summaryrefslogtreecommitdiffstats
path: root/kicker-applets/mediacontrol/jukInterface.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:22:56 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:22:56 +0000
commit7346aee26bf190a7e70333c40fab4caca847cd27 (patch)
tree4b019b434f88dcc3eeaafe1d3f26240b4c4718e8 /kicker-applets/mediacontrol/jukInterface.cpp
parent23a3d3aa5b44cbdf305495919866d9dbf4f6da54 (diff)
downloadtdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.tar.gz
tdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1157634 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kicker-applets/mediacontrol/jukInterface.cpp')
-rw-r--r--kicker-applets/mediacontrol/jukInterface.cpp94
1 files changed, 47 insertions, 47 deletions
diff --git a/kicker-applets/mediacontrol/jukInterface.cpp b/kicker-applets/mediacontrol/jukInterface.cpp
index 302e7f2..be99528 100644
--- a/kicker-applets/mediacontrol/jukInterface.cpp
+++ b/kicker-applets/mediacontrol/jukInterface.cpp
@@ -20,9 +20,9 @@
#include <kapplication.h>
#include <kdebug.h>
-#include <qstringlist.h>
-#include <qstrlist.h>
-#include <qprocess.h>
+#include <tqstringlist.h>
+#include <tqstrlist.h>
+#include <tqprocess.h>
#include <kurldrag.h>
#define TIMER_FAST 250
@@ -30,18 +30,18 @@
JuKInterface::JuKInterface() : PlayerInterface(), mProc(0)
{
mTimerValue = TIMER_FAST;
- mJuKTimer = new QTimer ( this, "mJukTimer" );
+ mJuKTimer = new TQTimer ( this, "mJukTimer" );
- connect(mJuKTimer, SIGNAL(timeout()), SLOT(updateSlider()) );
+ connect(mJuKTimer, TQT_SIGNAL(timeout()), TQT_SLOT(updateSlider()) );
kapp->dcopClient()->setNotifications ( true );
- connect(kapp->dcopClient(), SIGNAL(applicationRegistered(const QCString&)),
- SLOT(appRegistered(const QCString&)) );
+ connect(kapp->dcopClient(), TQT_SIGNAL(applicationRegistered(const TQCString&)),
+ TQT_SLOT(appRegistered(const TQCString&)) );
- connect(kapp->dcopClient(), SIGNAL(applicationRemoved(const QCString&)),
- SLOT(appRemoved(const QCString&)));
+ connect(kapp->dcopClient(), TQT_SIGNAL(applicationRemoved(const TQCString&)),
+ TQT_SLOT(appRemoved(const TQCString&)));
- QTimer::singleShot(0, this, SLOT(myInit()));
+ TQTimer::singleShot(0, this, TQT_SLOT(myInit()));
}
JuKInterface::~JuKInterface()
@@ -66,7 +66,7 @@ void JuKInterface::myInit()
}
}
-void JuKInterface::appRegistered ( const QCString &appId )
+void JuKInterface::appRegistered ( const TQCString &appId )
{
if(appId.contains("juk",false) )
{
@@ -80,18 +80,18 @@ void JuKInterface::appRegistered ( const QCString &appId )
// So what we do is launch the dcop command instead, and let
// *it* block for us. As soon as the command exits, we know
// that JuK is ready to go (and so are we).
- mProc = new QProcess(this, "jukdcopCheckProc");
+ mProc = new TQProcess(this, "jukdcopCheckProc");
mProc->addArgument("dcop");
mProc->addArgument("juk");
mProc->addArgument("Player");
mProc->addArgument("status()");
- connect(mProc, SIGNAL(processExited()), SLOT(jukIsReady()));
+ connect(mProc, TQT_SIGNAL(processExited()), TQT_SLOT(jukIsReady()));
mProc->start();
}
}
-void JuKInterface::appRemoved ( const QCString &appId )
+void JuKInterface::appRemoved ( const TQCString &appId )
{
if ( appId.contains("juk",false) )
{
@@ -119,13 +119,13 @@ void JuKInterface::updateSlider ()
// length/time in msecs, -1 means "no playobject in juk"
int len = -1;
int time = -1;
- QByteArray data, replyData;
- QCString replyType;
+ TQByteArray data, replyData;
+ TQCString replyType;
if (kapp->dcopClient()->call(mAppId, "Player", "totalTime()", data,
replyType, replyData))
{
- QDataStream reply(replyData, IO_ReadOnly);
+ TQDataStream reply(replyData, IO_ReadOnly);
if (replyType == "int")
reply >> len;
}
@@ -137,7 +137,7 @@ void JuKInterface::updateSlider ()
if (kapp->dcopClient()->call(mAppId, "Player", "currentTime()", data,
replyType, replyData))
{
- QDataStream reply(replyData, IO_ReadOnly);
+ TQDataStream reply(replyData, IO_ReadOnly);
if (replyType == "int")
reply >> time;
}
@@ -153,22 +153,22 @@ void JuKInterface::updateSlider ()
// Drag-n-Drop stuff =================================================================
-void JuKInterface::dragEnterEvent(QDragEnterEvent* event)
+void JuKInterface::dragEnterEvent(TQDragEnterEvent* event)
{
// kdDebug(90200) << "JuKInterface::dragEnterEvent()" << endl;
event->accept( KURLDrag::canDecode(event) );
}
-void JuKInterface::dropEvent(QDropEvent* event)
+void JuKInterface::dropEvent(TQDropEvent* event)
{
// kdDebug(90200) << "JuKInterface::dropEvent()" << endl;
KURL::List list;
if (KURLDrag::decode(event, list))
{
- QByteArray data, replyData;
- QStringList fileList;
- QCString replyType;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, replyData;
+ TQStringList fileList;
+ TQCString replyType;
+ TQDataStream arg(data, IO_WriteOnly);
// Juk doesn't handle KURL's yet, so we need to form a list
// that contains the local paths.
@@ -179,18 +179,18 @@ void JuKInterface::dropEvent(QDropEvent* event)
// Use call instead of send to make sure the files are added
// before we try to play.
- if (!kapp->dcopClient()->call(mAppId, "Collection", "openFile(QStringList)", data,
+ if (!kapp->dcopClient()->call(mAppId, "Collection", "openFile(TQStringList)", data,
replyType, replyData, true))
{
kdDebug(90200) << "Couldn't send drop to juk" << endl;
}
// Apparently we should auto-play?
- QByteArray strData;
- QDataStream strArg(strData, IO_WriteOnly);
+ TQByteArray strData;
+ TQDataStream strArg(strData, IO_WriteOnly);
strArg << *fileList.begin();
- if (!kapp->dcopClient()->send(mAppId, "Player", "play(QString)", strData))
+ if (!kapp->dcopClient()->send(mAppId, "Player", "play(TQString)", strData))
kdDebug(90200) << "Couldn't send play command to juk" << endl;
}
}
@@ -209,8 +209,8 @@ void JuKInterface::sliderStopDrag()
void JuKInterface::jumpToTime( int sec )
{
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << sec;
// Used in JuK shipping with KDE < 3.3
//kapp->dcopClient()->send(mAppId, "Player", "setTime(int)", data);
@@ -221,64 +221,64 @@ void JuKInterface::playpause()
{
if (!findRunningJuK())
startPlayer("juk");
- QByteArray data;
+ TQByteArray data;
kapp->dcopClient()->send(mAppId, "Player", "playPause()", data);
}
void JuKInterface::stop()
{
- QByteArray data;
+ TQByteArray data;
kapp->dcopClient()->send(mAppId, "Player", "stop()", data);
}
void JuKInterface::next()
{
- QByteArray data;
+ TQByteArray data;
kapp->dcopClient()->send(mAppId, "Player", "forward()", data);
}
void JuKInterface::prev()
{
- QByteArray data;
+ TQByteArray data;
kapp->dcopClient()->send(mAppId, "Player", "back()", data);
}
void JuKInterface::volumeUp()
{
- QByteArray data;
+ TQByteArray data;
kapp->dcopClient()->send(mAppId, "Player", "volumeUp()", data);
}
void JuKInterface::volumeDown()
{
- QByteArray data;
+ TQByteArray data;
kapp->dcopClient()->send(mAppId, "Player", "volumeDown()", data);
}
-const QString JuKInterface::getTrackTitle() const
+const TQString JuKInterface::getTrackTitle() const
{
- QString title;
- QByteArray data, replyData;
- QCString replyType;
+ TQString title;
+ TQByteArray data, replyData;
+ TQCString replyType;
if (kapp->dcopClient()->call(mAppId, "Player", "playingString()",data,
replyType, replyData))
{
- QDataStream reply(replyData, IO_ReadOnly);
- if (replyType == "QString")
+ TQDataStream reply(replyData, IO_ReadOnly);
+ if (replyType == "TQString")
{
reply >> title;
return title;
}
}
- return QString("");
+ return TQString("");
}
// FIXME: what if we have a dcop app named, let's say, 'jukfrontend'?
bool JuKInterface::findRunningJuK()
{
QCStringList allApps = kapp->dcopClient()->registeredApplications();
- QValueList<QCString>::const_iterator iterator;
+ TQValueList<TQCString>::const_iterator iterator;
for (iterator = allApps.constBegin(); iterator != allApps.constEnd(); ++iterator)
{
@@ -293,14 +293,14 @@ bool JuKInterface::findRunningJuK()
int JuKInterface::playingStatus()
{
- QByteArray data, replyData;
- QCString replyType;
+ TQByteArray data, replyData;
+ TQCString replyType;
if (kapp->dcopClient()->call(mAppId, "Player", "status()", data, replyType,
replyData))
{
int status = 0;
- QDataStream reply(replyData, IO_ReadOnly);
+ TQDataStream reply(replyData, IO_ReadOnly);
if (replyType == "int")
reply >> status;