diff options
Diffstat (limited to 'kicker-applets/mediacontrol/amarokInterface.cpp')
-rw-r--r-- | kicker-applets/mediacontrol/amarokInterface.cpp | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/kicker-applets/mediacontrol/amarokInterface.cpp b/kicker-applets/mediacontrol/amarokInterface.cpp index 2045c12..f52ae4b 100644 --- a/kicker-applets/mediacontrol/amarokInterface.cpp +++ b/kicker-applets/mediacontrol/amarokInterface.cpp @@ -21,8 +21,8 @@ #include "amarokInterface.moc" #include <kdebug.h> -#include <qstringlist.h> -#include <qstrlist.h> +#include <tqstringlist.h> +#include <tqstrlist.h> #include <kurldrag.h> #define TIMER_FAST 250 @@ -30,18 +30,18 @@ AmarokInterface::AmarokInterface() : PlayerInterface() { mTimerValue = TIMER_FAST; - mAmarokTimer = new QTimer ( this, "mAmaroKTimer" ); + mAmarokTimer = new TQTimer ( this, "mAmaroKTimer" ); - connect(mAmarokTimer, SIGNAL(timeout()), SLOT(updateSlider()) ); + connect(mAmarokTimer, 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())); } AmarokInterface::~AmarokInterface() @@ -66,7 +66,7 @@ void AmarokInterface::myInit() } } -void AmarokInterface::appRegistered ( const QCString &appId ) +void AmarokInterface::appRegistered ( const TQCString &appId ) { if(appId.contains("amarok",false) ) { @@ -76,7 +76,7 @@ void AmarokInterface::appRegistered ( const QCString &appId ) } } -void AmarokInterface::appRemoved ( const QCString &appId ) +void AmarokInterface::appRemoved ( const TQCString &appId ) { if ( appId.contains("amarok",false) ) { @@ -93,8 +93,8 @@ void AmarokInterface::updateSlider ( ) { // length/time in msecs, -1 means "no playobject in amarok" int len, time; - QByteArray data, replyData; - QCString replyType; + TQByteArray data, replyData; + TQCString replyType; if (!kapp->dcopClient()->call(mAppId, "player", "trackTotalTime()",data, replyType, replyData)) { @@ -104,7 +104,7 @@ void AmarokInterface::updateSlider ( ) } else { - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); if (replyType == "int") { reply >> len; @@ -128,7 +128,7 @@ void AmarokInterface::updateSlider ( ) } else { - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); if (replyType == "int") { reply >> time; @@ -151,20 +151,20 @@ void AmarokInterface::updateSlider ( ) // Drag-n-Drop stuff ================================================================= -void AmarokInterface::dragEnterEvent(QDragEnterEvent* event) +void AmarokInterface::dragEnterEvent(TQDragEnterEvent* event) { // kdDebug(90200) << "AmarokInterface::dragEnterEvent()" << endl; event->accept( KURLDrag::canDecode(event) ); } -void AmarokInterface::dropEvent(QDropEvent* event) +void AmarokInterface::dropEvent(TQDropEvent* event) { kdDebug(90200) << "AmarokInterface::dropEvent()" << endl; KURL::List list; if (KURLDrag::decode(event, list)) { - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << list; if (!kapp->dcopClient()->send(mAppId, "player", "addMediaList(KURL::List)",data)) kdDebug(90200) << "Couldn't send drop to amarok" << endl; @@ -185,8 +185,8 @@ void AmarokInterface::sliderStopDrag() void AmarokInterface::jumpToTime( int sec ) { - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << sec; kapp->dcopClient()->send(mAppId, "player", "seek(int)", data); } @@ -195,54 +195,54 @@ void AmarokInterface::playpause() { if (!findRunningAmarok()) startPlayer("amarok"); - QByteArray data; + TQByteArray data; kapp->dcopClient()->send(mAppId, "player", "playPause()", data); } void AmarokInterface::stop() { - QByteArray data; + TQByteArray data; kapp->dcopClient()->send(mAppId, "player", "stop()", data); } void AmarokInterface::next() { - QByteArray data; + TQByteArray data; kapp->dcopClient()->send(mAppId, "player", "next()", data); } void AmarokInterface::prev() { - QByteArray data; + TQByteArray data; kapp->dcopClient()->send(mAppId, "player", "prev()", data); } void AmarokInterface::volumeUp() { - QByteArray data; + TQByteArray data; kapp->dcopClient()->send(mAppId, "player", "volumeUp()", data); } void AmarokInterface::volumeDown() { - QByteArray data; + TQByteArray data; kapp->dcopClient()->send(mAppId, "player", "volumeDown()", data); } -const QString AmarokInterface::getTrackTitle() const +const TQString AmarokInterface::getTrackTitle() const { - QString title; - QByteArray data, replyData; - QCString replyType; + TQString title; + TQByteArray data, replyData; + TQCString replyType; if (!kapp->dcopClient()->call(mAppId, "player", "nowPlaying()",data, replyType, replyData)) { //kdDebug(90200) << "mediacontrol: DCOP communication Error" << endl; - return QString(""); + return TQString(""); } else { - QDataStream reply(replyData, IO_ReadOnly); - if (replyType == "QString") + TQDataStream reply(replyData, IO_ReadOnly); + if (replyType == "TQString") { reply >> title; return title; @@ -250,7 +250,7 @@ const QString AmarokInterface::getTrackTitle() const else { //kdDebug(90200) << "mediacontrol: unexpected type of DCOP-reply" << endl; - return QString(""); + return TQString(""); } } } @@ -258,9 +258,9 @@ const QString AmarokInterface::getTrackTitle() const bool AmarokInterface::findRunningAmarok() { QCStringList allApps = kapp->dcopClient()->registeredApplications(); - QValueList<QCString>::const_iterator iterator; - QByteArray data, replyData; - QCString replyType; + TQValueList<TQCString>::const_iterator iterator; + TQByteArray data, replyData; + TQCString replyType; for (iterator = allApps.constBegin(); iterator != allApps.constEnd(); ++iterator) { @@ -270,7 +270,7 @@ bool AmarokInterface::findRunningAmarok() { if ( replyType == "QCStringList" ) { - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); QCStringList list; reply >> list; @@ -291,14 +291,14 @@ bool AmarokInterface::findRunningAmarok() int AmarokInterface::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; if (status == 2) |