summaryrefslogtreecommitdiffstats
path: root/kcontrol/arts/krichtextlabel.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
commitc663b6440964f6ac48027143ac9e63298991f9d0 (patch)
tree6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /kcontrol/arts/krichtextlabel.cpp
parenta061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff)
downloadtdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz
tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcontrol/arts/krichtextlabel.cpp')
-rw-r--r--kcontrol/arts/krichtextlabel.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/kcontrol/arts/krichtextlabel.cpp b/kcontrol/arts/krichtextlabel.cpp
index 7e292cde1..5c7618a1b 100644
--- a/kcontrol/arts/krichtextlabel.cpp
+++ b/kcontrol/arts/krichtextlabel.cpp
@@ -18,35 +18,35 @@
#include "krichtextlabel.h"
-#include <qtooltip.h>
-#include <qstylesheet.h>
-#include <qsimplerichtext.h>
+#include <tqtooltip.h>
+#include <tqstylesheet.h>
+#include <tqsimplerichtext.h>
#include <kglobalsettings.h>
-static QString qrichtextify( const QString& text )
+static TQString qrichtextify( const TQString& text )
{
if ( text.isEmpty() || text[0] == '<' )
return text;
- QStringList lines = QStringList::split('\n', text);
- for(QStringList::Iterator it = lines.begin(); it != lines.end(); ++it)
+ TQStringList lines = TQStringList::split('\n', text);
+ for(TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it)
{
- *it = QStyleSheet::convertFromPlainText( *it, QStyleSheetItem::WhiteSpaceNormal );
+ *it = TQStyleSheet::convertFromPlainText( *it, TQStyleSheetItem::WhiteSpaceNormal );
}
- return lines.join(QString::null);
+ return lines.join(TQString::null);
}
-KRichTextLabel::KRichTextLabel( const QString &text , QWidget *parent, const char *name )
- : QLabel ( parent, name ) {
+KRichTextLabel::KRichTextLabel( const TQString &text , TQWidget *parent, const char *name )
+ : TQLabel ( parent, name ) {
m_defaultWidth = QMIN(500, KGlobalSettings::desktopGeometry(this).width()*3/5);
setAlignment( Qt::WordBreak );
setText(text);
}
-KRichTextLabel::KRichTextLabel( QWidget *parent, const char *name )
- : QLabel ( parent, name ) {
+KRichTextLabel::KRichTextLabel( TQWidget *parent, const char *name )
+ : TQLabel ( parent, name ) {
m_defaultWidth = QMIN(500, KGlobalSettings::desktopGeometry(this).width()*3/5);
setAlignment( Qt::WordBreak );
}
@@ -57,17 +57,17 @@ void KRichTextLabel::setDefaultWidth(int defaultWidth)
updateGeometry();
}
-QSizePolicy KRichTextLabel::sizePolicy() const
+TQSizePolicy KRichTextLabel::sizePolicy() const
{
- return QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum, false);
+ return TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Minimum, false);
}
-QSize KRichTextLabel::minimumSizeHint() const
+TQSize KRichTextLabel::minimumSizeHint() const
{
- QString qt_text = qrichtextify( text() );
+ TQString qt_text = qrichtextify( text() );
int pref_width = 0;
int pref_height = 0;
- QSimpleRichText rt(qt_text, font());
+ TQSimpleRichText rt(qt_text, font());
pref_width = m_defaultWidth;
rt.setWidth(pref_width);
int used_width = rt.widthUsed();
@@ -94,19 +94,19 @@ QSize KRichTextLabel::minimumSizeHint() const
pref_width = used_width;
}
- return QSize(pref_width, rt.height());
+ return TQSize(pref_width, rt.height());
}
-QSize KRichTextLabel::sizeHint() const
+TQSize KRichTextLabel::sizeHint() const
{
return minimumSizeHint();
}
-void KRichTextLabel::setText( const QString &text ) {
+void KRichTextLabel::setText( const TQString &text ) {
if (!text.startsWith("<qt>"))
- QLabel::setText("<qt>"+text+"</qt>");
+ TQLabel::setText("<qt>"+text+"</qt>");
else
- QLabel::setText(text);
+ TQLabel::setText(text);
}
void KRichTextLabel::virtual_hook( int, void* )