summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/nowlistening
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/plugins/nowlistening')
-rw-r--r--kopete/plugins/nowlistening/nlamarok.cpp26
-rw-r--r--kopete/plugins/nowlistening/nljuk.cpp42
-rw-r--r--kopete/plugins/nowlistening/nlkaffeine.cpp18
-rw-r--r--kopete/plugins/nowlistening/nlkscd.cpp22
-rw-r--r--kopete/plugins/nowlistening/nlmediaplayer.h16
-rw-r--r--kopete/plugins/nowlistening/nlnoatun.cpp36
-rw-r--r--kopete/plugins/nowlistening/nlnoatun.h4
-rw-r--r--kopete/plugins/nowlistening/nlxmms.cpp2
-rw-r--r--kopete/plugins/nowlistening/nowlisteningguiclient.cpp10
-rw-r--r--kopete/plugins/nowlistening/nowlisteningguiclient.h4
-rw-r--r--kopete/plugins/nowlistening/nowlisteningplugin.cpp102
-rw-r--r--kopete/plugins/nowlistening/nowlisteningplugin.h16
-rw-r--r--kopete/plugins/nowlistening/nowlisteningpreferences.cpp24
-rw-r--r--kopete/plugins/nowlistening/nowlisteningpreferences.h2
14 files changed, 162 insertions, 162 deletions
diff --git a/kopete/plugins/nowlistening/nlamarok.cpp b/kopete/plugins/nowlistening/nlamarok.cpp
index 15d19411..9101758c 100644
--- a/kopete/plugins/nowlistening/nlamarok.cpp
+++ b/kopete/plugins/nowlistening/nlamarok.cpp
@@ -22,7 +22,7 @@
*/
#include <kdebug.h>
-#include <qstring.h>
+#include <tqstring.h>
#include "nlmediaplayer.h"
#include "nlamarok.h"
@@ -38,10 +38,10 @@ void NLamaroK::update()
{
m_playing = false;
m_newTrack = false;
- QString newTrack;
- QByteArray data, replyData;
- QCString replyType;
- QString result;
+ TQString newTrack;
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQString result;
// see if amaroK is registered with DCOP
if ( !m_client->isApplicationRegistered( "amarok" ) )
@@ -64,7 +64,7 @@ void NLamaroK::update()
}
else
{
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
if ( replyType == "bool" ) {
reply >> m_playing;
}
@@ -74,7 +74,7 @@ void NLamaroK::update()
{
int status = 0;
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
if ( replyType == "int" ) {
reply >> status;
kdDebug( 14307 ) << k_funcinfo << "Amarok status()=" << status << endl;
@@ -89,9 +89,9 @@ void NLamaroK::update()
if ( m_client->call( "amarok", "player", "title()", data,
replyType, replyData ) )
{
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
- if ( replyType == "QString" ) {
+ if ( replyType == "TQString" ) {
reply >> newTrack;
}
}
@@ -105,9 +105,9 @@ void NLamaroK::update()
if ( m_client->call( "amarok", "player", "album()", data,
replyType, replyData ) )
{
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
- if ( replyType == "QString" ) {
+ if ( replyType == "TQString" ) {
reply >> m_album;
}
}
@@ -115,9 +115,9 @@ void NLamaroK::update()
if ( m_client->call( "amarok", "player", "artist()", data,
replyType, replyData ) )
{
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
- if ( replyType == "QString" ) {
+ if ( replyType == "TQString" ) {
reply >> m_artist;
}
}
diff --git a/kopete/plugins/nowlistening/nljuk.cpp b/kopete/plugins/nowlistening/nljuk.cpp
index 41de23bc..422e0db9 100644
--- a/kopete/plugins/nowlistening/nljuk.cpp
+++ b/kopete/plugins/nowlistening/nljuk.cpp
@@ -22,7 +22,7 @@
*/
#include <kdebug.h>
-#include <qstring.h>
+#include <tqstring.h>
#include "nlmediaplayer.h"
#include "nljuk.h"
@@ -37,62 +37,62 @@ NLJuk::NLJuk( DCOPClient *client ) : NLMediaPlayer()
void NLJuk::update()
{
m_playing = false;
- QString newTrack;
+ TQString newTrack;
// see if JuK is registered with DCOP
if ( m_client->isApplicationRegistered( "juk" ) )
{
// see if it's playing
- QByteArray data, replyData;
- QCString replyType;
- QString result;
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQString result;
if ( m_client->call( "juk", "Player", "playing()", data,
replyType, replyData ) )
{
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
if ( replyType == "bool" ) {
reply >> m_playing;
}
}
{
- QDataStream arg( data, IO_WriteOnly );
- arg << QString::fromLatin1("Album");
- if ( m_client->call( "juk", "Player", "trackProperty(QString)", data,
+ TQDataStream arg( data, IO_WriteOnly );
+ arg << TQString::fromLatin1("Album");
+ if ( m_client->call( "juk", "Player", "trackProperty(TQString)", data,
replyType, replyData ) )
{
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
- if ( replyType == "QString" ) {
+ if ( replyType == "TQString" ) {
reply >> m_album;
}
}
}
{
- QDataStream arg( data, IO_WriteOnly );
- arg << QString::fromLatin1("Artist");
- if ( m_client->call( "juk", "Player", "trackProperty(QString)", data,
+ TQDataStream arg( data, IO_WriteOnly );
+ arg << TQString::fromLatin1("Artist");
+ if ( m_client->call( "juk", "Player", "trackProperty(TQString)", data,
replyType, replyData ) )
{
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
- if ( replyType == "QString" ) {
+ if ( replyType == "TQString" ) {
reply >> m_artist;
}
}
}
{
- QDataStream arg( data, IO_WriteOnly );
- arg << QString::fromLatin1("Title");
- if ( m_client->call( "juk", "Player", "trackProperty(QString)", data,
+ TQDataStream arg( data, IO_WriteOnly );
+ arg << TQString::fromLatin1("Title");
+ if ( m_client->call( "juk", "Player", "trackProperty(TQString)", data,
replyType, replyData ) )
{
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
- if ( replyType == "QString" ) {
+ if ( replyType == "TQString" ) {
reply >> newTrack;
}
}
diff --git a/kopete/plugins/nowlistening/nlkaffeine.cpp b/kopete/plugins/nowlistening/nlkaffeine.cpp
index fe02077f..d5823298 100644
--- a/kopete/plugins/nowlistening/nlkaffeine.cpp
+++ b/kopete/plugins/nowlistening/nlkaffeine.cpp
@@ -22,7 +22,7 @@
*/
#include <kdebug.h>
-#include <qstring.h>
+#include <tqstring.h>
#include "nlmediaplayer.h"
#include "nlkaffeine.h"
@@ -38,17 +38,17 @@ void NLKaffeine::update()
{
m_playing = false;
m_newTrack = false;
- QString newTrack;
+ TQString newTrack;
bool error = true; // Asume we have a error first.
- QCString kaffeineIface("Kaffeine"), kaffeineGetTrack("getTitle()");
+ TQCString kaffeineIface("Kaffeine"), kaffeineGetTrack("getTitle()");
// see if kaffeine is registered with DCOP
if ( m_client->isApplicationRegistered( "kaffeine" ) )
{
// see if it's playing
- QByteArray data, replyData;
- QCString replyType;
- QString result;
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQString result;
if ( !m_client->call( "kaffeine", kaffeineIface, "isPlaying()", data,
replyType, replyData ) )
{
@@ -73,7 +73,7 @@ void NLKaffeine::update()
// If we didn't get any DCOP error, check if Kaffeine is playing.
if(!error)
{
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
if ( replyType == "bool" ) {
reply >> m_playing;
kdDebug( 14307 ) << "checked if Kaffeine is playing!" << endl;
@@ -83,9 +83,9 @@ void NLKaffeine::update()
if ( m_client->call( "kaffeine", kaffeineIface, kaffeineGetTrack, data,
replyType, replyData ) )
{
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
- if ( replyType == "QString" ) {
+ if ( replyType == "TQString" ) {
reply >> newTrack;
}
}
diff --git a/kopete/plugins/nowlistening/nlkscd.cpp b/kopete/plugins/nowlistening/nlkscd.cpp
index a20c809b..06bf6c28 100644
--- a/kopete/plugins/nowlistening/nlkscd.cpp
+++ b/kopete/plugins/nowlistening/nlkscd.cpp
@@ -22,7 +22,7 @@
*/
#include <kdebug.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "nlmediaplayer.h"
@@ -38,13 +38,13 @@ NLKscd::NLKscd( DCOPClient *client ) : NLMediaPlayer()
void NLKscd::update()
{
m_playing = false;
- QString newTrack;
+ TQString newTrack;
// see if it's registered with DCOP
if ( m_client->isApplicationRegistered( "kscd" ) )
{
// see if it's playing
- QByteArray data, replyData;
- QCString replyType;
+ TQByteArray data, replyData;
+ TQCString replyType;
if ( !m_client->call( "kscd", "CDPlayer", "playing()", data,
replyType, replyData ) )
{
@@ -55,7 +55,7 @@ void NLKscd::update()
}
else
{
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
if ( replyType == "bool" ) {
reply >> m_playing;
// kdDebug( 14307 ) << "NLKscd::update() - KsCD is " <<
@@ -68,8 +68,8 @@ void NLKscd::update()
kdDebug( 14307 ) << "NLKscd::update() DCOP error"
<< endl;
else {
- QDataStream reply( replyData, IO_ReadOnly );
- if ( replyType == "QString" )
+ TQDataStream reply( replyData, IO_ReadOnly );
+ if ( replyType == "TQString" )
reply >> m_artist;
else
kdDebug( 14307 ) << "NLKscd::update() trackList returned unexpected reply type!" << endl;
@@ -81,8 +81,8 @@ void NLKscd::update()
kdDebug( 14307 ) << "NLKscd::update() DCOP error"
<< endl;
else {
- QDataStream reply( replyData, IO_ReadOnly );
- if ( replyType == "QString" )
+ TQDataStream reply( replyData, IO_ReadOnly );
+ if ( replyType == "TQString" )
reply >> m_album;
else
kdDebug( 14307 ) << "NLKscd::update() trackList returned unexpected reply type!" << endl;
@@ -93,8 +93,8 @@ void NLKscd::update()
"currentTrackTitle()", data, replyType, replyData ) )
kdDebug( 14307 ) << "NLKscd::update() - there was some error using DCOP." << endl;
else {
- QDataStream reply( replyData, IO_ReadOnly );
- if ( replyType == "QString" ) {
+ TQDataStream reply( replyData, IO_ReadOnly );
+ if ( replyType == "TQString" ) {
reply >> newTrack;
//kdDebug( 14307 ) << "the result is: " << newTrack.latin1()
// << endl;
diff --git a/kopete/plugins/nowlistening/nlmediaplayer.h b/kopete/plugins/nowlistening/nlmediaplayer.h
index 5c619150..dad13190 100644
--- a/kopete/plugins/nowlistening/nlmediaplayer.h
+++ b/kopete/plugins/nowlistening/nlmediaplayer.h
@@ -38,19 +38,19 @@ class NLMediaPlayer
virtual void update() = 0;
bool playing() const { return m_playing; }
bool newTrack() const { return m_newTrack; }
- QString artist() const { return m_artist; }
- QString album() const { return m_album; }
- QString track() const { return m_track; }
- QString name() const{ return m_name; }
+ TQString artist() const { return m_artist; }
+ TQString album() const { return m_album; }
+ TQString track() const { return m_track; }
+ TQString name() const{ return m_name; }
NLMediaType mediaType() const { return m_type; }
protected:
// The name of the application
- QString m_name;
+ TQString m_name;
bool m_playing;
bool m_newTrack;
- QString m_artist;
- QString m_album;
- QString m_track;
+ TQString m_artist;
+ TQString m_album;
+ TQString m_track;
NLMediaType m_type;
};
diff --git a/kopete/plugins/nowlistening/nlnoatun.cpp b/kopete/plugins/nowlistening/nlnoatun.cpp
index 62bdc8ba..c9c504c2 100644
--- a/kopete/plugins/nowlistening/nlnoatun.cpp
+++ b/kopete/plugins/nowlistening/nlnoatun.cpp
@@ -37,14 +37,14 @@ void NLNoatun::update()
{
// Thanks mETz for telling me about Noatun's currentProperty()
m_playing = false;
- QString newTrack;
+ TQString newTrack;
// see if it's registered with DCOP
- QCString appname = find();
+ TQCString appname = find();
if ( !appname.isEmpty() )
{
// see if it's playing
- QByteArray data, replyData;
- QCString replyType;
+ TQByteArray data, replyData;
+ TQCString replyType;
if ( !m_client->call( appname, "Noatun", "state()", data,
replyType, replyData ) )
{
@@ -52,7 +52,7 @@ void NLNoatun::update()
}
else
{
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
if ( replyType == "int" ) {
int state = 0;
reply >> state;
@@ -64,7 +64,7 @@ void NLNoatun::update()
// Using properties
m_artist = currentProperty( appname, "author" );
m_album = currentProperty( appname, "album" );
- QString title = currentProperty( appname, "title" );
+ TQString title = currentProperty( appname, "title" );
// if properties not set ( no id3 tags... ) fallback to filename
if ( !title.isEmpty() )
newTrack = title;
@@ -75,8 +75,8 @@ void NLNoatun::update()
kdDebug( 14307 ) << "NLNoatun::update() DCOP error on " << appname
<< endl;
else {
- QDataStream reply( replyData, IO_ReadOnly );
- if ( replyType == "QString" ) {
+ TQDataStream reply( replyData, IO_ReadOnly );
+ if ( replyType == "TQString" ) {
reply >> newTrack;
} else
kdDebug( 14307 ) << "NLNoatun::update(), title() returned unexpected reply type!" << endl;
@@ -97,9 +97,9 @@ void NLNoatun::update()
kdDebug( 14307 ) << "NLNoatun::update() - noatun not found" << endl;
}
-QCString NLNoatun::find() const
+TQCString NLNoatun::find() const
{
- QCString app = "noatun";
+ TQCString app = "noatun";
if ( !m_client->isApplicationRegistered( app ) )
{
// looking for a registered app prefixed with 'app'
@@ -121,23 +121,23 @@ QCString NLNoatun::find() const
return app;
}
-QString NLNoatun::currentProperty( QCString appname, QString property ) const
+TQString NLNoatun::currentProperty( TQCString appname, TQString property ) const
{
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg( data, IO_WriteOnly );
- QString result = "";
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg( data, IO_WriteOnly );
+ TQString result = "";
arg << property;
if ( !m_client->call( appname, "Noatun",
- "currentProperty(QString)", data, replyType, replyData ) )
+ "currentProperty(TQString)", data, replyType, replyData ) )
{
kdDebug( 14307 ) << "NLNoatun::currentProperty() DCOP error on "
<< appname << endl;
}
else
{
- QDataStream reply( replyData, IO_ReadOnly );
- if ( replyType == "QString" )
+ TQDataStream reply( replyData, IO_ReadOnly );
+ if ( replyType == "TQString" )
{
reply >> result;
}
diff --git a/kopete/plugins/nowlistening/nlnoatun.h b/kopete/plugins/nowlistening/nlnoatun.h
index 88441754..85e1aaac 100644
--- a/kopete/plugins/nowlistening/nlnoatun.h
+++ b/kopete/plugins/nowlistening/nlnoatun.h
@@ -32,8 +32,8 @@ class NLNoatun : public NLMediaPlayer
NLNoatun( DCOPClient *client );
virtual void update();
protected:
- QCString find() const;
- QString currentProperty( QCString appname, QString property ) const;
+ TQCString find() const;
+ TQString currentProperty( TQCString appname, TQString property ) const;
DCOPClient *m_client;
};
diff --git a/kopete/plugins/nowlistening/nlxmms.cpp b/kopete/plugins/nowlistening/nlxmms.cpp
index a2d3637d..3f5bb675 100644
--- a/kopete/plugins/nowlistening/nlxmms.cpp
+++ b/kopete/plugins/nowlistening/nlxmms.cpp
@@ -49,7 +49,7 @@ void NLXmms::update()
if ( xmmslib &&
xmms_remote_get_version( 0 ) )
{
- QString newTrack;
+ TQString newTrack;
// see if it's playing
if ( xmms_remote_is_playing( 0 ) && !xmms_remote_is_paused( 0 ) )
{
diff --git a/kopete/plugins/nowlistening/nowlisteningguiclient.cpp b/kopete/plugins/nowlistening/nowlisteningguiclient.cpp
index 8e7b1908..c5e47ef0 100644
--- a/kopete/plugins/nowlistening/nowlisteningguiclient.cpp
+++ b/kopete/plugins/nowlistening/nowlisteningguiclient.cpp
@@ -30,12 +30,12 @@
#include <kmessagebox.h>
NowListeningGUIClient::NowListeningGUIClient( Kopete::ChatSession *parent, NowListeningPlugin *plugin )
- : QObject(parent) , KXMLGUIClient(parent)
+ : TQObject(parent) , KXMLGUIClient(parent)
{
- connect(plugin, SIGNAL(readyForUnload()), SLOT(slotPluginUnloaded()));
+ connect(plugin, TQT_SIGNAL(readyForUnload()), TQT_SLOT(slotPluginUnloaded()));
m_msgManager = parent;
m_action = new KAction( i18n( "Send Media Info" ), 0, this,
- SLOT( slotAdvertToCurrentChat() ), actionCollection(), "actionSendAdvert" );
+ TQT_SLOT( slotAdvertToCurrentChat() ), actionCollection(), "actionSendAdvert" );
setXMLFile("nowlisteningchatui.rc");
}
@@ -47,13 +47,13 @@ void NowListeningGUIClient::slotAdvertToCurrentChat()
if (!NowListeningPlugin::plugin())
return;
- QString message = NowListeningPlugin::plugin()->mediaPlayerAdvert();
+ TQString message = NowListeningPlugin::plugin()->mediaPlayerAdvert();
// We warn in a mode appropriate to the mode the user invoked the
// plugin - GUI on menu action, in message if they typed '/media'
if ( message.isEmpty() )
{
- QWidget * origin = 0L;
+ TQWidget * origin = 0L;
if ( m_msgManager && m_msgManager->view() )
origin = m_msgManager->view()->mainWidget();
KMessageBox::queuedMessageBox( origin, KMessageBox::Sorry,
diff --git a/kopete/plugins/nowlistening/nowlisteningguiclient.h b/kopete/plugins/nowlistening/nowlisteningguiclient.h
index 9f89d351..b12b0424 100644
--- a/kopete/plugins/nowlistening/nowlisteningguiclient.h
+++ b/kopete/plugins/nowlistening/nowlisteningguiclient.h
@@ -21,7 +21,7 @@
#ifndef NOWLISTENINGGUICLIENT_H
#define NOWLISTENINGGUICLIENT_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kxmlguiclient.h>
class KAction;
@@ -31,7 +31,7 @@ namespace Kopete {
class ChatSession;
}
-class NowListeningGUIClient : public QObject, public KXMLGUIClient
+class NowListeningGUIClient : public TQObject, public KXMLGUIClient
{
Q_OBJECT
diff --git a/kopete/plugins/nowlistening/nowlisteningplugin.cpp b/kopete/plugins/nowlistening/nowlisteningplugin.cpp
index e28316be..4c286b0f 100644
--- a/kopete/plugins/nowlistening/nowlisteningplugin.cpp
+++ b/kopete/plugins/nowlistening/nowlisteningplugin.cpp
@@ -18,9 +18,9 @@
*************************************************************************
*/
-#include <qtimer.h>
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqtimer.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kgenericfactory.h>
@@ -59,7 +59,7 @@ public:
{}
// abstracted media player interfaces
- QPtrList<NLMediaPlayer> m_mediaPlayerList;
+ TQPtrList<NLMediaPlayer> m_mediaPlayerList;
NLMediaPlayer *m_currentMediaPlayer;
// Needed for DCOP interprocess communication
@@ -69,16 +69,16 @@ public:
// Used when using automatic advertising to know who has already gotten
// the music information
- QStringList m_musicSentTo;
+ TQStringList m_musicSentTo;
// Used when advertising to status message.
- QTimer *advertTimer;
+ TQTimer *advertTimer;
};
typedef KGenericFactory<NowListeningPlugin> NowListeningPluginFactory;
K_EXPORT_COMPONENT_FACTORY( kopete_nowlistening, NowListeningPluginFactory( "kopete_nowlistening" ) )
-NowListeningPlugin::NowListeningPlugin( QObject *parent, const char* name, const QStringList& /*args*/ )
+NowListeningPlugin::NowListeningPlugin( TQObject *parent, const char* name, const TQStringList& /*args*/ )
: Kopete::Plugin( NowListeningPluginFactory::instance(), parent, name )
{
if ( pluginStatic_ )
@@ -91,18 +91,18 @@ NowListeningPlugin::NowListeningPlugin( QObject *parent, const char* name, const
kdDebug(14307) << k_funcinfo << endl;
// Connection for the "/media" command (always needed)
- connect( Kopete::ChatSessionManager::self(), SIGNAL(
- chatSessionCreated( Kopete::ChatSession * )) , SLOT( slotNewKMM(
+ connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL(
+ chatSessionCreated( Kopete::ChatSession * )) , TQT_SLOT( slotNewKMM(
Kopete::ChatSession * ) ) );
// If autoadvertising is on...
connect(Kopete::ChatSessionManager::self(),
- SIGNAL(aboutToSend(Kopete::Message&)),
+ TQT_SIGNAL(aboutToSend(Kopete::Message&)),
this,
- SLOT(slotOutgoingMessage(Kopete::Message&)));
+ TQT_SLOT(slotOutgoingMessage(Kopete::Message&)));
- QValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
- for (QValueListIterator<Kopete::ChatSession*> it= sessions.begin(); it!=sessions.end() ; ++it)
+ TQValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
+ for (TQValueListIterator<Kopete::ChatSession*> it= sessions.begin(); it!=sessions.end() ; ++it)
slotNewKMM( *it );
// get a pointer to the dcop client
@@ -130,16 +130,16 @@ NowListeningPlugin::NowListeningPlugin( QObject *parent, const char* name, const
Kopete::CommandHandler::commandHandler()->registerCommand(
this,
"media",
- SLOT( slotMediaCommand( const QString &, Kopete::ChatSession * ) ),
+ TQT_SLOT( slotMediaCommand( const TQString &, Kopete::ChatSession * ) ),
i18n("USAGE: /media - Displays information on current song"),
0
);
- connect ( this , SIGNAL( settingsChanged() ) , this , SLOT( slotSettingsChanged() ) );
+ connect ( this , TQT_SIGNAL( settingsChanged() ) , this , TQT_SLOT( slotSettingsChanged() ) );
// Advert the accounts with the current listened track.
- d->advertTimer = new QTimer(this);
- connect(d->advertTimer, SIGNAL( timeout() ), this, SLOT( slotAdvertCurrentMusic() ) );
+ d->advertTimer = new TQTimer(this);
+ connect(d->advertTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotAdvertCurrentMusic() ) );
d->advertTimer->start(5000); // Update every 5 seconds
}
@@ -162,9 +162,9 @@ NowListeningPlugin* NowListeningPlugin::plugin()
return pluginStatic_ ;
}
-void NowListeningPlugin::slotMediaCommand( const QString &args, Kopete::ChatSession *theChat )
+void NowListeningPlugin::slotMediaCommand( const TQString &args, Kopete::ChatSession *theChat )
{
- QString advert = mediaPlayerAdvert();
+ TQString advert = mediaPlayerAdvert();
if ( advert.isEmpty() )
{
// Catch no players/no track playing message case:
@@ -189,14 +189,14 @@ void NowListeningPlugin::slotOutgoingMessage(Kopete::Message& msg)
if(!NowListeningConfig::self()->chatAdvertising())
return;
- QString originalBody = msg.plainBody();
+ TQString originalBody = msg.plainBody();
// If it is a /media message, don't process it
if(originalBody.startsWith(NowListeningConfig::self()->header()))
return;
// What will be sent
- QString newBody;
+ TQString newBody;
// Getting the list of contacts the message will be sent to to determine if at least
// one of them has never gotten the current music information.
@@ -204,7 +204,7 @@ void NowListeningPlugin::slotOutgoingMessage(Kopete::Message& msg)
bool mustSendAnyway = false;
for( Kopete::Contact *c = dest.first() ; c ; c = dest.next() )
{
- const QString& cId = c->contactId();
+ const TQString& cId = c->contactId();
if( 0 == d->m_musicSentTo.contains( cId ) )
{
mustSendAnyway = true;
@@ -220,7 +220,7 @@ void NowListeningPlugin::slotOutgoingMessage(Kopete::Message& msg)
// has changed since it was last sent.
if ( mustSendAnyway || newTrack )
{
- QString advert = mediaPlayerAdvert(false); // false since newTrackPlaying() did the update
+ TQString advert = mediaPlayerAdvert(false); // false since newTrackPlaying() did the update
if( !advert.isEmpty() )
newBody = originalBody + "<br>" + advert;
@@ -252,9 +252,9 @@ void NowListeningPlugin::slotAdvertCurrentMusic()
// This slot is called every 5 seconds, so we check if we have a new track playing.
if( newTrackPlaying() )
{
- QString advert;
+ TQString advert;
- QPtrList<Kopete::Account> accountsList = Kopete::AccountManager::self()->accounts();
+ TQPtrList<Kopete::Account> accountsList = Kopete::AccountManager::self()->accounts();
for( Kopete::Account* a = accountsList.first(); a; a = accountsList.next() )
{
/*
@@ -266,7 +266,7 @@ void NowListeningPlugin::slotAdvertCurrentMusic()
*/
if( a->protocol()->pluginId() == "MSNProtocol" && !NowListeningConfig::self()->appendStatusAdvertising() )
{
- QString track, artist, album, mediaList;
+ TQString track, artist, album, mediaList;
bool isPlaying=false;
if( NowListeningConfig::self()->useSpecifiedMediaPlayer() && d->m_currentMediaPlayer )
@@ -298,7 +298,7 @@ void NowListeningPlugin::slotAdvertCurrentMusic()
// KDE4 TODO: Use the new status message framework, and remove this "hack".
if( isPlaying )
{
- advert = QString("[Music]%1").arg(mediaList);
+ advert = TQString("[Music]%1").arg(mediaList);
}
}
@@ -308,21 +308,21 @@ void NowListeningPlugin::slotAdvertCurrentMusic()
{
// Check for the now listening message in parenthesis,
// include the header to not override other messages in parenthesis.
- QRegExp statusSong( QString(" \\(%1.*\\)$").arg( NowListeningConfig::header()) );
+ TQRegExp statusSong( TQString(" \\(%1.*\\)$").arg( NowListeningConfig::header()) );
// HACK: Don't keep appending the now listened song. Replace it in the status message.
advert = a->myself()->property( Kopete::Global::Properties::self()->awayMessage() ).value().toString();
// Remove the braces when they are no listened song.
- QString mediaAdvert = mediaPlayerAdvert(false);
+ TQString mediaAdvert = mediaPlayerAdvert(false);
if(!mediaAdvert.isEmpty())
{
if(statusSong.search(advert) != -1)
{
- advert = advert.replace(statusSong, QString(" (%1)").arg(mediaPlayerAdvert(false)) );
+ advert = advert.replace(statusSong, TQString(" (%1)").arg(mediaPlayerAdvert(false)) );
}
else
{
- advert += QString(" (%1)").arg( mediaPlayerAdvert(false) );
+ advert += TQString(" (%1)").arg( mediaPlayerAdvert(false) );
}
}
else
@@ -341,10 +341,10 @@ void NowListeningPlugin::slotAdvertCurrentMusic()
}
}
-QString NowListeningPlugin::mediaPlayerAdvert(bool update)
+TQString NowListeningPlugin::mediaPlayerAdvert(bool update)
{
// generate message for all players
- QString message;
+ TQString message;
if( NowListeningConfig::self()->useSpecifiedMediaPlayer() && d->m_currentMediaPlayer != 0L )
{
@@ -363,9 +363,9 @@ QString NowListeningPlugin::mediaPlayerAdvert(bool update)
return message;
}
-void NowListeningPlugin::buildTrackMessage(QString &message, NLMediaPlayer *player, bool update)
+void NowListeningPlugin::buildTrackMessage(TQString &message, NLMediaPlayer *player, bool update)
{
- QString perTrack = NowListeningConfig::self()->perTrack();
+ TQString perTrack = NowListeningConfig::self()->perTrack();
if(update)
player->update();
@@ -401,17 +401,17 @@ bool NowListeningPlugin::newTrackPlaying(void) const
return false;
}
-QString NowListeningPlugin::substDepthFirst( NLMediaPlayer *player,
- QString in, bool inBrackets ) const
+TQString NowListeningPlugin::substDepthFirst( NLMediaPlayer *player,
+ TQString in, bool inBrackets ) const
{
- QString track = player->track();
- QString artist = player->artist();
- QString album = player->album();
- QString playerName = player->name();
+ TQString track = player->track();
+ TQString artist = player->artist();
+ TQString album = player->album();
+ TQString playerName = player->name();
for ( unsigned int i = 0; i < in.length(); i++ )
{
- QChar c = in.at( i );
+ TQChar c = in.at( i );
//kdDebug(14307) << "Now working on:" << in << " char is: " << c << endl;
if ( c == '(' )
{
@@ -420,7 +420,7 @@ QString NowListeningPlugin::substDepthFirst( NLMediaPlayer *player,
//kdDebug(14307) << "Looking for ')'" << endl;
for ( unsigned int j = i + 1; j < in.length(); j++ )
{
- QChar d = in.at( j );
+ TQChar d = in.at( j );
//kdDebug(14307) << "Got " << d << endl;
if ( d == '(' )
depth++;
@@ -430,7 +430,7 @@ QString NowListeningPlugin::substDepthFirst( NLMediaPlayer *player,
if ( depth == 0 )
{
// recursively replace contents of matching ()
- QString substitution = substDepthFirst( player,
+ TQString substitution = substDepthFirst( player,
in.mid( i + 1, j - i - 1), true ) ;
in.replace ( i, j - i + 1, substitution );
// perform substitution and return the result
@@ -484,7 +484,7 @@ QString NowListeningPlugin::substDepthFirst( NLMediaPlayer *player,
return in;
}
-void NowListeningPlugin::advertiseToChat( Kopete::ChatSession *theChat, QString message )
+void NowListeningPlugin::advertiseToChat( Kopete::ChatSession *theChat, TQString message )
{
Kopete::ContactPtrList pl = theChat->members();
@@ -522,27 +522,27 @@ void NowListeningPlugin::slotSettingsChanged()
updateCurrentMediaPlayer();
disconnect(Kopete::ChatSessionManager::self(),
- SIGNAL(aboutToSend(Kopete::Message&)),
+ TQT_SIGNAL(aboutToSend(Kopete::Message&)),
this,
- SLOT(slotOutgoingMessage(Kopete::Message&)));
+ TQT_SLOT(slotOutgoingMessage(Kopete::Message&)));
d->advertTimer->stop();
- disconnect(d->advertTimer, SIGNAL(timeout()), this, SLOT(slotAdvertCurrentMusic()));
+ disconnect(d->advertTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAdvertCurrentMusic()));
if( NowListeningConfig::self()->chatAdvertising() )
{
kdDebug(14307) << k_funcinfo << "Now using chat window advertising." << endl;
connect(Kopete::ChatSessionManager::self(),
- SIGNAL(aboutToSend(Kopete::Message&)),
+ TQT_SIGNAL(aboutToSend(Kopete::Message&)),
this,
- SLOT(slotOutgoingMessage(Kopete::Message&)));
+ TQT_SLOT(slotOutgoingMessage(Kopete::Message&)));
}
else if( NowListeningConfig::self()->statusAdvertising() || NowListeningConfig::self()->appendStatusAdvertising() )
{
kdDebug(14307) << k_funcinfo << "Now using status message advertising." << endl;
- connect(d->advertTimer, SIGNAL(timeout()), this, SLOT(slotAdvertCurrentMusic()));
+ connect(d->advertTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAdvertCurrentMusic()));
d->advertTimer->start(5000);
}
}
diff --git a/kopete/plugins/nowlistening/nowlisteningplugin.h b/kopete/plugins/nowlistening/nowlisteningplugin.h
index 7a608fd2..848b8aef 100644
--- a/kopete/plugins/nowlistening/nowlisteningplugin.h
+++ b/kopete/plugins/nowlistening/nowlisteningplugin.h
@@ -23,7 +23,7 @@
#include "kopeteplugin.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
namespace Kopete { class ChatSession; class Message; }
@@ -41,12 +41,12 @@ class NowListeningPlugin : public Kopete::Plugin
friend class NowListeningGUIClient;
public:
- NowListeningPlugin( QObject *parent, const char *name, const QStringList &args );
+ NowListeningPlugin( TQObject *parent, const char *name, const TQStringList &args );
virtual ~NowListeningPlugin();
static NowListeningPlugin* plugin();
public slots:
- void slotMediaCommand( const QString &, Kopete::ChatSession *theChat );
+ void slotMediaCommand( const TQString &, Kopete::ChatSession *theChat );
void slotOutgoingMessage(Kopete::Message&);
void slotAdvertCurrentMusic();
@@ -57,17 +57,17 @@ friend class NowListeningGUIClient;
* useful to set it to false if one already has called
* update somewhere else, for instance in newTrackPlaying().
*/
- QString mediaPlayerAdvert(bool update = true);
+ TQString mediaPlayerAdvert(bool update = true);
/**
* @internal Build the message for @ref mediaPlayerAdvert
- * @param message Reference to the messsage, because return QString cause data loss.
+ * @param message Reference to the messsage, because return TQString cause data loss.
* @param player Pointer to the current Media Player.
* Used to get the information about the current track playing.
* @param update Whether the players must update their data. It can be
* useful to set it to false if one already has called
* update somewhere else, for instance in newTrackPlaying().
*/
- void buildTrackMessage(QString &message, NLMediaPlayer *player, bool update);
+ void buildTrackMessage(TQString &message, NLMediaPlayer *player, bool update);
/**
* @return true if one of the players has changed track since the last message.
*/
@@ -78,11 +78,11 @@ friend class NowListeningGUIClient;
* @p in - the source format string
* @p bool - is this call within a set of brackets for conditional expansion?
*/
- QString substDepthFirst( NLMediaPlayer *player, QString in, bool inBrackets) const;
+ TQString substDepthFirst( NLMediaPlayer *player, TQString in, bool inBrackets) const;
/**
* Sends a message to a single chat
*/
- void advertiseToChat( Kopete::ChatSession* theChat, QString message );
+ void advertiseToChat( Kopete::ChatSession* theChat, TQString message );
/**
* Update the currentMedia pointer on config change.
*/
diff --git a/kopete/plugins/nowlistening/nowlisteningpreferences.cpp b/kopete/plugins/nowlistening/nowlisteningpreferences.cpp
index 179ce3a5..118b37da 100644
--- a/kopete/plugins/nowlistening/nowlisteningpreferences.cpp
+++ b/kopete/plugins/nowlistening/nowlisteningpreferences.cpp
@@ -17,10 +17,10 @@
* *
*************************************************************************
*/
-#include <qspinbox.h>
-#include <qlineedit.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
+#include <tqspinbox.h>
+#include <tqlineedit.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
#include <klistbox.h>
#include <klocale.h>
@@ -36,22 +36,22 @@ typedef KGenericFactory<NowListeningPreferences> NowListeningPreferencesFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kopete_nowlistening, NowListeningPreferencesFactory( "kcm_kopete_nowlistening" ) )
-NowListeningPreferences::NowListeningPreferences(QWidget *parent, const char* /*name*/, const QStringList &args)
+NowListeningPreferences::NowListeningPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args)
: KCModule( NowListeningPreferencesFactory::instance(), parent, args )
{
- ( new QVBoxLayout( this ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this ) )->setAutoAdd( true );
preferencesDialog = new NowListeningPrefsUI( this );
addConfig( NowListeningConfig::self(), preferencesDialog );
// Fill the media player listbox.
- preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("Kscd"));
- preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("Noatun"));
- preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("Juk"));
- preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("amaroK"));
- preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("Kaffeine"));
+ preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("Kscd"));
+ preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("Noatun"));
+ preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("Juk"));
+ preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("amaroK"));
+ preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("Kaffeine"));
#if defined Q_WS_X11 && !defined K_WS_QTONLY && defined HAVE_XMMS
- preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("XMMS"));
+ preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("XMMS"));
#endif
load();
}
diff --git a/kopete/plugins/nowlistening/nowlisteningpreferences.h b/kopete/plugins/nowlistening/nowlisteningpreferences.h
index 14d9ceea..078b1a0c 100644
--- a/kopete/plugins/nowlistening/nowlisteningpreferences.h
+++ b/kopete/plugins/nowlistening/nowlisteningpreferences.h
@@ -33,7 +33,7 @@ class NowListeningPreferences : public KCModule
{
Q_OBJECT
public:
- NowListeningPreferences(QWidget *parent = 0, const char *name = 0, const QStringList &args = QStringList());
+ NowListeningPreferences(TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList());
virtual ~NowListeningPreferences();
virtual void save();
virtual void load();