summaryrefslogtreecommitdiffstats
path: root/kopete/libkopete/kopetechatsession.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/libkopete/kopetechatsession.cpp')
-rw-r--r--kopete/libkopete/kopetechatsession.cpp92
1 files changed, 46 insertions, 46 deletions
diff --git a/kopete/libkopete/kopetechatsession.cpp b/kopete/libkopete/kopetechatsession.cpp
index 9ebf1d07..91866cce 100644
--- a/kopete/libkopete/kopetechatsession.cpp
+++ b/kopete/libkopete/kopetechatsession.cpp
@@ -22,8 +22,8 @@
#include "kopetechatsession.h"
-#include <qapplication.h>
-#include <qregexp.h>
+#include <tqapplication.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kdeversion.h>
@@ -49,14 +49,14 @@ class KMMPrivate
public:
Kopete::ContactPtrList mContactList;
const Kopete::Contact *mUser;
- QMap<const Kopete::Contact *, Kopete::OnlineStatus> contactStatus;
+ TQMap<const Kopete::Contact *, Kopete::OnlineStatus> contactStatus;
Kopete::Protocol *mProtocol;
bool isEmpty;
bool mCanBeDeleted;
unsigned int refcount;
bool customDisplayName;
- QDateTime awayTime;
- QString displayName;
+ TQDateTime awayTime;
+ TQString displayName;
KopeteView *view;
bool mayInvite;
Kopete::MessageHandlerChain::Ptr chains[3];
@@ -64,7 +64,7 @@ public:
Kopete::ChatSession::ChatSession( const Kopete::Contact *user,
Kopete::ContactPtrList others, Kopete::Protocol *protocol, const char *name )
-: QObject( user->account(), name )
+: TQObject( user->account(), name )
{
d = new KMMPrivate;
d->mUser = user;
@@ -79,11 +79,11 @@ Kopete::ChatSession::ChatSession( const Kopete::Contact *user,
for ( Kopete::Contact *c = others.first(); c; c = others.next() )
addContact( c, true );
- connect( user, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), this,
- SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) );
+ connect( user, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), this,
+ TQT_SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) );
if( user->metaContact() )
- connect( user->metaContact(), SIGNAL( photoChanged() ), this, SIGNAL( photoChanged() ) );
+ connect( user->metaContact(), TQT_SIGNAL( photoChanged() ), this, TQT_SIGNAL( photoChanged() ) );
slotUpdateDisplayName();
}
@@ -111,8 +111,8 @@ void Kopete::ChatSession::setContactOnlineStatus( const Kopete::Contact *contact
{
Kopete::OnlineStatus oldStatus = d->contactStatus[ contact ];
d->contactStatus[ contact ] = status;
- disconnect( contact, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ),
- this, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) );
+ disconnect( contact, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ),
+ this, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) );
emit onlineStatusChanged( (Kopete::Contact*)contact, status, oldStatus );
}
@@ -124,7 +124,7 @@ const Kopete::OnlineStatus Kopete::ChatSession::contactOnlineStatus( const Kopet
return contact->onlineStatus();
}
-const QString Kopete::ChatSession::displayName()
+const TQString Kopete::ChatSession::displayName()
{
if ( d->displayName.isNull() )
{
@@ -134,7 +134,7 @@ const QString Kopete::ChatSession::displayName()
return d->displayName;
}
-void Kopete::ChatSession::setDisplayName( const QString &newName )
+void Kopete::ChatSession::setDisplayName( const TQString &newName )
{
d->displayName = newName;
d->customDisplayName = true;
@@ -152,17 +152,17 @@ void Kopete::ChatSession::slotUpdateDisplayName()
if ( !c )
return;
- d->displayName=QString::null;
+ d->displayName=TQString::null;
do
{
if(! d->displayName.isNull() )
- d->displayName.append( QString::fromLatin1( ", " ) ) ;
+ d->displayName.append( TQString::fromLatin1( ", " ) ) ;
if ( c->metaContact() )
d->displayName.append( c->metaContact()->displayName() );
else
{
- QString nick=c->property(Kopete::Global::Properties::self()->nickName()).value().toString();
+ TQString nick=c->property(Kopete::Global::Properties::self()->nickName()).value().toString();
d->displayName.append( nick.isEmpty() ? c->contactId() : nick );
}
c=d->mContactList.next();
@@ -171,7 +171,7 @@ void Kopete::ChatSession::slotUpdateDisplayName()
//If we have only 1 contact, add the status of him
if ( d->mContactList.count() == 1 )
{
- d->displayName.append( QString::fromLatin1( " (%1)" ).arg( d->mContactList.first()->onlineStatus().description() ) );
+ d->displayName.append( TQString::fromLatin1( " (%1)" ).arg( d->mContactList.first()->onlineStatus().description() ) );
}
emit displayNameChanged();
@@ -248,7 +248,7 @@ void Kopete::ChatSession::sendMessage( Kopete::Message &message )
emit messageSent( sentMessage, this );
if ( !account()->isAway() || KopetePrefs::prefs()->soundIfAway() )
{
- KNotification::event(QString::fromLatin1( "kopete_outgoing" ), i18n( "Outgoing Message Sent" ) );
+ KNotification::event(TQString::fromLatin1( "kopete_outgoing" ), i18n( "Outgoing Message Sent" ) );
}
}
else
@@ -264,7 +264,7 @@ void Kopete::ChatSession::messageSucceeded()
void Kopete::ChatSession::emitNudgeNotification()
{
- KNotification::event( QString::fromLatin1("buzz_nudge"), i18n("A contact sent you a buzz/nudge.") );
+ KNotification::event( TQString::fromLatin1("buzz_nudge"), i18n("A contact sent you a buzz/nudge.") );
}
void Kopete::ChatSession::appendMessage( Kopete::Message &msg )
@@ -273,9 +273,9 @@ void Kopete::ChatSession::appendMessage( Kopete::Message &msg )
if ( msg.direction() == Kopete::Message::Inbound )
{
- QString nick=myself()->property(Kopete::Global::Properties::self()->nickName()).value().toString();
+ TQString nick=myself()->property(Kopete::Global::Properties::self()->nickName()).value().toString();
if ( KopetePrefs::prefs()->highlightEnabled() && !nick.isEmpty() &&
- msg.plainBody().contains( QRegExp( QString::fromLatin1( "\\b(%1)\\b" ).arg( nick ), false ) ) )
+ msg.plainBody().contains( TQRegExp( TQString::fromLatin1( "\\b(%1)\\b" ).arg( nick ), false ) ) )
{
msg.setImportance( Kopete::Message::Highlight );
}
@@ -320,18 +320,18 @@ void Kopete::ChatSession::addContact( const Kopete::Contact *c, bool suppress )
d->mContactList.remove( old );
d->mContactList.append( c );
- disconnect( old, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ),
- this, SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) );
+ disconnect( old, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ),
+ this, TQT_SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) );
if ( old->metaContact() )
{
- disconnect( old->metaContact(), SIGNAL( displayNameChanged( const QString &, const QString & ) ), this, SLOT( slotUpdateDisplayName() ) );
- disconnect( old->metaContact(), SIGNAL( photoChanged() ), this, SIGNAL( photoChanged() ) );
+ disconnect( old->metaContact(), TQT_SIGNAL( displayNameChanged( const TQString &, const TQString & ) ), this, TQT_SLOT( slotUpdateDisplayName() ) );
+ disconnect( old->metaContact(), TQT_SIGNAL( photoChanged() ), this, TQT_SIGNAL( photoChanged() ) );
}
else
- disconnect( old, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), this, SLOT( slotUpdateDisplayName() ) );
+ disconnect( old, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), this, TQT_SLOT( slotUpdateDisplayName() ) );
emit contactAdded( c, suppress );
- emit contactRemoved( old, QString::null );
+ emit contactRemoved( old, TQString::null );
}
else
{
@@ -339,24 +339,24 @@ void Kopete::ChatSession::addContact( const Kopete::Contact *c, bool suppress )
emit contactAdded( c, suppress );
}
- connect( c, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ),
- this, SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) );
+ connect( c, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ),
+ this, TQT_SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) );
;
if ( c->metaContact() )
{
- connect( c->metaContact(), SIGNAL( displayNameChanged( const QString &, const QString & ) ), this, SLOT( slotUpdateDisplayName() ) );
- connect( c->metaContact(), SIGNAL( photoChanged() ), this, SIGNAL( photoChanged() ) );
+ connect( c->metaContact(), TQT_SIGNAL( displayNameChanged( const TQString &, const TQString & ) ), this, TQT_SLOT( slotUpdateDisplayName() ) );
+ connect( c->metaContact(), TQT_SIGNAL( photoChanged() ), this, TQT_SIGNAL( photoChanged() ) );
}
else
- connect( c, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), this, SLOT( slotUpdateDisplayName() ) );
- connect( c, SIGNAL( contactDestroyed( Kopete::Contact * ) ), this, SLOT( slotContactDestroyed( Kopete::Contact * ) ) );
+ connect( c, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), this, TQT_SLOT( slotUpdateDisplayName() ) );
+ connect( c, TQT_SIGNAL( contactDestroyed( Kopete::Contact * ) ), this, TQT_SLOT( slotContactDestroyed( Kopete::Contact * ) ) );
slotUpdateDisplayName();
}
d->isEmpty = false;
}
-void Kopete::ChatSession::removeContact( const Kopete::Contact *c, const QString& reason, Kopete::Message::MessageFormat format, bool suppressNotification )
+void Kopete::ChatSession::removeContact( const Kopete::Contact *c, const TQString& reason, Kopete::Message::MessageFormat format, bool suppressNotification )
{
kdDebug( 14010 ) << k_funcinfo << endl;
if ( !c || !d->mContactList.contains( c ) )
@@ -371,17 +371,17 @@ void Kopete::ChatSession::removeContact( const Kopete::Contact *c, const QString
{
d->mContactList.remove( c );
- disconnect( c, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ),
- this, SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) );
+ disconnect( c, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ),
+ this, TQT_SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) );
if ( c->metaContact() )
{
- disconnect( c->metaContact(), SIGNAL( displayNameChanged( const QString &, const QString & ) ), this, SLOT( slotUpdateDisplayName() ) );
- disconnect( c->metaContact(), SIGNAL( photoChanged() ), this, SIGNAL( photoChanged() ) );
+ disconnect( c->metaContact(), TQT_SIGNAL( displayNameChanged( const TQString &, const TQString & ) ), this, TQT_SLOT( slotUpdateDisplayName() ) );
+ disconnect( c->metaContact(), TQT_SIGNAL( photoChanged() ), this, TQT_SIGNAL( photoChanged() ) );
}
else
- disconnect( c, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), this, SLOT( slotUpdateDisplayName() ) );
- disconnect( c, SIGNAL( contactDestroyed( Kopete::Contact * ) ), this, SLOT( slotContactDestroyed( Kopete::Contact * ) ) );
+ disconnect( c, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), this, TQT_SLOT( slotUpdateDisplayName() ) );
+ disconnect( c, TQT_SIGNAL( contactDestroyed( Kopete::Contact * ) ), this, TQT_SLOT( slotContactDestroyed( Kopete::Contact * ) ) );
slotUpdateDisplayName();
}
@@ -396,7 +396,7 @@ void Kopete::ChatSession::receivedTypingMsg( const Kopete::Contact *c, bool t )
emit remoteTyping( c, t );
}
-void Kopete::ChatSession::receivedTypingMsg( const QString &contactId, bool t )
+void Kopete::ChatSession::receivedTypingMsg( const TQString &contactId, bool t )
{
for ( Kopete::Contact *it = d->mContactList.first(); it; it = d->mContactList.next() )
{
@@ -413,7 +413,7 @@ void Kopete::ChatSession::typing( bool t )
emit myselfTyping( t );
}
-void Kopete::ChatSession::receivedEventNotification( const QString& notificationText)
+void Kopete::ChatSession::receivedEventNotification( const TQString& notificationText)
{
emit eventNotification( notificationText );
}
@@ -436,14 +436,14 @@ void Kopete::ChatSession::deref ()
deleteLater();
}
-KopeteView* Kopete::ChatSession::view( bool canCreate, const QString &requestedPlugin )
+KopeteView* Kopete::ChatSession::view( bool canCreate, const TQString &requestedPlugin )
{
if ( !d->view && canCreate )
{
d->view = Kopete::ChatSessionManager::self()->createView( this, requestedPlugin );
if ( d->view )
{
- connect( d->view->mainWidget(), SIGNAL( closing( KopeteView * ) ), this, SLOT( slotViewDestroyed( ) ) );
+ connect( d->view->mainWidget(), TQT_SIGNAL( closing( KopeteView * ) ), this, TQT_SLOT( slotViewDestroyed( ) ) );
}
else
{
@@ -479,7 +479,7 @@ void Kopete::ChatSession::slotContactDestroyed( Kopete::Contact *contact )
// in the best case, we should ask the protocol to recreate a temporary contact.
// (remember: the contact may be deleted when the users removes it from the contactlist, or when closing kopete )
d->mContactList.remove( contact );
- emit contactRemoved( contact, QString::null );
+ emit contactRemoved( contact, TQString::null );
if ( d->mContactList.isEmpty() )
deleteLater();
@@ -490,7 +490,7 @@ bool Kopete::ChatSession::mayInvite() const
return d->mayInvite;
}
-void Kopete::ChatSession::inviteContact(const QString& )
+void Kopete::ChatSession::inviteContact(const TQString& )
{
//default implementation do nothing
}