From 458efa7b0c935cbaafa2791021a5f8f7241aa876 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 2 May 2011 22:38:52 +0000 Subject: 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 --- src/gui/widgets/TextFloat.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/gui/widgets/TextFloat.cpp') 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(); } } -- cgit v1.2.1