summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/webpresence/webpresenceplugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/plugins/webpresence/webpresenceplugin.cpp')
-rw-r--r--kopete/plugins/webpresence/webpresenceplugin.cpp98
1 files changed, 49 insertions, 49 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: