From ffe8a83e053396df448e9413828527613ca3bd46 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:46:43 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- interfaces/kimproxy/interface/kimiface.h | 66 ++++++------- interfaces/kimproxy/library/kimproxy.cpp | 144 ++++++++++++++-------------- interfaces/kimproxy/library/kimproxy.h | 94 +++++++++--------- interfaces/kimproxy/library/kimproxyiface.h | 2 +- 4 files changed, 153 insertions(+), 153 deletions(-) (limited to 'interfaces/kimproxy') diff --git a/interfaces/kimproxy/interface/kimiface.h b/interfaces/kimproxy/interface/kimiface.h index 4cc1d88b5..f3212df6d 100644 --- a/interfaces/kimproxy/interface/kimiface.h +++ b/interfaces/kimproxy/interface/kimiface.h @@ -22,9 +22,9 @@ #ifndef KIMIFACE_H #define KIMIFACE_H -#include +#include #include -#include +#include #include /** @@ -57,16 +57,16 @@ * @endcode * and the class implementing KIMIface must pass "KIMIface" to the DCOPObject constructor: * @code - * // just need QObject inheritance and Q_OBJECT if you want signals and slots + * // just need TQObject inheritance and Q_OBJECT if you want signals and slots * // no need to use K_DCOP macro again * - * class MyIMIface : public QObject, public KIMIface + * class MyIMIface : public TQObject, public KIMIface * { * Q_OBJECT * public: - * MyIMIface(QObject* parent = 0, const char* name) : + * MyIMIface(TQObject* parent = 0, const char* name) : * DCOPObject("KIMIface"), // <-- passing the interface name as required - * QObject(parent, name) {} + * TQObject(parent, name) {} * }; * @endcode * @@ -102,7 +102,7 @@ k_dcop: * @see isPresent() * @see KABC::Addressee::uid() */ - virtual QStringList allContacts() = 0; + virtual TQStringList allContacts() = 0; /** * @brief Obtain a list of IM-contacts that are currently reachable @@ -122,7 +122,7 @@ k_dcop: * @see messageContact() * @see KABC::Addressee::uid() */ - virtual QStringList reachableContacts() = 0; + virtual TQStringList reachableContacts() = 0; /** * @brief Obtain a list of IM-contacts that are currently online @@ -140,7 +140,7 @@ k_dcop: * @see chatWithContact() * @see KABC::Addressee::uid() */ - virtual QStringList onlineContacts() = 0; + virtual TQStringList onlineContacts() = 0; /** * @brief Obtain a list of IM-contacts who may receive file transfers @@ -165,7 +165,7 @@ k_dcop: * @see sendFile() * @see KABC::Addressee::uid() */ - virtual QStringList fileTransferContacts() = 0; + virtual TQStringList fileTransferContacts() = 0; // individual /** @@ -182,7 +182,7 @@ k_dcop: * @see presenceStatus() * @see KABC::Addressee::uid() */ - virtual bool isPresent( const QString & uid ) = 0; + virtual bool isPresent( const TQString & uid ) = 0; /** * @brief Obtain the IM app's idea of the contact's display name @@ -192,7 +192,7 @@ k_dcop: * a nick name, a user configured name string, etc. * * @param uid the KABC UID you are interested in - * @return the corresponding display name or QString:null if the + * @return the corresponding display name or TQString:null if the * UID is unknown * * @see isPresent() @@ -200,7 +200,7 @@ k_dcop: * @see presenceStatus() * @see KABC::Addressee::uid() */ - virtual QString displayName( const QString & uid ) = 0; + virtual TQString displayName( const TQString & uid ) = 0; /** * @brief Obtain the IM presence as a i18ned string for the specified @@ -211,13 +211,13 @@ k_dcop: * * @param uid the KABC UID you want the presence for * @return the i18ned string describing the contact's presence or - * QString::null if the UID is unknown + * TQString::null if the UID is unknown * * @see isPresent() * @see presenceStatus() * @see KABC::Addressee::uid() */ - virtual QString presenceString( const QString & uid ) = 0; + virtual TQString presenceString( const TQString & uid ) = 0; /** * @brief Obtain the IM presence as a number for the specified contact @@ -247,7 +247,7 @@ k_dcop: * @see presenceString() * @see KABC::Addressee::uid() */ - virtual int presenceStatus( const QString & uid ) = 0; + virtual int presenceStatus( const TQString & uid ) = 0; /** * @brief Indicate if a given contact can receive files @@ -258,7 +258,7 @@ k_dcop: * @see fileTransferContacts() * @see KABC::Addressee::uid() */ - virtual bool canReceiveFiles( const QString & uid ) = 0; + virtual bool canReceiveFiles( const TQString & uid ) = 0; /** * @brief Indicate if a given contact will be able to respond @@ -276,7 +276,7 @@ k_dcop: * @see isPresent() * @see KABC::Addressee::uid() */ - virtual bool canRespond( const QString & uid ) = 0; + virtual bool canRespond( const TQString & uid ) = 0; /** * @brief Obtain the KABC UID corresponding to the given IM address @@ -284,7 +284,7 @@ k_dcop: * @param contactId the protocol specific identifier for the contact, * e.g. UIN for ICQ, screenname for AIM, nick for IRC * @param protocol the IM protocol/service to check. See protocols() - * @return the KABC UID for the given contact or @c QString::null if not + * @return the KABC UID for the given contact or @c TQString::null if not * found or either input stream was empty or the protocol is not * supported * @@ -293,7 +293,7 @@ k_dcop: * @see isPresent() * @see KABC::Addressee::uid() */ - virtual QString locate( const QString & contactId, const QString & protocol ) = 0; + virtual TQString locate( const TQString & contactId, const TQString & protocol ) = 0; // metadata /** @@ -305,29 +305,29 @@ k_dcop: * * @param uid the KABC UID you want the presence icon for * @return a pixmap representing the contact's presence or a null pixmap - * if the contact is unknown. See QPixmap::isNull() + * if the contact is unknown. See TQPixmap::isNull() * * @see isPresent() * @see presenceString() * @see presenceStatus() * @see KABC::Addressee::uid() */ - virtual QPixmap icon( const QString & uid ) = 0; + virtual TQPixmap icon( const TQString & uid ) = 0; /** * @brief Obtain the given contact's current context (home, work, or any) * * Not all IM services/protocols support the concept of contexts. If the - * given UID maps to such a service, just return @c QString::null + * given UID maps to such a service, just return @c TQString::null * * @param uid the KABC UID you want the context for - * @return a string describing the context, or @c QString::null if not + * @return a string describing the context, or @c TQString::null if not * supported or if the contact is unknown * * @see isPresent() * @see KABC::Addressee::uid() */ - virtual QString context( const QString & uid ) = 0; + virtual TQString context( const TQString & uid ) = 0; // App capabilities /** @@ -349,7 +349,7 @@ k_dcop: * @see addContact() * @see messageNewContact */ - virtual QStringList protocols() = 0; + virtual TQStringList protocols() = 0; // ACTORS /** @@ -374,7 +374,7 @@ k_dcop: * @see reachableContacts() * @see KABC::Addressee::uid() */ - virtual void messageContact( const QString &uid, const QString& message ) = 0; + virtual void messageContact( const TQString &uid, const TQString& message ) = 0; /** * @brief Send a single message to a contact given only its protocol @@ -394,7 +394,7 @@ k_dcop: * @see protocols() * @see addContact() */ - virtual void messageNewContact( const QString &contactId, const QString &protocol ) = 0; + virtual void messageNewContact( const TQString &contactId, const TQString &protocol ) = 0; /** * @brief Start a chat session with the specified contact @@ -412,7 +412,7 @@ k_dcop: * @see reachableContacts() * @see KABC::Addressee::uid() */ - virtual void chatWithContact( const QString &uid ) = 0; + virtual void chatWithContact( const TQString &uid ) = 0; /** * @brief Send a file to the contact @@ -438,8 +438,8 @@ k_dcop: * @see fileTransferContacts() * @see KABC::Addressee::uid() */ - virtual void sendFile(const QString &uid, const KURL &sourceURL, - const QString &altFileName = QString::null, uint fileSize = 0) = 0; + virtual void sendFile(const TQString &uid, const KURL &sourceURL, + const TQString &altFileName = TQString::null, uint fileSize = 0) = 0; // MUTATORS // Contact list @@ -460,7 +460,7 @@ k_dcop: * @see protocols() * @see messageNewContact() */ - virtual bool addContact( const QString &contactId, const QString &protocol ) = 0; + virtual bool addContact( const TQString &contactId, const TQString &protocol ) = 0; // SIGNALS k_dcop_signals: @@ -482,7 +482,7 @@ k_dcop_signals: * @see KABC::Addressee::uid() * @see DCOPClient::appId() */ - void contactPresenceChanged( QString uid, QCString appId, int presence ); + void contactPresenceChanged( TQString uid, TQCString appId, int presence ); }; #endif diff --git a/interfaces/kimproxy/library/kimproxy.cpp b/interfaces/kimproxy/library/kimproxy.cpp index 746c6da90..d3cf1ef24 100644 --- a/interfaces/kimproxy/library/kimproxy.cpp +++ b/interfaces/kimproxy/library/kimproxy.cpp @@ -21,8 +21,8 @@ Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include #include #include @@ -43,11 +43,11 @@ KIMProxy * KIMProxy::s_instance = 0L; struct AppPresenceCurrent { - QCString appId; + TQCString appId; int presence; }; -class ContactPresenceListCurrent : public QValueList +class ContactPresenceListCurrent : public TQValueList { public: // return value indicates if the supplied parameter was better than any existing presence @@ -60,9 +60,9 @@ struct KIMProxy::Private { DCOPClient * dc; // list of the strings in use by KIMIface - QStringList presence_strings; + TQStringList presence_strings; // list of the icon names in use by KIMIface - QStringList presence_icons; + TQStringList presence_icons; // map of presences PresenceStringMap presence_map; }; @@ -140,11 +140,11 @@ AppPresenceCurrent ContactPresenceListCurrent::best() // return best; // } // -// QCString bestAppId( AppPresence* ap ) +// TQCString bestAppId( AppPresence* ap ) // { // Q_ASSERT( ap ); // AppPresence::const_iterator it; -// QCString bestAppId; +// TQCString bestAppId; // it = ap->begin(); // if ( it != ap->end() ) // { @@ -175,14 +175,14 @@ KIMProxy * KIMProxy::instance( DCOPClient * client ) return 0L; } -KIMProxy::KIMProxy( DCOPClient* dc ) : DCOPObject( "KIMProxyIface" ), QObject(), d( new Private ) +KIMProxy::KIMProxy( DCOPClient* dc ) : DCOPObject( "KIMProxyIface" ), TQObject(), d( new Private ) { m_im_client_stubs.setAutoDelete( true ); d->dc = dc; m_initialized = false; - connect( d->dc, SIGNAL( applicationRemoved( const QCString& ) ) , this, SLOT( unregisteredFromDCOP( const QCString& ) ) ); - connect( d->dc, SIGNAL( applicationRegistered( const QCString& ) ) , this, SLOT( registeredToDCOP( const QCString& ) ) ); + connect( d->dc, TQT_SIGNAL( applicationRemoved( const TQCString& ) ) , this, TQT_SLOT( unregisteredFromDCOP( const TQCString& ) ) ); + connect( d->dc, TQT_SIGNAL( applicationRegistered( const TQCString& ) ) , this, TQT_SLOT( registeredToDCOP( const TQCString& ) ) ); d->dc->setNotifications( true ); d->presence_strings.append( "Unknown" ); @@ -197,14 +197,14 @@ KIMProxy::KIMProxy( DCOPClient* dc ) : DCOPObject( "KIMProxyIface" ), QObject(), d->presence_icons.append( "presence_away" ); d->presence_icons.append( "presence_online" ); - //QCString senderApp = "Kopete"; - //QCString senderObjectId = "KIMIface"; - QCString method = "contactPresenceChanged( QString, QCString, int )"; - //QCString receiverObjectId = "KIMProxyIface"; + //TQCString senderApp = "Kopete"; + //TQCString senderObjectId = "KIMIface"; + TQCString method = "contactPresenceChanged( TQString, TQCString, int )"; + //TQCString receiverObjectId = "KIMProxyIface"; // FIXME: make this work when the sender object id is set to KIMIFace if ( !connectDCOPSignal( 0, 0, method, method, false ) ) - KMessageBox::information( 0, QString( "Couldn't connect DCOP signal.\nWon't receive any status notifications!" ) ); + KMessageBox::information( 0, TQString( "Couldn't connect DCOP signal.\nWon't receive any status notifications!" ) ); } KIMProxy::~KIMProxy( ) @@ -221,12 +221,12 @@ bool KIMProxy::initialize() if ( KServiceType::serviceType( IM_SERVICE_TYPE ) ) { //kdDebug( 790 ) << k_funcinfo << endl; - QCString dcopObjectId = "KIMIface"; + TQCString dcopObjectId = "KIMIface"; // see what apps implementing our service type are out there KService::List offers = KServiceType::offers( IM_SERVICE_TYPE ); KService::List::iterator offer; - typedef QValueList QCStringList; + typedef TQValueList QCStringList; QCStringList registeredApps = d->dc->registeredApplications(); QCStringList::iterator app; const QCStringList::iterator end = registeredApps.end(); @@ -237,12 +237,12 @@ bool KIMProxy::initialize() //for each offer for ( offer = offers.begin(); offer != offers.end(); ++offer ) { - QCString dcopService = (*offer)->property("X-DCOP-ServiceName").toString().latin1(); + TQCString dcopService = (*offer)->property("X-DCOP-ServiceName").toString().latin1(); if ( !dcopService.isEmpty() ) { //kdDebug( 790 ) << " is it: " << dcopService << "?" << endl; // get the application name ( minus any process ID ) - QCString instanceName = (*app).left( dcopService.length() ); + TQCString instanceName = (*app).left( dcopService.length() ); // if the application implements the dcop service, add it if ( instanceName == dcopService ) { @@ -263,7 +263,7 @@ bool KIMProxy::initialize() return !m_im_client_stubs.isEmpty(); } -void KIMProxy::registeredToDCOP( const QCString& appId ) +void KIMProxy::registeredToDCOP( const TQCString& appId ) { //kdDebug( 790 ) << k_funcinfo << " appId '" << appId << "'" << endl; // check that appId implements our service @@ -279,8 +279,8 @@ void KIMProxy::registeredToDCOP( const QCString& appId ) KService::List::const_iterator it; for ( it = offers.begin(); it != offers.end(); ++it ) { - QCString dcopObjectId = "KIMIface"; - QCString dcopService = (*it)->property("X-DCOP-ServiceName").toString().latin1(); + TQCString dcopObjectId = "KIMIface"; + TQCString dcopService = (*it)->property("X-DCOP-ServiceName").toString().latin1(); if ( appId.left( dcopService.length() ) == dcopService ) { // if it's not already known, insert it @@ -298,7 +298,7 @@ void KIMProxy::registeredToDCOP( const QCString& appId ) // emit sigPresenceInfoExpired(); } -void KIMProxy::unregisteredFromDCOP( const QCString& appId ) +void KIMProxy::unregisteredFromDCOP( const TQCString& appId ) { //kdDebug( 790 ) << k_funcinfo << appId << endl; if ( m_im_client_stubs.find( appId ) ) @@ -325,7 +325,7 @@ void KIMProxy::unregisteredFromDCOP( const QCString& appId ) } } -void KIMProxy::contactPresenceChanged( QString uid, QCString appId, int presence ) +void KIMProxy::contactPresenceChanged( TQString uid, TQCString appId, int presence ) { // update the presence map //kdDebug( 790 ) << k_funcinfo << "uid: " << uid << " appId: " << appId << " presence " << presence << endl; @@ -343,7 +343,7 @@ void KIMProxy::contactPresenceChanged( QString uid, QCString appId, int presence } } -int KIMProxy::presenceNumeric( const QString& uid ) +int KIMProxy::presenceNumeric( const TQString& uid ) { AppPresenceCurrent ap; ap.presence = 0; @@ -355,7 +355,7 @@ int KIMProxy::presenceNumeric( const QString& uid ) return ap.presence; } -QString KIMProxy::presenceString( const QString& uid ) +TQString KIMProxy::presenceString( const TQString& uid ) { AppPresenceCurrent ap; ap.presence = 0; @@ -365,12 +365,12 @@ QString KIMProxy::presenceString( const QString& uid ) ap = presence.best(); } if ( ap.appId.isEmpty() ) - return QString::null; + return TQString::null; else return d->presence_strings[ ap.presence ]; } -QPixmap KIMProxy::presenceIcon( const QString& uid ) +TQPixmap KIMProxy::presenceIcon( const TQString& uid ) { AppPresenceCurrent ap; ap.presence = 0; @@ -381,8 +381,8 @@ QPixmap KIMProxy::presenceIcon( const QString& uid ) } if ( ap.appId.isEmpty() ) { - //kdDebug( 790 ) << k_funcinfo << "returning a null QPixmap because we were asked for an icon for a uid we know nothing about" << endl; - return QPixmap(); + //kdDebug( 790 ) << k_funcinfo << "returning a null TQPixmap because we were asked for an icon for a uid we know nothing about" << endl; + return TQPixmap(); } else { @@ -391,19 +391,19 @@ QPixmap KIMProxy::presenceIcon( const QString& uid ) } } -QStringList KIMProxy::allContacts() +TQStringList KIMProxy::allContacts() { - QStringList value = d->presence_map.keys(); + TQStringList value = d->presence_map.keys(); return value; } -QStringList KIMProxy::reachableContacts() +TQStringList KIMProxy::reachableContacts() { - QStringList value; + TQStringList value; if ( initialize() ) { - QDictIterator it( m_im_client_stubs ); + TQDictIterator it( m_im_client_stubs ); for ( ; it.current(); ++it ) { value += it.current()->reachableContacts( ); @@ -412,9 +412,9 @@ QStringList KIMProxy::reachableContacts() return value; } -QStringList KIMProxy::onlineContacts() +TQStringList KIMProxy::onlineContacts() { - QStringList value; + TQStringList value; PresenceStringMap::iterator it = d->presence_map.begin(); const PresenceStringMap::iterator end= d->presence_map.end(); for ( ; it != end; ++it ) @@ -424,13 +424,13 @@ QStringList KIMProxy::onlineContacts() return value; } -QStringList KIMProxy::fileTransferContacts() +TQStringList KIMProxy::fileTransferContacts() { - QStringList value; + TQStringList value; if ( initialize() ) { - QDictIterator it( m_im_client_stubs ); + TQDictIterator it( m_im_client_stubs ); for ( ; it.current(); ++it ) { value += it.current()->fileTransferContacts( ); @@ -439,14 +439,14 @@ QStringList KIMProxy::fileTransferContacts() return value; } -bool KIMProxy::isPresent( const QString& uid ) +bool KIMProxy::isPresent( const TQString& uid ) { return ( !d->presence_map[ uid ].isEmpty() ); } -QString KIMProxy::displayName( const QString& uid ) +TQString KIMProxy::displayName( const TQString& uid ) { - QString name; + TQString name; if ( initialize() ) { if ( KIMIface_stub* s = stubForUid( uid ) ) @@ -456,7 +456,7 @@ QString KIMProxy::displayName( const QString& uid ) return name; } -bool KIMProxy::canReceiveFiles( const QString & uid ) +bool KIMProxy::canReceiveFiles( const TQString & uid ) { if ( initialize() ) { @@ -466,7 +466,7 @@ bool KIMProxy::canReceiveFiles( const QString & uid ) return false; } -bool KIMProxy::canRespond( const QString & uid ) +bool KIMProxy::canRespond( const TQString & uid ) { if ( initialize() ) { @@ -476,17 +476,17 @@ bool KIMProxy::canRespond( const QString & uid ) return false; } -QString KIMProxy::context( const QString & uid ) +TQString KIMProxy::context( const TQString & uid ) { if ( initialize() ) { if ( KIMIface_stub* s = stubForUid( uid ) ) return s->context( uid ); } - return QString::null; + return TQString::null; } -void KIMProxy::chatWithContact( const QString& uid ) +void KIMProxy::chatWithContact( const TQString& uid ) { if ( initialize() ) { @@ -499,7 +499,7 @@ void KIMProxy::chatWithContact( const QString& uid ) return; } -void KIMProxy::messageContact( const QString& uid, const QString& message ) +void KIMProxy::messageContact( const TQString& uid, const TQString& message ) { if ( initialize() ) { @@ -512,11 +512,11 @@ void KIMProxy::messageContact( const QString& uid, const QString& message ) return; } -void KIMProxy::sendFile(const QString &uid, const KURL &sourceURL, const QString &altFileName, uint fileSize ) +void KIMProxy::sendFile(const TQString &uid, const KURL &sourceURL, const TQString &altFileName, uint fileSize ) { if ( initialize() ) { - QDictIterator it( m_im_client_stubs ); + TQDictIterator it( m_im_client_stubs ); for ( ; it.current(); ++it ) { if ( it.current()->canReceiveFiles( uid ) ) @@ -530,7 +530,7 @@ void KIMProxy::sendFile(const QString &uid, const KURL &sourceURL, const QString return; } -bool KIMProxy::addContact( const QString &contactId, const QString &protocol ) +bool KIMProxy::addContact( const TQString &contactId, const TQString &protocol ) { if ( initialize() ) { @@ -540,14 +540,14 @@ bool KIMProxy::addContact( const QString &contactId, const QString &protocol ) return false; } -QString KIMProxy::locate( const QString & contactId, const QString & protocol ) +TQString KIMProxy::locate( const TQString & contactId, const TQString & protocol ) { if ( initialize() ) { if ( KIMIface_stub* s = stubForProtocol( protocol ) ) return s->locate( contactId, protocol ); } - return QString::null; + return TQString::null; } bool KIMProxy::imAppsAvailable() @@ -557,15 +557,15 @@ bool KIMProxy::imAppsAvailable() bool KIMProxy::startPreferredApp() { - QString preferences = QString("[X-DCOP-ServiceName] = '%1'").arg( preferredApp() ); + TQString preferences = TQString("[X-DCOP-ServiceName] = '%1'").arg( preferredApp() ); // start/find an instance of DCOP/InstantMessenger - QString error; - QCString dcopService; + TQString error; + TQCString dcopService; // Get a preferred IM client. // The app will notify itself to us using registeredToDCOP, so we don't need to record a stub for it here // FIXME: error in preferences, see debug output - preferences = QString::null; - int result = KDCOPServiceStarter::self()->findServiceFor( IM_SERVICE_TYPE, QString::null, preferences, &error, &dcopService ); + preferences = TQString::null; + int result = KDCOPServiceStarter::self()->findServiceFor( IM_SERVICE_TYPE, TQString::null, preferences, &error, &dcopService ); kdDebug( 790 ) << k_funcinfo << "error was: " << error << ", dcopService: " << dcopService << endl; @@ -573,7 +573,7 @@ bool KIMProxy::startPreferredApp() } -void KIMProxy::pollAll( const QString &uid ) +void KIMProxy::pollAll( const TQString &uid ) { /* // We only need to call this function if we don't have any data at all // otherwise, the data will be kept fresh by received presence change @@ -582,7 +582,7 @@ void KIMProxy::pollAll( const QString &uid ) { AppPresence *presence = new AppPresence(); // record current presence from known clients - QDictIterator it( m_im_client_stubs ); + TQDictIterator it( m_im_client_stubs ); for ( ; it.current(); ++it ) { presence->insert( it.currentKey().ascii(), it.current()->presenceStatus( uid ) ); // m_im_client_stubs has qstring keys... @@ -591,13 +591,13 @@ void KIMProxy::pollAll( const QString &uid ) }*/ } -void KIMProxy::pollApp( const QCString & appId ) +void KIMProxy::pollApp( const TQCString & appId ) { //kdDebug( 790 ) << k_funcinfo << endl; KIMIface_stub * appStub = m_im_client_stubs[ appId ]; - QStringList contacts = m_im_client_stubs[ appId ]->allContacts(); - QStringList::iterator it = contacts.begin(); - QStringList::iterator end = contacts.end(); + TQStringList contacts = m_im_client_stubs[ appId ]->allContacts(); + TQStringList::iterator it = contacts.begin(); + TQStringList::iterator end = contacts.end(); for ( ; it != end; ++it ) { ContactPresenceListCurrent current = d->presence_map[ *it ]; @@ -613,7 +613,7 @@ void KIMProxy::pollApp( const QCString & appId ) } } -KIMIface_stub * KIMProxy::stubForUid( const QString &uid ) +KIMIface_stub * KIMProxy::stubForUid( const TQString &uid ) { // get best appPresence AppPresenceCurrent ap = d->presence_map[ uid ].best(); @@ -621,18 +621,18 @@ KIMIface_stub * KIMProxy::stubForUid( const QString &uid ) return m_im_client_stubs.find( ap.appId ); } -KIMIface_stub * KIMProxy::stubForProtocol( const QString &protocol) +KIMIface_stub * KIMProxy::stubForProtocol( const TQString &protocol) { KIMIface_stub * app; // see if the preferred client supports this protocol - QString preferred = preferredApp(); + TQString preferred = preferredApp(); if ( ( app = m_im_client_stubs.find( preferred ) ) ) { if ( app->protocols().grep( protocol ).count() > 0 ) return app; } // preferred doesn't do this protocol, try the first of the others that says it does - QDictIterator it( m_im_client_stubs ); + TQDictIterator it( m_im_client_stubs ); for ( ; it.current(); ++it ) { if ( it.current()->protocols().grep( protocol ).count() > 0 ) @@ -641,11 +641,11 @@ KIMIface_stub * KIMProxy::stubForProtocol( const QString &protocol) return 0L; } -QString KIMProxy::preferredApp() +TQString KIMProxy::preferredApp() { KConfig *store = new KSimpleConfig( IM_CLIENT_PREFERENCES_FILE ); store->setGroup( IM_CLIENT_PREFERENCES_SECTION ); - QString preferredApp = store->readEntry( IM_CLIENT_PREFERENCES_ENTRY ); + TQString preferredApp = store->readEntry( IM_CLIENT_PREFERENCES_ENTRY ); //kdDebug( 790 ) << k_funcinfo << "found preferred app: " << preferredApp << endl; return preferredApp; } diff --git a/interfaces/kimproxy/library/kimproxy.h b/interfaces/kimproxy/library/kimproxy.h index 6f56a0f13..d4312b341 100644 --- a/interfaces/kimproxy/library/kimproxy.h +++ b/interfaces/kimproxy/library/kimproxy.h @@ -24,10 +24,10 @@ #ifndef KIMPROXY_H #define KIMPROXY_H -#include -#include -#include -#include +#include +#include +#include +#include #define IM_SERVICE_TYPE "DCOP/InstantMessenger" @@ -43,10 +43,10 @@ class KURL; class ContactPresenceListCurrent; /** FIXME: remove for KDE4, binary compability again. */ -typedef QMap AppPresence; // appId->presence; contains all applications' ideas of a user's presence -typedef QDict PresenceMap; // uid->AppPresence; contains a AppPresences for all users +typedef TQMap AppPresence; // appId->presence; contains all applications' ideas of a user's presence +typedef TQDict PresenceMap; // uid->AppPresence; contains a AppPresences for all users /** FIXME: remove presenceMap and call this presenceMap in KDE4. This hack is for binary compatibility */ -typedef QMap PresenceStringMap; +typedef TQMap PresenceStringMap; /** * @brief Provides access to instant messenger programs which implement KDE's @@ -81,11 +81,11 @@ typedef QMap PresenceStringMap; * // check if there are suitable applications reachable * if (!proxy->initialize()) return; * - * QString message = "Hi!\nHow are you on this wonderful day?"; + * TQString message = "Hi!\nHow are you on this wonderful day?"; * * // iterate over the list of reachable contacts - * QStringList reachableContacts = proxy->reachableContacts(); - * for (QStringList::const_iterator it = reachableContacts.begin(); + * TQStringList reachableContacts = proxy->reachableContacts(); + * for (TQStringList::const_iterator it = reachableContacts.begin(); * it != reachableContacts.end(); ++it) * { proxy->messageContact(*it, message); @@ -104,7 +104,7 @@ typedef QMap PresenceStringMap; * @since 3.3 * @author Will Stephenson */ -class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface +class KIMPROXY_EXPORT KIMProxy : public TQObject, virtual public KIMProxyIface { Q_OBJECT struct Private; @@ -163,7 +163,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface * @see isPresent() * @see KABC::Addressee::uid() */ - QStringList allContacts(); + TQStringList allContacts(); /** * @brief Obtain a list of IM-contacts that are currently reachable @@ -179,7 +179,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface * @see messageContact() * @see KABC::Addressee::uid() */ - QStringList reachableContacts(); + TQStringList reachableContacts(); /** * @brief Obtain a list of IM-contacts that are currently online @@ -199,7 +199,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface * @see chatWithContact() * @see KABC::Addressee::uid() */ - QStringList onlineContacts(); + TQStringList onlineContacts(); /** * @brief Obtain a list of IM-contacts who may receive file transfers @@ -221,7 +221,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface * @see canReceiveFiles() * @see KABC::Addressee::uid() */ - QStringList fileTransferContacts(); + TQStringList fileTransferContacts(); /** * @brief Confirm if a given contact is known to the proxy @@ -241,7 +241,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface * @see presenceNumeric() * @see KABC::Addressee::uid() */ - bool isPresent( const QString& uid ); + bool isPresent( const TQString& uid ); /** * @brief Obtain the proxy's idea of the contact's display name @@ -255,7 +255,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface * Useful if KABC lookups may be too slow. * * @param uid the KABC UID you are interested in - * @return the corresponding display name or QString:null if the + * @return the corresponding display name or TQString:null if the * UID is unknown * * @see isPresent() @@ -263,7 +263,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface * @see presenceNumeric() * @see KABC::Addressee::uid() */ - QString displayName( const QString& uid ); + TQString displayName( const TQString& uid ); /** * @brief Obtain the IM presence as a number for the specified contact @@ -304,7 +304,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface * @see KIMIface::presenceStatus() * @see KABC::Addressee::uid() */ - int presenceNumeric( const QString& uid ); + int presenceNumeric( const TQString& uid ); /** * @brief Obtain the IM presence as a i18ned string for the specified @@ -333,14 +333,14 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface * * @param uid the KABC UID you want the presence for * @return the i18ned string describing the contact's presence or - * QString::null if the UID is unknown + * TQString::null if the UID is unknown * * @see isPresent() * @see presenceNumeric() * @see presenceIcon() * @see KABC::Addressee::uid() */ - QString presenceString( const QString& uid ); + TQString presenceString( const TQString& uid ); /** * @brief Obtain the icon representing the IM presence for the @@ -362,14 +362,14 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface * * @param uid the KABC UID you want the presence icon for * @return a pixmap representing the contact's presence or a null - * pixmap if the contact is unknown. See QPixmap::isNull() + * pixmap if the contact is unknown. See TQPixmap::isNull() * * @see isPresent() * @see presenceString() * @see presenceNumeric() * @see KABC::Addressee::uid() */ - QPixmap presenceIcon( const QString& uid ); + TQPixmap presenceIcon( const TQString& uid ); /** * @brief Indicate if a given contact can receive files @@ -386,7 +386,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface * @see fileTransferContacts() * @see KABC::Addressee::uid() */ - bool canReceiveFiles( const QString & uid ); + bool canReceiveFiles( const TQString & uid ); /** * @brief Indicate if a given contact will be able to respond @@ -411,7 +411,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface * @see isPresent() * @see KABC::Addressee::uid() */ - bool canRespond( const QString & uid ); + bool canRespond( const TQString & uid ); /** * @brief Obtain the KABC UID corresponding to the given IM address @@ -420,7 +420,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface * e.g. UIN for ICQ, screenname for AIM, nick for IRC * @param protocol the IM protocol/service to check. * See KIMIface::protocols() - * @return the KABC UID for the given contact or @c QString::null if + * @return the KABC UID for the given contact or @c TQString::null if * not found or either input stream was empty or the protocol * is not supported * @@ -429,14 +429,14 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface * @see isPresent() * @see KABC::Addressee::uid() */ - QString locate( const QString & contactId, const QString & protocol ); + TQString locate( const TQString & contactId, const TQString & protocol ); /** * @brief Obtain the given contact's current context (home, work, or * any) * * Not all IM services/protocols support the concept of contexts. If the - * given UID maps to such a service, @c QString::null will be returned + * given UID maps to such a service, @c TQString::null will be returned * * If the given KABC UID is known to more than one IM-application * the result of the application which has the best presence for the @@ -445,13 +445,13 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface * value returned by the application providing ICQ is taken. * * @param uid the KABC UID you want the context for - * @return a string describing the context, or @c QString::null if not + * @return a string describing the context, or @c TQString::null if not * supported or if the contact is unknown * * @see isPresent() * @see KABC::Addressee::uid() */ - QString context( const QString & uid ); + TQString context( const TQString & uid ); /** * @brief Start a chat session with the specified contact @@ -464,7 +464,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface * @see reachableContacts() * @see KABC::Addressee::uid() */ - void chatWithContact( const QString& uid ); + void chatWithContact( const TQString& uid ); /** * @brief Send a single message to the specified contact @@ -481,7 +481,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface * @see reachableContacts() * @see KABC::Addressee::uid() */ - void messageContact( const QString& uid, const QString& message ); + void messageContact( const TQString& uid, const TQString& message ); /** * @brief Send a file to the contact @@ -500,8 +500,8 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface * @see fileTransferContacts() * @see KABC::Addressee::uid() */ - void sendFile(const QString &uid, const KURL &sourceURL, - const QString &altFileName = QString::null, uint fileSize = 0); + void sendFile(const TQString &uid, const KURL &sourceURL, + const TQString &altFileName = TQString::null, uint fileSize = 0); /** * @brief Add a new contact given its protocol specific identifier @@ -516,7 +516,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface * @see locate() * @see KIMIface::protocols() */ - bool addContact( const QString &contactId, const QString &protocol ); + bool addContact( const TQString &contactId, const TQString &protocol ); /** * @brief Checks if there are any compatible instant messaging @@ -542,7 +542,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface /** * Just exists to let the IDL compiler make the DCOP signal for this */ - void contactPresenceChanged( QString uid, QCString appId, int presence ); + void contactPresenceChanged( TQString uid, TQCString appId, int presence ); public slots: /** @@ -557,7 +557,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface * * @see DCOPClient::applicationRegistered() */ - void registeredToDCOP( const QCString& appId ); + void registeredToDCOP( const TQCString& appId ); /** * @brief Updates the proxy's data after an application unregistered @@ -576,7 +576,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface * * @see DCOPClient::applicationRemoved() */ - void unregisteredFromDCOP( const QCString& appId ); + void unregisteredFromDCOP( const TQCString& appId ); signals: /** * @brief Indicates that the specified IM-contact's presence changed @@ -588,7 +588,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface * @see presenceIcon() * @see KABC::Addressee::uid() */ - void sigContactPresenceChanged( const QString &uid ); + void sigContactPresenceChanged( const TQString &uid ); /** * @brief Indicates that presence information obtained earlier on might @@ -602,44 +602,44 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface /** * Bootstrap our presence data for a newly registered app */ - void pollApp( const QCString & appId ); + void pollApp( const TQCString & appId ); /** * Bootstrap our presence data by polling all known apps */ - void pollAll( const QString &uid ); + void pollAll( const TQString &uid ); /** * Update our records with the given data */ - bool updatePresence( const QString &uid, const QCString &appId, int presence ); + bool updatePresence( const TQString &uid, const TQCString &appId, int presence ); /** * Get the name of the user's IM application of choice */ - QString preferredApp(); + TQString preferredApp(); /** * Get the app stub best able to reach this uid */ - KIMIface_stub * stubForUid( const QString &uid ); + KIMIface_stub * stubForUid( const TQString &uid ); /** * Get the app stub for this protocol. * Take the preferred app first, then any other. */ - KIMIface_stub * stubForProtocol( const QString &protocol ); + KIMIface_stub * stubForProtocol( const TQString &protocol ); private: // client stubs used to get presence // appId (from DCOP) -> KIMIface_stub - QDict m_im_client_stubs; + TQDict m_im_client_stubs; // map containing numeric presence and the originating application ID for each KABC uid we know of // KABC Uid -> (appId, numeric presence )(AppPresence) PresenceMap m_presence_map; // cache of the client strings in use by each application // dictionary of KIMIface_stub -> map of numeric presence -> string presence // FIXME: remove for KDE4 - UNUSED but maintained for binary compatibility in KDE 3.4 - QPtrDict m_client_presence_strings; + TQPtrDict m_client_presence_strings; Private * d; bool m_apps_available; bool m_initialized; diff --git a/interfaces/kimproxy/library/kimproxyiface.h b/interfaces/kimproxy/library/kimproxyiface.h index 7c99bce4e..fa11183c9 100644 --- a/interfaces/kimproxy/library/kimproxyiface.h +++ b/interfaces/kimproxy/library/kimproxyiface.h @@ -32,7 +32,7 @@ class KIMProxyIface : virtual public DCOPObject { K_DCOP k_dcop: - virtual void contactPresenceChanged( QString uid, QCString appId, int presence ) = 0; + virtual void contactPresenceChanged( TQString uid, TQCString appId, int presence ) = 0; }; #endif -- cgit v1.2.1