summaryrefslogtreecommitdiffstats
path: root/noatun-plugins/ffrs
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 17:00:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 17:00:31 +0000
commit395a904bff7b4d6ead445c342f7ac0c5fbf29121 (patch)
tree9829cadb79d2cc7c29a940627fadb28b11e54150 /noatun-plugins/ffrs
parent399f47c376fdf4d19192732a701ea9578d11619d (diff)
downloadtdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.tar.gz
tdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.zip
TQt4 port kdeaddons
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1237404 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'noatun-plugins/ffrs')
-rw-r--r--noatun-plugins/ffrs/Makefile.am2
-rw-r--r--noatun-plugins/ffrs/ffrs.cpp42
-rw-r--r--noatun-plugins/ffrs/ffrs.h7
3 files changed, 27 insertions, 24 deletions
diff --git a/noatun-plugins/ffrs/Makefile.am b/noatun-plugins/ffrs/Makefile.am
index 96eae2d..1ecfd53 100644
--- a/noatun-plugins/ffrs/Makefile.am
+++ b/noatun-plugins/ffrs/Makefile.am
@@ -1,4 +1,4 @@
-INCLUDES= -I$(kde_includes)/arts $(all_includes)
+INCLUDES= -I$(kde_includes)/arts $(all_includes) -I$(kde_includes)/kde
kde_module_LTLIBRARIES = noatun_ffrs.la
noatun_ffrs_la_SOURCES = ffrs.cpp
diff --git a/noatun-plugins/ffrs/ffrs.cpp b/noatun-plugins/ffrs/ffrs.cpp
index 38fd56e..73f2685 100644
--- a/noatun-plugins/ffrs/ffrs.cpp
+++ b/noatun-plugins/ffrs/ffrs.cpp
@@ -22,7 +22,7 @@ extern "C" Plugin *create_plugin()
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)
+ : TQWidget(0,0, TQt::WStyle_Customize | TQt::WStyle_NoBorder | TQt::WStyle_StaysOnTop | TQt::WType_TopLevel), mChannel(channel)
{
fg = front;
bg = back;
@@ -52,26 +52,26 @@ View::View(int width, int height, int block, int unblock, TQColor front, TQColor
// make sure we're on the desktop
if (
- !desktop.contains(rect().topLeft())
- || !desktop.contains(rect().bottomRight())
+ !desktop.tqcontains(rect().topLeft())
+ || !desktop.tqcontains(rect().bottomRight())
)
{
move(at);
}
- TQBitmap mask(width, height);
- TQPainter p(&mask);
+ TQBitmap tqmask(width, height);
+ TQPainter p(&tqmask);
-// Qt::color0 = transparent
-// Qt::color1 = opaque
- p.fillRect(0, 0, width, height, Qt::color0);
+// TQt::color0 = transparent
+// TQt::color1 = opaque
+ p.fillRect(0, 0, width, height, TQt::color0);
for (int i=0; i < height; )
{
- p.fillRect(0, height-i-block, width, block, Qt::color1);
+ p.fillRect(0, height-i-block, width, block, TQt::color1);
i += block + unblock;
}
- setMask(mask);
+ setMask(tqmask);
units = block+unblock;
show();
@@ -184,52 +184,52 @@ void FFRS::changed()
#include <tqhbox.h>
#include <tqlabel.h>
-FFRSPrefs::FFRSPrefs( TQObject *parent )
- : CModule(i18n("Foreign Region"), i18n("French Foreign Region"),"",parent)
+FFRSPrefs::FFRSPrefs( TQObject *tqparent )
+ : CModule(i18n("Foreign Region"), i18n("French Foreign Region"),"",tqparent)
{
- TQVBoxLayout *layout = new TQVBoxLayout(this);
+ TQVBoxLayout *tqlayout = new TQVBoxLayout(this);
TQHBox *box = new TQHBox(this);
- layout->addWidget(box);
+ tqlayout->addWidget(box);
new TQLabel(i18n("Width:"), box);
mWidth = new KIntNumInput(width(), box);
mWidth->setMinValue(0);
box = new TQHBox(this);
- layout->addWidget(box);
+ tqlayout->addWidget(box);
new TQLabel(i18n("Height:"), box);
mHeight = new KIntNumInput(height(), box);
mHeight->setMinValue(0);
box = new TQHBox(this);
- layout->addWidget(box);
+ tqlayout->addWidget(box);
new TQLabel(i18n("Visible block size:"), box);
mFgblock = new KIntNumInput(fgblock(), box);
mFgblock->setMinValue(0);
box = new TQHBox(this);
- layout->addWidget(box);
+ tqlayout->addWidget(box);
new TQLabel(i18n("Transparent block size:"), box);
mBgblock = new KIntNumInput(bgblock(), box);
mBgblock->setMinValue(0);
box = new TQHBox(this);
- layout->addWidget(box);
+ tqlayout->addWidget(box);
new TQLabel(i18n("Update interval:"), box);
mRate = new KIntNumInput(rate(), box);
mRate->setMinValue(0);
box = new TQHBox(this);
- layout->addWidget(box);
+ tqlayout->addWidget(box);
new TQLabel(i18n("Foreground color:"), box);
mFgcolor = new KColorButton(fgcolor(), box);
box = new TQHBox(this);
- layout->addWidget(box);
+ tqlayout->addWidget(box);
new TQLabel(i18n("Background color:"), box);
mBgcolor = new KColorButton(bgcolor(), box);
- layout->addStretch();
+ tqlayout->addStretch();
}
void FFRSPrefs::save()
diff --git a/noatun-plugins/ffrs/ffrs.h b/noatun-plugins/ffrs/ffrs.h
index a29a1c2..c19e86c 100644
--- a/noatun-plugins/ffrs/ffrs.h
+++ b/noatun-plugins/ffrs/ffrs.h
@@ -5,9 +5,10 @@
#include <noatun/plugin.h>
-class View : public QWidget
+class View : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
View(int width, int height, int block, int unblock, TQColor front, TQColor back, int channel);
~View();
@@ -31,6 +32,7 @@ class FFRSPrefs;
class FFRS : public TQObject, public Plugin, public StereoScope
{
Q_OBJECT
+ TQ_OBJECT
public:
FFRS();
@@ -53,9 +55,10 @@ class KColorButton;
class FFRSPrefs : public CModule
{
Q_OBJECT
+ TQ_OBJECT
public:
- FFRSPrefs( TQObject *parent );
+ FFRSPrefs( TQObject *tqparent );
virtual void save();
int width();