diff options
Diffstat (limited to 'src/app/truncatedtextlabel.h')
-rw-r--r-- | src/app/truncatedtextlabel.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/app/truncatedtextlabel.h b/src/app/truncatedtextlabel.h index 183752f..d9c1b88 100644 --- a/src/app/truncatedtextlabel.h +++ b/src/app/truncatedtextlabel.h @@ -21,9 +21,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef TRUNCATEDTEXTLABEL_H #define TRUNCATEDTEXTLABEL_H -// Qt -#include <qlabel.h> -#include <qtooltip.h> +// TQt +#include <tqlabel.h> +#include <tqtooltip.h> // KDE #include <kwordwrap.h> @@ -34,42 +34,42 @@ namespace Gwenview { * A label which truncates it's text if it's too long, drawing it using * KWordWrap::drawFadeoutText() */ -class TruncatedTextLabel : public QLabel { +class TruncatedTextLabel : public TQLabel { public: - TruncatedTextLabel(QWidget* parent) - : QLabel(parent) {} + TruncatedTextLabel(TQWidget* tqparent) + : TQLabel(tqparent) {} - QSize minimumSizeHint() const { - QSize size=QLabel::minimumSizeHint(); + TQSize tqminimumSizeHint() const { + TQSize size=TQLabel::tqminimumSizeHint(); size.setWidth(-1); return size; } - QSize sizeHint() const { - return QSize(contentsRect().width(), QLabel::sizeHint().height()); + TQSize tqsizeHint() const { + return TQSize(contentsRect().width(), TQLabel::tqsizeHint().height()); } - void setText(const QString& text) { - QLabel::setText(text); + void setText(const TQString& text) { + TQLabel::setText(text); updateToolTip(); } protected: - void drawContents(QPainter* painter) { + void drawContents(TQPainter* painter) { KWordWrap::drawFadeoutText(painter, 0, fontMetrics().ascent(), width(), text()); } - void resizeEvent(QResizeEvent*) { + void resizeEvent(TQResizeEvent*) { updateToolTip(); } void updateToolTip() { - QString txt=text(); - QToolTip::remove(this); + TQString txt=text(); + TQToolTip::remove(this); if ( width() < fontMetrics().width(txt) ) { - QToolTip::add(this, txt); + TQToolTip::add(this, txt); } else { - QToolTip::hide(); + TQToolTip::hide(); } } }; |