diff options
Diffstat (limited to 'kopete/protocols/msn/msnprotocol.cpp')
-rw-r--r-- | kopete/protocols/msn/msnprotocol.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/kopete/protocols/msn/msnprotocol.cpp b/kopete/protocols/msn/msnprotocol.cpp index 2a5b4319..9c0007fc 100644 --- a/kopete/protocols/msn/msnprotocol.cpp +++ b/kopete/protocols/msn/msnprotocol.cpp @@ -18,7 +18,7 @@ ************************************************************************* */ -#include <qimage.h> +#include <tqimage.h> #include <kdebug.h> #include <kgenericfactory.h> @@ -47,15 +47,15 @@ K_EXPORT_COMPONENT_FACTORY( libkopete_msn_shared, MSNProtocolFactory( "kopete_ms MSNProtocol *MSNProtocol::s_protocol = 0L; -MSNProtocol::MSNProtocol( QObject *parent, const char *name, const QStringList & /* args */ ) +MSNProtocol::MSNProtocol( TQObject *parent, const char *name, const TQStringList & /* args */ ) : Kopete::Protocol( MSNProtocolFactory::instance(), parent, name ), - NLN( Kopete::OnlineStatus::Online, 25, this, 1, QString::null, i18n( "Online" ) , i18n( "O&nline" ), Kopete::OnlineStatusManager::Online,Kopete::OnlineStatusManager::HasAwayMessage ), + NLN( Kopete::OnlineStatus::Online, 25, this, 1, TQString::null, i18n( "Online" ) , i18n( "O&nline" ), Kopete::OnlineStatusManager::Online,Kopete::OnlineStatusManager::HasAwayMessage ), BSY( Kopete::OnlineStatus::Away, 20, this, 2, "msn_busy", i18n( "Busy" ) , i18n( "&Busy" ), Kopete::OnlineStatusManager::Busy, Kopete::OnlineStatusManager::HasAwayMessage ), BRB( Kopete::OnlineStatus::Away, 22, this, 3, "msn_brb", i18n( "Be Right Back" ), i18n( "Be &Right Back" ) , 0 , Kopete::OnlineStatusManager::HasAwayMessage ), AWY( Kopete::OnlineStatus::Away, 18, this, 4, "contact_away_overlay", i18n( "Away From Computer" ),i18n( "&Away" ), Kopete::OnlineStatusManager::Away, Kopete::OnlineStatusManager::HasAwayMessage ), PHN( Kopete::OnlineStatus::Away, 12, this, 5, "contact_phone_overlay", i18n( "On the Phone" ) , i18n( "On The &Phone" ) , 0 , Kopete::OnlineStatusManager::HasAwayMessage ), LUN( Kopete::OnlineStatus::Away, 15, this, 6, "contact_food_overlay", i18n( "Out to Lunch" ) , i18n( "Out To &Lunch" ) , 0 , Kopete::OnlineStatusManager::HasAwayMessage ), - FLN( Kopete::OnlineStatus::Offline, 0, this, 7, QString::null, i18n( "Offline" ) , i18n( "&Offline" ), Kopete::OnlineStatusManager::Offline,Kopete::OnlineStatusManager::DisabledIfOffline ), + FLN( Kopete::OnlineStatus::Offline, 0, this, 7, TQString::null, i18n( "Offline" ) , i18n( "&Offline" ), Kopete::OnlineStatusManager::Offline,Kopete::OnlineStatusManager::DisabledIfOffline ), HDN( Kopete::OnlineStatus::Invisible, 3, this, 8, "contact_invisible_overlay", i18n( "Invisible" ) , i18n( "&Invisible" ), Kopete::OnlineStatusManager::Invisible ), IDL( Kopete::OnlineStatus::Away, 10, this, 9, "contact_away_overlay", i18n( "Idle" ) , i18n( "&Idle" ), Kopete::OnlineStatusManager::Idle , Kopete::OnlineStatusManager::HideFromMenu ), UNK( Kopete::OnlineStatus::Unknown, 25, this, 0, "status_unknown", i18n( "Status not available" ) ), @@ -77,16 +77,16 @@ MSNProtocol::MSNProtocol( QObject *parent, const char *name, const QStringList & // m_status = m_unknownStatus = UNK; } -Kopete::Contact *MSNProtocol::deserializeContact( Kopete::MetaContact *metaContact, const QMap<QString, QString> &serializedData, - const QMap<QString, QString> & /* addressBookData */ ) +Kopete::Contact *MSNProtocol::deserializeContact( Kopete::MetaContact *metaContact, const TQMap<TQString, TQString> &serializedData, + const TQMap<TQString, TQString> & /* addressBookData */ ) { - QString contactId = serializedData[ "contactId" ] ; - QString accountId = serializedData[ "accountId" ] ; - QString lists = serializedData[ "lists" ]; - QStringList groups = QStringList::split( ",", serializedData[ "groups" ] ); - QString contactGuid = serializedData[ "contactGuid" ] ; + TQString contactId = serializedData[ "contactId" ] ; + TQString accountId = serializedData[ "accountId" ] ; + TQString lists = serializedData[ "lists" ]; + TQStringList groups = TQStringList::split( ",", serializedData[ "groups" ] ); + TQString contactGuid = serializedData[ "contactGuid" ] ; - QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( this ); + TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( this ); Kopete::Account *account = accounts[ accountId ]; if( !account ) @@ -95,7 +95,7 @@ Kopete::Contact *MSNProtocol::deserializeContact( Kopete::MetaContact *metaConta // Create MSN contact MSNContact *c = new MSNContact( account, contactId, metaContact ); - for( QStringList::Iterator it = groups.begin() ; it != groups.end(); ++it ) + for( TQStringList::Iterator it = groups.begin() ; it != groups.end(); ++it ) c->contactAddedToGroup( *it, 0L /* FIXME - m_groupList[ ( *it ).toUInt() ]*/ ); c->m_obj= serializedData[ "obj" ]; @@ -111,17 +111,17 @@ Kopete::Contact *MSNProtocol::deserializeContact( Kopete::MetaContact *metaConta return c; } -AddContactPage *MSNProtocol::createAddContactWidget(QWidget *parent , Kopete::Account *i) +AddContactPage *MSNProtocol::createAddContactWidget(TQWidget *parent , Kopete::Account *i) { return (new MSNAddContactPage(i->isConnected(),parent)); } -KopeteEditAccountWidget *MSNProtocol::createEditAccountWidget(Kopete::Account *account, QWidget *parent) +KopeteEditAccountWidget *MSNProtocol::createEditAccountWidget(Kopete::Account *account, TQWidget *parent) { return new MSNEditAccountWidget(this,account,parent); } -Kopete::Account *MSNProtocol::createNewAccount(const QString &accountId) +Kopete::Account *MSNProtocol::createNewAccount(const TQString &accountId) { return new MSNAccount(this, accountId); } @@ -135,12 +135,12 @@ void MSNProtocol::slotSyncContactList() return; } // First, delete D marked contacts - QStringList localcontacts; + TQStringList localcontacts; contactsFile->setGroup("Default"); contactsFile->readListEntry("Contacts",localcontacts); - QString tmpUin; + TQString tmpUin; tmpUin.sprintf("%d",uin); tmp.append(tmpUin); cnt=contactsFile->readNumEntry("Count",0); @@ -152,15 +152,15 @@ MSNProtocol* MSNProtocol::protocol() return s_protocol; } -bool MSNProtocol::validContactId(const QString& userid) +bool MSNProtocol::validContactId(const TQString& userid) { return ( userid.contains('@') ==1 && userid.contains('.') >=1 && userid.contains(' ') == 0); } -QImage MSNProtocol::scalePicture(const QImage &picture) +TQImage MSNProtocol::scalePicture(const TQImage &picture) { - QImage img(picture); - img = img.smoothScale( 96, 96, QImage::ScaleMin ); + TQImage img(picture); + img = img.smoothScale( 96, 96, TQImage::ScaleMin ); // crop image if not square if(img.width() < img.height()) { |