summaryrefslogtreecommitdiffstats
path: root/noatun-plugins/ffrs/ffrs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'noatun-plugins/ffrs/ffrs.cpp')
-rw-r--r--noatun-plugins/ffrs/ffrs.cpp96
1 files changed, 48 insertions, 48 deletions
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 <noatun/app.h>
#include <math.h>
-#include <qpainter.h>
-#include <qbitmap.h>
+#include <tqpainter.h>
+#include <tqbitmap.h>
#include <klocale.h>
#include <kconfig.h>
-#include <qcursor.h>
-#include <qtooltip.h>
+#include <tqcursor.h>
+#include <tqtooltip.h>
#include <kwin.h>
@@ -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 <knuminput.h>
#include <kcolorbutton.h>
-#include <qlayout.h>
-#include <qhbox.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
-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);
}