From 7346aee26bf190a7e70333c40fab4caca847cd27 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:22:56 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1157634 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- noatun-plugins/ffrs/ffrs.cpp | 96 ++++++++++++++++++++++---------------------- noatun-plugins/ffrs/ffrs.h | 20 ++++----- 2 files changed, 58 insertions(+), 58 deletions(-) (limited to 'noatun-plugins/ffrs') diff --git a/noatun-plugins/ffrs/ffrs.cpp b/noatun-plugins/ffrs/ffrs.cpp index 5c4282a..38fd56e 100644 --- a/noatun-plugins/ffrs/ffrs.cpp +++ b/noatun-plugins/ffrs/ffrs.cpp @@ -3,12 +3,12 @@ #include #include -#include -#include +#include +#include #include #include -#include -#include +#include +#include #include @@ -21,8 +21,8 @@ extern "C" Plugin *create_plugin() } -View::View(int width, int height, int block, int unblock, QColor front, QColor back, int channel) - : QWidget(0,0, Qt::WStyle_Customize | Qt::WStyle_NoBorder | Qt::WStyle_StaysOnTop | Qt::WType_TopLevel), mChannel(channel) +View::View(int width, int height, int block, int unblock, TQColor front, TQColor back, int channel) + : TQWidget(0,0, Qt::WStyle_Customize | Qt::WStyle_NoBorder | Qt::WStyle_StaysOnTop | Qt::WType_TopLevel), mChannel(channel) { fg = front; bg = back; @@ -33,22 +33,22 @@ View::View(int width, int height, int block, int unblock, QColor front, QColor b KConfig *c = napp->config(); c->setGroup("FFRS"); - QSize size = napp->desktop()->size(); - QRect desktop(0,0, size.width(), size.height()); + TQSize size = napp->desktop()->size(); + TQRect desktop(0,0, size.width(), size.height()); - QPoint at; + TQPoint at; if (channel==0) { - at = QPoint(size.width()-width*4, size.height()-height-32); - QToolTip::add(this, i18n("Left")); + at = TQPoint(size.width()-width*4, size.height()-height-32); + TQToolTip::add(this, i18n("Left")); } else // if (channel==1) { - at = QPoint(size.width()-width*2, size.height()-height-32); - QToolTip::add(this, i18n("Right")); + at = TQPoint(size.width()-width*2, size.height()-height-32); + TQToolTip::add(this, i18n("Right")); } - move(c->readPointEntry("at"+QString::number(mChannel), &at)); + move(c->readPointEntry("at"+TQString::number(mChannel), &at)); // make sure we're on the desktop if ( @@ -60,8 +60,8 @@ View::View(int width, int height, int block, int unblock, QColor front, QColor b } - QBitmap mask(width, height); - QPainter p(&mask); + TQBitmap mask(width, height); + TQPainter p(&mask); // Qt::color0 = transparent // Qt::color1 = opaque @@ -82,24 +82,24 @@ View::~View() { KConfig *c = napp->config(); c->setGroup("FFRS"); - c->writeEntry("at"+QString::number(mChannel), pos()); + c->writeEntry("at"+TQString::number(mChannel), pos()); } -void View::mouseMoveEvent(QMouseEvent *) +void View::mouseMoveEvent(TQMouseEvent *) { if (moving) { - move ( QCursor::pos()-mMousePoint ); + move ( TQCursor::pos()-mMousePoint ); } } -void View::mousePressEvent(QMouseEvent *) +void View::mousePressEvent(TQMouseEvent *) { moving = true; - mMousePoint = mapFromGlobal(QCursor::pos()); + mMousePoint = mapFromGlobal(TQCursor::pos()); } -void View::mouseReleaseEvent(QMouseEvent *) +void View::mouseReleaseEvent(TQMouseEvent *) { moving = false; } @@ -123,19 +123,19 @@ void View::draw(float level) // and draw it (it updates too quickly for it to // need a paintEvent) - QPainter p(this); + TQPainter p(this); p.fillRect(0, 0, w, h-pix, bg); p.fillRect(0, h-pix, w, h - (h-pix), fg); } -FFRS::FFRS() : QObject(), Plugin() +FFRS::FFRS() : TQObject(), Plugin() { dpyleft = dpyright = 0; changed(); prefs = new FFRSPrefs(this); - connect(prefs, SIGNAL(changed()), SLOT(changed())); + connect(prefs, TQT_SIGNAL(changed()), TQT_SLOT(changed())); setSamples(256); @@ -180,53 +180,53 @@ void FFRS::changed() #include #include -#include -#include -#include +#include +#include +#include -FFRSPrefs::FFRSPrefs( QObject *parent ) +FFRSPrefs::FFRSPrefs( TQObject *parent ) : CModule(i18n("Foreign Region"), i18n("French Foreign Region"),"",parent) { - QVBoxLayout *layout = new QVBoxLayout(this); + TQVBoxLayout *layout = new TQVBoxLayout(this); - QHBox *box = new QHBox(this); + TQHBox *box = new TQHBox(this); layout->addWidget(box); - new QLabel(i18n("Width:"), box); + new TQLabel(i18n("Width:"), box); mWidth = new KIntNumInput(width(), box); mWidth->setMinValue(0); - box = new QHBox(this); + box = new TQHBox(this); layout->addWidget(box); - new QLabel(i18n("Height:"), box); + new TQLabel(i18n("Height:"), box); mHeight = new KIntNumInput(height(), box); mHeight->setMinValue(0); - box = new QHBox(this); + box = new TQHBox(this); layout->addWidget(box); - new QLabel(i18n("Visible block size:"), box); + new TQLabel(i18n("Visible block size:"), box); mFgblock = new KIntNumInput(fgblock(), box); mFgblock->setMinValue(0); - box = new QHBox(this); + box = new TQHBox(this); layout->addWidget(box); - new QLabel(i18n("Transparent block size:"), box); + new TQLabel(i18n("Transparent block size:"), box); mBgblock = new KIntNumInput(bgblock(), box); mBgblock->setMinValue(0); - box = new QHBox(this); + box = new TQHBox(this); layout->addWidget(box); - new QLabel(i18n("Update interval:"), box); + new TQLabel(i18n("Update interval:"), box); mRate = new KIntNumInput(rate(), box); mRate->setMinValue(0); - box = new QHBox(this); + box = new TQHBox(this); layout->addWidget(box); - new QLabel(i18n("Foreground color:"), box); + new TQLabel(i18n("Foreground color:"), box); mFgcolor = new KColorButton(fgcolor(), box); - box = new QHBox(this); + box = new TQHBox(this); layout->addWidget(box); - new QLabel(i18n("Background color:"), box); + new TQLabel(i18n("Background color:"), box); mBgcolor = new KColorButton(bgcolor(), box); layout->addStretch(); @@ -285,19 +285,19 @@ int FFRSPrefs::rate() } -QColor FFRSPrefs::bgcolor() +TQColor FFRSPrefs::bgcolor() { KConfig *c = napp->config(); c->setGroup("FFRS"); - QColor dumbass(0, 64, 0); + TQColor dumbass(0, 64, 0); return c->readColorEntry("bgcolor", &dumbass); } -QColor FFRSPrefs::fgcolor() +TQColor FFRSPrefs::fgcolor() { KConfig *c = napp->config(); c->setGroup("FFRS"); - QColor dumbass(0, 255, 0); + TQColor dumbass(0, 255, 0); return c->readColorEntry("fgcolor", &dumbass); } diff --git a/noatun-plugins/ffrs/ffrs.h b/noatun-plugins/ffrs/ffrs.h index b97c576..a29a1c2 100644 --- a/noatun-plugins/ffrs/ffrs.h +++ b/noatun-plugins/ffrs/ffrs.h @@ -9,26 +9,26 @@ class View : public QWidget { Q_OBJECT public: - View(int width, int height, int block, int unblock, QColor front, QColor back, int channel); + View(int width, int height, int block, int unblock, TQColor front, TQColor back, int channel); ~View(); void draw(float intensity); - virtual void mouseMoveEvent(QMouseEvent *e); - virtual void mousePressEvent(QMouseEvent *e); - virtual void mouseReleaseEvent(QMouseEvent *e); + virtual void mouseMoveEvent(TQMouseEvent *e); + virtual void mousePressEvent(TQMouseEvent *e); + virtual void mouseReleaseEvent(TQMouseEvent *e); private: int units; - QColor fg, bg; + TQColor fg, bg; bool moving; - QPoint mMousePoint; + TQPoint mMousePoint; int mChannel; }; class FFRSPrefs; -class FFRS : public QObject, public Plugin, public StereoScope +class FFRS : public TQObject, public Plugin, public StereoScope { Q_OBJECT @@ -55,7 +55,7 @@ class FFRSPrefs : public CModule Q_OBJECT public: - FFRSPrefs( QObject *parent ); + FFRSPrefs( TQObject *parent ); virtual void save(); int width(); @@ -64,8 +64,8 @@ public: int bgblock(); int rate(); - QColor bgcolor(); - QColor fgcolor(); + TQColor bgcolor(); + TQColor fgcolor(); signals: void changed(); -- cgit v1.2.1