summaryrefslogtreecommitdiffstats
path: root/noatun/modules/systray
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 06:00:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 06:00:15 +0000
commitb1057f437bf65300831a0ccb45b920787c6b318d (patch)
treef8a73db06ca1180d0da0ba6dfbe786197b4f4bc3 /noatun/modules/systray
parent4ddfca384ced9ad654213aef9dc2c3973720b980 (diff)
downloadtdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.tar.gz
tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.zip
TQt4 port kdemultimedia
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1236079 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'noatun/modules/systray')
-rw-r--r--noatun/modules/systray/cmodule.h1
-rw-r--r--noatun/modules/systray/kitsystemtray.cpp20
-rw-r--r--noatun/modules/systray/kitsystemtray.h3
-rw-r--r--noatun/modules/systray/systray.cpp58
-rw-r--r--noatun/modules/systray/systray.h5
-rw-r--r--noatun/modules/systray/yhconfigwidget.ui64
6 files changed, 77 insertions, 74 deletions
diff --git a/noatun/modules/systray/cmodule.h b/noatun/modules/systray/cmodule.h
index fd9cae2c..ddf52ada 100644
--- a/noatun/modules/systray/cmodule.h
+++ b/noatun/modules/systray/cmodule.h
@@ -34,6 +34,7 @@ class YHConfigWidget;
class YHModule : public CModule
{
Q_OBJECT
+ TQ_OBJECT
public:
YHModule(TQObject *_parent);
virtual void save();
diff --git a/noatun/modules/systray/kitsystemtray.cpp b/noatun/modules/systray/kitsystemtray.cpp
index 8e42a3ed..61c0f035 100644
--- a/noatun/modules/systray/kitsystemtray.cpp
+++ b/noatun/modules/systray/kitsystemtray.cpp
@@ -44,12 +44,12 @@
#include <fixx11h.h>
-KitSystemTray::KitSystemTray(const TQString &contextMenu, KMainWindow *parent, const char *name)
- : KSystemTray(parent, name)
+KitSystemTray::KitSystemTray(const TQString &contextMenu, KMainWindow *tqparent, const char *name)
+ : KSystemTray(tqparent, name)
{
- setAlignment(AlignHCenter | AlignVCenter);
- menu = (KPopupMenu *)parent->guiFactory()->container(contextMenu, parent);
- menu->insertTitle(SmallIcon("noatun"), TQString::null, 0, 0);
+ tqsetAlignment(AlignHCenter | AlignVCenter);
+ menu = (KPopupMenu *)tqparent->guiFactory()->container(contextMenu, tqparent);
+ menu->insertTitle(SmallIcon("noatun"), TQString(), 0, 0);
setAcceptDrops(true);
}
@@ -67,10 +67,10 @@ void KitSystemTray::mousePressEvent(TQMouseEvent *event)
{
switch(event->button())
{
- case LeftButton:
+ case Qt::LeftButton:
napp->toggleInterfaces();
break;
- case MidButton:
+ case Qt::MidButton:
if (YHConfig::self()->middleMouseAction() == YHConfig::HideShowPlaylist)
napp->playlist()->toggleList();
else // play or pause
@@ -103,11 +103,11 @@ void KitSystemTray::wheelEvent(TQWheelEvent *event)
YHConfig *c = YHConfig::self();
int action = 0;
- if (event->state() & Qt::ShiftButton)
+ if (event->state() & TQt::ShiftButton)
action = c->mouseWheelAction(YHConfig::Shift);
- else if (event->state() & Qt::ControlButton)
+ else if (event->state() & TQt::ControlButton)
action = c->mouseWheelAction(YHConfig::Ctrl);
- else if (event->state() & Qt::AltButton)
+ else if (event->state() & TQt::AltButton)
action = c->mouseWheelAction(YHConfig::Alt);
else
action = c->mouseWheelAction(YHConfig::None);
diff --git a/noatun/modules/systray/kitsystemtray.h b/noatun/modules/systray/kitsystemtray.h
index 6d5a2908..d933a19e 100644
--- a/noatun/modules/systray/kitsystemtray.h
+++ b/noatun/modules/systray/kitsystemtray.h
@@ -37,9 +37,10 @@ class TQPixmap;
class KitSystemTray : public KSystemTray
{
Q_OBJECT
+ TQ_OBJECT
public:
- KitSystemTray(const TQString &contextMenu, KMainWindow *parent, const char *name = 0);
+ KitSystemTray(const TQString &contextMenu, KMainWindow *tqparent, const char *name = 0);
void changeTitle(const TQPixmap &, const TQString &);
protected:
virtual void showEvent(TQShowEvent *);
diff --git a/noatun/modules/systray/systray.cpp b/noatun/modules/systray/systray.cpp
index 2493bdbc..57ce2105 100644
--- a/noatun/modules/systray/systray.cpp
+++ b/noatun/modules/systray/systray.cpp
@@ -72,7 +72,7 @@ const int COVER_MAXH = 128;
class PassivePopup : public KPassivePopup
{
public:
- PassivePopup(TQWidget *parent = 0, const char *name = 0) : KPassivePopup(parent, name) {}
+ PassivePopup(TQWidget *tqparent = 0, const char *name = 0) : KPassivePopup(tqparent, name) {}
protected:
virtual void enterEvent(TQEvent *)
@@ -91,7 +91,7 @@ protected:
NoatunSystray::NoatunSystray() : KMainWindow(0, "NoatunSystray"), Plugin(),
- mTray(0), trayStatus(0), trayBase(0), mPassivePopup(0L)
+ mTray(0), traytqStatus(0), trayBase(0), mPassivePopup(0L)
{
//self = this;
hide();
@@ -100,9 +100,9 @@ NoatunSystray::NoatunSystray() : KMainWindow(0, "NoatunSystray"), Plugin(),
removeCover(); // make sure any old temp cover is gone
- KStdAction::quit(napp, TQT_SLOT(quit()), actionCollection());
- KStdAction::open(napp, TQT_SLOT(fileOpen()), actionCollection());
- KStdAction::preferences(napp, TQT_SLOT(preferences()), actionCollection());
+ KStdAction::quit(TQT_TQOBJECT(napp), TQT_SLOT(quit()), actionCollection());
+ KStdAction::open(TQT_TQOBJECT(napp), TQT_SLOT(fileOpen()), actionCollection());
+ KStdAction::preferences(TQT_TQOBJECT(napp), TQT_SLOT(preferences()), actionCollection());
NoatunStdAction::back(actionCollection(), "back");
NoatunStdAction::stop(actionCollection(), "stop");
NoatunStdAction::playpause(actionCollection(), "play");
@@ -117,11 +117,11 @@ NoatunSystray::NoatunSystray() : KMainWindow(0, "NoatunSystray"), Plugin(),
mTray = new KitSystemTray("tray", this);
mTray->show();
- trayBase = renderIcon(BASEICON, TQString::null);
- trayStatus = renderIcon(BASEICON, "player_stop");
+ trayBase = renderIcon(BASEICON, TQString());
+ traytqStatus = renderIcon(BASEICON, "player_stop");
mTray->changeTitle(*trayBase, i18n("Noatun"));
- showingTrayStatus = false;
+ showingTraytqStatus = false;
mBlinkTimer = new TQTimer(this);
connect(mBlinkTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotBlinkTimer()));
@@ -138,14 +138,14 @@ NoatunSystray::~NoatunSystray()
//kdDebug(66666) << k_funcinfo << "Called." << endl;
removeCover();
delete trayBase;
- delete trayStatus;
+ delete traytqStatus;
napp->showInterfaces();
}
void NoatunSystray::init()
{
- YHModule *cmod = new YHModule(this);
+ YHModule *cmod = new YHModule(TQT_TQOBJECT(this));
connect(cmod, TQT_SIGNAL(saved()), this, TQT_SLOT(slotLoadSettings()));
slotLoadSettings();
}
@@ -213,21 +213,21 @@ void NoatunSystray::slotPlayPause()
if(!item.isProperty("title"))
{
// No metadata
- s = TQString("<nobr>%1</nobr>").arg(item.title());
+ s = TQString("<nobr>%1</nobr>").tqarg(item.title());
}
else
{
- s = TQString("<h2><nobr>%1</nobr></h2>").arg(item.property("title"));
+ s = TQString("<h2><nobr>%1</nobr></h2>").tqarg(item.property("title"));
if(item.isProperty("author"))
- s += TQString("<nobr>%1</nobr><br>").arg(item.property("author"));
+ s += TQString("<nobr>%1</nobr><br>").tqarg(item.property("author"));
if(item.isProperty("album"))
{
if(item.isProperty("date"))
- s += TQString("<nobr>%1 (%2)</nobr><br>").arg(item.property("album")).arg(item.property("date"));
+ s += TQString("<nobr>%1 (%2)</nobr><br>").tqarg(item.property("album")).tqarg(item.property("date"));
else
- s += TQString("<nobr>%1</nobr><br>").arg(item.property("album"));
+ s += TQString("<nobr>%1</nobr><br>").tqarg(item.property("album"));
}
}
@@ -242,11 +242,11 @@ void NoatunSystray::slotPlayPause()
setTipText(TQString("<qt><br><table cellspacing=0 cellpadding=0><tr>" \
"<td align=center valign=center><h4><nobr>%1</nobr></h4>%2</td>" \
"<td valign=center><img src='%3'></td>" \
- "</qt></tr></table>").arg(status).arg(s).arg(tmpCoverPath));
+ "</qt></tr></table>").tqarg(status).tqarg(s).tqarg(tmpCoverPath));
}
else
{
- setTipText(TQString("<qt><center><h4><nobr>%1</nobr></h4>%2</center></qt>").arg(status).arg(s));
+ setTipText(TQString("<qt><center><h4><nobr>%1</nobr></h4>%2</center></qt>").tqarg(status).tqarg(s));
}
}
@@ -256,16 +256,16 @@ void NoatunSystray::slotStopped()
if(!napp->player()->current())
return;
changeTray("player_stop");
- setTipText(TQString("<qt><nobr><h4>%1</h4></nobr></qt>").arg(i18n("Noatun - Stopped")));
+ setTipText(TQString("<qt><nobr><h4>%1</h4></nobr></qt>").tqarg(i18n("Noatun - Stopped")));
}
void NoatunSystray::changeTray(const TQString &pm)
{
- delete trayStatus;
- trayStatus = renderIcon(BASEICON, pm);
- if(showingTrayStatus)
+ delete traytqStatus;
+ traytqStatus = renderIcon(BASEICON, pm);
+ if(showingTraytqStatus)
slotBlinkTimer();
}
@@ -275,18 +275,18 @@ void NoatunSystray::slotBlinkTimer()
switch(YHConfig::self()->stateIconDisplay())
{
case (YHConfig::FlashingIcon):
- showingTrayStatus ^= true;
+ showingTraytqStatus ^= true;
break;
case (YHConfig::StaticIcon):
- showingTrayStatus = true;
+ showingTraytqStatus = true;
break;
case (YHConfig::NoIcon):
- showingTrayStatus = false;
+ showingTraytqStatus = false;
break;
}
- if(showingTrayStatus)
- mTray->setPixmap(*trayStatus);
+ if(showingTraytqStatus)
+ mTray->setPixmap(*traytqStatus);
else
mTray->setPixmap(*trayBase);
}
@@ -334,7 +334,7 @@ void NoatunSystray::updateCover()
if(src.load(cover))
{
if(src.width() >= COVER_MAXW || src.height() >= COVER_MAXH)
- tmpimg = src.scale(COVER_MAXW, COVER_MAXH, TQImage::ScaleMin);
+ tmpimg = src.scale(COVER_MAXW, COVER_MAXH, TQ_ScaleMin);
else
tmpimg = src;
@@ -383,7 +383,7 @@ void NoatunSystray::showPassivePopup()
if (YHConfig::self()->passivePopupButtons() && !napp->player()->isStopped())
{
- TQVBox *widget = mPassivePopup->standardView(TQString::null, tipText, TQPixmap());
+ TQVBox *widget = mPassivePopup->standardView(TQString(), tipText, TQPixmap());
TQHBox *box = new TQHBox(mPassivePopup, "popupbox");
box->setSpacing(8);
@@ -439,7 +439,7 @@ void NoatunSystray::showPassivePopup()
}
else
{
- mPassivePopup->setView(TQString::null, tipText);
+ mPassivePopup->setView(TQString(), tipText);
}
mPassivePopup->setTimeout(YHConfig::self()->passivePopupTimeout()*1000);
diff --git a/noatun/modules/systray/systray.h b/noatun/modules/systray/systray.h
index 1865479b..11743a22 100644
--- a/noatun/modules/systray/systray.h
+++ b/noatun/modules/systray/systray.h
@@ -41,6 +41,7 @@ class PassivePopup;
class NoatunSystray : public KMainWindow, public Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
NoatunSystray();
virtual ~NoatunSystray();
@@ -68,11 +69,11 @@ private:
private:
KitSystemTray *mTray;
TQTimer *mBlinkTimer;
- TQPixmap *trayStatus;
+ TQPixmap *traytqStatus;
TQPixmap *trayBase;
PassivePopup *mPassivePopup;
- bool showingTrayStatus;
+ bool showingTraytqStatus;
TQString tipText;
TQString tmpCoverPath;
};
diff --git a/noatun/modules/systray/yhconfigwidget.ui b/noatun/modules/systray/yhconfigwidget.ui
index 48267c28..5556c2c1 100644
--- a/noatun/modules/systray/yhconfigwidget.ui
+++ b/noatun/modules/systray/yhconfigwidget.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>YHConfigWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>YHConfigWidget</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -19,11 +19,11 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QTabWidget">
+ <widget class="TQTabWidget">
<property name="name">
<cstring>tabWidget2</cstring>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>tab</cstring>
</property>
@@ -34,7 +34,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>chkUseTooltip</cstring>
</property>
@@ -42,7 +42,7 @@
<string>Show a &amp;tooltip for the current track</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>chkUseCovers</cstring>
</property>
@@ -50,7 +50,7 @@
<string>Show &amp;covers in popup window and tooltip</string>
</property>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox1</cstring>
</property>
@@ -61,7 +61,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>lblPopupTimeout</cstring>
</property>
@@ -72,7 +72,7 @@
<cstring>spinPopupTimeout</cstring>
</property>
</widget>
- <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>chkPopupButtons</cstring>
</property>
@@ -80,7 +80,7 @@
<string>Show &amp;buttons in popup window</string>
</property>
</widget>
- <widget class="QSpinBox" row="1" column="1">
+ <widget class="TQSpinBox" row="1" column="1">
<property name="name">
<cstring>spinPopupTimeout</cstring>
</property>
@@ -98,7 +98,7 @@
<number>5</number>
</property>
</widget>
- <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>chkUsePopup</cstring>
</property>
@@ -108,7 +108,7 @@
</widget>
</grid>
</widget>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>buttonGroup1</cstring>
</property>
@@ -119,7 +119,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton" row="0" column="0">
+ <widget class="TQRadioButton" row="0" column="0">
<property name="name">
<cstring>rbStateAnim</cstring>
</property>
@@ -130,7 +130,7 @@
<string>&amp;Animated</string>
</property>
</widget>
- <widget class="QRadioButton" row="0" column="1">
+ <widget class="TQRadioButton" row="0" column="1">
<property name="name">
<cstring>rbStateFlashing</cstring>
</property>
@@ -138,7 +138,7 @@
<string>&amp;Flashing</string>
</property>
</widget>
- <widget class="QRadioButton" row="1" column="0">
+ <widget class="TQRadioButton" row="1" column="0">
<property name="name">
<cstring>rbStateStatic</cstring>
</property>
@@ -149,7 +149,7 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QRadioButton" row="1" column="1">
+ <widget class="TQRadioButton" row="1" column="1">
<property name="name">
<cstring>rbStateNone</cstring>
</property>
@@ -169,7 +169,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>81</height>
@@ -178,7 +178,7 @@
</spacer>
</vbox>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>tab</cstring>
</property>
@@ -189,7 +189,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>grpMiddleMouse</cstring>
</property>
@@ -200,7 +200,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>rbHideShowPlaylist</cstring>
</property>
@@ -208,7 +208,7 @@
<string>Hide / Show play&amp;list</string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>rbPlayPause</cstring>
</property>
@@ -218,7 +218,7 @@
</widget>
</vbox>
</widget>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>grpMwheel</cstring>
</property>
@@ -229,15 +229,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout1</cstring>
+ <cstring>tqlayout1</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>lblModifier</cstring>
</property>
@@ -248,14 +248,14 @@
<cstring>cmbModifier</cstring>
</property>
</widget>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<property name="name">
<cstring>cmbModifier</cstring>
</property>
</widget>
</hbox>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>lblAction</cstring>
</property>
@@ -263,7 +263,7 @@
<string>Action:</string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>rbActNothing</cstring>
</property>
@@ -271,7 +271,7 @@
<string>&amp;Nothing</string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>rbActVolume</cstring>
</property>
@@ -279,7 +279,7 @@
<string>Change v&amp;olume</string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>rbActTrack</cstring>
</property>
@@ -299,7 +299,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>21</height>
@@ -329,5 +329,5 @@
<tabstop>rbActVolume</tabstop>
<tabstop>rbActTrack</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>