diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /libkdepim/krsqueezedtextlabel.cpp | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkdepim/krsqueezedtextlabel.cpp')
-rw-r--r-- | libkdepim/krsqueezedtextlabel.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/libkdepim/krsqueezedtextlabel.cpp b/libkdepim/krsqueezedtextlabel.cpp index 00389a2a0..c61a706b2 100644 --- a/libkdepim/krsqueezedtextlabel.cpp +++ b/libkdepim/krsqueezedtextlabel.cpp @@ -20,57 +20,57 @@ #include "krsqueezedtextlabel.h" #include "kstringhandler.h" -#include <qtooltip.h> +#include <tqtooltip.h> -KRSqueezedTextLabel::KRSqueezedTextLabel( const QString &text , QWidget *parent, const char *name ) - : QLabel ( parent, name ) { - setSizePolicy(QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed )); +KRSqueezedTextLabel::KRSqueezedTextLabel( const TQString &text , TQWidget *parent, const char *name ) + : TQLabel ( parent, name ) { + setSizePolicy(TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed )); fullText = text; squeezeTextToLabel(); } -KRSqueezedTextLabel::KRSqueezedTextLabel( QWidget *parent, const char *name ) - : QLabel ( parent, name ) { - setSizePolicy(QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed )); +KRSqueezedTextLabel::KRSqueezedTextLabel( TQWidget *parent, const char *name ) + : TQLabel ( parent, name ) { + setSizePolicy(TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed )); } -void KRSqueezedTextLabel::resizeEvent( QResizeEvent * ) { +void KRSqueezedTextLabel::resizeEvent( TQResizeEvent * ) { squeezeTextToLabel(); } -QSize KRSqueezedTextLabel::minimumSizeHint() const +TQSize KRSqueezedTextLabel::minimumSizeHint() const { - QSize sh = QLabel::minimumSizeHint(); + TQSize sh = TQLabel::minimumSizeHint(); sh.setWidth(-1); return sh; } -QSize KRSqueezedTextLabel::sizeHint() const +TQSize KRSqueezedTextLabel::sizeHint() const { - return QSize(contentsRect().width(), QLabel::sizeHint().height()); + return TQSize(contentsRect().width(), TQLabel::sizeHint().height()); } -void KRSqueezedTextLabel::setText( const QString &text ) { +void KRSqueezedTextLabel::setText( const TQString &text ) { fullText = text; squeezeTextToLabel(); } void KRSqueezedTextLabel::squeezeTextToLabel() { - QFontMetrics fm(fontMetrics()); + TQFontMetrics fm(fontMetrics()); int labelWidth = size().width(); int textWidth = fm.width(fullText); if (textWidth > labelWidth) { - QString squeezedText = KStringHandler::rPixelSqueeze(fullText, fm, labelWidth); - QLabel::setText(squeezedText); + TQString squeezedText = KStringHandler::rPixelSqueeze(fullText, fm, labelWidth); + TQLabel::setText(squeezedText); - QToolTip::remove( this ); - QToolTip::add( this, fullText ); + TQToolTip::remove( this ); + TQToolTip::add( this, fullText ); } else { - QLabel::setText(fullText); + TQLabel::setText(fullText); - QToolTip::remove( this ); - QToolTip::hide(); + TQToolTip::remove( this ); + TQToolTip::hide(); } } @@ -78,8 +78,8 @@ void KRSqueezedTextLabel::squeezeTextToLabel() { void KRSqueezedTextLabel::setAlignment( int alignment ) { // save fullText and restore it - QString tmpFull(fullText); - QLabel::setAlignment(alignment); + TQString tmpFull(fullText); + TQLabel::setAlignment(alignment); fullText = tmpFull; } |