diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-06 20:59:29 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-06 20:59:29 +0000 |
commit | 11f31c37e5fa4889d9989f10272f44845449cb7b (patch) | |
tree | 4383da04a76c497950d957fc6120b0fd0d9082c2 /src/gui/widgets/TextFloat.cpp | |
parent | 832eb69d571e8e518db45d0c0e6fbc0f00690209 (diff) | |
download | rosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.tar.gz rosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.zip |
Initial TQt conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1172292 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/widgets/TextFloat.cpp')
-rw-r--r-- | src/gui/widgets/TextFloat.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/gui/widgets/TextFloat.cpp b/src/gui/widgets/TextFloat.cpp index 5e3ddbc..b1f5cfd 100644 --- a/src/gui/widgets/TextFloat.cpp +++ b/src/gui/widgets/TextFloat.cpp @@ -27,20 +27,20 @@ #include <kapplication.h> #include "gui/general/GUIPalette.h" -#include <qfontmetrics.h> -#include <qpainter.h> -#include <qpalette.h> -#include <qpoint.h> -#include <qrect.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqfontmetrics.h> +#include <tqpainter.h> +#include <tqpalette.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden { -TextFloat::TextFloat(QWidget *parent): - QWidget(parent, "TextFloat", +TextFloat::TextFloat(TQWidget *parent): + TQWidget(parent, "TextFloat", WStyle_Customize | WStyle_NoBorder | WStyle_StaysOnTop), m_text("") { @@ -49,9 +49,9 @@ TextFloat::TextFloat(QWidget *parent): } void -TextFloat::reparent(QWidget *newParent) +TextFloat::reparent(TQWidget *newParent) { - QPoint position = newParent->pos(); + TQPoint position = newParent->pos(); // Get position and reparent to either top level or dialog // @@ -63,36 +63,36 @@ TextFloat::reparent(QWidget *newParent) // Position this widget to the right of the parent // - //move(pos + QPoint(parent->width() + 5, 5)); + //move(pos + TQPoint(parent->width() + 5, 5)); - QWidget::reparent(newParent, + TQWidget::reparent(newParent, WStyle_Customize | WStyle_NoBorder | WStyle_StaysOnTop, - position + QPoint(20, 5)); + position + TQPoint(20, 5)); } void -TextFloat::paintEvent(QPaintEvent *e) +TextFloat::paintEvent(TQPaintEvent *e) { - QPainter paint(this); + TQPainter paint(this); paint.setClipRegion(e->region()); paint.setClipRect(e->rect().normalize()); - paint.setPen(kapp->palette().color(QPalette::Active, QColorGroup::Dark)); + paint.setPen(kapp->palette().color(TQPalette::Active, TQColorGroup::Dark)); paint.setPen(GUIPalette::getColour(GUIPalette::RotaryFloatForeground)); paint.setBrush(GUIPalette::getColour(GUIPalette::RotaryFloatBackground)); - QFontMetrics metrics(paint.fontMetrics()); + TQFontMetrics metrics(paint.fontMetrics()); - QRect r = metrics.boundingRect(0, 0, 400, 400, Qt::AlignAuto, m_text); + TQRect r = metrics.boundingRect(0, 0, 400, 400, Qt::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(QRect(3, 3, r.width(), r.height()), Qt::AlignAuto, m_text); + paint.drawText(TQRect(3, 3, r.width(), r.height()), Qt::AlignAuto, m_text); /* - QRect textBound = metrics.boundingRect(m_text); + TQRect textBound = metrics.boundingRect(m_text); resize(textBound.width() + 7, textBound.height() + 7); paint.drawRect(0, 0, textBound.width() + 6, textBound.height() + 6); @@ -103,7 +103,7 @@ TextFloat::paintEvent(QPaintEvent *e) } void -TextFloat::setText(const QString &text) +TextFloat::setText(const TQString &text) { m_text = text; repaint(); |