summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/TextFloat.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-02 22:38:52 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-02 22:38:52 +0000
commit458efa7b0c935cbaafa2791021a5f8f7241aa876 (patch)
tree624583f2873febe23770bee3fa94b5c24bd59f4f /src/gui/widgets/TextFloat.cpp
parent747037b72944ae2c02962b7c5c96e0a7f8852e38 (diff)
downloadrosegarden-458efa7b0c935cbaafa2791021a5f8f7241aa876.tar.gz
rosegarden-458efa7b0c935cbaafa2791021a5f8f7241aa876.zip
Initial TQt4 port of Rosegarden
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1230242 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/widgets/TextFloat.cpp')
-rw-r--r--src/gui/widgets/TextFloat.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/gui/widgets/TextFloat.cpp b/src/gui/widgets/TextFloat.cpp
index b1f5cfd..a62f3a1 100644
--- a/src/gui/widgets/TextFloat.cpp
+++ b/src/gui/widgets/TextFloat.cpp
@@ -39,12 +39,12 @@
namespace Rosegarden
{
-TextFloat::TextFloat(TQWidget *parent):
- TQWidget(parent, "TextFloat",
+TextFloat::TextFloat(TQWidget *tqparent):
+ TQWidget(tqparent, "TextFloat",
WStyle_Customize | WStyle_NoBorder | WStyle_StaysOnTop),
m_text("")
{
- reparent(parentWidget());
+ reparent(tqparentWidget());
resize(20, 20);
}
@@ -55,15 +55,15 @@ TextFloat::reparent(TQWidget *newParent)
// Get position and reparent to either top level or dialog
//
- while (newParent->parentWidget() && !newParent->isTopLevel()
+ while (newParent->tqparentWidget() && !newParent->isTopLevel()
&& !newParent->isDialog()) {
- newParent = newParent->parentWidget();
+ newParent = newParent->tqparentWidget();
position += newParent->pos();
}
- // Position this widget to the right of the parent
+ // Position this widget to the right of the tqparent
//
- //move(pos + TQPoint(parent->width() + 5, 5));
+ //move(pos + TQPoint(tqparent->width() + 5, 5));
TQWidget::reparent(newParent,
WStyle_Customize | WStyle_NoBorder | WStyle_StaysOnTop,
@@ -85,11 +85,11 @@ TextFloat::paintEvent(TQPaintEvent *e)
TQFontMetrics metrics(paint.fontMetrics());
- TQRect r = metrics.boundingRect(0, 0, 400, 400, Qt::AlignAuto, m_text);
+ TQRect r = metrics.boundingRect(0, 0, 400, 400, TQt::AlignAuto, m_text);
resize(r.width() + 7, r.height() + 7);
paint.drawRect(0, 0, r.width() + 6, r.height() + 6);
- paint.setPen(Qt::black);
- paint.drawText(TQRect(3, 3, r.width(), r.height()), Qt::AlignAuto, m_text);
+ paint.setPen(TQt::black);
+ paint.drawText(TQRect(3, 3, r.width(), r.height()), TQt::AlignAuto, m_text);
/*
TQRect textBound = metrics.boundingRect(m_text);
@@ -97,7 +97,7 @@ TextFloat::paintEvent(TQPaintEvent *e)
resize(textBound.width() + 7, textBound.height() + 7);
paint.drawRect(0, 0, textBound.width() + 6, textBound.height() + 6);
- paint.setPen(Qt::black);
+ paint.setPen(TQt::black);
paint.drawText(3, textBound.height() + 3, m_text);
*/
}
@@ -106,7 +106,7 @@ void
TextFloat::setText(const TQString &text)
{
m_text = text;
- repaint();
+ tqrepaint();
}
}