diff options
Diffstat (limited to 'kopete/kopete/kimifaceimpl.cpp')
-rw-r--r-- | kopete/kopete/kimifaceimpl.cpp | 120 |
1 files changed, 60 insertions, 60 deletions
diff --git a/kopete/kopete/kimifaceimpl.cpp b/kopete/kopete/kimifaceimpl.cpp index dd1bd962..1b835438 100644 --- a/kopete/kopete/kimifaceimpl.cpp +++ b/kopete/kopete/kimifaceimpl.cpp @@ -15,7 +15,7 @@ ************************************************************************* */ -#include <qstringlist.h> +#include <tqstringlist.h> #include <dcopclient.h> #include <kapplication.h> @@ -40,22 +40,22 @@ #include "kimifaceimpl.h" -KIMIfaceImpl::KIMIfaceImpl() : DCOPObject( "KIMIface" ), QObject() +KIMIfaceImpl::KIMIfaceImpl() : DCOPObject( "KIMIface" ), TQObject() { connect( Kopete::ContactList::self(), - SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), - SLOT( slotMetaContactAdded( Kopete::MetaContact * ) ) ); + TQT_SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), + TQT_SLOT( slotMetaContactAdded( Kopete::MetaContact * ) ) ); } KIMIfaceImpl::~KIMIfaceImpl() { } -QStringList KIMIfaceImpl::allContacts() +TQStringList KIMIfaceImpl::allContacts() { - QStringList result; - QPtrList<Kopete::MetaContact> list = Kopete::ContactList::self()->metaContacts(); - QPtrListIterator<Kopete::MetaContact> it( list ); + TQStringList result; + TQPtrList<Kopete::MetaContact> list = Kopete::ContactList::self()->metaContacts(); + TQPtrListIterator<Kopete::MetaContact> it( list ); for( ; it.current(); ++it ) { if ( !it.current()->metaContactId().contains(':') ) @@ -65,11 +65,11 @@ QStringList KIMIfaceImpl::allContacts() return result; } -QStringList KIMIfaceImpl::reachableContacts() +TQStringList KIMIfaceImpl::reachableContacts() { - QStringList result; - QPtrList<Kopete::MetaContact> list = Kopete::ContactList::self()->metaContacts(); - QPtrListIterator<Kopete::MetaContact> it( list ); + TQStringList result; + TQPtrList<Kopete::MetaContact> list = Kopete::ContactList::self()->metaContacts(); + TQPtrListIterator<Kopete::MetaContact> it( list ); for( ; it.current(); ++it ) { if ( it.current()->isReachable() && !it.current()->metaContactId().contains(':') ) @@ -79,11 +79,11 @@ QStringList KIMIfaceImpl::reachableContacts() return result; } -QStringList KIMIfaceImpl::onlineContacts() +TQStringList KIMIfaceImpl::onlineContacts() { - QStringList result; - QPtrList<Kopete::MetaContact> list = Kopete::ContactList::self()->metaContacts(); - QPtrListIterator<Kopete::MetaContact> it( list ); + TQStringList result; + TQPtrList<Kopete::MetaContact> list = Kopete::ContactList::self()->metaContacts(); + TQPtrListIterator<Kopete::MetaContact> it( list ); for( ; it.current(); ++it ) { if ( it.current()->isOnline() && !it.current()->metaContactId().contains(':') ) @@ -93,11 +93,11 @@ QStringList KIMIfaceImpl::onlineContacts() return result; } -QStringList KIMIfaceImpl::fileTransferContacts() +TQStringList KIMIfaceImpl::fileTransferContacts() { - QStringList result; - QPtrList<Kopete::MetaContact> list = Kopete::ContactList::self()->metaContacts(); - QPtrListIterator<Kopete::MetaContact> it( list ); + TQStringList result; + TQPtrList<Kopete::MetaContact> list = Kopete::ContactList::self()->metaContacts(); + TQPtrListIterator<Kopete::MetaContact> it( list ); for( ; it.current(); ++it ) { if ( it.current()->canAcceptFiles() && !it.current()->metaContactId().contains(':') ) @@ -107,7 +107,7 @@ QStringList KIMIfaceImpl::fileTransferContacts() return result; } -bool KIMIfaceImpl::isPresent( const QString & uid ) +bool KIMIfaceImpl::isPresent( const TQString & uid ) { Kopete::MetaContact *mc; mc = Kopete::ContactList::self()->metaContact( uid ); @@ -116,18 +116,18 @@ bool KIMIfaceImpl::isPresent( const QString & uid ) } -QString KIMIfaceImpl::displayName( const QString & uid ) +TQString KIMIfaceImpl::displayName( const TQString & uid ) { Kopete::MetaContact *mc; mc = Kopete::ContactList::self()->metaContact( uid ); - QString name; + TQString name; if ( mc ) name = mc->displayName(); return name; } -int KIMIfaceImpl::presenceStatus( const QString & uid ) +int KIMIfaceImpl::presenceStatus( const TQString & uid ) { //kdDebug( 14000 ) << k_funcinfo << endl; int p = -1; @@ -158,10 +158,10 @@ int KIMIfaceImpl::presenceStatus( const QString & uid ) return p; } -QString KIMIfaceImpl::presenceString( const QString & uid ) +TQString KIMIfaceImpl::presenceString( const TQString & uid ) { //kdDebug( 14000 ) << "KIMIfaceImpl::presenceString" << endl; - QString p; + TQString p; Kopete::MetaContact *m = Kopete::ContactList::self()->metaContact( uid ); if ( m ) { @@ -172,12 +172,12 @@ QString KIMIfaceImpl::presenceString( const QString & uid ) else { kdDebug( 14000 ) << "Couldn't find MC: " << uid << endl;; - p = QString(); + p = TQString(); } return p; } -bool KIMIfaceImpl::canReceiveFiles( const QString & uid ) +bool KIMIfaceImpl::canReceiveFiles( const TQString & uid ) { Kopete::MetaContact *mc; mc = Kopete::ContactList::self()->metaContact( uid ); @@ -188,15 +188,15 @@ bool KIMIfaceImpl::canReceiveFiles( const QString & uid ) return false; } -bool KIMIfaceImpl::canRespond( const QString & uid ) +bool KIMIfaceImpl::canRespond( const TQString & uid ) { Kopete::MetaContact *mc; mc = Kopete::ContactList::self()->metaContact( uid ); if ( mc ) { - QPtrList<Kopete::Contact> list = mc->contacts(); - QPtrListIterator<Kopete::Contact> it( list ); + TQPtrList<Kopete::Contact> list = mc->contacts(); + TQPtrListIterator<Kopete::Contact> it( list ); Kopete::Contact *contact; while ( ( contact = it.current() ) != 0 ) { @@ -208,16 +208,16 @@ bool KIMIfaceImpl::canRespond( const QString & uid ) return false; } -QString KIMIfaceImpl::locate( const QString & contactId, const QString & protocolId ) +TQString KIMIfaceImpl::locate( const TQString & contactId, const TQString & protocolId ) { Kopete::MetaContact *mc = locateProtocolContact( contactId, protocolId ); if ( mc ) return mc->metaContactId(); else - return QString::null; + return TQString::null; } -Kopete::MetaContact * KIMIfaceImpl::locateProtocolContact( const QString & contactId, const QString & protocolId ) +Kopete::MetaContact * KIMIfaceImpl::locateProtocolContact( const TQString & contactId, const TQString & protocolId ) { Kopete::MetaContact *mc = 0; // find a matching protocol @@ -226,8 +226,8 @@ Kopete::MetaContact * KIMIfaceImpl::locateProtocolContact( const QString & conta if ( protocol ) { // find its accounts - QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( protocol ); - QDictIterator<Kopete::Account> it( accounts ); + TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( protocol ); + TQDictIterator<Kopete::Account> it( accounts ); for( ; it.current(); ++it ) { Kopete::Contact *c = Kopete::ContactList::self()->findContact( protocolId, it.currentKey(), contactId ); @@ -241,35 +241,35 @@ Kopete::MetaContact * KIMIfaceImpl::locateProtocolContact( const QString & conta return mc; } -QPixmap KIMIfaceImpl::icon( const QString & uid ) +TQPixmap KIMIfaceImpl::icon( const TQString & uid ) { Kopete::MetaContact *m = Kopete::ContactList::self()->metaContact( uid ); - QPixmap p; + TQPixmap p; if ( m ) p = SmallIcon( m->statusIcon() ); return p; } -QString KIMIfaceImpl::context( const QString & uid ) +TQString KIMIfaceImpl::context( const TQString & uid ) { // TODO: support context // shush warning - QString myUid = uid; + TQString myUid = uid; - return QString::null; + return TQString::null; } -QStringList KIMIfaceImpl::protocols() +TQStringList KIMIfaceImpl::protocols() { - QValueList<KPluginInfo *> protocols = Kopete::PluginManager::self()->availablePlugins( "Protocols" ); - QStringList protocolList; - for ( QValueList<KPluginInfo *>::Iterator it = protocols.begin(); it != protocols.end(); ++it ) + TQValueList<KPluginInfo *> protocols = Kopete::PluginManager::self()->availablePlugins( "Protocols" ); + TQStringList protocolList; + for ( TQValueList<KPluginInfo *>::Iterator it = protocols.begin(); it != protocols.end(); ++it ) protocolList.append( (*it)->name() ); return protocolList; } -void KIMIfaceImpl::messageContact( const QString &uid, const QString& messageText ) +void KIMIfaceImpl::messageContact( const TQString &uid, const TQString& messageText ) { Kopete::MetaContact *m = Kopete::ContactList::self()->metaContact( uid ); if ( m ) @@ -285,14 +285,14 @@ void KIMIfaceImpl::messageContact( const QString &uid, const QString& messageTex unknown( uid ); } -void KIMIfaceImpl::messageNewContact( const QString &contactId, const QString &protocol ) +void KIMIfaceImpl::messageNewContact( const TQString &contactId, const TQString &protocol ) { Kopete::MetaContact *mc = locateProtocolContact( contactId, protocol ); if ( mc ) mc->sendMessage(); } -void KIMIfaceImpl::chatWithContact( const QString &uid ) +void KIMIfaceImpl::chatWithContact( const TQString &uid ) { Kopete::MetaContact *m = Kopete::ContactList::self()->metaContact( uid ); if ( m ) @@ -301,8 +301,8 @@ void KIMIfaceImpl::chatWithContact( const QString &uid ) unknown( uid ); } -void KIMIfaceImpl::sendFile(const QString &uid, const KURL &sourceURL, - const QString &altFileName, uint fileSize) +void KIMIfaceImpl::sendFile(const TQString &uid, const KURL &sourceURL, + const TQString &altFileName, uint fileSize) { Kopete::MetaContact *m = Kopete::ContactList::self()->metaContact( uid ); if ( m ) @@ -310,7 +310,7 @@ void KIMIfaceImpl::sendFile(const QString &uid, const KURL &sourceURL, // else, prompt to create a new MC associated with UID } -bool KIMIfaceImpl::addContact( const QString &contactId, const QString &protocolId ) +bool KIMIfaceImpl::addContact( const TQString &contactId, const TQString &protocolId ) { // find a matching protocol Kopete::Protocol *protocol = dynamic_cast<Kopete::Protocol*>( Kopete::PluginManager::self()->plugin( protocolId ) ); @@ -318,8 +318,8 @@ bool KIMIfaceImpl::addContact( const QString &contactId, const QString &protocol if ( protocol ) { // find its accounts - QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( protocol ); - QDictIterator<Kopete::Account> it( accounts ); + TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( protocol ); + TQDictIterator<Kopete::Account> it( accounts ); Kopete::Account *ac = it.toFirst(); if ( ac ) { @@ -332,8 +332,8 @@ bool KIMIfaceImpl::addContact( const QString &contactId, const QString &protocol void KIMIfaceImpl::slotMetaContactAdded( Kopete::MetaContact *mc ) { - connect( mc, SIGNAL( onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType ) ), - SLOT( slotContactStatusChanged( Kopete::MetaContact * ) ) ); + connect( mc, TQT_SIGNAL( onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType ) ), + TQT_SLOT( slotContactStatusChanged( Kopete::MetaContact * ) ) ); } void KIMIfaceImpl::slotContactStatusChanged( Kopete::MetaContact *mc ) @@ -363,16 +363,16 @@ void KIMIfaceImpl::slotContactStatusChanged( Kopete::MetaContact *mc ) } // tell anyone who's listening over DCOP contactPresenceChanged( mc->metaContactId(), kapp->name(), p ); -/* QByteArray params; - QDataStream stream(params, IO_WriteOnly); +/* TQByteArray params; + TQDataStream stream(params, IO_WriteOnly); stream << mc->metaContactId(); stream << kapp->name(); stream << p; - kapp->dcopClient()->emitDCOPSignal( "contactPresenceChanged( QString, QCString, int )", params );*/ + kapp->dcopClient()->emitDCOPSignal( "contactPresenceChanged( TQString, TQCString, int )", params );*/ } } -void KIMIfaceImpl::unknown( const QString &uid ) +void KIMIfaceImpl::unknown( const TQString &uid ) { // warn the user that the KABC contact associated with this UID isn't known to kopete, // either associate an existing contact with KABC or add a new one using the ACW. @@ -384,7 +384,7 @@ void KIMIfaceImpl::unknown( const QString &uid ) } else { - QString apology = i18n( "Translators: %1 is the name of a person taken from the KDE address book, who Kopete doesn't know about. Kopete must either be told that an existing contact in Kopete is this person, or add a new contact for them", + TQString apology = i18n( "Translators: %1 is the name of a person taken from the KDE address book, who Kopete doesn't know about. Kopete must either be told that an existing contact in Kopete is this person, or add a new contact for them", "<qt><p>The KDE Address Book has no instant messaging information for</p><p><b>%1</b>.</p><p>If he/she is already present in the Kopete contact list, indicate the correct addressbook entry in their properties.</p><p>Otherwise, add a new contact using the Add Contact wizard.</p></qt>" ); apology = apology.arg( addr.realName() ); KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Information, apology, i18n( "No Instant Messaging Address" ) ); |