summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/irc/ircusercontact.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/protocols/irc/ircusercontact.cpp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/irc/ircusercontact.cpp')
-rw-r--r--kopete/protocols/irc/ircusercontact.cpp146
1 files changed, 73 insertions, 73 deletions
diff --git a/kopete/protocols/irc/ircusercontact.cpp b/kopete/protocols/irc/ircusercontact.cpp
index dc9dcbf2..24e46c57 100644
--- a/kopete/protocols/irc/ircusercontact.cpp
+++ b/kopete/protocols/irc/ircusercontact.cpp
@@ -31,20 +31,20 @@
#include <kfiledialog.h>
#include <klocale.h>
-#include <qtimer.h>
+#include <tqtimer.h>
-IRCUserContact::IRCUserContact(IRCContactManager *contactManager, const QString &nickname, Kopete::MetaContact *m )
+IRCUserContact::IRCUserContact(IRCContactManager *contactManager, const TQString &nickname, Kopete::MetaContact *m )
: IRCContact(contactManager, nickname, m ),
actionCtcpMenu(0L)
{
setFileCapable(true);
- mOnlineTimer = new QTimer( this );
+ mOnlineTimer = new TQTimer( this );
- QObject::connect(mOnlineTimer, SIGNAL(timeout()), this, SLOT( slotUserOffline() ) );
+ TQObject::connect(mOnlineTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT( slotUserOffline() ) );
- QObject::connect(kircEngine(), SIGNAL(incomingChannelModeChange(const QString&, const QString&, const QString&)),
- this, SLOT(slotIncomingModeChange(const QString&,const QString&, const QString&)));
+ TQObject::connect(kircEngine(), TQT_SIGNAL(incomingChannelModeChange(const TQString&, const TQString&, const TQString&)),
+ this, TQT_SLOT(slotIncomingModeChange(const TQString&,const TQString&, const TQString&)));
mInfo.isOperator = false;
mInfo.isIdentified = false;
@@ -100,9 +100,9 @@ void IRCUserContact::updateStatus()
// This may not be created yet ( for myself() on startup )
if( ircAccount()->contactManager() )
{
- QValueList<IRCChannelContact*> channels = ircAccount()->contactManager()->findChannelsByMember(this);
+ TQValueList<IRCChannelContact*> channels = ircAccount()->contactManager()->findChannelsByMember(this);
- for( QValueList<IRCChannelContact*>::iterator it = channels.begin(); it != channels.end(); ++it )
+ for( TQValueList<IRCChannelContact*>::iterator it = channels.begin(); it != channels.end(); ++it )
{
IRCChannelContact *channel = *it;
Kopete::OnlineStatus currentStatus = channel->manager()->contactOnlineStatus(this);
@@ -141,13 +141,13 @@ void IRCUserContact::updateStatus()
}
}
-void IRCUserContact::sendFile(const KURL &sourceURL, const QString&, unsigned int)
+void IRCUserContact::sendFile(const KURL &sourceURL, const TQString&, unsigned int)
{
- 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);
@@ -165,7 +165,7 @@ void IRCUserContact::slotUserOffline()
updateStatus();
if( !metaContact()->isTemporary() )
- kircEngine()->writeMessage( QString::fromLatin1("WHOWAS %1").arg(m_nickName) );
+ kircEngine()->writeMessage( TQString::fromLatin1("WHOWAS %1").arg(m_nickName) );
removeProperty( m_protocol->propUserInfo );
removeProperty( m_protocol->propServer );
@@ -180,7 +180,7 @@ void IRCUserContact::setAway(bool isAway)
updateStatus();
}
-void IRCUserContact::incomingUserIsAway(const QString &reason)
+void IRCUserContact::incomingUserIsAway(const TQString &reason)
{
if( manager( Kopete::Contact::CannotCreate ) )
{
@@ -214,29 +214,29 @@ void IRCUserContact::slotUserInfo()
}
}
-const QString IRCUserContact::caption() const
+const TQString IRCUserContact::caption() const
{
return i18n("%1 @ %2").arg(m_nickName).arg(kircEngine()->currentHost());
}
void IRCUserContact::slotOp()
{
- contactMode( QString::fromLatin1("+o") );
+ contactMode( TQString::fromLatin1("+o") );
}
void IRCUserContact::slotDeop()
{
- contactMode( QString::fromLatin1("-o") );
+ contactMode( TQString::fromLatin1("-o") );
}
void IRCUserContact::slotVoice()
{
- contactMode( QString::fromLatin1("+v") );
+ contactMode( TQString::fromLatin1("+v") );
}
void IRCUserContact::slotDevoice()
{
- contactMode( QString::fromLatin1("-v") );
+ contactMode( TQString::fromLatin1("-v") );
}
void IRCUserContact::slotBanHost()
@@ -246,7 +246,7 @@ void IRCUserContact::slotBanHost()
if (mInfo.hostName.isEmpty()) {
if (kircEngine()->isConnected()) {
kircEngine()->whois(m_nickName);
- QTimer::singleShot( 750, this, SLOT( slotBanHostOnce() ) );
+ TQTimer::singleShot( 750, this, TQT_SLOT( slotBanHostOnce() ) );
}
} else {
slotBanHostOnce();
@@ -258,9 +258,9 @@ void IRCUserContact::slotBanHostOnce()
return;
Kopete::ContactPtrList members = mActiveManager->members();
- QString channelName = static_cast<IRCContact*>(members.first())->nickName();
+ TQString channelName = static_cast<IRCContact*>(members.first())->nickName();
- kircEngine()->mode(channelName, QString::fromLatin1("+b *!*@%1").arg(mInfo.hostName));
+ kircEngine()->mode(channelName, TQString::fromLatin1("+b *!*@%1").arg(mInfo.hostName));
}
void IRCUserContact::slotBanUserHost()
@@ -270,7 +270,7 @@ void IRCUserContact::slotBanUserHost()
if (mInfo.hostName.isEmpty()) {
if (kircEngine()->isConnected()) {
kircEngine()->whois(m_nickName);
- QTimer::singleShot( 750, this, SLOT( slotBanUserHostOnce() ) );
+ TQTimer::singleShot( 750, this, TQT_SLOT( slotBanUserHostOnce() ) );
}
} else {
slotBanUserHostOnce();
@@ -282,9 +282,9 @@ void IRCUserContact::slotBanUserHostOnce()
return;
Kopete::ContactPtrList members = mActiveManager->members();
- QString channelName = static_cast<IRCContact*>(members.first())->nickName();
+ TQString channelName = static_cast<IRCContact*>(members.first())->nickName();
- kircEngine()->mode(channelName, QString::fromLatin1("+b *!*%1@%2").arg(mInfo.userName, mInfo.hostName));
+ kircEngine()->mode(channelName, TQString::fromLatin1("+b *!*%1@%2").arg(mInfo.userName, mInfo.hostName));
}
void IRCUserContact::slotBanDomain()
@@ -294,7 +294,7 @@ void IRCUserContact::slotBanDomain()
if (mInfo.hostName.isEmpty()) {
if (kircEngine()->isConnected()) {
kircEngine()->whois(m_nickName);
- QTimer::singleShot( 750, this, SLOT( slotBanDomainOnce() ) );
+ TQTimer::singleShot( 750, this, TQT_SLOT( slotBanDomainOnce() ) );
}
} else {
slotBanDomainOnce();
@@ -306,11 +306,11 @@ void IRCUserContact::slotBanDomainOnce()
return;
Kopete::ContactPtrList members = mActiveManager->members();
- QString channelName = static_cast<IRCContact*>(members.first())->nickName();
+ TQString channelName = static_cast<IRCContact*>(members.first())->nickName();
- QString domain = mInfo.hostName.section('.', 1);
+ TQString domain = mInfo.hostName.section('.', 1);
- kircEngine()->mode(channelName, QString::fromLatin1("+b *!*@*.%1").arg(domain));
+ kircEngine()->mode(channelName, TQString::fromLatin1("+b *!*@*.%1").arg(domain));
}
void IRCUserContact::slotBanUserDomain()
@@ -320,7 +320,7 @@ void IRCUserContact::slotBanUserDomain()
if (mInfo.hostName.isEmpty()) {
if (kircEngine()->isConnected()) {
kircEngine()->whois(m_nickName);
- QTimer::singleShot( 750, this, SLOT( slotBanUserDomainOnce() ) );
+ TQTimer::singleShot( 750, this, TQT_SLOT( slotBanUserDomainOnce() ) );
}
} else {
slotBanUserDomainOnce();
@@ -332,25 +332,25 @@ void IRCUserContact::slotBanUserDomainOnce()
return;
Kopete::ContactPtrList members = mActiveManager->members();
- QString channelName = static_cast<IRCContact*>(members.first())->nickName();
+ TQString channelName = static_cast<IRCContact*>(members.first())->nickName();
- QString domain = mInfo.hostName.section('.', 1);
+ TQString domain = mInfo.hostName.section('.', 1);
- kircEngine()->mode(channelName, QString::fromLatin1("+b *!*%1@*.%2").arg(mInfo.userName, domain));
+ kircEngine()->mode(channelName, TQString::fromLatin1("+b *!*%1@*.%2").arg(mInfo.userName, domain));
}
void IRCUserContact::slotKick()
{
Kopete::ContactPtrList members = mActiveManager->members();
- QString channelName = static_cast<IRCContact*>(members.first())->nickName();
- kircEngine()->kick(m_nickName, channelName, QString::null);
+ TQString channelName = static_cast<IRCContact*>(members.first())->nickName();
+ kircEngine()->kick(m_nickName, channelName, TQString::null);
}
-void IRCUserContact::contactMode(const QString &mode)
+void IRCUserContact::contactMode(const TQString &mode)
{
Kopete::ContactPtrList members = mActiveManager->members();
- QString channelName = static_cast<IRCContact*>(members.first())->nickName();
- kircEngine()->mode(channelName, QString::fromLatin1("%1 %2").arg(mode).arg(m_nickName));
+ TQString channelName = static_cast<IRCContact*>(members.first())->nickName();
+ kircEngine()->mode(channelName, TQString::fromLatin1("%1 %2").arg(mode).arg(m_nickName));
}
void IRCUserContact::slotCtcpPing()
@@ -363,7 +363,7 @@ void IRCUserContact::slotCtcpVersion()
kircEngine()->CtcpRequest_version(m_nickName);
}
-void IRCUserContact::newWhoIsUser(const QString &username, const QString &hostname, const QString &realname)
+void IRCUserContact::newWhoIsUser(const TQString &username, const TQString &hostname, const TQString &realname)
{
mInfo.channels.clear();
mInfo.userName = username;
@@ -372,14 +372,14 @@ void IRCUserContact::newWhoIsUser(const QString &username, const QString &hostna
if( onlineStatus().status() == Kopete::OnlineStatus::Offline )
{
- setProperty( m_protocol->propUserInfo, QString::fromLatin1("%1@%2")
+ setProperty( m_protocol->propUserInfo, TQString::fromLatin1("%1@%2")
.arg(mInfo.userName).arg(mInfo.hostName) );
setProperty( m_protocol->propServer, mInfo.serverName );
setProperty( m_protocol->propFullName, mInfo.realName );
}
}
-void IRCUserContact::newWhoIsServer(const QString &servername, const QString &serverinfo)
+void IRCUserContact::newWhoIsServer(const TQString &servername, const TQString &serverinfo)
{
mInfo.serverName = servername;
if( metaContact()->isTemporary() || onlineStatus().status() == Kopete::OnlineStatus::Online
@@ -395,7 +395,7 @@ void IRCUserContact::newWhoIsServer(const QString &servername, const QString &se
// 312 mynick othernick localhost.localdomain :FooNet Server
// 312 mynick othernick localhost.localdomain :Thu Jun 16 21:00:36 2005
- QDateTime lastSeen = QDateTime::fromString( serverinfo );
+ TQDateTime lastSeen = TQDateTime::fromString( serverinfo );
if( lastSeen.isValid() )
setProperty( m_protocol->propLastSeen, lastSeen );
}
@@ -417,7 +417,7 @@ void IRCUserContact::newWhoIsIdentified()
setProperty( m_protocol->propIsIdentified, i18n("True") );
}
-void IRCUserContact::newWhoIsChannels(const QString &channel)
+void IRCUserContact::newWhoIsChannels(const TQString &channel)
{
mInfo.channels.append( channel );
}
@@ -432,7 +432,7 @@ void IRCUserContact::whoIsComplete()
commandSource == manager(Kopete::Contact::CannotCreate) )
{
//User info
- QString msg = i18n("%1 is (%2@%3): %4<br/>")
+ TQString msg = i18n("%1 is (%2@%3): %4<br/>")
.arg(m_nickName)
.arg(mInfo.userName)
.arg(mInfo.hostName)
@@ -451,8 +451,8 @@ void IRCUserContact::whoIsComplete()
msg += i18n("on IRC via server %1 ( %2 )<br/>").arg(mInfo.serverName).arg(mInfo.serverInfo);
//Idle
- QString idleTime = formattedIdleTime();
- msg += i18n("idle: %2<br/>").arg( idleTime.isEmpty() ? QString::number(0) : idleTime );
+ TQString idleTime = formattedIdleTime();
+ msg += i18n("idle: %2<br/>").arg( idleTime.isEmpty() ? TQString::number(0) : idleTime );
//End
ircAccount()->appendMessage(msg, IRCAccount::InfoReply );
@@ -465,7 +465,7 @@ void IRCUserContact::whoWasComplete()
if( isChatting() && ircAccount()->currentCommandSource() == manager() )
{
//User info
- QString msg = i18n("%1 was (%2@%3): %4\n")
+ TQString msg = i18n("%1 was (%2@%3): %4\n")
.arg(m_nickName)
.arg(mInfo.userName)
.arg(mInfo.hostName)
@@ -482,27 +482,27 @@ void IRCUserContact::whoWasComplete()
}
}
-QString IRCUserContact::formattedName() const
+TQString IRCUserContact::formattedName() const
{
return mInfo.realName;
}
void IRCUserContact::updateInfo()
{
- setProperty( m_protocol->propUserInfo, QString::fromLatin1("%1@%2")
+ setProperty( m_protocol->propUserInfo, TQString::fromLatin1("%1@%2")
.arg(mInfo.userName).arg(mInfo.hostName) );
setProperty( m_protocol->propServer, mInfo.serverName );
setProperty( m_protocol->propChannels, mInfo.channels.join(" ") );
- setProperty( m_protocol->propHops, QString::number(mInfo.hops) );
+ setProperty( m_protocol->propHops, TQString::number(mInfo.hops) );
setProperty( m_protocol->propFullName, mInfo.realName );
setIdleTime( mInfo.idle );
- mInfo.lastUpdate = QTime::currentTime();
+ mInfo.lastUpdate = TQTime::currentTime();
}
-void IRCUserContact::newWhoReply( const QString &channel, const QString &user, const QString &host,
- const QString &server, bool away, const QString &flags, uint hops, const QString &realName )
+void IRCUserContact::newWhoReply( const TQString &channel, const TQString &user, const TQString &host,
+ const TQString &server, bool away, const TQString &flags, uint hops, const TQString &realName )
{
if( !mInfo.channels.contains( channel ) )
mInfo.channels.append( channel );
@@ -524,11 +524,11 @@ void IRCUserContact::newWhoReply( const QString &channel, const QString &user, c
}
}
-QPtrList<KAction> *IRCUserContact::customContextMenuActions( Kopete::ChatSession *manager )
+TQPtrList<KAction> *IRCUserContact::customContextMenuActions( Kopete::ChatSession *manager )
{
if( manager )
{
- QPtrList<KAction> *mCustomActions = new QPtrList<KAction> ();
+ TQPtrList<KAction> *mCustomActions = new TQPtrList<KAction> ();
mActiveManager = manager;
Kopete::ContactPtrList members = mActiveManager->members();
IRCChannelContact *isChannel = dynamic_cast<IRCChannelContact*>( members.first() );
@@ -537,38 +537,38 @@ QPtrList<KAction> *IRCUserContact::customContextMenuActions( Kopete::ChatSession
{
actionCtcpMenu = new KActionMenu(i18n("C&TCP"), 0, this );
actionCtcpMenu->insert( new KAction(i18n("&Version"), 0, this,
- SLOT(slotCtcpVersion()), actionCtcpMenu) );
+ TQT_SLOT(slotCtcpVersion()), actionCtcpMenu) );
actionCtcpMenu->insert( new KAction(i18n("&Ping"), 0, this,
- SLOT(slotCtcpPing()), actionCtcpMenu) );
+ TQT_SLOT(slotCtcpPing()), actionCtcpMenu) );
actionModeMenu = new KActionMenu(i18n("&Modes"), 0, this, "actionModeMenu");
actionModeMenu->insert( new KAction(i18n("&Op"), 0, this,
- SLOT(slotOp()), actionModeMenu, "actionOp") );
+ TQT_SLOT(slotOp()), actionModeMenu, "actionOp") );
actionModeMenu->insert( new KAction(i18n("&Deop"), 0, this,
- SLOT(slotDeop()), actionModeMenu, "actionDeop") );
+ TQT_SLOT(slotDeop()), actionModeMenu, "actionDeop") );
actionModeMenu->insert( new KAction(i18n("&Voice"), 0, this,
- SLOT(slotVoice()), actionModeMenu, "actionVoice") );
+ TQT_SLOT(slotVoice()), actionModeMenu, "actionVoice") );
actionModeMenu->insert( new KAction(i18n("Devoice"), 0, this,
- SLOT(slotDevoice()), actionModeMenu, "actionDevoice") );
+ TQT_SLOT(slotDevoice()), actionModeMenu, "actionDevoice") );
actionModeMenu->setEnabled( false );
- actionKick = new KAction(i18n("&Kick"), 0, this, SLOT(slotKick()), this);
+ actionKick = new KAction(i18n("&Kick"), 0, this, TQT_SLOT(slotKick()), this);
actionKick->setEnabled( false );
actionBanMenu = new KActionMenu(i18n("&Ban"), 0, this, "actionBanMenu");
actionBanMenu->insert( new KAction(i18n("Host (*!*@host.domain.net)"), 0, this,
- SLOT(slotBanHost()), actionBanMenu ) );
+ TQT_SLOT(slotBanHost()), actionBanMenu ) );
actionBanMenu->insert( new KAction(i18n("Domain (*!*@*.domain.net)"), 0, this,
- SLOT(slotBanDomain()), actionBanMenu ) );
+ TQT_SLOT(slotBanDomain()), actionBanMenu ) );
actionBanMenu->insert( new KAction(i18n("User@Host (*!*user@host.domain.net)"), 0, this,
- SLOT(slotBanUserHost()), actionBanMenu ) );
+ TQT_SLOT(slotBanUserHost()), actionBanMenu ) );
actionBanMenu->insert( new KAction(i18n("User@Domain (*!*user@*.domain.net)"), 0, this,
- SLOT(slotBanUserDomain()), actionBanMenu ) );
+ TQT_SLOT(slotBanUserDomain()), actionBanMenu ) );
actionBanMenu->setEnabled( false );
codecAction = new KCodecAction( i18n("&Encoding"), 0, this, "selectcharset" );
- connect( codecAction, SIGNAL( activated( const QTextCodec * ) ),
- this, SLOT( setCodec( const QTextCodec *) ) );
+ connect( codecAction, TQT_SIGNAL( activated( const TQTextCodec * ) ),
+ this, TQT_SLOT( setCodec( const TQTextCodec *) ) );
codecAction->setCodec( codec() );
}
@@ -594,7 +594,7 @@ QPtrList<KAction> *IRCUserContact::customContextMenuActions( Kopete::ChatSession
return 0L;
}
-void IRCUserContact::slotIncomingModeChange( const QString &channel, const QString &, const QString &mode_ )
+void IRCUserContact::slotIncomingModeChange( const TQString &channel, const TQString &, const TQString &mode_ )
{
kdDebug(14120) << k_funcinfo << "channel: " << channel << " mode: " << mode_ << endl;
@@ -610,13 +610,13 @@ void IRCUserContact::slotIncomingModeChange( const QString &channel, const QStri
//
// irssi manual example: /MODE #channel +nto-o+v nick1 nick2 nick3
- QStringList users = QStringList::split(' ', mode_);
+ TQStringList users = TQStringList::split(' ', mode_);
users.pop_front();
- const QString mode = mode_.section(' ', 0, 0);
+ const TQString mode = mode_.section(' ', 0, 0);
bitAdjustment adjMode = RemoveBits;
- QStringList::iterator user = users.begin();
+ TQStringList::iterator user = users.begin();
//kdDebug(14120) << "me: " << m_nickName << " users: " << users << " mode: " << mode << endl;
@@ -695,7 +695,7 @@ void IRCUserContact::adjustInternalOnlineStatusBits(IRCChannelContact *channel,
channel->manager()->setContactOnlineStatus(this, newStatus);
}
-void IRCUserContact::privateMessage(IRCContact *from, IRCContact *to, const QString &message)
+void IRCUserContact::privateMessage(IRCContact *from, IRCContact *to, const TQString &message)
{
if (to == this)
{
@@ -713,7 +713,7 @@ void IRCUserContact::privateMessage(IRCContact *from, IRCContact *to, const QStr
}
}
-void IRCUserContact::newAction(const QString &to, const QString &action)
+void IRCUserContact::newAction(const TQString &to, const TQString &action)
{
IRCAccount *account = ircAccount();