summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/msn/msncontact.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/protocols/msn/msncontact.cpp')
-rw-r--r--kopete/protocols/msn/msncontact.cpp108
1 files changed, 54 insertions, 54 deletions
diff --git a/kopete/protocols/msn/msncontact.cpp b/kopete/protocols/msn/msncontact.cpp
index 8a490a1b..c6ef14f8 100644
--- a/kopete/protocols/msn/msncontact.cpp
+++ b/kopete/protocols/msn/msncontact.cpp
@@ -21,7 +21,7 @@
#include "msncontact.h"
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#undef KDE_NO_COMPAT
#include <kaction.h>
@@ -35,7 +35,7 @@
#include <ktempfile.h>
#include <kconfig.h>
#include <kglobal.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kio/job.h>
#include "kopetecontactlist.h"
@@ -50,7 +50,7 @@
#include "msnnotifysocket.h"
#include "msnaccount.h"
-MSNContact::MSNContact( Kopete::Account *account, const QString &id, Kopete::MetaContact *parent )
+MSNContact::MSNContact( Kopete::Account *account, const TQString &id, Kopete::MetaContact *parent )
: Kopete::Contact( account, id, parent )
{
m_deleted = false;
@@ -125,30 +125,30 @@ Kopete::ChatSession *MSNContact::manager( Kopete::Contact::CanCreateFlags canCre
return manager;
}
-QPtrList<KAction> *MSNContact::customContextMenuActions()
+TQPtrList<KAction> *MSNContact::customContextMenuActions()
{
- QPtrList<KAction> *m_actionCollection = new QPtrList<KAction>;
+ TQPtrList<KAction> *m_actionCollection = new TQPtrList<KAction>;
// Block/unblock Contact
- QString label = isBlocked() ? i18n( "Unblock User" ) : i18n( "Block User" );
+ TQString label = isBlocked() ? i18n( "Unblock User" ) : i18n( "Block User" );
if( !actionBlock )
{
- actionBlock = new KAction( label, "msn_blocked",0, this, SLOT( slotBlockUser() ),
+ actionBlock = new KAction( label, "msn_blocked",0, this, TQT_SLOT( slotBlockUser() ),
this, "actionBlock" );
//show profile
- actionShowProfile = new KAction( i18n("Show Profile") , 0, this, SLOT( slotShowProfile() ),
+ actionShowProfile = new KAction( i18n("Show Profile") , 0, this, TQT_SLOT( slotShowProfile() ),
this, "actionShowProfile" );
// Send mail (only available if it is an hotmail account)
- actionSendMail = new KAction( i18n("Send Email...") , "mail_generic",0, this, SLOT( slotSendMail() ),
+ actionSendMail = new KAction( i18n("Send Email...") , "mail_generic",0, this, TQT_SLOT( slotSendMail() ),
this, "actionSendMail" );
// Invite to receive webcam
- actionWebcamReceive = new KAction( i18n( "View Contact's Webcam" ), "webcamreceive", 0, this, SLOT(slotWebcamReceive() ), this, "msnWebcamReceive" ) ;
+ actionWebcamReceive = new KAction( i18n( "View Contact's Webcam" ), "webcamreceive", 0, this, TQT_SLOT(slotWebcamReceive() ), this, "msnWebcamReceive" ) ;
//Send webcam action
- actionWebcamSend = new KAction( i18n( "Send Webcam" ), "webcamsend", 0, this, SLOT(slotWebcamSend() ), this, "msnWebcamSend" ) ;
+ actionWebcamSend = new KAction( i18n( "Send Webcam" ), "webcamsend", 0, this, TQT_SLOT(slotWebcamSend() ), this, "msnWebcamSend" ) ;
}
else
actionBlock->setText( label );
@@ -178,22 +178,22 @@ void MSNContact::slotBlockUser()
if( m_blocked )
{
- notify->removeContact( contactId(), MSNProtocol::BL, QString::null, QString::null );
+ notify->removeContact( contactId(), MSNProtocol::BL, TQString::null, TQString::null );
}
else
{
if(m_allowed)
- notify->removeContact( contactId(), MSNProtocol::AL, QString::null, QString::null );
+ notify->removeContact( contactId(), MSNProtocol::AL, TQString::null, TQString::null );
else
- notify->addContact( contactId(), MSNProtocol::BL, QString::null, QString::null, QString::null );
+ notify->addContact( contactId(), MSNProtocol::BL, TQString::null, TQString::null, TQString::null );
}
}
void MSNContact::slotUserInfo()
{
- KDialogBase *infoDialog=new KDialogBase( 0l, "infoDialog", /*modal = */false, QString::null, KDialogBase::Close , KDialogBase::Close, false );
- QString nick=property( Kopete::Global::Properties::self()->nickName()).value().toString();
- QString personalMessage=property( MSNProtocol::protocol()->propPersonalMessage).value().toString();
+ KDialogBase *infoDialog=new KDialogBase( 0l, "infoDialog", /*modal = */false, TQString::null, KDialogBase::Close , KDialogBase::Close, false );
+ TQString nick=property( Kopete::Global::Properties::self()->nickName()).value().toString();
+ TQString personalMessage=property( MSNProtocol::protocol()->propPersonalMessage).value().toString();
MSNInfo *info=new MSNInfo ( infoDialog,"info");
info->m_id->setText( contactId() );
info->m_displayName->setText(nick);
@@ -203,7 +203,7 @@ void MSNContact::slotUserInfo()
info->m_phm->setText(m_phoneMobile);
info->m_reversed->setChecked(m_reversed);
- connect( info->m_reversed, SIGNAL(toggled(bool)) , this, SLOT(slotUserInfoDialogReversedToggled()));
+ connect( info->m_reversed, TQT_SIGNAL(toggled(bool)) , this, TQT_SLOT(slotUserInfoDialogReversedToggled()));
infoDialog->setMainWidget(info);
infoDialog->setCaption(nick);
@@ -213,9 +213,9 @@ void MSNContact::slotUserInfo()
void MSNContact::slotUserInfoDialogReversedToggled()
{
//workaround to make this checkboxe readonly
- const QCheckBox *cb=dynamic_cast<const QCheckBox*>(sender());
+ const TQCheckBox *cb=dynamic_cast<const TQCheckBox*>(sender());
if(cb && cb->isChecked()!=m_reversed)
- const_cast<QCheckBox*>(cb)->setChecked(m_reversed);
+ const_cast<TQCheckBox*>(cb)->setChecked(m_reversed);
}
void MSNContact::deleteContact()
@@ -228,7 +228,7 @@ void MSNContact::deleteContact()
if( hasProperty(MSNProtocol::protocol()->propGuid.key()) )
{
// Remove from all groups he belongs (if applicable)
- for( QMap<QString, Kopete::Group*>::Iterator it = m_serverGroups.begin(); it != m_serverGroups.end(); ++it )
+ for( TQMap<TQString, Kopete::Group*>::Iterator it = m_serverGroups.begin(); it != m_serverGroups.end(); ++it )
{
kdDebug(14140) << k_funcinfo << "Removing contact from group \"" << it.key() << "\"" << endl;
notify->removeContact( contactId(), MSNProtocol::FL, guid(), it.key() );
@@ -237,7 +237,7 @@ void MSNContact::deleteContact()
// Then trully remove it from server contact list,
// because only removing the contact from his groups isn't sufficent from MSNP11.
kdDebug( 14140 ) << k_funcinfo << "Removing contact from top-level." << endl;
- notify->removeContact( contactId(), MSNProtocol::FL, guid(), QString::null);
+ notify->removeContact( contactId(), MSNProtocol::FL, guid(), TQString::null);
}
else
{
@@ -325,7 +325,7 @@ void MSNContact::setClientFlags( uint flags )
m_clientFlags=flags;
}
-void MSNContact::setInfo(const QString &type,const QString &data )
+void MSNContact::setInfo(const TQString &type,const TQString &data )
{
if( type == "PHH" )
{
@@ -362,12 +362,12 @@ void MSNContact::setInfo(const QString &type,const QString &data )
}
-void MSNContact::serialize( QMap<QString, QString> &serializedData, QMap<QString, QString> & /* addressBookData */ )
+void MSNContact::serialize( TQMap<TQString, TQString> &serializedData, TQMap<TQString, TQString> & /* addressBookData */ )
{
// Contact id and display name are already set for us, only add the rest
- QString groups;
+ TQString groups;
bool firstEntry = true;
- for( QMap<QString, Kopete::Group *>::ConstIterator it = m_serverGroups.begin(); it != m_serverGroups.end(); ++it )
+ for( TQMap<TQString, Kopete::Group *>::ConstIterator it = m_serverGroups.begin(); it != m_serverGroups.end(); ++it )
{
if( !firstEntry )
{
@@ -377,7 +377,7 @@ void MSNContact::serialize( QMap<QString, QString> &serializedData, QMap<QString
groups += it.key();
}
- QString lists="C";
+ TQString lists="C";
if(m_blocked)
lists +="B";
if(m_allowed)
@@ -395,14 +395,14 @@ void MSNContact::serialize( QMap<QString, QString> &serializedData, QMap<QString
}
-QString MSNContact::guid(){ return property(MSNProtocol::protocol()->propGuid).value().toString(); }
+TQString MSNContact::guid(){ return property(MSNProtocol::protocol()->propGuid).value().toString(); }
-QString MSNContact::phoneHome(){ return m_phoneHome ;}
-QString MSNContact::phoneWork(){ return m_phoneWork ;}
-QString MSNContact::phoneMobile(){ return m_phoneMobile ;}
+TQString MSNContact::phoneHome(){ return m_phoneHome ;}
+TQString MSNContact::phoneWork(){ return m_phoneWork ;}
+TQString MSNContact::phoneMobile(){ return m_phoneMobile ;}
-const QMap<QString, Kopete::Group*> MSNContact::serverGroups() const
+const TQMap<TQString, Kopete::Group*> MSNContact::serverGroups() const
{
return m_serverGroups;
}
@@ -451,21 +451,21 @@ void MSNContact::sync( unsigned int changed )
return;
//STEP ONE : add the contact to every kopetegroups where the MC is
- QPtrList<Kopete::Group> groupList = metaContact()->groups();
+ TQPtrList<Kopete::Group> groupList = metaContact()->groups();
for ( Kopete::Group *group = groupList.first(); group; group = groupList.next() )
{
//For each group, ensure it is on the MSN server
if( !group->pluginData( protocol() , account()->accountId() + " id" ).isEmpty() )
{
- QString Gid=group->pluginData( protocol(), account()->accountId() + " id" );
+ TQString Gid=group->pluginData( protocol(), account()->accountId() + " id" );
if( !static_cast<MSNAccount*>( account() )->m_groupList.contains(Gid) )
{ // ohoh! something is corrupted on the contactlist.xml
// anyway, we never should add a contact to an unexisting group on the server.
// This shouln't be possible anymore 2004-06-10 -Olivier
//repair the problem
- group->setPluginData( protocol() , account()->accountId() + " id" , QString::null);
- group->setPluginData( protocol() , account()->accountId() + " displayName" , QString::null);
+ group->setPluginData( protocol() , account()->accountId() + " id" , TQString::null);
+ group->setPluginData( protocol() , account()->accountId() + " displayName" , TQString::null);
kdWarning( 14140 ) << k_funcinfo << " Group " << group->displayName() << " marked with id #" <<Gid << " does not seems to be anymore on the server" << endl;
if(!group->displayName().isEmpty() && group->type() == Kopete::Group::Normal) //not the top-level
@@ -479,7 +479,7 @@ void MSNContact::sync( unsigned int changed )
else if( !m_serverGroups.contains(Gid) )
{
//Add the contact to the group on the server
- notify->addContact( contactId(), MSNProtocol::FL, QString::null, guid(), Gid );
+ notify->addContact( contactId(), MSNProtocol::FL, TQString::null, guid(), Gid );
count++;
m_moving=true;
}
@@ -502,9 +502,9 @@ void MSNContact::sync( unsigned int changed )
//STEP TWO : remove the contact from groups where the MC is not, but let it at least in one group
//contact is not in that group. on the server. we will remove them dirrectly after the loop
- QValueList<QString> removinglist;
+ TQValueList<TQString> removinglist;
- for( QMap<QString, Kopete::Group*>::Iterator it = m_serverGroups.begin();(count > 1 && it != m_serverGroups.end()); ++it )
+ for( TQMap<TQString, Kopete::Group*>::Iterator it = m_serverGroups.begin();(count > 1 && it != m_serverGroups.end()); ++it )
{
if( !static_cast<MSNAccount*>( account() )->m_groupList.contains(it.key()) )
{ // ohoh! something is corrupted on the contactlist.xml
@@ -531,7 +531,7 @@ void MSNContact::sync( unsigned int changed )
}
}
- for(QValueList<QString>::Iterator it= removinglist.begin() ; it != removinglist.end() ; ++it )
+ for(TQValueList<TQString>::Iterator it= removinglist.begin() ; it != removinglist.end() ; ++it )
contactRemovedFromGroup(*it);
//FINAL TEST: is the contact at least in a group..
@@ -539,17 +539,17 @@ void MSNContact::sync( unsigned int changed )
// we add the contact to the group #0 (the default one)
/*if(count==0)
{
-// notify->addContact( contactId(), MSNProtocol::FL, QString::null, guid(), "0");
+// notify->addContact( contactId(), MSNProtocol::FL, TQString::null, guid(), "0");
}*/
}
-void MSNContact::contactAddedToGroup( const QString& groupId, Kopete::Group *group )
+void MSNContact::contactAddedToGroup( const TQString& groupId, Kopete::Group *group )
{
m_serverGroups.insert( groupId, group );
m_moving=false;
}
-void MSNContact::contactRemovedFromGroup( const QString& groupId )
+void MSNContact::contactRemovedFromGroup( const TQString& groupId )
{
m_serverGroups.remove( groupId );
if(m_serverGroups.isEmpty() && !m_moving)
@@ -560,7 +560,7 @@ void MSNContact::contactRemovedFromGroup( const QString& groupId )
}
-void MSNContact::rename( const QString &newName )
+void MSNContact::rename( const TQString &newName )
{
//kdDebug( 14140 ) << k_funcinfo << "From: " << displayName() << ", to: " << newName << endl;
@@ -577,20 +577,20 @@ void MSNContact::rename( const QString &newName )
void MSNContact::slotShowProfile()
{
- KRun::runURL( KURL( QString::fromLatin1("http://members.msn.com/?pgmarket=it-it&mem=") + contactId()) , "text/html" );
+ KRun::runURL( KURL( TQString::fromLatin1("http://members.msn.com/?pgmarket=it-it&mem=") + contactId()) , "text/html" );
}
/**
* FIXME: Make this a standard KMM API call
*/
-void MSNContact::sendFile( const KURL &sourceURL, const QString &altFileName, uint /*fileSize*/ )
+void MSNContact::sendFile( const KURL &sourceURL, const TQString &altFileName, uint /*fileSize*/ )
{
- QString filePath;
+ TQString filePath;
//If the file location is null, then get it from a file open dialog
if( !sourceURL.isValid() )
- filePath = KFileDialog::getOpenFileName( QString::null ,"*", 0l , i18n( "Kopete File Transfer" ));
+ filePath = KFileDialog::getOpenFileName( TQString::null ,"*", 0l , i18n( "Kopete File Transfer" ));
else
filePath = sourceURL.path(-1);
@@ -598,7 +598,7 @@ void MSNContact::sendFile( const KURL &sourceURL, const QString &altFileName, ui
if ( !filePath.isEmpty() )
{
- Q_UINT32 fileSize = QFileInfo(filePath).size();
+ Q_UINT32 fileSize = TQFileInfo(filePath).size();
//Send the file
static_cast<MSNChatSession*>( manager(Kopete::Contact::CanCreate) )->sendFile( filePath, altFileName, fileSize );
@@ -614,7 +614,7 @@ void MSNContact::setOnlineStatus(const Kopete::OnlineStatus& status)
(status.weight()==0) ? 0 : (status.weight() -1) ,
protocol() ,
status.internalStatus()+15 ,
- status.overlayIcons() + QStringList("msn_blocked") ,
+ status.overlayIcons() + TQStringList("msn_blocked") ,
i18n("%1|Blocked").arg( status.description() ) ) );
}
else if(!isBlocked() && status.internalStatus() >= 15)
@@ -672,7 +672,7 @@ void MSNContact::setDisplayPicture(KTempFile *f)
//copy the temp file somewere else.
// in a better world, the file could be dirrectly wrote at the correct location.
// but the custom emoticon code is to deeply merged in the display picture code while it could be separated.
- QString newlocation=locateLocal( "appdata", "msnpictures/"+ contactId().lower().replace(QRegExp("[./~]"),"-") +".png" ) ;
+ TQString newlocation=locateLocal( "appdata", "msnpictures/"+ contactId().lower().replace(TQRegExp("[./~]"),"-") +".png" ) ;
KIO::Job *j=KIO::file_move( KURL::fromPathOrURL( f->name() ) , KURL::fromPathOrURL( newlocation ) , -1, true /*overwrite*/ , false /*resume*/ , false /*showProgressInfo*/ );
@@ -680,17 +680,17 @@ void MSNContact::setDisplayPicture(KTempFile *f)
delete f;
//let the time to KIO to copy the file
- connect(j, SIGNAL(result(KIO::Job *)) , this, SLOT(slotEmitDisplayPictureChanged() ));
+ connect(j, TQT_SIGNAL(result(KIO::Job *)) , this, TQT_SLOT(slotEmitDisplayPictureChanged() ));
}
void MSNContact::slotEmitDisplayPictureChanged()
{
- QString newlocation=locateLocal( "appdata", "msnpictures/"+ contactId().lower().replace(QRegExp("[./~]"),"-") +".png" ) ;
+ TQString newlocation=locateLocal( "appdata", "msnpictures/"+ contactId().lower().replace(TQRegExp("[./~]"),"-") +".png" ) ;
setProperty( Kopete::Global::Properties::self()->photo() , newlocation );
emit displayPictureChanged();
}
-void MSNContact::setObject(const QString &obj)
+void MSNContact::setObject(const TQString &obj)
{
if(m_obj==obj && (obj.isEmpty() || hasProperty(Kopete::Global::Properties::self()->photo().key())))
return;