summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/webpresence
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/plugins/webpresence')
-rw-r--r--kopete/plugins/webpresence/webpresenceplugin.cpp98
-rw-r--r--kopete/plugins/webpresence/webpresenceplugin.h16
-rw-r--r--kopete/plugins/webpresence/webpresencepreferences.cpp10
-rw-r--r--kopete/plugins/webpresence/webpresencepreferences.h2
4 files changed, 63 insertions, 63 deletions
diff --git a/kopete/plugins/webpresence/webpresenceplugin.cpp b/kopete/plugins/webpresence/webpresenceplugin.cpp
index 1856d94c..bb7b9d4c 100644
--- a/kopete/plugins/webpresence/webpresenceplugin.cpp
+++ b/kopete/plugins/webpresence/webpresenceplugin.cpp
@@ -20,9 +20,9 @@
#include "config.h"
-#include <qdom.h>
-#include <qtimer.h>
-#include <qfile.h>
+#include <tqdom.h>
+#include <tqtimer.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -51,18 +51,18 @@
typedef KGenericFactory<WebPresencePlugin> WebPresencePluginFactory;
K_EXPORT_COMPONENT_FACTORY( kopete_webpresence, WebPresencePluginFactory( "kopete_webpresence" ) )
-WebPresencePlugin::WebPresencePlugin( QObject *parent, const char *name, const QStringList& /*args*/ )
+WebPresencePlugin::WebPresencePlugin( TQObject *parent, const char *name, const TQStringList& /*args*/ )
: Kopete::Plugin( WebPresencePluginFactory::instance(), parent, name ),
shuttingDown( false ), resultFormatting( WEB_HTML )
{
- m_writeScheduler = new QTimer( this );
- connect ( m_writeScheduler, SIGNAL( timeout() ), this, SLOT( slotWriteFile() ) );
- connect( Kopete::AccountManager::self(), SIGNAL(accountRegistered(Kopete::Account*)),
- this, SLOT( listenToAllAccounts() ) );
- connect( Kopete::AccountManager::self(), SIGNAL(accountUnregistered(Kopete::Account*)),
- this, SLOT( listenToAllAccounts() ) );
-
- connect(this, SIGNAL(settingsChanged()), this, SLOT( loadSettings() ) );
+ m_writeScheduler = new TQTimer( this );
+ connect ( m_writeScheduler, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotWriteFile() ) );
+ connect( Kopete::AccountManager::self(), TQT_SIGNAL(accountRegistered(Kopete::Account*)),
+ this, TQT_SLOT( listenToAllAccounts() ) );
+ connect( Kopete::AccountManager::self(), TQT_SIGNAL(accountUnregistered(Kopete::Account*)),
+ this, TQT_SLOT( listenToAllAccounts() ) );
+
+ connect(this, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT( loadSettings() ) );
loadSettings();
listenToAllAccounts();
}
@@ -113,8 +113,8 @@ void WebPresencePlugin::listenToAllAccounts()
for ( ProtocolList::Iterator it = protocols.begin();
it != protocols.end(); ++it )
{
- QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( *it );
- QDictIterator<Kopete::Account> acIt( accounts );
+ TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( *it );
+ TQDictIterator<Kopete::Account> acIt( accounts );
for( ; Kopete::Account *account = acIt.current(); ++acIt )
{
@@ -130,18 +130,18 @@ void WebPresencePlugin::listenToAccount( Kopete::Account* account )
{
// Connect to the account's status changed signal
// because we can't know if the account has already connected
- QObject::disconnect( account->myself(),
- SIGNAL(onlineStatusChanged( Kopete::Contact *,
+ TQObject::disconnect( account->myself(),
+ TQT_SIGNAL(onlineStatusChanged( Kopete::Contact *,
const Kopete::OnlineStatus &,
const Kopete::OnlineStatus & ) ),
this,
- SLOT( slotWaitMoreStatusChanges() ) ) ;
- QObject::connect( account->myself(),
- SIGNAL(onlineStatusChanged( Kopete::Contact *,
+ TQT_SLOT( slotWaitMoreStatusChanges() ) ) ;
+ TQObject::connect( account->myself(),
+ TQT_SIGNAL(onlineStatusChanged( Kopete::Contact *,
const Kopete::OnlineStatus &,
const Kopete::OnlineStatus & ) ),
this,
- SLOT( slotWaitMoreStatusChanges() ) );
+ TQT_SLOT( slotWaitMoreStatusChanges() ) );
}
}
@@ -197,8 +197,8 @@ void WebPresencePlugin::slotWriteFile()
// upload it to the specified URL
KURL src( m_output->name() );
KIO::FileCopyJob *job = KIO::file_move( src, dest, -1, true, false, false );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotUploadJobResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotUploadJobResult( KIO::Job * ) ) );
}
void WebPresencePlugin::slotUploadJobResult( KIO::Job *job )
@@ -215,26 +215,26 @@ KTempFile* WebPresencePlugin::generateFile()
{
// generate the (temporary) XML file representing the current contactlist
kdDebug( 14309 ) << k_funcinfo << endl;
- QString notKnown = i18n( "Not yet known" );
+ TQString notKnown = i18n( "Not yet known" );
- QDomDocument doc;
+ TQDomDocument doc;
doc.appendChild( doc.createProcessingInstruction( "xml",
"version=\"1.0\" encoding=\"UTF-8\"" ) );
- QDomElement root = doc.createElement( "webpresence" );
+ TQDomElement root = doc.createElement( "webpresence" );
doc.appendChild( root );
// insert the current date/time
- QDomElement date = doc.createElement( "listdate" );
- QDomText t = doc.createTextNode(
- KGlobal::locale()->formatDateTime( QDateTime::currentDateTime() ) );
+ TQDomElement date = doc.createElement( "listdate" );
+ TQDomText t = doc.createTextNode(
+ KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime() ) );
date.appendChild( t );
root.appendChild( date );
// insert the user's name
- QDomElement name = doc.createElement( "name" );
- QDomText nameText;
+ TQDomElement name = doc.createElement( "name" );
+ TQDomText nameText;
if ( !useImName && !userName.isEmpty() )
nameText = doc.createTextNode( userName );
else
@@ -243,37 +243,37 @@ KTempFile* WebPresencePlugin::generateFile()
root.appendChild( name );
// insert the list of the user's accounts
- QDomElement accounts = doc.createElement( "accounts" );
+ TQDomElement accounts = doc.createElement( "accounts" );
root.appendChild( accounts );
- QPtrList<Kopete::Account> list = Kopete::AccountManager::self()->accounts();
+ TQPtrList<Kopete::Account> list = Kopete::AccountManager::self()->accounts();
// If no accounts, stop here
if ( !list.isEmpty() )
{
- for( QPtrListIterator<Kopete::Account> it( list );
+ for( TQPtrListIterator<Kopete::Account> it( list );
Kopete::Account *account=it.current();
++it )
{
- QDomElement acc = doc.createElement( "account" );
+ TQDomElement acc = doc.createElement( "account" );
//output += h.openTag( "account" );
- QDomElement protoName = doc.createElement( "protocol" );
- QDomText protoNameText = doc.createTextNode(
+ TQDomElement protoName = doc.createElement( "protocol" );
+ TQDomText protoNameText = doc.createTextNode(
account->protocol()->pluginId() );
protoName.appendChild( protoNameText );
acc.appendChild( protoName );
Kopete::Contact* me = account->myself();
- QString displayName = me->property( Kopete::Global::Properties::self()->nickName() ).value().toString();
- QDomElement accName = doc.createElement( "accountname" );
- QDomText accNameText = doc.createTextNode( ( me )
+ TQString displayName = me->property( Kopete::Global::Properties::self()->nickName() ).value().toString();
+ TQDomElement accName = doc.createElement( "accountname" );
+ TQDomText accNameText = doc.createTextNode( ( me )
? displayName
: notKnown );
accName.appendChild( accNameText );
acc.appendChild( accName );
- QDomElement accStatus = doc.createElement( "accountstatus" );
- QDomText statusText = doc.createTextNode( ( me )
+ TQDomElement accStatus = doc.createElement( "accountstatus" );
+ TQDomText statusText = doc.createTextNode( ( me )
? statusAsString( me->onlineStatus() )
: notKnown ) ;
accStatus.appendChild( statusText );
@@ -299,8 +299,8 @@ KTempFile* WebPresencePlugin::generateFile()
if ( showAddresses )
{
- QDomElement accAddress = doc.createElement( "accountaddress" );
- QDomText addressText = doc.createTextNode( ( me )
+ TQDomElement accAddress = doc.createElement( "accountaddress" );
+ TQDomText addressText = doc.createTextNode( ( me )
? me->contactId()
: notKnown );
accAddress.appendChild( addressText );
@@ -313,8 +313,8 @@ KTempFile* WebPresencePlugin::generateFile()
// write the XML to a temporary file
KTempFile* file = new KTempFile();
- QTextStream *stream = file->textStream();
- stream->setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream *stream = file->textStream();
+ stream->setEncoding( TQTextStream::UnicodeUTF8 );
doc.save( *stream, 4 );
file->close();
return file;
@@ -327,7 +327,7 @@ bool WebPresencePlugin::transform( KTempFile * src, KTempFile * dest )
xmlSubstituteEntitiesDefault( 1 );
xmlLoadExtDtdDefaultValue = 1;
- QFile sheet;
+ TQFile sheet;
switch ( resultFormatting ) {
case WEB_XML:
@@ -374,7 +374,7 @@ bool WebPresencePlugin::transform( KTempFile * src, KTempFile * dest )
goto end;
}
- doc = xmlParseFile( QFile::encodeName( src->name() ) );
+ doc = xmlParseFile( TQFile::encodeName( src->name() ) );
if ( !doc ) {
kdDebug(14309) << k_funcinfo << "ERROR: XML parsing failed" << endl;
retval = false;
@@ -430,12 +430,12 @@ ProtocolList WebPresencePlugin::allProtocols()
return result;
}
-QString WebPresencePlugin::statusAsString( const Kopete::OnlineStatus &newStatus )
+TQString WebPresencePlugin::statusAsString( const Kopete::OnlineStatus &newStatus )
{
if (shuttingDown)
return "OFFLINE";
- QString status;
+ TQString status;
switch ( newStatus.status() )
{
case Kopete::OnlineStatus::Online:
diff --git a/kopete/plugins/webpresence/webpresenceplugin.h b/kopete/plugins/webpresence/webpresenceplugin.h
index 3aea9af0..6e8ba946 100644
--- a/kopete/plugins/webpresence/webpresenceplugin.h
+++ b/kopete/plugins/webpresence/webpresenceplugin.h
@@ -20,7 +20,7 @@
#ifndef WEBPRESENCEPLUGIN_H
#define WEBPRESENCEPLUGIN_H
-#include <qvaluestack.h>
+#include <tqvaluestack.h>
#include <kio/job.h>
@@ -33,7 +33,7 @@ namespace Kopete { class MetaContact; }
class KToggleAction;
class KActionCollection;
-typedef QValueList<Kopete::Protocol*> ProtocolList;
+typedef TQValueList<Kopete::Protocol*> ProtocolList;
class WebPresencePlugin : public Kopete::Plugin
{
@@ -43,8 +43,8 @@ private:
int frequency;
bool showAddresses;
bool useImName;
- QString userName;
- QString userStyleSheet;
+ TQString userName;
+ TQString userStyleSheet;
bool useImagesInHTML;
// Is set to true when Kopete has notified us
@@ -59,10 +59,10 @@ private:
WEB_UNDEFINED
} resultFormatting;
- QString resultURL;
+ TQString resultURL;
public:
- WebPresencePlugin( QObject *parent, const char *name, const QStringList &args );
+ WebPresencePlugin( TQObject *parent, const char *name, const TQStringList &args );
virtual ~WebPresencePlugin();
virtual void aboutToUnload();
@@ -108,11 +108,11 @@ protected:
/**
* Converts numeric status to a string
*/
- QString statusAsString( const Kopete::OnlineStatus &newStatus );
+ TQString statusAsString( const Kopete::OnlineStatus &newStatus );
/**
* Schedules writes
*/
- QTimer* m_writeScheduler;
+ TQTimer* m_writeScheduler;
// The file to be uploaded to the WWW
KTempFile *m_output;
diff --git a/kopete/plugins/webpresence/webpresencepreferences.cpp b/kopete/plugins/webpresence/webpresencepreferences.cpp
index 9b00435a..8aebcd53 100644
--- a/kopete/plugins/webpresence/webpresencepreferences.cpp
+++ b/kopete/plugins/webpresence/webpresencepreferences.cpp
@@ -15,7 +15,7 @@
* *
***************************************************************************/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kgenericfactory.h>
#include <kautoconfig.h>
@@ -27,19 +27,19 @@
typedef KGenericFactory<WebPresencePreferences> WebPresencePreferencesFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kopete_webpresence, WebPresencePreferencesFactory("kcm_kopete_webpresence"))
-WebPresencePreferences::WebPresencePreferences(QWidget *parent, const char* /*name*/, const QStringList &args)
+WebPresencePreferences::WebPresencePreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args)
: KCModule(WebPresencePreferencesFactory::instance(), parent, args)
{
// Add actuall widget generated from ui file.
- ( new QVBoxLayout( this ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this ) )->setAutoAdd( true );
preferencesDialog = new WebPresencePrefsUI(this);
preferencesDialog->uploadURL->setMode( KFile::File );
preferencesDialog->formatStylesheetURL->setFilter( "*.xsl" );
// KAutoConfig stuff
kautoconfig = new KAutoConfig(KGlobal::config(), this, "kautoconfig");
- connect(kautoconfig, SIGNAL(widgetModified()), SLOT(widgetModified()));
- connect(kautoconfig, SIGNAL(settingsChanged()), SLOT(widgetModified()));
+ connect(kautoconfig, TQT_SIGNAL(widgetModified()), TQT_SLOT(widgetModified()));
+ connect(kautoconfig, TQT_SIGNAL(settingsChanged()), TQT_SLOT(widgetModified()));
kautoconfig->addWidget(preferencesDialog, "Web Presence Plugin");
kautoconfig->retrieveSettings(true);
}
diff --git a/kopete/plugins/webpresence/webpresencepreferences.h b/kopete/plugins/webpresence/webpresencepreferences.h
index 120e7a9a..8c272cdc 100644
--- a/kopete/plugins/webpresence/webpresencepreferences.h
+++ b/kopete/plugins/webpresence/webpresencepreferences.h
@@ -31,7 +31,7 @@ class WebPresencePreferences : public KCModule {
Q_OBJECT
public:
- WebPresencePreferences(QWidget *parent = 0, const char *name = 0, const QStringList &args = QStringList());
+ WebPresencePreferences(TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList());
virtual void save();
virtual void defaults();