diff options
Diffstat (limited to 'kicker-applets/mediacontrol')
24 files changed, 481 insertions, 481 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) diff --git a/kicker-applets/mediacontrol/amarokInterface.h b/kicker-applets/mediacontrol/amarokInterface.h index 3a71031..53f1ac6 100644 --- a/kicker-applets/mediacontrol/amarokInterface.h +++ b/kicker-applets/mediacontrol/amarokInterface.h @@ -24,7 +24,7 @@ #include <kapplication.h> #include <dcopclient.h> -#include <qtimer.h> +#include <tqtimer.h> class AmarokInterface : public PlayerInterface { @@ -44,20 +44,20 @@ class AmarokInterface : public PlayerInterface virtual void prev(); virtual void volumeUp(); virtual void volumeDown(); - virtual void dragEnterEvent(QDragEnterEvent* event); - virtual void dropEvent(QDropEvent* event); - virtual const QString getTrackTitle() const; + virtual void dragEnterEvent(TQDragEnterEvent* event); + virtual void dropEvent(TQDropEvent* event); + virtual const TQString getTrackTitle() const; virtual int playingStatus(); private slots: void myInit(); - void appRegistered ( const QCString &appId ); - void appRemoved ( const QCString &appId ); + void appRegistered ( const TQCString &appId ); + void appRemoved ( const TQCString &appId ); private: - QTimer *mAmarokTimer; + TQTimer *mAmarokTimer; int mTimerValue; - QCString mAppId; + TQCString mAppId; /** * Tries to find a DCOP registered instance of AmaroK diff --git a/kicker-applets/mediacontrol/configfrontend.cpp b/kicker-applets/mediacontrol/configfrontend.cpp index ba206c8..4deab8b 100644 --- a/kicker-applets/mediacontrol/configfrontend.cpp +++ b/kicker-applets/mediacontrol/configfrontend.cpp @@ -21,9 +21,9 @@ #include "configfrontend.h" // #include <kdebug.h> -ConfigFrontend::ConfigFrontend() : QObject(0, 0) +ConfigFrontend::ConfigFrontend() : TQObject(0, 0) { - _config = new KConfig(QString::null, true, false); + _config = new KConfig(TQString::null, true, false); _ownConfig = true; } @@ -35,7 +35,7 @@ ConfigFrontend::~ConfigFrontend() } } -ConfigFrontend::ConfigFrontend(KConfig *config) : QObject(0, 0) +ConfigFrontend::ConfigFrontend(KConfig *config) : TQObject(0, 0) { _config = config; _config->setGroup("MediaControl"); @@ -57,12 +57,12 @@ void ConfigFrontend::setMouseWheelSpeed(const uint mouseWheelSpeed) // ==================================================================================== -QString ConfigFrontend::player() const +TQString ConfigFrontend::player() const { return _config->readPathEntry("Player", "Noatun"); } -void ConfigFrontend::setPlayer(const QString &player) +void ConfigFrontend::setPlayer(const TQString &player) { _config->writePathEntry("Player", player); _config->sync(); @@ -70,12 +70,12 @@ void ConfigFrontend::setPlayer(const QString &player) // ==================================================================================== -QString ConfigFrontend::theme() const +TQString ConfigFrontend::theme() const { return _config->readEntry("Theme", "default"); } -void ConfigFrontend::setTheme(const QString &theme) +void ConfigFrontend::setTheme(const TQString &theme) { _config->writeEntry("Theme", theme); _config->sync(); diff --git a/kicker-applets/mediacontrol/configfrontend.h b/kicker-applets/mediacontrol/configfrontend.h index 87a0bf4..b625c70 100644 --- a/kicker-applets/mediacontrol/configfrontend.h +++ b/kicker-applets/mediacontrol/configfrontend.h @@ -33,14 +33,14 @@ class ConfigFrontend : public QObject virtual ~ConfigFrontend(); uint mouseWheelSpeed() const; - QString player() const; - QString theme() const; + TQString player() const; + TQString theme() const; bool useCustomTheme() const; public slots: void setMouseWheelSpeed(const uint); - void setPlayer(const QString &player); - void setTheme(const QString &theme); + void setPlayer(const TQString &player); + void setTheme(const TQString &theme); void setUseCustomTheme(const bool use); void reparseConfiguration() { _config->reparseConfiguration(); } 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; diff --git a/kicker-applets/mediacontrol/jukInterface.h b/kicker-applets/mediacontrol/jukInterface.h index fb7f9bb..f305ab0 100644 --- a/kicker-applets/mediacontrol/jukInterface.h +++ b/kicker-applets/mediacontrol/jukInterface.h @@ -23,7 +23,7 @@ #include <kapplication.h> #include <dcopclient.h> -#include <qtimer.h> +#include <tqtimer.h> class QProcess; @@ -45,22 +45,22 @@ class JuKInterface : public PlayerInterface void prev(); void volumeUp(); void volumeDown(); - void dragEnterEvent(QDragEnterEvent* event); - void dropEvent(QDropEvent* event); - const QString getTrackTitle() const; + void dragEnterEvent(TQDragEnterEvent* event); + void dropEvent(TQDropEvent* event); + const TQString getTrackTitle() const; int playingStatus(); private slots: void myInit(); - void appRegistered ( const QCString &appId ); - void appRemoved ( const QCString &appId ); + void appRegistered ( const TQCString &appId ); + void appRemoved ( const TQCString &appId ); void jukIsReady(); private: - QTimer *mJuKTimer; - QProcess *mProc; + TQTimer *mJuKTimer; + TQProcess *mProc; int mTimerValue; - QCString mAppId; + TQCString mAppId; /** * Tries to find a DCOP registered instance of juk diff --git a/kicker-applets/mediacontrol/kscdInterface.cpp b/kicker-applets/mediacontrol/kscdInterface.cpp index f7f7e90..fea1048 100644 --- a/kicker-applets/mediacontrol/kscdInterface.cpp +++ b/kicker-applets/mediacontrol/kscdInterface.cpp @@ -21,8 +21,8 @@ #include <kapplication.h> #include <kdebug.h> -#include <qstringlist.h> -#include <qstrlist.h> +#include <tqstringlist.h> +#include <tqstrlist.h> #include <kurldrag.h> #include <klocale.h> @@ -30,18 +30,18 @@ KsCDInterface::KsCDInterface() : PlayerInterface() { - mKsCDTimer = new QTimer(this, "mKsCDTimer"); + mKsCDTimer = new TQTimer(this, "mKsCDTimer"); - connect(mKsCDTimer, SIGNAL(timeout()), SLOT(updateSlider()) ); + connect(mKsCDTimer, 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())); } KsCDInterface::~KsCDInterface() @@ -66,7 +66,7 @@ void KsCDInterface::myInit() } } -void KsCDInterface::appRegistered(const QCString &appId) +void KsCDInterface::appRegistered(const TQCString &appId) { if((appId) == "kscd") { @@ -76,7 +76,7 @@ void KsCDInterface::appRegistered(const QCString &appId) } } -void KsCDInterface::appRemoved(const QCString &appId) +void KsCDInterface::appRemoved(const TQCString &appId) { if ((appId) == "kscd") { @@ -97,13 +97,13 @@ void KsCDInterface::updateSlider() // length/time in secs, -1 means "no playobject in kscd" int len = -1; int time = -1; - QByteArray data, replyData; - QCString replyType; + TQByteArray data, replyData; + TQCString replyType; if (kapp->dcopClient()->call(mAppId, "CDPlayer", "currentTrackLength()", data, replyType, replyData)) { - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); if (replyType == "int") reply >> len; } @@ -115,7 +115,7 @@ void KsCDInterface::updateSlider() if (kapp->dcopClient()->call(mAppId, "CDPlayer", "currentPosition()", data, replyType, replyData)) { - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); if (replyType == "int") reply >> time; } @@ -134,12 +134,12 @@ void KsCDInterface::updateSlider() // or even no application to drag AudioCD track from (not the KIO-wrapped track // path (audiocd:/...) like from Konqueror) -void KsCDInterface::dragEnterEvent(QDragEnterEvent* event) +void KsCDInterface::dragEnterEvent(TQDragEnterEvent* event) { event->ignore(); } -void KsCDInterface::dropEvent(QDropEvent* event) +void KsCDInterface::dropEvent(TQDropEvent* event) { event->ignore(); } @@ -158,8 +158,8 @@ void KsCDInterface::sliderStopDrag() void KsCDInterface::jumpToTime(int sec) { - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << sec; kapp->dcopClient()->send(mAppId, "CDPlayer", "jumpTo(int)", data); } @@ -168,52 +168,52 @@ void KsCDInterface::playpause() { if (!findRunningKsCD()) startPlayer("kscd"); - QByteArray data; + TQByteArray data; kapp->dcopClient()->send(mAppId, "CDPlayer", "play()", data); } void KsCDInterface::stop() { - QByteArray data; + TQByteArray data; kapp->dcopClient()->send(mAppId, "CDPlayer", "stop()", data); } void KsCDInterface::next() { - QByteArray data; + TQByteArray data; kapp->dcopClient()->send(mAppId, "CDPlayer", "next()", data); } void KsCDInterface::prev() { - QByteArray data; + TQByteArray data; kapp->dcopClient()->send(mAppId, "CDPlayer", "previous()", data); } void KsCDInterface::volumeUp() { - QByteArray data; + TQByteArray data; kapp->dcopClient()->send(mAppId, "CDPlayer", "volumeUp()", data); } void KsCDInterface::volumeDown() { - QByteArray data; + TQByteArray data; kapp->dcopClient()->send(mAppId, "CDPlayer", "volumeDown()", data); } -const QString KsCDInterface::getTrackTitle() const +const TQString KsCDInterface::getTrackTitle() const { - QString title, artist, album, result; - QByteArray data, replyData; - QCString replyType; + TQString title, artist, album, result; + TQByteArray data, replyData; + TQCString replyType; // Get track title from KsCD... if (kapp->dcopClient()->call(mAppId, "CDPlayer", "currentTrackTitle()", data, replyType, replyData)) { - QDataStream reply(replyData, IO_ReadOnly); - if (replyType == "QString") + TQDataStream reply(replyData, IO_ReadOnly); + if (replyType == "TQString") { reply >> title; } @@ -223,8 +223,8 @@ const QString KsCDInterface::getTrackTitle() const if (kapp->dcopClient()->call(mAppId, "CDPlayer", "currentAlbum()", data, replyType, replyData)) { - QDataStream reply(replyData, IO_ReadOnly); - if (replyType == "QString") + TQDataStream reply(replyData, IO_ReadOnly); + if (replyType == "TQString") { reply >> album; } @@ -234,8 +234,8 @@ const QString KsCDInterface::getTrackTitle() const if (kapp->dcopClient()->call(mAppId, "CDPlayer", "currentArtist()", data, replyType, replyData)) { - QDataStream reply(replyData, IO_ReadOnly); - if (replyType == "QString") + TQDataStream reply(replyData, IO_ReadOnly); + if (replyType == "TQString") { reply >> artist; } @@ -292,7 +292,7 @@ const QString KsCDInterface::getTrackTitle() const bool KsCDInterface::findRunningKsCD() { QCStringList allApps = kapp->dcopClient()->registeredApplications(); - QValueList<QCString>::const_iterator iterator; + TQValueList<TQCString>::const_iterator iterator; for (iterator = allApps.constBegin(); iterator != allApps.constEnd(); ++iterator) { @@ -307,14 +307,14 @@ bool KsCDInterface::findRunningKsCD() int KsCDInterface::playingStatus() { - QByteArray data, replyData; - QCString replyType; + TQByteArray data, replyData; + TQCString replyType; if (kapp->dcopClient()->call(mAppId, "CDPlayer", "getStatus()", data, replyType, replyData)) { int status = 0; - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); if (replyType == "int") reply >> status; diff --git a/kicker-applets/mediacontrol/kscdInterface.h b/kicker-applets/mediacontrol/kscdInterface.h index 0817b1e..8af0d1d 100644 --- a/kicker-applets/mediacontrol/kscdInterface.h +++ b/kicker-applets/mediacontrol/kscdInterface.h @@ -24,7 +24,7 @@ #include <kapplication.h> #include <dcopclient.h> -#include <qtimer.h> +#include <tqtimer.h> class KsCDInterface : public PlayerInterface { @@ -44,19 +44,19 @@ class KsCDInterface : public PlayerInterface void prev(); void volumeUp(); void volumeDown(); - void dragEnterEvent(QDragEnterEvent* event); - void dropEvent(QDropEvent* event); - const QString getTrackTitle() const; + void dragEnterEvent(TQDragEnterEvent* event); + void dropEvent(TQDropEvent* event); + const TQString getTrackTitle() const; int playingStatus(); private slots: void myInit(); - void appRegistered ( const QCString &appId ); - void appRemoved ( const QCString &appId ); + void appRegistered ( const TQCString &appId ); + void appRemoved ( const TQCString &appId ); private: - QTimer *mKsCDTimer; - QCString mAppId; + TQTimer *mKsCDTimer; + TQCString mAppId; /** * Tries to find a DCOP registered instance of KsCD diff --git a/kicker-applets/mediacontrol/mcslider.cpp b/kicker-applets/mediacontrol/mcslider.cpp index 642d2e2..cad953d 100644 --- a/kicker-applets/mediacontrol/mcslider.cpp +++ b/kicker-applets/mediacontrol/mcslider.cpp @@ -15,12 +15,12 @@ * * ***************************************************************************/ -#include <qpixmap.h> +#include <tqpixmap.h> #include "mcslider.h" -MCSlider::MCSlider( Orientation orientation, QWidget *parent, const char *name ) - : QSlider( orientation, parent, name ) +MCSlider::MCSlider( Orientation orientation, TQWidget *parent, const char *name ) + : TQSlider( orientation, parent, name ) { setBackgroundOrigin(WidgetOrigin); setBackground(); @@ -38,13 +38,13 @@ void MCSlider::setBackground() if (parentWidget()->paletteBackgroundPixmap()) { - QPixmap pm(width(), height()); + TQPixmap pm(width(), height()); pm.fill(parentWidget(), pos()); setPaletteBackgroundPixmap(pm); } } -void MCSlider::wheelEvent(QWheelEvent *e) +void MCSlider::wheelEvent(TQWheelEvent *e) { if (e->orientation() == Horizontal) return; @@ -59,7 +59,7 @@ void MCSlider::wheelEvent(QWheelEvent *e) } else { - QSlider::wheelEvent(e); + TQSlider::wheelEvent(e); } } diff --git a/kicker-applets/mediacontrol/mcslider.h b/kicker-applets/mediacontrol/mcslider.h index 9b11893..d58aac0 100644 --- a/kicker-applets/mediacontrol/mcslider.h +++ b/kicker-applets/mediacontrol/mcslider.h @@ -18,18 +18,18 @@ #ifndef MCSLIDER_H #define MCSLIDER_H -#include <qslider.h> +#include <tqslider.h> class MCSlider : public QSlider { Q_OBJECT public: - MCSlider( Orientation orientation, QWidget *parent, const char *name = 0 ); + MCSlider( Orientation orientation, TQWidget *parent, const char *name = 0 ); ~MCSlider(); void setBackground(); private: - virtual void wheelEvent(QWheelEvent *e); + virtual void wheelEvent(TQWheelEvent *e); signals: void volumeUp(); void volumeDown(); diff --git a/kicker-applets/mediacontrol/mediacontrol.cpp b/kicker-applets/mediacontrol/mediacontrol.cpp index e69e0e0..433f52d 100644 --- a/kicker-applets/mediacontrol/mediacontrol.cpp +++ b/kicker-applets/mediacontrol/mediacontrol.cpp @@ -35,13 +35,13 @@ #include "mcslider.h" -#include <qfile.h> -#include <qdragobject.h> -#include <qtooltip.h> -#include <qstyle.h> -#include <qslider.h> -#include <qpainter.h> -#include <qiconset.h> +#include <tqfile.h> +#include <tqdragobject.h> +#include <tqtooltip.h> +#include <tqstyle.h> +#include <tqslider.h> +#include <tqpainter.h> +#include <tqiconset.h> #include <kpopupmenu.h> #include <kapplication.h> @@ -57,7 +57,7 @@ const int NO_BUTTONS = 4; extern "C" { - KDE_EXPORT KPanelApplet *init( QWidget *parent, const QString &configFile) + KDE_EXPORT KPanelApplet *init( TQWidget *parent, const TQString &configFile) { KGlobal::locale()->insertCatalogue("mediacontrol"); return new MediaControl(configFile, KPanelApplet::Normal, @@ -71,27 +71,27 @@ extern "C" class MediaControlToolTip : public QToolTip { public: - MediaControlToolTip(QWidget *widget, PlayerInterface *pl_obj) : - QToolTip(widget), mWidget(widget), mPlayer(pl_obj) {} + MediaControlToolTip(TQWidget *widget, PlayerInterface *pl_obj) : + TQToolTip(widget), mWidget(widget), mPlayer(pl_obj) {} protected: - virtual void maybeTip(const QPoint &pt) + virtual void maybeTip(const TQPoint &pt) { - QRect rc( mWidget->rect()); + TQRect rc( mWidget->rect()); if (rc.contains(pt)) { tip ( rc, mPlayer->getTrackTitle() ); } } private: - QWidget *mWidget; + TQWidget *mWidget; PlayerInterface *mPlayer; }; // ============================================================================= -MediaControl::MediaControl(const QString &configFile, Type t, int actions, - QWidget *parent, const char *name) +MediaControl::MediaControl(const TQString &configFile, Type t, int actions, + TQWidget *parent, const char *name) : DCOPObject("MediaControl"), KPanelApplet(configFile, t, actions, parent, name), mInstance(new KInstance("mediacontrol")), @@ -139,7 +139,7 @@ MediaControl::MediaControl(const QString &configFile, Type t, int actions, playpause_button = new TrayButton (this, "PLAYPAUSE"); stop_button = new TrayButton (this, "STOP"); next_button = new TrayButton (this, "NEXT"); - time_slider = new MCSlider (QSlider::Horizontal, this, "time_slider" ); + time_slider = new MCSlider (TQSlider::Horizontal, this, "time_slider" ); time_slider->setRange(0,0); time_slider->setValue(0); time_slider->setTracking( false ); @@ -147,15 +147,15 @@ MediaControl::MediaControl(const QString &configFile, Type t, int actions, // request notification of changes in icon style kapp->addKipcEventMask(KIPC::IconChanged); - connect(kapp, SIGNAL(iconChanged(int)), this, SLOT(slotIconChanged())); + connect(kapp, TQT_SIGNAL(iconChanged(int)), this, TQT_SLOT(slotIconChanged())); reparseConfig(); rmbMenu = new KPopupMenu(this, "RMBMenu"); rmbMenu->insertTitle(i18n("MediaControl"), 0, 0); rmbMenu->insertItem(SmallIcon("configure"), i18n("Configure MediaControl..."), - this, SLOT(preferences())); - rmbMenu->insertItem(i18n("About MediaControl"), this, SLOT(about())); + this, TQT_SLOT(preferences())); + rmbMenu->insertItem(i18n("About MediaControl"), this, TQT_SLOT(about())); } MediaControl::~MediaControl() @@ -168,12 +168,12 @@ MediaControl::~MediaControl() // Drag-n-Drop stuff =========================================================== -void MediaControl::dragEnterEvent(QDragEnterEvent* event) +void MediaControl::dragEnterEvent(TQDragEnterEvent* event) { _player->dragEnterEvent(event); // Just pass dnd to the playerInterface } -void MediaControl::dropEvent(QDropEvent* event) +void MediaControl::dropEvent(TQDropEvent* event) { _player->dropEvent(event); // Just pass dnd to the playerInterface } @@ -202,7 +202,7 @@ void MediaControl::enableAll() { prev_button->setDisabled(false); playpause_button->setDisabled(false); - QToolTip::remove(playpause_button); + TQToolTip::remove(playpause_button); stop_button->setDisabled(false); next_button->setDisabled(false); time_slider->setDisabled(false); @@ -212,12 +212,12 @@ void MediaControl::disableAll() { prev_button->setDisabled(true); playpause_button->setDisabled(false); - QToolTip::add(playpause_button, i18n("Start the player")); + TQToolTip::add(playpause_button, i18n("Start the player")); stop_button->setDisabled(true); next_button->setDisabled(true); time_slider->setDisabled(true); if(_configFrontend->useCustomTheme()) { - QString skindir = locate("data", "mediacontrol/"+_configFrontend->theme()+"/"); + TQString skindir = locate("data", "mediacontrol/"+_configFrontend->theme()+"/"); playpause_button->setIconSet(SmallIconSet(locate("data",skindir+"play.png"))); } else @@ -230,7 +230,7 @@ void MediaControl::slotPlayingStatusChanged(int status) return; mLastStatus = status; - QString skindir = locate("data", "mediacontrol/"+_configFrontend->theme()+"/"); + TQString skindir = locate("data", "mediacontrol/"+_configFrontend->theme()+"/"); switch (status) { @@ -275,12 +275,12 @@ void MediaControl::preferences() else { _prefsDialog = new MediaControlConfig ( _configFrontend ); - connect ( _prefsDialog, SIGNAL(closing()), - this, SLOT(slotClosePrefsDialog()) ); - connect ( _prefsDialog, SIGNAL(destroyed()), - this, SLOT(slotPrefsDialogClosing()) ); - connect ( _prefsDialog, SIGNAL(configChanged()), - this, SLOT(slotConfigChanged()) ); + connect ( _prefsDialog, TQT_SIGNAL(closing()), + this, TQT_SLOT(slotClosePrefsDialog()) ); + connect ( _prefsDialog, TQT_SIGNAL(destroyed()), + this, TQT_SLOT(slotPrefsDialogClosing()) ); + connect ( _prefsDialog, TQT_SIGNAL(configChanged()), + this, TQT_SLOT(slotConfigChanged()) ); } } @@ -352,7 +352,7 @@ void MediaControl::reparseConfig() mLastTime = -1; mLastStatus = -1; - QString playerString = _configFrontend->player(); + TQString playerString = _configFrontend->player(); #ifdef HAVE_XMMS @@ -396,21 +396,21 @@ void MediaControl::reparseConfig() } // this signal gets emitted by a playerInterface when the player's playtime changed - connect(_player, SIGNAL(newSliderPosition(int,int)), - this, SLOT(setSliderPosition(int,int))); + connect(_player, TQT_SIGNAL(newSliderPosition(int,int)), + this, TQT_SLOT(setSliderPosition(int,int))); - connect(_player, SIGNAL(playerStarted()), SLOT(enableAll())); - connect(_player, SIGNAL(playerStopped()), SLOT(disableAll())); - connect(_player, SIGNAL(playingStatusChanged(int)), SLOT(slotPlayingStatusChanged(int))); + connect(_player, TQT_SIGNAL(playerStarted()), TQT_SLOT(enableAll())); + connect(_player, TQT_SIGNAL(playerStopped()), TQT_SLOT(disableAll())); + connect(_player, TQT_SIGNAL(playingStatusChanged(int)), TQT_SLOT(slotPlayingStatusChanged(int))); // do we use our icons or the default ones from KDE? if(_configFrontend->useCustomTheme()) { // load theme - QString skindir = locate("data", "mediacontrol/"+_configFrontend->theme()+"/"); + TQString skindir = locate("data", "mediacontrol/"+_configFrontend->theme()+"/"); // the user has to take care if all pixmaps are there, we only check for one of them - if (QFile(skindir+"play.png").exists()) + if (TQFile(skindir+"play.png").exists()) { prev_button->setIconSet(SmallIconSet(locate("data",skindir+"prev.png"))); if (_player->playingStatus() == PlayerInterface::Playing) @@ -441,17 +441,17 @@ void MediaControl::reparseConfig() slider_tooltip = new MediaControlToolTip(time_slider, _player); - connect(prev_button, SIGNAL(clicked()), _player, SLOT(prev())); - connect(playpause_button, SIGNAL(clicked()), _player, SLOT(playpause())); - connect(stop_button, SIGNAL(clicked()), _player, SLOT(stop())); - connect(next_button, SIGNAL(clicked()), _player, SLOT(next())); - - connect(time_slider, SIGNAL(sliderPressed()), _player, SLOT(sliderStartDrag())); - connect(time_slider, SIGNAL(sliderReleased()), _player, SLOT(sliderStopDrag())); - connect(time_slider, SIGNAL(valueChanged(int)), this, SLOT(adjustTime(int))); - connect(time_slider, SIGNAL(volumeUp()), _player, SLOT(volumeUp())); - connect(time_slider, SIGNAL(volumeDown()), _player, SLOT(volumeDown())); - connect(this, SIGNAL(newJumpToTime(int)), _player, SLOT(jumpToTime(int))); + connect(prev_button, TQT_SIGNAL(clicked()), _player, TQT_SLOT(prev())); + connect(playpause_button, TQT_SIGNAL(clicked()), _player, TQT_SLOT(playpause())); + connect(stop_button, TQT_SIGNAL(clicked()), _player, TQT_SLOT(stop())); + connect(next_button, TQT_SIGNAL(clicked()), _player, TQT_SLOT(next())); + + connect(time_slider, TQT_SIGNAL(sliderPressed()), _player, TQT_SLOT(sliderStartDrag())); + connect(time_slider, TQT_SIGNAL(sliderReleased()), _player, TQT_SLOT(sliderStopDrag())); + connect(time_slider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(adjustTime(int))); + connect(time_slider, TQT_SIGNAL(volumeUp()), _player, TQT_SLOT(volumeUp())); + connect(time_slider, TQT_SIGNAL(volumeDown()), _player, TQT_SLOT(volumeDown())); + connect(this, TQT_SIGNAL(newJumpToTime(int)), _player, TQT_SLOT(jumpToTime(int))); } // Widget Placement =================================================================== @@ -496,18 +496,18 @@ int MediaControl::heightForWidth(int width) const } } -void MediaControl::mousePressEvent(QMouseEvent* e) +void MediaControl::mousePressEvent(TQMouseEvent* e) { - if (e->button() == QMouseEvent::RightButton) + if (e->button() == TQMouseEvent::RightButton) rmbMenu->popup(e->globalPos()); } -bool MediaControl::eventFilter(QObject *, QEvent *e) +bool MediaControl::eventFilter(TQObject *, TQEvent *e) { - if (e->type() == QEvent::MouseButtonPress) + if (e->type() == TQEvent::MouseButtonPress) { - QMouseEvent *me = static_cast<QMouseEvent *>(e); - if (me->button() == QMouseEvent::RightButton) + TQMouseEvent *me = static_cast<TQMouseEvent *>(e); + if (me->button() == TQMouseEvent::RightButton) { rmbMenu->popup(me->globalPos()); return true; @@ -516,25 +516,25 @@ bool MediaControl::eventFilter(QObject *, QEvent *e) return false; } -void MediaControl::paletteChange( const QPalette& ) +void MediaControl::paletteChange( const TQPalette& ) { time_slider->setBackground(); } -void MediaControl::moveEvent( QMoveEvent* ) +void MediaControl::moveEvent( TQMoveEvent* ) { time_slider->setBackground(); } // Danger: Weird Code ahead! ;)) -void MediaControl::resizeEvent( QResizeEvent* ) +void MediaControl::resizeEvent( TQResizeEvent* ) { // kdDebug(90200) << "resizeEvent()" << endl; int w = width(); int h = height(); if ( orientation() == Vertical ) { // ====== VERTICAL ================================================= - time_slider->setOrientation(QSlider::Vertical); + time_slider->setOrientation(TQSlider::Vertical); int slider_width = time_slider->minimumSizeHint().width(); // some styles need more space for sliders than avilable in very small panels :( if ( slider_width > w ) slider_width = w; @@ -566,7 +566,7 @@ void MediaControl::resizeEvent( QResizeEvent* ) } else // ====== HORIZONTAL =============================================== { - time_slider->setOrientation(QSlider::Horizontal); + time_slider->setOrientation(TQSlider::Horizontal); int slider_height = time_slider->minimumSizeHint().height(); // some styles need more space for sliders than avilable in very small panels :( if ( slider_height > h ) slider_height = h; @@ -600,15 +600,15 @@ void MediaControl::resizeEvent( QResizeEvent* ) // Our Button ======================================================================== -TrayButton::TrayButton(QWidget* parent, const char* name) +TrayButton::TrayButton(TQWidget* parent, const char* name) : SimpleButton (parent, name) { setBackgroundMode(PaletteBackground); setBackgroundOrigin(AncestorOrigin); } -void TrayButton::setIconSet(const QIconSet &iconSet) +void TrayButton::setIconSet(const TQIconSet &iconSet) { - setPixmap(iconSet.pixmap(QIconSet::Automatic, QIconSet::Normal, QIconSet::On)); + setPixmap(iconSet.pixmap(TQIconSet::Automatic, TQIconSet::Normal, TQIconSet::On)); } diff --git a/kicker-applets/mediacontrol/mediacontrol.h b/kicker-applets/mediacontrol/mediacontrol.h index f5a6e5e..c6ec47b 100644 --- a/kicker-applets/mediacontrol/mediacontrol.h +++ b/kicker-applets/mediacontrol/mediacontrol.h @@ -29,10 +29,10 @@ #include <kaboutdata.h> #include <kaboutapplication.h> -#include <qpalette.h> +#include <tqpalette.h> // used everywhere :) -#include <qstring.h> +#include <tqstring.h> #include "playerInterface.h" #include "configfrontend.h" @@ -55,9 +55,9 @@ class TrayButton : public SimpleButton Q_OBJECT public: - TrayButton(QWidget* parent, const char* name); + TrayButton(TQWidget* parent, const char* name); virtual ~TrayButton() {} - void setIconSet(const QIconSet &iconSet); + void setIconSet(const TQIconSet &iconSet); }; // ============================================================================= @@ -67,13 +67,13 @@ class MediaControl : public KPanelApplet, virtual public MediaControlIface Q_OBJECT public: - MediaControl(const QString&, Type, int ,QWidget * = 0, const char * = 0); + MediaControl(const TQString&, Type, int ,TQWidget * = 0, const char * = 0); virtual ~MediaControl(); int widthForHeight(int height) const; int heightForWidth(int width) const; - void dragEnterEvent(QDragEnterEvent* event); - void dropEvent(QDropEvent* event); + void dragEnterEvent(TQDragEnterEvent* event); + void dropEvent(TQDropEvent* event); virtual void reparseConfig(); public slots: @@ -96,11 +96,11 @@ class MediaControl : public KPanelApplet, virtual public MediaControlIface int mLastLen, mLastTime, mLastStatus; KPopupMenu *rmbMenu; - virtual void mousePressEvent(QMouseEvent* e); - virtual void moveEvent(QMoveEvent*); - virtual void paletteChange(const QPalette&); - virtual void resizeEvent(QResizeEvent*); - virtual bool eventFilter(QObject *watched, QEvent *e); + virtual void mousePressEvent(TQMouseEvent* e); + virtual void moveEvent(TQMoveEvent*); + virtual void paletteChange(const TQPalette&); + virtual void resizeEvent(TQResizeEvent*); + virtual bool eventFilter(TQObject *watched, TQEvent *e); friend class MediaControlToolTip; MediaControlToolTip *slider_tooltip; diff --git a/kicker-applets/mediacontrol/mediacontrolconfig.cpp b/kicker-applets/mediacontrol/mediacontrolconfig.cpp index b146ff1..0217a25 100644 --- a/kicker-applets/mediacontrol/mediacontrolconfig.cpp +++ b/kicker-applets/mediacontrol/mediacontrolconfig.cpp @@ -25,12 +25,12 @@ #include "mediacontrolconfig.h" #include "mediacontrolconfigwidget.h" -#include <qdir.h> -#include <qcheckbox.h> -#include <qlistbox.h> -#include <qtoolbutton.h> -#include <qlayout.h> -#include <qgroupbox.h> +#include <tqdir.h> +#include <tqcheckbox.h> +#include <tqlistbox.h> +#include <tqtoolbutton.h> +#include <tqlayout.h> +#include <tqgroupbox.h> #include <kapplication.h> #include <kdebug.h> @@ -42,7 +42,7 @@ #include <knuminput.h> #include <kstandarddirs.h> -MediaControlConfig::MediaControlConfig( ConfigFrontend *cfg, QWidget *parent, const char* name) +MediaControlConfig::MediaControlConfig( ConfigFrontend *cfg, TQWidget *parent, const char* name) : KDialogBase( parent, name, false, i18n("MediaControl"), Ok | Apply | Cancel, Ok, false ) { _configFrontend = cfg; @@ -64,16 +64,16 @@ MediaControlConfig::MediaControlConfig( ConfigFrontend *cfg, QWidget *parent, co _child->themeListBox->clear(); // fill with available skins KGlobal::dirs()->addResourceType("themes", KStandardDirs::kde_default("data") + "mediacontrol"); - QStringList list = KGlobal::dirs()->resourceDirs("themes"); - for (QStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it) + TQStringList list = KGlobal::dirs()->resourceDirs("themes"); + for (TQStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it) readSkinDir(*it); - connect(_child->mWheelScrollAmount, SIGNAL(valueChanged(int)), SLOT(slotConfigChanged())); - connect(_child->playerListBox, SIGNAL(selectionChanged()), SLOT(slotConfigChanged())); - connect(_child->themeListBox, SIGNAL(selectionChanged()), SLOT(slotConfigChanged())); - connect(_child->themeListBox, SIGNAL(selectionChanged(QListBoxItem *)), SLOT(slotChangePreview(QListBoxItem *))); - connect(_child->mUseThemes, SIGNAL(toggled(bool)), SLOT(slotConfigChanged()) ); - connect(_child->mUseThemes, SIGNAL(toggled(bool)), SLOT(slotUseThemesToggled(bool)) ); + connect(_child->mWheelScrollAmount, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotConfigChanged())); + connect(_child->playerListBox, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotConfigChanged())); + connect(_child->themeListBox, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotConfigChanged())); + connect(_child->themeListBox, TQT_SIGNAL(selectionChanged(TQListBoxItem *)), TQT_SLOT(slotChangePreview(TQListBoxItem *))); + connect(_child->mUseThemes, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotConfigChanged()) ); + connect(_child->mUseThemes, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotUseThemesToggled(bool)) ); load(); show(); @@ -81,9 +81,9 @@ MediaControlConfig::MediaControlConfig( ConfigFrontend *cfg, QWidget *parent, co enableButtonApply ( false ); // apply id disabled until something changed } -void MediaControlConfig::readSkinDir( const QString &dir ) +void MediaControlConfig::readSkinDir( const TQString &dir ) { - QDir directory( dir ); + TQDir directory( dir ); if (!directory.exists()) return; @@ -93,7 +93,7 @@ void MediaControlConfig::readSkinDir( const QString &dir ) while ( it.current() ) { // append directory-name to our theme-listbox - if ( QFile(it.current()->absFilePath()+"/play.png").exists() ) + if ( TQFile(it.current()->absFilePath()+"/play.png").exists() ) _child->themeListBox->insertItem ( it.current()->baseName(), -1 ); ++it; } @@ -104,7 +104,7 @@ void MediaControlConfig::readSkinDir( const QString &dir ) void MediaControlConfig::load() { // find the playerstring from config in the playerlist and select it if found - QListBoxItem *item = 0; + TQListBoxItem *item = 0; item = _child->playerListBox->findItem( _configFrontend->player() ); if ( item ) @@ -178,9 +178,9 @@ void MediaControlConfig::slotConfigChanged() enableButtonApply ( true ); } -void MediaControlConfig::slotChangePreview(QListBoxItem *item) +void MediaControlConfig::slotChangePreview(TQListBoxItem *item) { - QString skindir = item->text(); + TQString skindir = item->text(); _child->previewPrev->setIconSet(SmallIconSet(locate("themes",skindir+"/prev.png"))); _child->previewPlay->setIconSet(SmallIconSet(locate("themes",skindir+"/play.png"))); _child->previewPause->setIconSet(SmallIconSet(locate("themes",skindir+"/pause.png"))); diff --git a/kicker-applets/mediacontrol/mediacontrolconfig.h b/kicker-applets/mediacontrol/mediacontrolconfig.h index 5869722..4467177 100644 --- a/kicker-applets/mediacontrol/mediacontrolconfig.h +++ b/kicker-applets/mediacontrol/mediacontrolconfig.h @@ -29,9 +29,9 @@ class MediaControlConfig: public KDialogBase { Q_OBJECT public: - MediaControlConfig(ConfigFrontend *cfg, QWidget *parent = 0, const char* name = "MediaControlConfig"); + MediaControlConfig(ConfigFrontend *cfg, TQWidget *parent = 0, const char* name = "MediaControlConfig"); - void readSkinDir(const QString &dir); + void readSkinDir(const TQString &dir); void load(); void save(); @@ -41,7 +41,7 @@ signals: protected slots: void slotConfigChanged(); - void slotChangePreview(QListBoxItem *item); + void slotChangePreview(TQListBoxItem *item); void slotUseThemesToggled(bool); virtual void slotApply(); virtual void slotOk(); diff --git a/kicker-applets/mediacontrol/mpdInterface.cpp b/kicker-applets/mediacontrol/mpdInterface.cpp index 8027f82..98ba0cb 100644 --- a/kicker-applets/mediacontrol/mpdInterface.cpp +++ b/kicker-applets/mediacontrol/mpdInterface.cpp @@ -23,7 +23,7 @@ #include <cstring> -#include <qregexp.h> +#include <tqregexp.h> #include <kmessagebox.h> #include <kdebug.h> @@ -39,16 +39,16 @@ MpdInterface::MpdInterface() , slider_timer(0) , reconnect_timer(0) { - connect(&sock, SIGNAL(error(int)), this, SLOT(connectionError(int))); - connect(&sock, SIGNAL(error(int)), this, SLOT(stopSliderClock())); + connect(&sock, TQT_SIGNAL(error(int)), this, TQT_SLOT(connectionError(int))); + connect(&sock, TQT_SIGNAL(error(int)), this, TQT_SLOT(stopSliderClock())); - connect(&sock, SIGNAL(connected()), this, SLOT(startSliderClock())); - connect(&sock, SIGNAL(connected()), this, SLOT(stopReconnectClock())); - connect(&sock, SIGNAL(connected()), this, SLOT(connected())); + connect(&sock, TQT_SIGNAL(connected()), this, TQT_SLOT(startSliderClock())); + connect(&sock, TQT_SIGNAL(connected()), this, TQT_SLOT(stopReconnectClock())); + connect(&sock, TQT_SIGNAL(connected()), this, TQT_SLOT(connected())); - connect(&sock, SIGNAL(connectionClosed()), this, SLOT(stopSliderClock())); - connect(&sock, SIGNAL(connectionClosed()), this, SLOT(startReconnectClock())); - connect(&sock, SIGNAL(connectionClosed()), this, SIGNAL(playerStopped())); + connect(&sock, TQT_SIGNAL(connectionClosed()), this, TQT_SLOT(stopSliderClock())); + connect(&sock, TQT_SIGNAL(connectionClosed()), this, TQT_SLOT(startReconnectClock())); + connect(&sock, TQT_SIGNAL(connectionClosed()), this, TQT_SIGNAL(playerStopped())); reconnect(); } @@ -95,7 +95,7 @@ void MpdInterface::stopReconnectClock() } -void MpdInterface::timerEvent(QTimerEvent* te) +void MpdInterface::timerEvent(TQTimerEvent* te) { if (te->timerId() == slider_timer) updateSlider(); else if (te->timerId() == reconnect_timer) reconnect(); @@ -104,7 +104,7 @@ void MpdInterface::timerEvent(QTimerEvent* te) void MpdInterface::reconnect() const { - if (sock.state()==QSocket::Idle) + if (sock.state()==TQSocket::Idle) { sock_mutex.tryLock(); //kdDebug(90200) << "Connecting to " << hostname.latin1() << ":" << port << "...\n"; @@ -131,18 +131,18 @@ void MpdInterface::connectionError(int e) { sock_mutex.unlock(); emit playerStopped(); - QString message; + TQString message; if (messagebox_mutex.tryLock()) { switch (e) { - case QSocket::ErrConnectionRefused: + case TQSocket::ErrConnectionRefused: message=i18n("Connection refused to %1:%2.\nIs mpd running?").arg(hostname).arg(port); break; - case QSocket::ErrHostNotFound: + case TQSocket::ErrHostNotFound: message=i18n("Host '%1' not found.").arg(hostname); break; - case QSocket::ErrSocketRead: + case TQSocket::ErrSocketRead: message=i18n("Error reading socket."); break; default: @@ -166,7 +166,7 @@ void MpdInterface::connectionError(int e) bool MpdInterface::dispatch(const char* cmd) const { - if (sock.state()==QSocket::Connected && sock_mutex.tryLock()) + if (sock.state()==TQSocket::Connected && sock_mutex.tryLock()) { long cmd_len=strlen(cmd); //kdDebug(90200) << "sending: " << cmd; @@ -186,10 +186,10 @@ bool MpdInterface::dispatch(const char* cmd) const return false; } -bool MpdInterface::fetchLine(QString& res) const +bool MpdInterface::fetchLine(TQString& res) const { - QString errormessage; - while (sock.state()==QSocket::Connected) + TQString errormessage; + while (sock.state()==TQSocket::Connected) { if (!sock.canReadLine()) { @@ -231,7 +231,7 @@ bool MpdInterface::fetchLine(QString& res) const bool MpdInterface::fetchOk() const { - QString res; + TQString res; while (fetchLine(res)) { } if (res.startsWith("OK")) return true; @@ -244,8 +244,8 @@ void MpdInterface::updateSlider() //kdDebug(90200) << "update slider\n"; if (!dispatch("status\n")) return; - QString res; - QRegExp time_re("time: (\\d+):(\\d+)"); + TQString res; + TQRegExp time_re("time: (\\d+):(\\d+)"); while(fetchLine(res)) { if (res.startsWith("state: ")) @@ -265,7 +265,7 @@ void MpdInterface::updateSlider() } else if (time_re.search(res)>=0) { - QStringList timeinfo=time_re.capturedTexts(); + TQStringList timeinfo=time_re.capturedTexts(); timeinfo.pop_front(); int elapsed_seconds=timeinfo.first().toInt(); timeinfo.pop_front(); @@ -292,13 +292,13 @@ void MpdInterface::jumpToTime(int sec) long songid=-1; - QString res; - QRegExp songid_re("songid: (\\d+)"); + TQString res; + TQRegExp songid_re("songid: (\\d+)"); while(fetchLine(res)) { if (songid_re.search(res)>=0) { - QStringList songidinfo=songid_re.capturedTexts(); + TQStringList songidinfo=songid_re.capturedTexts(); songidinfo.pop_front(); songid=songidinfo.first().toInt(); } @@ -306,7 +306,7 @@ void MpdInterface::jumpToTime(int sec) if (songid>-1) { - if (dispatch(QString("seekid %1 %2\n").arg(songid).arg(sec).latin1())) + if (dispatch(TQString("seekid %1 %2\n").arg(songid).arg(sec).latin1())) { fetchOk(); // unlocks } @@ -349,13 +349,13 @@ void MpdInterface::changeVolume(int delta) int volume=-1; - QString res; - QRegExp volume_re("volume: (\\d+)"); + TQString res; + TQRegExp volume_re("volume: (\\d+)"); while(fetchLine(res)) { if (volume_re.search(res)>=0) { - QStringList info=volume_re.capturedTexts(); + TQStringList info=volume_re.capturedTexts(); info.pop_front(); volume=info.first().toInt(); } @@ -366,7 +366,7 @@ void MpdInterface::changeVolume(int delta) volume+=delta; if (volume<0) volume=0; if (volume>100) volume=100; - if (dispatch(QString("setvol %1\n").arg(volume).latin1())) + if (dispatch(TQString("setvol %1\n").arg(volume).latin1())) { fetchOk(); } @@ -385,12 +385,12 @@ void MpdInterface::volumeDown() changeVolume(-5); } -void MpdInterface::dragEnterEvent(QDragEnterEvent* event) +void MpdInterface::dragEnterEvent(TQDragEnterEvent* event) { event->accept( KURLDrag::canDecode(event) ); } -void MpdInterface::dropEvent(QDropEvent* event) +void MpdInterface::dropEvent(TQDropEvent* event) { reconnect(); @@ -403,15 +403,15 @@ void MpdInterface::dropEvent(QDropEvent* event) if (dispatch("playlistid\n")) { long songid=-1; - QString file; - QString res; + TQString file; + TQString res; while(fetchLine(res)) { - QRegExp file_re("file: (.+)"); - QRegExp id_re("Id: (.+)"); + TQRegExp file_re("file: (.+)"); + TQRegExp id_re("Id: (.+)"); if (file.isEmpty() && file_re.search(res)>=0) { - QStringList info=file_re.capturedTexts(); + TQStringList info=file_re.capturedTexts(); info.pop_front(); // if the dropped file ends with the same name, record it if (list.front().path().endsWith(info.first())) @@ -422,7 +422,7 @@ void MpdInterface::dropEvent(QDropEvent* event) else if (!file.isEmpty() && id_re.search(res)>=0) { // when we have the file, pick up the id (file scomes first) - QStringList info=id_re.capturedTexts(); + TQStringList info=id_re.capturedTexts(); info.pop_front(); songid=info.first().toInt(); fetchOk(); // skip to the end @@ -433,7 +433,7 @@ void MpdInterface::dropEvent(QDropEvent* event) // found song, so lets play it if (songid>-1) { - if (dispatch((QString("playid %1\n").arg(songid)).latin1())) + if (dispatch((TQString("playid %1\n").arg(songid)).latin1())) { if (fetchOk()) list.pop_front(); return; @@ -447,13 +447,13 @@ void MpdInterface::dropEvent(QDropEvent* event) { if ((*i).isLocalFile()) { - QStringList path=QStringList::split("/",(*i).path()); + TQStringList path=TQStringList::split("/",(*i).path()); while (!path.empty()) { - if (dispatch((QString("add \"") + if (dispatch((TQString("add \"") +path.join("/").replace("\"","\\\"") - +QString("\"\n")).latin1())) + +TQString("\"\n")).latin1())) { if (fetchOk()) break; } @@ -468,22 +468,22 @@ void MpdInterface::dropEvent(QDropEvent* event) } } -const QString MpdInterface::getTrackTitle() const +const TQString MpdInterface::getTrackTitle() const { - QString result; + TQString result; reconnect(); if (!dispatch("status\n")) return result; long songid=-1; - QString res; + TQString res; while(fetchLine(res)) { - QRegExp songid_re("songid: (\\d+)"); + TQRegExp songid_re("songid: (\\d+)"); if (songid_re.search(res)>=0) { - QStringList songidinfo=songid_re.capturedTexts(); + TQStringList songidinfo=songid_re.capturedTexts(); songidinfo.pop_front(); songid=songidinfo.first().toInt(); } @@ -491,48 +491,48 @@ const QString MpdInterface::getTrackTitle() const if (!(songid>-1)) return result; - if (!dispatch(QString("playlistid %1\n").arg(songid).latin1())) + if (!dispatch(TQString("playlistid %1\n").arg(songid).latin1())) return result; - QString artist; - QString album; - QString title; - QString track; - QString file; + TQString artist; + TQString album; + TQString title; + TQString track; + TQString file; while(fetchLine(res)) { - QRegExp artist_re("Artist: (.+)"); - QRegExp album_re("Album: (.+)"); - QRegExp track_re("Album: (.+)"); - QRegExp title_re("Title: (.+)"); - QRegExp file_re("file: (.+)"); + TQRegExp artist_re("Artist: (.+)"); + TQRegExp album_re("Album: (.+)"); + TQRegExp track_re("Album: (.+)"); + TQRegExp title_re("Title: (.+)"); + TQRegExp file_re("file: (.+)"); if (artist_re.search(res)>=0) { - QStringList info=artist_re.capturedTexts(); + TQStringList info=artist_re.capturedTexts(); info.pop_front(); artist=info.first(); } else if (album_re.search(res)>=0) { - QStringList info=album_re.capturedTexts(); + TQStringList info=album_re.capturedTexts(); info.pop_front(); album=info.first(); } else if (title_re.search(res)>=0) { - QStringList info=title_re.capturedTexts(); + TQStringList info=title_re.capturedTexts(); info.pop_front(); title=info.first(); } else if (track_re.search(res)>=0) { - QStringList info=track_re.capturedTexts(); + TQStringList info=track_re.capturedTexts(); info.pop_front(); track=info.first(); } else if (file_re.search(res)>=0) { - QStringList info=file_re.capturedTexts(); + TQStringList info=file_re.capturedTexts(); info.pop_front(); file=info.first(); } @@ -568,7 +568,7 @@ int MpdInterface::playingStatus() if (!dispatch("status\n")) return Stopped; PlayingStatus status=Stopped; - QString res; + TQString res; while(fetchLine(res)) { if (res.startsWith("state: ")) diff --git a/kicker-applets/mediacontrol/mpdInterface.h b/kicker-applets/mediacontrol/mpdInterface.h index d891586..ab95637 100644 --- a/kicker-applets/mediacontrol/mpdInterface.h +++ b/kicker-applets/mediacontrol/mpdInterface.h @@ -23,10 +23,10 @@ #define MPDINTERFACE_H #include "playerInterface.h" -#include <qtimer.h> +#include <tqtimer.h> #include <klocale.h> -#include <qsocket.h> -#include <qmutex.h> +#include <tqsocket.h> +#include <tqmutex.h> class MpdInterface : public PlayerInterface @@ -47,9 +47,9 @@ class MpdInterface virtual void prev(); virtual void volumeUp(); virtual void volumeDown(); - virtual void dragEnterEvent(QDragEnterEvent* event); - virtual void dropEvent(QDropEvent* event); - virtual const QString getTrackTitle() const; + virtual void dragEnterEvent(TQDragEnterEvent* event); + virtual void dropEvent(TQDropEvent* event); + virtual const TQString getTrackTitle() const; virtual int playingStatus(); void changeVolume(int delta); @@ -65,15 +65,15 @@ class MpdInterface protected: - virtual void timerEvent(QTimerEvent* te); + virtual void timerEvent(TQTimerEvent* te); private: - mutable QSocket sock; - mutable QMutex sock_mutex; + mutable TQSocket sock; + mutable TQMutex sock_mutex; - mutable QMutex messagebox_mutex; + mutable TQMutex messagebox_mutex; - QString hostname; + TQString hostname; int port; static const int SLIDER_TIMER_INTERVAL = 500; // ms @@ -94,7 +94,7 @@ class MpdInterface /** fetches a line and returns true, or false if OK or ACK (end of message). Will unlock the sock_mutex on the end of message. */ - bool fetchLine(QString& res) const; + bool fetchLine(TQString& res) const; }; #endif // MPDINTERFACE_H diff --git a/kicker-applets/mediacontrol/noatunInterface.cpp b/kicker-applets/mediacontrol/noatunInterface.cpp index f6cdfc8..c7355dc 100644 --- a/kicker-applets/mediacontrol/noatunInterface.cpp +++ b/kicker-applets/mediacontrol/noatunInterface.cpp @@ -20,8 +20,8 @@ #include <kapplication.h> #include <kdebug.h> -#include <qstringlist.h> -#include <qstrlist.h> +#include <tqstringlist.h> +#include <tqstrlist.h> #include <kurldrag.h> #define TIMER_FAST 250 @@ -29,18 +29,18 @@ NoatunInterface::NoatunInterface() : PlayerInterface() { mTimerValue = TIMER_FAST; - mNoatunTimer = new QTimer(this, "mNoatunTimer"); + mNoatunTimer = new TQTimer(this, "mNoatunTimer"); - connect(mNoatunTimer, SIGNAL(timeout()), SLOT(updateSlider())); + connect(mNoatunTimer, TQT_SIGNAL(timeout()), TQT_SLOT(updateSlider())); - 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&))); kapp->dcopClient()->setNotifications(true); - QTimer::singleShot(0, this, SLOT(myInit())); + TQTimer::singleShot(0, this, TQT_SLOT(myInit())); } NoatunInterface::~NoatunInterface() @@ -64,7 +64,7 @@ void NoatunInterface::myInit() } } -void NoatunInterface::appRegistered(const QCString &appId) +void NoatunInterface::appRegistered(const TQCString &appId) { if (appId.contains("noatun",false)) { @@ -74,7 +74,7 @@ void NoatunInterface::appRegistered(const QCString &appId) } } -void NoatunInterface::appRemoved(const QCString &appId) +void NoatunInterface::appRemoved(const TQCString &appId) { if (appId.contains("noatun",false)) { @@ -91,8 +91,8 @@ void NoatunInterface::updateSlider() { // length/time in msecs, -1 means "no playobject in noatun" int len, time; - QByteArray data, replyData; - QCString replyType; + TQByteArray data, replyData; + TQCString replyType; if (!kapp->dcopClient()->call(mAppId, "Noatun", "length()", data, replyType, replyData, false, 200)) { @@ -102,7 +102,7 @@ void NoatunInterface::updateSlider() } else { - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); if (replyType == "int") { reply >> len; @@ -127,7 +127,7 @@ void NoatunInterface::updateSlider() } else { - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); if (replyType == "int") { reply >> time; @@ -150,8 +150,8 @@ void NoatunInterface::updateSlider() int NoatunInterface::playingStatus() { - QByteArray data, replyData; - QCString replyType; + TQByteArray data, replyData; + TQCString replyType; if (!kapp->dcopClient()->call(mAppId, "Noatun", "state()", data, replyType, replyData, false, 200)) @@ -161,7 +161,7 @@ int NoatunInterface::playingStatus() else { int status = 0; - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); if (replyType == "int") reply >> status; @@ -177,22 +177,22 @@ int NoatunInterface::playingStatus() // Drag-n-Drop stuff ================================================================= -void NoatunInterface::dragEnterEvent(QDragEnterEvent* event) +void NoatunInterface::dragEnterEvent(TQDragEnterEvent* event) { // kdDebug(90200) << "NoatunInterface::dragEnterEvent()" << endl; event->accept(KURLDrag::canDecode(event)); } -void NoatunInterface::dropEvent(QDropEvent* event) +void NoatunInterface::dropEvent(TQDropEvent* event) { // kdDebug(90200) << "NoatunInterface::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.toStringList() << false; - kapp->dcopClient()->send(mAppId, "Noatun", "addFile(QStringList,bool)", data); + kapp->dcopClient()->send(mAppId, "Noatun", "addFile(TQStringList,bool)", data); } } @@ -210,8 +210,8 @@ void NoatunInterface::sliderStopDrag() void NoatunInterface::jumpToTime(int sec) { - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << (sec*1000); // noatun wants milliseconds kapp->dcopClient()->send(mAppId, "Noatun", "skipTo(int)", data); } @@ -220,46 +220,46 @@ void NoatunInterface::playpause() { if (!findRunningNoatun()) startPlayer("noatun"); - kapp->dcopClient()->send(mAppId, "Noatun", "playpause()", QString::null); + kapp->dcopClient()->send(mAppId, "Noatun", "playpause()", TQString::null); } void NoatunInterface::stop() { - kapp->dcopClient()->send(mAppId, "Noatun", "stop()", QString::null); + kapp->dcopClient()->send(mAppId, "Noatun", "stop()", TQString::null); } void NoatunInterface::next() { // fastForward() is noatun from kde2 - //kapp->dcopClient()->send("noatun", "Noatun", "fastForward()", QString::null); - kapp->dcopClient()->send(mAppId, "Noatun", "forward()", QString::null); + //kapp->dcopClient()->send("noatun", "Noatun", "fastForward()", TQString::null); + kapp->dcopClient()->send(mAppId, "Noatun", "forward()", TQString::null); } void NoatunInterface::prev() { - kapp->dcopClient()->send(mAppId, "Noatun", "back()", QString::null); + kapp->dcopClient()->send(mAppId, "Noatun", "back()", TQString::null); } void NoatunInterface::volumeUp() { - kapp->dcopClient()->send(mAppId, "Noatun", "volumeDown()", QString::null); + kapp->dcopClient()->send(mAppId, "Noatun", "volumeDown()", TQString::null); } void NoatunInterface::volumeDown() { - kapp->dcopClient()->send(mAppId, "Noatun", "volumeUp()", QString::null); + kapp->dcopClient()->send(mAppId, "Noatun", "volumeUp()", TQString::null); } -const QString NoatunInterface::getTrackTitle() const +const TQString NoatunInterface::getTrackTitle() const { - QString title(""); - QByteArray data, replyData; - QCString replyType; + TQString title(""); + TQByteArray data, replyData; + TQCString replyType; if (kapp->dcopClient()->call(mAppId, "Noatun", "title()", data, replyType, replyData, false, 200)) { - QDataStream reply(replyData, IO_ReadOnly); - if (replyType == "QString") + TQDataStream reply(replyData, IO_ReadOnly); + if (replyType == "TQString") reply >> title; } return title; @@ -269,7 +269,7 @@ bool NoatunInterface::findRunningNoatun() { // FIXME: what if we have a dcop app named, let's say, 'noatunfrontend'? QCStringList allApps = kapp->dcopClient()->registeredApplications(); - QValueList<QCString>::const_iterator iterator; + TQValueList<TQCString>::const_iterator iterator; for (iterator = allApps.constBegin(); iterator != allApps.constEnd(); ++iterator) { diff --git a/kicker-applets/mediacontrol/noatunInterface.h b/kicker-applets/mediacontrol/noatunInterface.h index 99191b5..36fa21c 100644 --- a/kicker-applets/mediacontrol/noatunInterface.h +++ b/kicker-applets/mediacontrol/noatunInterface.h @@ -23,7 +23,7 @@ #include <kapplication.h> #include <dcopclient.h> -#include <qtimer.h> +#include <tqtimer.h> class NoatunInterface : public PlayerInterface { @@ -43,19 +43,19 @@ class NoatunInterface : public PlayerInterface void prev(); void volumeUp(); void volumeDown(); - void dragEnterEvent(QDragEnterEvent* event); - void dropEvent(QDropEvent* event); - const QString getTrackTitle() const; - void appRegistered(const QCString &appId); - void appRemoved(const QCString &appId); + void dragEnterEvent(TQDragEnterEvent* event); + void dropEvent(TQDropEvent* event); + const TQString getTrackTitle() const; + void appRegistered(const TQCString &appId); + void appRemoved(const TQCString &appId); int playingStatus(); void myInit(void); private: - QTimer *mNoatunTimer; + TQTimer *mNoatunTimer; int mTimerValue; - QCString mAppId; + TQCString mAppId; /** * Tries to find a DCOP registered instance of Noatun diff --git a/kicker-applets/mediacontrol/playerInterface.cpp b/kicker-applets/mediacontrol/playerInterface.cpp index cc388c0..9517aa8 100644 --- a/kicker-applets/mediacontrol/playerInterface.cpp +++ b/kicker-applets/mediacontrol/playerInterface.cpp @@ -24,9 +24,9 @@ PlayerInterface::PlayerInterface() { } // Constructor PlayerInterface::~PlayerInterface() { } // Destructor -void PlayerInterface::startPlayer(const QString &desktopname) +void PlayerInterface::startPlayer(const TQString &desktopname) { - if (KApplication::startServiceByDesktopName(desktopname, QStringList(), + if (KApplication::startServiceByDesktopName(desktopname, TQStringList(), 0, 0, 0, "", false) > 0) { KMessageBox::error(0, i18n("Could not start media player.")); diff --git a/kicker-applets/mediacontrol/playerInterface.h b/kicker-applets/mediacontrol/playerInterface.h index aa4701e..4d7fa7c 100644 --- a/kicker-applets/mediacontrol/playerInterface.h +++ b/kicker-applets/mediacontrol/playerInterface.h @@ -18,8 +18,8 @@ #ifndef PLAYERINTERFACE_H #define PLAYERINTERFACE_H -#include <qobject.h> -#include <qdragobject.h> +#include <tqobject.h> +#include <tqdragobject.h> class PlayerInterface : public QObject { @@ -41,12 +41,12 @@ class PlayerInterface : public QObject virtual void prev()=0; virtual void volumeUp()=0; virtual void volumeDown()=0; - virtual void dragEnterEvent(QDragEnterEvent* event)=0; - virtual void dropEvent(QDropEvent* event)=0; - virtual const QString getTrackTitle() const=0; + virtual void dragEnterEvent(TQDragEnterEvent* event)=0; + virtual void dropEvent(TQDropEvent* event)=0; + virtual const TQString getTrackTitle() const=0; virtual int playingStatus()=0; - void startPlayer(const QString &desktopname); + void startPlayer(const TQString &desktopname); signals: void newSliderPosition(int, int); diff --git a/kicker-applets/mediacontrol/simplebutton.cpp b/kicker-applets/mediacontrol/simplebutton.cpp index 9daa926..478ca2d 100644 --- a/kicker-applets/mediacontrol/simplebutton.cpp +++ b/kicker-applets/mediacontrol/simplebutton.cpp @@ -20,8 +20,8 @@ #include "simplebutton.h" -#include <qpainter.h> -#include <qstyle.h> +#include <tqpainter.h> +#include <tqstyle.h> #include <kapplication.h> #include <kcursor.h> @@ -32,17 +32,17 @@ #include <kipc.h> #include <kstandarddirs.h> -SimpleButton::SimpleButton(QWidget *parent, const char *name) - : QButton(parent, name), +SimpleButton::SimpleButton(TQWidget *parent, const char *name) + : TQButton(parent, name), m_highlight(false), m_orientation(Qt::Horizontal) { setBackgroundOrigin( AncestorOrigin ); - connect( kapp, SIGNAL( settingsChanged( int ) ), - SLOT( slotSettingsChanged( int ) ) ); - connect( kapp, SIGNAL( iconChanged( int ) ), - SLOT( slotIconChanged( int ) ) ); + connect( kapp, TQT_SIGNAL( settingsChanged( int ) ), + TQT_SLOT( slotSettingsChanged( int ) ) ); + connect( kapp, TQT_SIGNAL( iconChanged( int ) ), + TQT_SLOT( slotIconChanged( int ) ) ); kapp->addKipcEventMask( KIPC::SettingsChanged ); kapp->addKipcEventMask( KIPC::IconChanged ); @@ -50,9 +50,9 @@ SimpleButton::SimpleButton(QWidget *parent, const char *name) slotSettingsChanged( KApplication::SETTINGS_MOUSE ); } -void SimpleButton::setPixmap(const QPixmap &pix) +void SimpleButton::setPixmap(const TQPixmap &pix) { - QButton::setPixmap(pix); + TQButton::setPixmap(pix); generateIcons(); update(); } @@ -63,39 +63,39 @@ void SimpleButton::setOrientation(Qt::Orientation orientation) update(); } -QSize SimpleButton::sizeHint() const +TQSize SimpleButton::sizeHint() const { - const QPixmap* pm = pixmap(); + const TQPixmap* pm = pixmap(); if (!pm) - return QButton::sizeHint(); + return TQButton::sizeHint(); else - return QSize(pm->width() + KDialog::spacingHint(), pm->height() + KDialog::spacingHint()); + return TQSize(pm->width() + KDialog::spacingHint(), pm->height() + KDialog::spacingHint()); } -QSize SimpleButton::minimumSizeHint() const +TQSize SimpleButton::minimumSizeHint() const { - const QPixmap* pm = pixmap(); + const TQPixmap* pm = pixmap(); if (!pm) - return QButton::minimumSizeHint(); + return TQButton::minimumSizeHint(); else - return QSize(pm->width(), pm->height()); + return TQSize(pm->width(), pm->height()); } -void SimpleButton::drawButton( QPainter *p ) +void SimpleButton::drawButton( TQPainter *p ) { drawButtonLabel(p); } -void SimpleButton::drawButtonLabel( QPainter *p ) +void SimpleButton::drawButtonLabel( TQPainter *p ) { if (!pixmap()) { return; } - QPixmap pix = isEnabled() ? (m_highlight? m_activeIcon : m_normalIcon) : m_disabledIcon; + TQPixmap pix = isEnabled() ? (m_highlight? m_activeIcon : m_normalIcon) : m_disabledIcon; if (isOn() || isDown()) { @@ -108,7 +108,7 @@ void SimpleButton::drawButtonLabel( QPainter *p ) int ph = pix.height(); int pw = pix.width(); int margin = KDialog::spacingHint(); - QPoint origin(margin / 2, margin / 2); + TQPoint origin(margin / 2, margin / 2); if (ph < (h - margin)) { @@ -130,7 +130,7 @@ void SimpleButton::generateIcons() return; } - QImage image = pixmap()->convertToImage(); + TQImage image = pixmap()->convertToImage(); KIconEffect effect; m_normalIcon = effect.apply(image, KIcon::Panel, KIcon::DefaultState); @@ -170,29 +170,29 @@ void SimpleButton::slotIconChanged( int group ) update(); } -void SimpleButton::enterEvent( QEvent *e ) +void SimpleButton::enterEvent( TQEvent *e ) { m_highlight = true; repaint( false ); - QButton::enterEvent( e ); + TQButton::enterEvent( e ); } -void SimpleButton::leaveEvent( QEvent *e ) +void SimpleButton::leaveEvent( TQEvent *e ) { m_highlight = false; repaint( false ); - QButton::enterEvent( e ); + TQButton::enterEvent( e ); } -void SimpleButton::resizeEvent( QResizeEvent * ) +void SimpleButton::resizeEvent( TQResizeEvent * ) { generateIcons(); } -SimpleArrowButton::SimpleArrowButton(QWidget *parent, Qt::ArrowType arrow, const char *name) +SimpleArrowButton::SimpleArrowButton(TQWidget *parent, Qt::ArrowType arrow, const char *name) : SimpleButton(parent, name) { setBackgroundOrigin(AncestorOrigin); @@ -200,9 +200,9 @@ SimpleArrowButton::SimpleArrowButton(QWidget *parent, Qt::ArrowType arrow, const _inside = false; } -QSize SimpleArrowButton::sizeHint() const +TQSize SimpleArrowButton::sizeHint() const { - return QSize( 12, 12 ); + return TQSize( 12, 12 ); } void SimpleArrowButton::setArrowType(Qt::ArrowType a) @@ -219,32 +219,32 @@ Qt::ArrowType SimpleArrowButton::arrowType() const return _arrow; } -void SimpleArrowButton::drawButton( QPainter *p ) +void SimpleArrowButton::drawButton( TQPainter *p ) { - QRect r(1, 1, width() - 2, height() - 2); + TQRect r(1, 1, width() - 2, height() - 2); - QStyle::PrimitiveElement pe = QStyle::PE_ArrowLeft; + TQStyle::PrimitiveElement pe = TQStyle::PE_ArrowLeft; switch (_arrow) { - case Qt::LeftArrow: pe = QStyle::PE_ArrowLeft; break; - case Qt::RightArrow: pe = QStyle::PE_ArrowRight; break; - case Qt::UpArrow: pe = QStyle::PE_ArrowUp; break; - case Qt::DownArrow: pe = QStyle::PE_ArrowDown; break; + case Qt::LeftArrow: pe = TQStyle::PE_ArrowLeft; break; + case Qt::RightArrow: pe = TQStyle::PE_ArrowRight; break; + case Qt::UpArrow: pe = TQStyle::PE_ArrowUp; break; + case Qt::DownArrow: pe = TQStyle::PE_ArrowDown; break; } - int flags = QStyle::Style_Default | QStyle::Style_Enabled; - if (isDown() || isOn()) flags |= QStyle::Style_Down; + int flags = TQStyle::Style_Default | TQStyle::Style_Enabled; + if (isDown() || isOn()) flags |= TQStyle::Style_Down; style().drawPrimitive(pe, p, r, colorGroup(), flags); } -void SimpleArrowButton::enterEvent( QEvent *e ) +void SimpleArrowButton::enterEvent( TQEvent *e ) { _inside = true; SimpleButton::enterEvent( e ); update(); } -void SimpleArrowButton::leaveEvent( QEvent *e ) +void SimpleArrowButton::leaveEvent( TQEvent *e ) { _inside = false; SimpleButton::enterEvent( e ); diff --git a/kicker-applets/mediacontrol/simplebutton.h b/kicker-applets/mediacontrol/simplebutton.h index 5423dff..1ea5c7a 100644 --- a/kicker-applets/mediacontrol/simplebutton.h +++ b/kicker-applets/mediacontrol/simplebutton.h @@ -21,8 +21,8 @@ #ifndef SIMPLEBUTTON_H #define SIMPLEBUTTON_H -#include <qbutton.h> -#include <qpixmap.h> +#include <tqbutton.h> +#include <tqpixmap.h> #include <kdemacros.h> @@ -31,20 +31,20 @@ class KDE_EXPORT SimpleButton : public QButton Q_OBJECT public: - SimpleButton(QWidget *parent, const char *name = 0); - void setPixmap(const QPixmap &pix); + SimpleButton(TQWidget *parent, const char *name = 0); + void setPixmap(const TQPixmap &pix); void setOrientation(Qt::Orientation orientaton); - QSize sizeHint() const; - QSize minimumSizeHint() const; + TQSize sizeHint() const; + TQSize minimumSizeHint() const; protected: - void drawButton( QPainter *p ); - void drawButtonLabel( QPainter *p ); + void drawButton( TQPainter *p ); + void drawButtonLabel( TQPainter *p ); void generateIcons(); - void enterEvent( QEvent *e ); - void leaveEvent( QEvent *e ); - void resizeEvent( QResizeEvent *e ); + void enterEvent( TQEvent *e ); + void leaveEvent( TQEvent *e ); + void resizeEvent( TQResizeEvent *e ); protected slots: virtual void slotSettingsChanged( int category ); @@ -52,9 +52,9 @@ class KDE_EXPORT SimpleButton : public QButton private: bool m_highlight; - QPixmap m_normalIcon; - QPixmap m_activeIcon; - QPixmap m_disabledIcon; + TQPixmap m_normalIcon; + TQPixmap m_activeIcon; + TQPixmap m_disabledIcon; Qt::Orientation m_orientation; class SimpleButtonPrivate; SimpleButtonPrivate* d; @@ -65,14 +65,14 @@ class KDE_EXPORT SimpleArrowButton: public SimpleButton Q_OBJECT public: - SimpleArrowButton(QWidget *parent = 0, Qt::ArrowType arrow = Qt::UpArrow, const char *name = 0); + SimpleArrowButton(TQWidget *parent = 0, Qt::ArrowType arrow = Qt::UpArrow, const char *name = 0); virtual ~SimpleArrowButton() {}; - QSize sizeHint() const; + TQSize sizeHint() const; protected: - virtual void enterEvent( QEvent *e ); - virtual void leaveEvent( QEvent *e ); - virtual void drawButton(QPainter *p); + virtual void enterEvent( TQEvent *e ); + virtual void leaveEvent( TQEvent *e ); + virtual void drawButton(TQPainter *p); Qt::ArrowType arrowType() const; public slots: diff --git a/kicker-applets/mediacontrol/xmmsInterface.cpp b/kicker-applets/mediacontrol/xmmsInterface.cpp index e2512e5..7d8e236 100644 --- a/kicker-applets/mediacontrol/xmmsInterface.cpp +++ b/kicker-applets/mediacontrol/xmmsInterface.cpp @@ -34,9 +34,9 @@ XmmsInterface::XmmsInterface() : PlayerInterface() { timervalue = TIMER_FAST; bStartingXMMS = false; - xmms_timer = new QTimer ( this, "xmms_timer" ); + xmms_timer = new TQTimer ( this, "xmms_timer" ); - QObject::connect( xmms_timer, SIGNAL(timeout()), SLOT(updateSlider()) ); + TQObject::connect( xmms_timer, TQT_SIGNAL(timeout()), TQT_SLOT(updateSlider()) ); // Better start the timer as late as possible in initialization xmms_timer->start ( timervalue ); @@ -85,16 +85,16 @@ void XmmsInterface::updateSlider ( void ) // Drag-n-Drop stuff ================================================================= -void XmmsInterface::dragEnterEvent(QDragEnterEvent* event) +void XmmsInterface::dragEnterEvent(TQDragEnterEvent* event) { - event->accept( QTextDrag::canDecode(event) ); + event->accept( TQTextDrag::canDecode(event) ); } -void XmmsInterface::dropEvent(QDropEvent* event) +void XmmsInterface::dropEvent(TQDropEvent* event) { - QString text; + TQString text; // kdDebug(90200) << "XmmsInterface::dropEvent()" << endl; - if ( QTextDrag::decode(event, text) ) + if ( TQTextDrag::decode(event, text) ) { xmms_remote_playlist_add_url_string(XMMS_SESSION, (gchar *)text.local8Bit().data()); @@ -127,7 +127,7 @@ void XmmsInterface::playpause() return; startPlayer("xmms"); bStartingXMMS = true; - QTimer::singleShot(500, this, SLOT(playpause())); + TQTimer::singleShot(500, this, TQT_SLOT(playpause())); } else { @@ -174,9 +174,9 @@ int XmmsInterface::playingStatus() return Stopped; } -const QString XmmsInterface::getTrackTitle() const +const TQString XmmsInterface::getTrackTitle() const { - return QString::fromLocal8Bit( + return TQString::fromLocal8Bit( xmms_remote_get_playlist_title(XMMS_SESSION, xmms_remote_get_playlist_pos(XMMS_SESSION))); } diff --git a/kicker-applets/mediacontrol/xmmsInterface.h b/kicker-applets/mediacontrol/xmmsInterface.h index ca514b2..34db157 100644 --- a/kicker-applets/mediacontrol/xmmsInterface.h +++ b/kicker-applets/mediacontrol/xmmsInterface.h @@ -25,7 +25,7 @@ #define XMMSINTERFACE_H #include "playerInterface.h" -#include <qtimer.h> +#include <tqtimer.h> class XmmsInterface : public PlayerInterface { @@ -45,13 +45,13 @@ class XmmsInterface : public PlayerInterface virtual void prev(); virtual void volumeUp(); virtual void volumeDown(); - virtual void dragEnterEvent(QDragEnterEvent* event); - virtual void dropEvent(QDropEvent* event); - virtual const QString getTrackTitle() const; + virtual void dragEnterEvent(TQDragEnterEvent* event); + virtual void dropEvent(TQDropEvent* event); + virtual const TQString getTrackTitle() const; virtual int playingStatus(); private: - QTimer *xmms_timer; + TQTimer *xmms_timer; int timervalue; bool bStartingXMMS; }; |