summaryrefslogtreecommitdiffstats
path: root/konversation/src/nicksonline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'konversation/src/nicksonline.cpp')
-rw-r--r--konversation/src/nicksonline.cpp272
1 files changed, 136 insertions, 136 deletions
diff --git a/konversation/src/nicksonline.cpp b/konversation/src/nicksonline.cpp
index 85361ff..46579dd 100644
--- a/konversation/src/nicksonline.cpp
+++ b/konversation/src/nicksonline.cpp
@@ -28,14 +28,14 @@
#include "viewcontainer.h"
#include "nicksonlineitem.h"
-#include <qlayout.h>
-#include <qstringlist.h>
-#include <qhbox.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qpopupmenu.h>
-#include <qptrlist.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqstringlist.h>
+#include <tqhbox.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqpopupmenu.h>
+#include <tqptrlist.h>
+#include <tqwhatsthis.h>
#include <kdebug.h>
@@ -47,7 +47,7 @@
#include <kmessagebox.h>
-NicksOnline::NicksOnline(QWidget* parent): ChatWindow(parent)
+NicksOnline::NicksOnline(TQWidget* parent): ChatWindow(parent)
{
setName(i18n("Watched Nicks Online"));
setType(ChatWindow::NicksOnline);
@@ -67,7 +67,7 @@ NicksOnline::NicksOnline(QWidget* parent): ChatWindow(parent)
m_nickListView->setShadeSortColumn(true);
m_nickListView->setShowSortIndicator(true);
- QString nickListViewWT = i18n(
+ TQString nickListViewWT = i18n(
"<p>These are all the nicknames on your Nickname Watch list, listed under the "
"server network they are connected to. The list also includes the nicknames "
"in KAddressBook associated with the server network.</p>"
@@ -77,77 +77,77 @@ NicksOnline::NicksOnline(QWidget* parent): ChatWindow(parent)
"<p>Nicknames appearing under <b>Offline</b> are not connected to any of the "
"servers in the network.</p>"
"<p>Right-click with the mouse on a nickname to perform additional functions.</p>");
- QWhatsThis::add(m_nickListView, nickListViewWT);
+ TQWhatsThis::add(m_nickListView, nickListViewWT);
m_tooltip = new Konversation::KonversationNicksOnlineToolTip(m_nickListView->viewport(), this);
setMargin(margin());
setSpacing(spacing());
- QHBox* buttonBox=new QHBox(this);
+ TQHBox* buttonBox=new TQHBox(this);
buttonBox->setSpacing(spacing());
- QPushButton* editButton=new QPushButton(i18n("&Edit Watch List..."),
+ TQPushButton* editButton=new TQPushButton(i18n("&Edit Watch List..."),
buttonBox,"edit_notify_button");
- QString editButtonWT = i18n(
+ TQString editButtonWT = i18n(
"Click to edit the list of nicknames that appear on this screen.");
- QWhatsThis::add(editButton, editButtonWT);
+ TQWhatsThis::add(editButton, editButtonWT);
- connect(editButton, SIGNAL(clicked()), SIGNAL(editClicked()) );
- connect(m_nickListView, SIGNAL(doubleClicked(QListViewItem*)),
- this,SLOT(processDoubleClick(QListViewItem*)));
+ connect(editButton, TQT_SIGNAL(clicked()), TQT_SIGNAL(editClicked()) );
+ connect(m_nickListView, TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ this,TQT_SLOT(processDoubleClick(TQListViewItem*)));
- QLabel* addressbookLabel = new QLabel(i18n("Address book:"),
+ TQLabel* addressbookLabel = new TQLabel(i18n("Address book:"),
buttonBox, "nicksonline_addressbook_label");
- QString addressbookLabelWT = i18n(
+ TQString addressbookLabelWT = i18n(
"When you select a nickname in the list above, the buttons here are used "
"to associate the nickname with an entry in KAddressBook.");
- QWhatsThis::add(addressbookLabel, addressbookLabelWT);
+ TQWhatsThis::add(addressbookLabel, addressbookLabelWT);
addressbookLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
- m_editContactButton = new QPushButton(i18n("Edit C&ontact..."),
+ m_editContactButton = new TQPushButton(i18n("Edit C&ontact..."),
buttonBox, "nicksonline_editcontact_button");
- QString editContactButtonWT = i18n(
+ TQString editContactButtonWT = i18n(
"Click to create, view, or edit the KAddressBook entry associated with the nickname "
"selected above.");
- QWhatsThis::add(m_editContactButton, editContactButtonWT);
+ TQWhatsThis::add(m_editContactButton, editContactButtonWT);
m_editContactButton->setIconSet(m_kabcIconSet);
- m_changeAssociationButton = new QPushButton(i18n("&Change Association..."),
+ m_changeAssociationButton = new TQPushButton(i18n("&Change Association..."),
buttonBox, "nicksonline_changeassociation_button");
- QString changeAssociationButtonWT = i18n(
+ TQString changeAssociationButtonWT = i18n(
"Click to associate the nickname selected above with an entry in KAddressBook.");
- QWhatsThis::add(m_changeAssociationButton, changeAssociationButtonWT);
+ TQWhatsThis::add(m_changeAssociationButton, changeAssociationButtonWT);
m_changeAssociationButton->setIconSet(m_kabcIconSet);
- m_deleteAssociationButton = new QPushButton(i18n("&Delete Association"),
+ m_deleteAssociationButton = new TQPushButton(i18n("&Delete Association"),
buttonBox, "nicksonline_deleteassociation_button");
- QString deleteAssociationButtonWT = i18n(
+ TQString deleteAssociationButtonWT = i18n(
"Click to remove the association between the nickname selected above and a "
"KAddressBook entry.");
- QWhatsThis::add(m_deleteAssociationButton, deleteAssociationButtonWT);
+ TQWhatsThis::add(m_deleteAssociationButton, deleteAssociationButtonWT);
m_deleteAssociationButton->setIconSet(m_kabcIconSet);
- connect(m_editContactButton, SIGNAL(clicked()),
- this, SLOT(slotEditContactButton_Clicked()));
- connect(m_changeAssociationButton, SIGNAL(clicked()),
- this, SLOT(slotChangeAssociationButton_Clicked()));
- connect(m_deleteAssociationButton, SIGNAL(clicked()),
- this, SLOT(slotDeleteAssociationButton_Clicked()));
- connect(m_nickListView, SIGNAL(selectionChanged()),
- this, SLOT(slotNickListView_SelectionChanged()));
+ connect(m_editContactButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotEditContactButton_Clicked()));
+ connect(m_changeAssociationButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotChangeAssociationButton_Clicked()));
+ connect(m_deleteAssociationButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotDeleteAssociationButton_Clicked()));
+ connect(m_nickListView, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(slotNickListView_SelectionChanged()));
setupAddressbookButtons(nsNotANick);
// Create context menu. Individual menu entries are created in rightButtonClicked slot.
- m_popupMenu = new QPopupMenu(this,"nicksonline_context_menu");
- connect(m_nickListView, SIGNAL(rightButtonClicked(QListViewItem *, const QPoint &, int )),
- this, SLOT(slotNickListView_RightButtonClicked(QListViewItem*, const QPoint &)));
- connect(m_popupMenu, SIGNAL(activated(int)),
- this, SLOT(slotPopupMenu_Activated(int)));
+ m_popupMenu = new TQPopupMenu(this,"nicksonline_context_menu");
+ connect(m_nickListView, TQT_SIGNAL(rightButtonClicked(TQListViewItem *, const TQPoint &, int )),
+ this, TQT_SLOT(slotNickListView_RightButtonClicked(TQListViewItem*, const TQPoint &)));
+ connect(m_popupMenu, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotPopupMenu_Activated(int)));
// Display info for all currently-connected servers.
refreshAllServerOnlineLists();
// Connect and start refresh timer.
- m_timer = new QTimer(this, "nicksOnlineTimer");
- connect(m_timer, SIGNAL (timeout()), this, SLOT(timerFired()));
+ m_timer = new TQTimer(this, "nicksOnlineTimer");
+ connect(m_timer, TQT_SIGNAL (timeout()), this, TQT_SLOT(timerFired()));
// TODO: User preference for refresh interval.
m_timer->start(8000);
}
@@ -167,14 +167,14 @@ KListView* NicksOnline::getNickListView()
/**
* Returns the named child of parent item in a NicksOnlineItem
* @param parent Pointer to a NicksOnlineItem.
- * @param name The name in the desired child QListViewItem, must be in column 0.
+ * @param name The name in the desired child TQListViewItem, must be in column 0.
* @param type The type of entry to be found
- * @return Pointer to the child QListViewItem or 0 if not found.
+ * @return Pointer to the child TQListViewItem or 0 if not found.
*/
-QListViewItem* NicksOnline::findItemChild(const QListViewItem* parent, const QString& name, NicksOnlineItem::NickListViewColumn type)
+TQListViewItem* NicksOnline::findItemChild(const TQListViewItem* parent, const TQString& name, NicksOnlineItem::NickListViewColumn type)
{
if (!parent) return 0;
- QListViewItem* child;
+ TQListViewItem* child;
for (child = parent->firstChild(); (child) ; child = child->nextSibling())
{
if(static_cast<NicksOnlineItem*>(child)->type() == type && child->text(0) == name) return child;
@@ -186,12 +186,12 @@ QListViewItem* NicksOnline::findItemChild(const QListViewItem* parent, const QSt
* Returns the first occurrence of a child item of a given type in a NicksOnlineItem
* @param parent Pointer to a NicksOnlineItem.
* @param type The type of entry to be found
- * @return Pointer to the child QListViewItem or 0 if not found.
+ * @return Pointer to the child TQListViewItem or 0 if not found.
*/
-QListViewItem* NicksOnline::findItemType(const QListViewItem* parent, NicksOnlineItem::NickListViewColumn type)
+TQListViewItem* NicksOnline::findItemType(const TQListViewItem* parent, NicksOnlineItem::NickListViewColumn type)
{
if (!parent) return 0;
- QListViewItem* child;
+ TQListViewItem* child;
for (child = parent->firstChild(); (child) ; child = child->nextSibling())
{
if(static_cast<NicksOnlineItem*>(child)->type() == type) return child;
@@ -200,13 +200,13 @@ QListViewItem* NicksOnline::findItemType(const QListViewItem* parent, NicksOnlin
}
/**
- * Returns a pointer to the network QListViewItem with the given name.
+ * Returns a pointer to the network TQListViewItem with the given name.
* @param name The name of the network, assumed to be in column 0 of the item.
- * @return Pointer to the QListViewItem or 0 if not found.
+ * @return Pointer to the TQListViewItem or 0 if not found.
*/
-QListViewItem* NicksOnline::findNetworkRoot(const QString& name)
+TQListViewItem* NicksOnline::findNetworkRoot(const TQString& name)
{
- QListViewItem* child;
+ TQListViewItem* child;
for (child = getNickListView()->firstChild(); (child) ; child = child->nextSibling())
{
if (child->text(0) == name) return child;
@@ -223,10 +223,10 @@ QListViewItem* NicksOnline::findNetworkRoot(const QString& name)
* @return needWhois True if a WHOIS needs to be performed on the nick
* to get additional information.
*/
-QString NicksOnline::getNickAdditionalInfo(NickInfoPtr nickInfo, KABC::Addressee addressee,
+TQString NicksOnline::getNickAdditionalInfo(NickInfoPtr nickInfo, KABC::Addressee addressee,
bool& needWhois)
{
- QString info;
+ TQString info;
if (!addressee.isEmpty())
{
if (addressee.fullEmail().isEmpty())
@@ -234,7 +234,7 @@ bool& needWhois)
else
info += addressee.fullEmail();
}
- QString niInfo;
+ TQString niInfo;
if (nickInfo)
{
if (nickInfo->isAway())
@@ -268,9 +268,9 @@ bool& needWhois)
void NicksOnline::updateServerOnlineList(Server* servr)
{
bool newNetworkRoot = false;
- QString serverName = servr->getServerName();
- QString networkName = servr->getDisplayName();
- QListViewItem* networkRoot = findNetworkRoot(networkName);
+ TQString serverName = servr->getServerName();
+ TQString networkName = servr->getDisplayName();
+ TQListViewItem* networkRoot = findNetworkRoot(networkName);
// If network is not in our list, add it.
if (!networkRoot)
{
@@ -283,11 +283,11 @@ void NicksOnline::updateServerOnlineList(Server* servr)
// watch list.
networkRoot->setText(nlvcServerName, serverName);
// Update list of servers in the network that are connected.
- QStringList serverList = QStringList::split(",", networkRoot->text(nlvcAdditionalInfo));
+ TQStringList serverList = TQStringList::split(",", networkRoot->text(nlvcAdditionalInfo));
if (!serverList.contains(serverName)) serverList.append(serverName);
networkRoot->setText(nlvcAdditionalInfo, serverList.join(","));
// Get item in nicklistview for the Offline branch.
- QListViewItem* offlineRoot = findItemType(networkRoot, NicksOnlineItem::OfflineItem);
+ TQListViewItem* offlineRoot = findItemType(networkRoot, NicksOnlineItem::OfflineItem);
if (!offlineRoot)
{
offlineRoot = new NicksOnlineItem(NicksOnlineItem::OfflineItem,networkRoot,i18n("Offline"));
@@ -295,11 +295,11 @@ void NicksOnline::updateServerOnlineList(Server* servr)
}
// Get watch list.
- QStringList watchList = servr->getWatchList();
- QStringList::iterator itEnd = watchList.end();
- QString nickname;
+ TQStringList watchList = servr->getWatchList();
+ TQStringList::iterator itEnd = watchList.end();
+ TQString nickname;
- for (QStringList::iterator it = watchList.begin(); it != itEnd; ++it)
+ for (TQStringList::iterator it = watchList.begin(); it != itEnd; ++it)
{
nickname = (*it);
NickInfoPtr nickInfo = getOnlineNickInfo(networkName, nickname);
@@ -313,12 +313,12 @@ void NicksOnline::updateServerOnlineList(Server* servr)
KABC::Addressee addressee = nickInfo->getAddressee();
// Construct additional information string for nick.
bool needWhois = false;
- QString nickAdditionalInfo = getNickAdditionalInfo(nickInfo, addressee, needWhois);
+ TQString nickAdditionalInfo = getNickAdditionalInfo(nickInfo, addressee, needWhois);
// Remove from offline branch if present.
- QListViewItem* item = findItemChild(offlineRoot, nickname, NicksOnlineItem::NicknameItem);
+ TQListViewItem* item = findItemChild(offlineRoot, nickname, NicksOnlineItem::NicknameItem);
if (item) delete item;
// Add to network if not already added.
- QListViewItem* nickRoot = findItemChild(networkRoot, nickname, NicksOnlineItem::NicknameItem);
+ TQListViewItem* nickRoot = findItemChild(networkRoot, nickname, NicksOnlineItem::NicknameItem);
if (!nickRoot) nickRoot = new NicksOnlineItem(NicksOnlineItem::NicknameItem,networkRoot, nickname, nickAdditionalInfo);
nickRoot->setText(nlvcAdditionalInfo, nickAdditionalInfo);
nickRoot->setText(nlvcServerName, serverName);
@@ -334,31 +334,31 @@ void NicksOnline::updateServerOnlineList(Server* servr)
// Set Kabc icon if the nick is associated with an addressbook entry.
if (!addressee.isEmpty())
nickRoot->setPixmap(nlvcKabc, m_kabcIconSet.pixmap(
- QIconSet::Small, QIconSet::Normal, QIconSet::On));
+ TQIconSet::Small, TQIconSet::Normal, TQIconSet::On));
else
nickRoot->setPixmap(nlvcKabc, m_kabcIconSet.pixmap(
- QIconSet::Small, QIconSet::Disabled, QIconSet::Off));
+ TQIconSet::Small, TQIconSet::Disabled, TQIconSet::Off));
- QStringList channelList = server->getNickChannels(nickname);
- QStringList::iterator itEnd2 = channelList.end();
+ TQStringList channelList = server->getNickChannels(nickname);
+ TQStringList::iterator itEnd2 = channelList.end();
- for (QStringList::iterator it2 = channelList.begin(); it2 != itEnd2; ++it2)
+ for (TQStringList::iterator it2 = channelList.begin(); it2 != itEnd2; ++it2)
{
// Known channels where nickname is online and mode in each channel.
// FIXME: If user connects to multiple servers in same network, the
// channel info will differ between the servers, resulting in inaccurate
// mode and led info displayed.
- QString channelName = (*it2);
+ TQString channelName = (*it2);
ChannelNickPtr channelNick = server->getChannelNick(channelName, nickname);
- QString nickMode;
+ TQString nickMode;
if (channelNick->hasVoice()) nickMode = nickMode + i18n(" Voice");
if (channelNick->isHalfOp()) nickMode = nickMode + i18n(" HalfOp");
if (channelNick->isOp()) nickMode = nickMode + i18n(" Operator");
if (channelNick->isOwner()) nickMode = nickMode + i18n(" Owner");
if (channelNick->isAdmin()) nickMode = nickMode + i18n(" Admin");
- QListViewItem* channelItem = findItemChild(nickRoot, channelName, NicksOnlineItem::ChannelItem);
+ TQListViewItem* channelItem = findItemChild(nickRoot, channelName, NicksOnlineItem::ChannelItem);
if (!channelItem) channelItem = new NicksOnlineItem(NicksOnlineItem::ChannelItem,nickRoot,
channelName, nickMode);
channelItem->setText(nlvcAdditionalInfo, nickMode);
@@ -378,10 +378,10 @@ void NicksOnline::updateServerOnlineList(Server* servr)
KonversationApplication::instance()->images()->getNickIcon(nickPrivilege, true));
}
// Remove channel if nick no longer in it.
- QListViewItem* child = nickRoot->firstChild();
+ TQListViewItem* child = nickRoot->firstChild();
while (child)
{
- QListViewItem* nextChild = child->nextSibling();
+ TQListViewItem* nextChild = child->nextSibling();
if (channelList.find(child->text(nlvcNick)) == channelList.end())
delete child;
child = nextChild;
@@ -391,35 +391,35 @@ void NicksOnline::updateServerOnlineList(Server* servr)
{
// Nick is offline.
// Remove from online nicks, if present.
- QListViewItem* item = findItemChild(networkRoot, nickname, NicksOnlineItem::NicknameItem);
+ TQListViewItem* item = findItemChild(networkRoot, nickname, NicksOnlineItem::NicknameItem);
if (item) delete item;
// Add to offline list if not already listed.
- QListViewItem* nickRoot = findItemChild(offlineRoot, nickname, NicksOnlineItem::NicknameItem);
+ TQListViewItem* nickRoot = findItemChild(offlineRoot, nickname, NicksOnlineItem::NicknameItem);
if (!nickRoot) nickRoot = new NicksOnlineItem(NicksOnlineItem::NicknameItem,offlineRoot, nickname);
nickRoot->setText(nlvcServerName, serverName);
// Get addressbook entry for the nick.
KABC::Addressee addressee = servr->getOfflineNickAddressee(nickname);
// Format additional information for the nick.
bool needWhois = false;
- QString nickAdditionalInfo = getNickAdditionalInfo(0, addressee, needWhois);
+ TQString nickAdditionalInfo = getNickAdditionalInfo(0, addressee, needWhois);
nickRoot->setText(nlvcAdditionalInfo, nickAdditionalInfo);
// Set Kabc icon if the nick is associated with an addressbook entry.
if (!addressee.isEmpty())
nickRoot->setPixmap(nlvcKabc, m_kabcIconSet.pixmap(
- QIconSet::Small, QIconSet::Normal, QIconSet::On));
+ TQIconSet::Small, TQIconSet::Normal, TQIconSet::On));
else
nickRoot->setPixmap(nlvcKabc, m_kabcIconSet.pixmap(
- QIconSet::Small, QIconSet::Disabled, QIconSet::Off));
+ TQIconSet::Small, TQIconSet::Disabled, TQIconSet::Off));
}
}
// Erase nicks no longer being watched.
- QListViewItem* item = networkRoot->firstChild();
+ TQListViewItem* item = networkRoot->firstChild();
while (item)
{
- QListViewItem* nextItem = item->nextSibling();
+ TQListViewItem* nextItem = item->nextSibling();
if (static_cast<NicksOnlineItem*>(item)->type() != NicksOnlineItem::OfflineItem)
{
- QString nickname = item->text(nlvcNick);
+ TQString nickname = item->text(nlvcNick);
if ((watchList.find(nickname) == watchList.end()) &&
(serverName == item->text(nlvcServerName))) delete item;
}
@@ -430,8 +430,8 @@ void NicksOnline::updateServerOnlineList(Server* servr)
if(item) {
while (item)
{
- QListViewItem* nextItem = item->nextSibling();
- QString nickname = item->text(nlvcNick);
+ TQListViewItem* nextItem = item->nextSibling();
+ TQString nickname = item->text(nlvcNick);
if ((watchList.find(nickname) == watchList.end()) &&
(serverName == item->text(nlvcServerName))) delete item;
item = nextItem;
@@ -446,8 +446,8 @@ void NicksOnline::updateServerOnlineList(Server* servr)
{
networkRoot->setOpen(true);
// Connect server NickInfo updates.
- connect (servr, SIGNAL(nickInfoChanged(Server*, const NickInfoPtr)),
- this, SLOT(slotNickInfoChanged(Server*, const NickInfoPtr)));
+ connect (servr, TQT_SIGNAL(nickInfoChanged(Server*, const NickInfoPtr)),
+ this, TQT_SLOT(slotNickInfoChanged(Server*, const NickInfoPtr)));
}
}
@@ -458,11 +458,11 @@ void NicksOnline::updateServerOnlineList(Server* servr)
* @param nickname Nick name.
* @return NickInfo if nick is online in any server, otherwise 0.
*/
-NickInfoPtr NicksOnline::getOnlineNickInfo(QString& networkName, QString& nickname)
+NickInfoPtr NicksOnline::getOnlineNickInfo(TQString& networkName, TQString& nickname)
{
// Get list of pointers to all servers.
KonversationApplication* konvApp = static_cast<KonversationApplication*>(kapp);
- QPtrList<Server> serverList = konvApp->getConnectionManager()->getServerList();
+ TQPtrList<Server> serverList = konvApp->getConnectionManager()->getServerList();
for (Server* server = serverList.first(); server; server = serverList.next())
{
if (server->getDisplayName() == networkName)
@@ -480,10 +480,10 @@ NickInfoPtr NicksOnline::getOnlineNickInfo(QString& networkName, QString& nickna
* @param groupName Server group name.
* @param nickname Nick name.
*/
-void NicksOnline::requestWhois(QString& networkName, QString& nickname)
+void NicksOnline::requestWhois(TQString& networkName, TQString& nickname)
{
KonversationApplication* konvApp = static_cast<KonversationApplication*>(kapp);
- QPtrList<Server> serverList = konvApp->getConnectionManager()->getServerList();
+ TQPtrList<Server> serverList = konvApp->getConnectionManager()->getServerList();
for (Server* server = serverList.first(); server; server = serverList.next())
{
if (server->getDisplayName() == networkName)
@@ -500,20 +500,20 @@ void NicksOnline::requestWhois(QString& networkName, QString& nickname)
void NicksOnline::refreshAllServerOnlineLists()
{
KonversationApplication* konvApp = static_cast<KonversationApplication*>(kapp);
- QPtrList<Server> serverList = konvApp->getConnectionManager()->getServerList();
+ TQPtrList<Server> serverList = konvApp->getConnectionManager()->getServerList();
Server* server;
// Remove servers no longer connected.
- QListViewItem* child = m_nickListView->firstChild();
+ TQListViewItem* child = m_nickListView->firstChild();
while (child)
{
- QListViewItem* nextChild = child->nextSibling();
- QString networkName = child->text(nlvcNetwork);
- QStringList serverNameList = QStringList::split(",", child->text(nlvcAdditionalInfo));
- QStringList::Iterator itEnd = serverNameList.end();
- QStringList::Iterator it = serverNameList.begin();
+ TQListViewItem* nextChild = child->nextSibling();
+ TQString networkName = child->text(nlvcNetwork);
+ TQStringList serverNameList = TQStringList::split(",", child->text(nlvcAdditionalInfo));
+ TQStringList::Iterator itEnd = serverNameList.end();
+ TQStringList::Iterator it = serverNameList.begin();
while (it != itEnd)
{
- QString serverName = *it;
+ TQString serverName = *it;
// Locate server in server list.
bool found = false;
for (server = serverList.first(); server; server = serverList.next())
@@ -554,12 +554,12 @@ void NicksOnline::timerFired()
* When a user double-clicks a nickname in the nicklistview, let server know so that
* it can perform the user's chosen default action for that.
*/
-void NicksOnline::processDoubleClick(QListViewItem* item)
+void NicksOnline::processDoubleClick(TQListViewItem* item)
{
// Only emit signal when the user double clicked a nickname rather than
// a server name or channel name.
- QString serverName;
- QString nickname;
+ TQString serverName;
+ TQString nickname;
if (getItemServerAndNick(item, serverName, nickname))
emit doubleClicked(serverName, nickname);
}
@@ -570,7 +570,7 @@ void NicksOnline::processDoubleClick(QListViewItem* item)
* @return serverName Name of the server for the nick at the item, or Null if not a nick.
* @return nickname The nickname at the item.
*/
-bool NicksOnline::getItemServerAndNick(const QListViewItem* item, QString& serverName, QString& nickname)
+bool NicksOnline::getItemServerAndNick(const TQListViewItem* item, TQString& serverName, TQString& nickname)
{
if (!item) return false;
// convert into NicksOnlineItem
@@ -591,10 +591,10 @@ bool NicksOnline::getItemServerAndNick(const QListViewItem* item, QString& serve
return true;
}
-NickInfoPtr NicksOnline::getNickInfo(const QListViewItem* item)
+NickInfoPtr NicksOnline::getNickInfo(const TQListViewItem* item)
{
- QString serverName;
- QString nickname;
+ TQString serverName;
+ TQString nickname;
getItemServerAndNick(item, serverName, nickname);
@@ -613,19 +613,19 @@ NickInfoPtr NicksOnline::getNickInfo(const QListViewItem* item)
* the nick.
* @param serverName Name of server.
* @param nickname Nick name.
- * @return Pointer to QListViewItem displaying the nick, or 0 if not found.
+ * @return Pointer to TQListViewItem displaying the nick, or 0 if not found.
*
* @see getItemServerAndNick
*/
-QListViewItem* NicksOnline::getServerAndNickItem(const QString& serverName,
-const QString& nickname)
+TQListViewItem* NicksOnline::getServerAndNickItem(const TQString& serverName,
+const TQString& nickname)
{
Server* server = KonversationApplication::instance()->getConnectionManager()->getServerByName(serverName);
if (!server) return 0;
- QString networkName = server->getDisplayName();
- QListViewItem* networkRoot = m_nickListView->findItem(networkName, nlvcNetwork);
+ TQString networkName = server->getDisplayName();
+ TQListViewItem* networkRoot = m_nickListView->findItem(networkName, nlvcNetwork);
if (!networkRoot) return 0;
- QListViewItem* nickRoot = findItemChild(networkRoot, nickname, NicksOnlineItem::NicknameItem);
+ TQListViewItem* nickRoot = findItemChild(networkRoot, nickname, NicksOnlineItem::NicknameItem);
return nickRoot;
}
@@ -647,9 +647,9 @@ void NicksOnline::doCommand(int id)
return;
}
- QString serverName;
- QString nickname;
- QListViewItem* item = m_nickListView->selectedItem();
+ TQString serverName;
+ TQString nickname;
+ TQListViewItem* item = m_nickListView->selectedItem();
if(!getItemServerAndNick(item, serverName, nickname))
{
@@ -732,7 +732,7 @@ void NicksOnline::doCommand(int id)
// only join real channels
if (static_cast<NicksOnlineItem*>(m_nickListView->selectedItem())->type() == NicksOnlineItem::ChannelItem)
{
- QString contactChannel = m_nickListView->selectedItem()->text(nlvcChannel);
+ TQString contactChannel = m_nickListView->selectedItem()->text(nlvcChannel);
server->queue( "JOIN "+contactChannel );
}
break;
@@ -756,11 +756,11 @@ void NicksOnline::doCommand(int id)
* @return Addressbook state.
* 0 = not a nick, 1 = nick has no addressbook association, 2 = nick has association
*/
-int NicksOnline::getNickAddressbookState(QListViewItem* item)
+int NicksOnline::getNickAddressbookState(TQListViewItem* item)
{
int nickState = nsNotANick;
- QString serverName;
- QString nickname;
+ TQString serverName;
+ TQString nickname;
if (getItemServerAndNick(item, serverName, nickname))
{
Server *server = KonversationApplication::instance()->getConnectionManager()->getServerByName(serverName);
@@ -848,7 +848,7 @@ void NicksOnline::slotDeleteAssociationButton_Clicked() { doCommand(ciAddressboo
*/
void NicksOnline::slotNickListView_SelectionChanged()
{
- QListViewItem* item = m_nickListView->selectedItem();
+ TQListViewItem* item = m_nickListView->selectedItem();
int nickState = getNickAddressbookState(item);
setupAddressbookButtons(nickState);
}
@@ -856,7 +856,7 @@ void NicksOnline::slotNickListView_SelectionChanged()
/**
* Received when right-clicking an item in the NickListView.
*/
-void NicksOnline::slotNickListView_RightButtonClicked(QListViewItem* item, const QPoint& pt)
+void NicksOnline::slotNickListView_RightButtonClicked(TQListViewItem* item, const TQPoint& pt)
{
if (!item) return;
m_popupMenu->clear();
@@ -912,11 +912,11 @@ void NicksOnline::slotPopupMenu_Activated(int id)
void NicksOnline::slotNickInfoChanged(Server* server, const NickInfoPtr nickInfo)
{
if (!nickInfo) return;
- QString nickname = nickInfo->getNickname();
+ TQString nickname = nickInfo->getNickname();
if (!server) return;
- QString serverName = server->getServerName();
- QListViewItem* item = getServerAndNickItem(serverName, nickname);
+ TQString serverName = server->getServerName();
+ TQListViewItem* item = getServerAndNickItem(serverName, nickname);
refreshItem(item);
}
@@ -924,11 +924,11 @@ void NicksOnline::slotNickInfoChanged(Server* server, const NickInfoPtr nickInfo
* Refreshes the information for the given item in the list.
* @param item Pointer to listview item.
*/
-void NicksOnline::refreshItem(QListViewItem* item)
+void NicksOnline::refreshItem(TQListViewItem* item)
{
if (!item) return;
- QString serverName;
- QString nickname;
+ TQString serverName;
+ TQString nickname;
if (getItemServerAndNick(item, serverName, nickname))
{
Server *server = KonversationApplication::instance()->getConnectionManager()->getServerByName(serverName);
@@ -949,15 +949,15 @@ void NicksOnline::refreshItem(QListViewItem* item)
case nsNoAddress:
{
item->setPixmap(nlvcKabc, m_kabcIconSet.pixmap(
- QIconSet::Small, QIconSet::Disabled, QIconSet::Off)); break;
+ TQIconSet::Small, TQIconSet::Disabled, TQIconSet::Off)); break;
}
case nsHasAddress:
{
item->setPixmap(nlvcKabc, m_kabcIconSet.pixmap(
- QIconSet::Small, QIconSet::Normal, QIconSet::On)); break;
+ TQIconSet::Small, TQIconSet::Normal, TQIconSet::On)); break;
}
}
- QString nickAdditionalInfo;
+ TQString nickAdditionalInfo;
bool needWhois = false;
if (nickInfo) nickAdditionalInfo = getNickAdditionalInfo(nickInfo, addressee,
needWhois);