summaryrefslogtreecommitdiffstats
path: root/konversation/src/linkaddressbook/addressbook.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'konversation/src/linkaddressbook/addressbook.cpp')
-rw-r--r--konversation/src/linkaddressbook/addressbook.cpp88
1 files changed, 44 insertions, 44 deletions
diff --git a/konversation/src/linkaddressbook/addressbook.cpp b/konversation/src/linkaddressbook/addressbook.cpp
index c5608e6..85670dd 100644
--- a/konversation/src/linkaddressbook/addressbook.cpp
+++ b/konversation/src/linkaddressbook/addressbook.cpp
@@ -19,8 +19,8 @@
#include "../channel.h"
#include "../konversationapplication.h"
-#include <qstringlist.h>
-#include "qwidget.h"
+#include <tqstringlist.h>
+#include "tqwidget.h"
#include <klocale.h>
#include <kmessagebox.h>
@@ -51,52 +51,52 @@ namespace Konversation
return m_instance;
}
- QStringList Addressbook::allContacts()
+ TQStringList Addressbook::allContacts()
{
- QStringList contactUIDS;
+ TQStringList contactUIDS;
for( KABC::AddressBook::Iterator it = addressBook->begin(); it != addressBook->end(); ++it )
if(hasAnyNicks(*it)) contactUIDS.append((*it).uid());
return contactUIDS;
}
//Produces a string list of all the irc nicks that are known.
- QStringList Addressbook::allContactsNicks()
+ TQStringList Addressbook::allContactsNicks()
{
- QStringList contacts;
+ TQStringList contacts;
for( KABC::AddressBook::Iterator it = addressBook->begin(); it != addressBook->end(); ++it )
- contacts += QStringList::split( QChar( 0xE000 ), (*it).custom("messaging/irc", "All") );
+ contacts += TQStringList::split( TQChar( 0xE000 ), (*it).custom("messaging/irc", "All") );
return contacts;
}
- QStringList Addressbook::onlineContacts()
+ TQStringList Addressbook::onlineContacts()
{
- QStringList contactUIDS;
+ TQStringList contactUIDS;
for( KABC::AddressBook::Iterator it = addressBook->begin(); it != addressBook->end(); ++it )
if(isOnline(*it)) contactUIDS.append((*it).uid());
return contactUIDS;
}
- QStringList Addressbook::reachableContacts()
+ TQStringList Addressbook::reachableContacts()
{
return onlineContacts();
}
- QStringList Addressbook::fileTransferContacts()
+ TQStringList Addressbook::fileTransferContacts()
{
return onlineContacts();
}
- bool Addressbook::isPresent(const QString &uid)
+ bool Addressbook::isPresent(const TQString &uid)
{
return hasAnyNicks(addressBook->findByUid(uid));
}
- QString Addressbook::displayName(const QString &uid)
+ TQString Addressbook::displayName(const TQString &uid)
{
return getBestNick(addressBook->findByUid(uid));
}
- QString Addressbook::presenceString(const QString &uid)
+ TQString Addressbook::presenceString(const TQString &uid)
{
if(uid.isEmpty())
{
kdDebug() << "Addressbook::presenceString() called with an empty uid" << endl;
- return QString("Error");
+ return TQString("Error");
}
switch( presenceStatus(uid))
{
@@ -111,14 +111,14 @@ namespace Konversation
case 4:
return i18n("Online");
}
- return QString("Error");
+ return TQString("Error");
}
- int Addressbook::presenceStatus(const QString &uid)
+ int Addressbook::presenceStatus(const TQString &uid)
{
return presenceStatusByAddressee(addressBook->findByUid(uid));
}
- bool Addressbook::canReceiveFiles(const QString &uid)
+ bool Addressbook::canReceiveFiles(const TQString &uid)
{
if(uid.isEmpty())
{
@@ -129,7 +129,7 @@ namespace Konversation
return (presence == 4) || (presence == 3);
}
- bool Addressbook::canRespond(const QString &uid)
+ bool Addressbook::canRespond(const TQString &uid)
{
if(uid.isEmpty())
{
@@ -141,25 +141,25 @@ namespace Konversation
if(result == 3 || result == 4) return true;
return false;
}
- QString Addressbook::locate(const QString &contactId, const QString &protocol)
+ TQString Addressbook::locate(const TQString &contactId, const TQString &protocol)
{
if(contactId.isEmpty())
{
kdDebug() << "Addressbook::locate called with empty contactId" << endl;
- return QString();
+ return TQString();
}
if(protocol != "messaging/irc")
- return QString();
+ return TQString();
return getKABCAddresseeFromNick(contactId).uid();
}
- QPixmap Addressbook::icon(const QString &uid)
+ TQPixmap Addressbook::icon(const TQString &uid)
{
Images* icons = KonversationApplication::instance()->images();
- QIconSet currentIcon;
+ TQIconSet currentIcon;
if(!isPresent(uid))
- return QPixmap();
+ return TQPixmap();
switch(presenceStatus(uid))
{
@@ -177,25 +177,25 @@ namespace Konversation
default:
//error
kdDebug() << "Unknown status " << uid << endl;
- return QPixmap();
+ return TQPixmap();
}
- QPixmap joinedIcon = currentIcon.pixmap(QIconSet::Automatic, QIconSet::Active, QIconSet::On);
+ TQPixmap joinedIcon = currentIcon.pixmap(TQIconSet::Automatic, TQIconSet::Active, TQIconSet::On);
return joinedIcon;
}
- QString Addressbook::context(const QString &uid)
+ TQString Addressbook::context(const TQString &uid)
{
if(uid.isEmpty())
{
kdDebug() << "Addressbook::contact called with empty uid" << endl;
- return QString();
+ return TQString();
}
- QString context;
+ TQString context;
return context;
}
- QStringList Addressbook::protocols()
+ TQStringList Addressbook::protocols()
{
- QStringList protocols;
+ TQStringList protocols;
protocols.append("messaging/irc");
return protocols;
}
@@ -208,7 +208,7 @@ namespace Konversation
* @param uid the KABC uid you want to chat with.
* @param message the message to send them.
*/
- void Addressbook::messageContact( const QString &uid, const QString& message )
+ void Addressbook::messageContact( const TQString &uid, const TQString& message )
{
if(uid.isEmpty())
{
@@ -224,7 +224,7 @@ namespace Konversation
NickInfoPtr nickInfo = getNickInfo(addressee);
if(!nickInfo)
{
- QString user = addressee.fullEmail();
+ TQString user = addressee.fullEmail();
if(!user.isEmpty()) user = " (" + user + ')';
focusAndShowErrorMessage(i18n("Another KDE application tried to use Konversation for instant messaging, but the requested user%1 is not online.").arg(user));
return;
@@ -236,21 +236,21 @@ namespace Konversation
/**
* Open a chat to a contact, and optionally set some initial text
*/
- void Addressbook::messageNewContact( const QString &contactId, const QString &/*protocol*/ ) {
+ void Addressbook::messageNewContact( const TQString &contactId, const TQString &/*protocol*/ ) {
if(contactId.isEmpty() )
{
kdDebug() << "Addressbook::messageNewContact called with empty contactid" << endl;
focusAndShowErrorMessage(i18n("Another KDE application tried to use Konversation for instant messaging, but did not specify any contact to send the message to. This is probably a bug in the other application."));
return;
}
- messageContact(contactId, QString());
+ messageContact(contactId, TQString());
}
/**
* Start a chat session with the specified addressee
* @param uid the KABC uid you want to chat with.
*/
-void Addressbook::chatWithContact( const QString &uid )
+void Addressbook::chatWithContact( const TQString &uid )
{
if(uid.isEmpty())
{
@@ -258,7 +258,7 @@ void Addressbook::chatWithContact( const QString &uid )
focusAndShowErrorMessage(i18n("Another KDE application tried to use Konversation for instant messaging, but did not specify any contact to send the message to. This is probably a bug in the other application."));
return;
}
- messageContact(uid, QString());
+ messageContact(uid, TQString());
}
/**
@@ -268,7 +268,7 @@ void Addressbook::chatWithContact( const QString &uid )
* @param altFileName an alternate filename describing the file
* @param fileSize file size in bytes
*/
-void Addressbook::sendFile(const QString &uid, const KURL &sourceURL, const QString &altFileName, uint fileSize)
+void Addressbook::sendFile(const TQString &uid, const KURL &sourceURL, const TQString &altFileName, uint fileSize)
{
if(uid.isEmpty())
{
@@ -284,13 +284,13 @@ void Addressbook::sendFile(const QString &uid, const KURL &sourceURL, const QStr
NickInfoPtr nickInfo = getNickInfo(addressee);
if(!nickInfo)
{
- QString user = addressee.fullEmail();
+ TQString user = addressee.fullEmail();
if(!user.isEmpty()) user = " (" + user + ')';
focusAndShowErrorMessage(i18n("Another KDE application tried to use Konversation to send a file to a contact, but the requested user%1 is not currently online.").arg(user));
return;
}
nickInfo->getServer()->addDccSend(nickInfo->getNickname(), sourceURL, altFileName, fileSize);
- QWidget *widget = nickInfo->getServer()->getViewContainer()->getWindow();
+ TQWidget *widget = nickInfo->getServer()->getViewContainer()->getWindow();
KWin::demandAttention(widget->winId()); //If activeWindow request is denied, at least demand attention!
KWin::activateWindow(widget->winId()); //May or may not work, depending on focus stealing prevention.
@@ -304,13 +304,13 @@ void Addressbook::sendFile(const QString &uid, const KURL &sourceURL, const QStr
* @param protocolId the protocol, eg one of "AIMProtocol", "MSNProtocol", "ICQProtocol", ...
* @return whether the add succeeded. False may signal already present, protocol not supported, or add operation not supported.
*/
-bool Addressbook::addContact( const QString &/*contactId*/, const QString &/*protocolId*/ ) {
+bool Addressbook::addContact( const TQString &/*contactId*/, const TQString &/*protocolId*/ ) {
focusAndShowErrorMessage(i18n("Another KDE application tried to use Konversation to add a contact. Konversation does support this."));
return false;
//Nicks are auto added if they are put in the addressbook - I don' think there is anything useful I can do.
}
-void Addressbook::emitContactPresenceChanged(const QString &uid, int presence)
+void Addressbook::emitContactPresenceChanged(const TQString &uid, int presence)
{
if(uid.isEmpty())
{
@@ -323,7 +323,7 @@ void Addressbook::emitContactPresenceChanged(const QString &uid, int presence)
// kdDebug() << "Presence changed for uid " << uid << " to " << presence << endl;
}
-void Addressbook::emitContactPresenceChanged(const QString &uid)
+void Addressbook::emitContactPresenceChanged(const TQString &uid)
{
if(uid.isEmpty())
{