summaryrefslogtreecommitdiffstats
path: root/libkdepim/krsqueezedtextlabel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkdepim/krsqueezedtextlabel.cpp')
-rw-r--r--libkdepim/krsqueezedtextlabel.cpp46
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;
}