summaryrefslogtreecommitdiffstats
path: root/src/app/truncatedtextlabel.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-26 21:04:57 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-26 21:04:57 +0000
commitbf7f88413be3831a9372d323d02fc0335b9f9188 (patch)
tree516fdef9206245b40a14f99b4e3d9ef9289196e0 /src/app/truncatedtextlabel.h
parente238aa77b1fb3c2f55aef2ef2c91ce52166d2cc8 (diff)
downloadgwenview-bf7f88413be3831a9372d323d02fc0335b9f9188.tar.gz
gwenview-bf7f88413be3831a9372d323d02fc0335b9f9188.zip
TQt4 port Gwenview
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/gwenview@1233720 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/app/truncatedtextlabel.h')
-rw-r--r--src/app/truncatedtextlabel.h36
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();
}
}
};