summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-20 20:20:19 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-20 20:20:19 +0000
commitdf6d1c3c6fd22031d432af447798938c1d7e1877 (patch)
tree4f74f2a214b347b651f6df4cee9d3e47dbfa84db
parent449e0b1b356e63cb4869fc6e0020134efa83825d (diff)
downloadkonversation-df6d1c3c.tar.gz
konversation-df6d1c3c.zip
TQt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/konversation@1166088 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--konversation/src/alias_preferences.cpp50
-rw-r--r--konversation/src/alias_preferences.h14
-rw-r--r--konversation/src/autoreplace_preferences.cpp92
-rw-r--r--konversation/src/autoreplace_preferences.h14
-rw-r--r--konversation/src/awaymanager.cpp32
-rw-r--r--konversation/src/awaymanager.h16
-rw-r--r--konversation/src/blowfish/blowfish.cpp36
-rw-r--r--konversation/src/blowfish/blowfish.h12
-rw-r--r--konversation/src/channel.cpp544
-rw-r--r--konversation/src/channel.h168
-rw-r--r--konversation/src/channeldialog.cpp24
-rw-r--r--konversation/src/channeldialog.h8
-rw-r--r--konversation/src/channellistpanel.cpp186
-rw-r--r--konversation/src/channellistpanel.h54
-rw-r--r--konversation/src/channellistviewitem.cpp4
-rw-r--r--konversation/src/channellistviewitem.h6
-rw-r--r--konversation/src/channelnick.cpp22
-rw-r--r--konversation/src/channelnick.h16
-rw-r--r--konversation/src/channeloptionsdialog.cpp134
-rw-r--r--konversation/src/channeloptionsdialog.h36
-rw-r--r--konversation/src/chatwindow.cpp112
-rw-r--r--konversation/src/chatwindow.h60
-rw-r--r--konversation/src/common.cpp62
-rw-r--r--konversation/src/common.h18
-rw-r--r--konversation/src/config/preferences.cpp158
-rw-r--r--konversation/src/config/preferences.h142
-rw-r--r--konversation/src/connectionmanager.cpp80
-rw-r--r--konversation/src/connectionmanager.h26
-rw-r--r--konversation/src/connectionsettings.cpp4
-rw-r--r--konversation/src/connectionsettings.h10
-rw-r--r--konversation/src/dcc_preferences.cpp10
-rw-r--r--konversation/src/dcc_preferences.h4
-rw-r--r--konversation/src/dccchat.cpp112
-rw-r--r--konversation/src/dccchat.h36
-rw-r--r--konversation/src/dcccommon.cpp20
-rw-r--r--konversation/src/dcccommon.h12
-rw-r--r--konversation/src/dccrecipientdialog.cpp26
-rw-r--r--konversation/src/dccrecipientdialog.h12
-rw-r--r--konversation/src/dccresumedialog.cpp46
-rw-r--r--konversation/src/dccresumedialog.h4
-rw-r--r--konversation/src/dcctransfer.cpp60
-rw-r--r--konversation/src/dcctransfer.h76
-rw-r--r--konversation/src/dcctransferdetailedinfopanel.cpp34
-rw-r--r--konversation/src/dcctransferdetailedinfopanel.h8
-rw-r--r--konversation/src/dcctransfermanager.cpp34
-rw-r--r--konversation/src/dcctransfermanager.h18
-rw-r--r--konversation/src/dcctransferpanel.cpp96
-rw-r--r--konversation/src/dcctransferpanel.h22
-rw-r--r--konversation/src/dcctransferpanelitem.cpp90
-rw-r--r--konversation/src/dcctransferpanelitem.h40
-rw-r--r--konversation/src/dcctransferrecv.cpp86
-rw-r--r--konversation/src/dcctransferrecv.h36
-rw-r--r--konversation/src/dcctransfersend.cpp46
-rw-r--r--konversation/src/dcctransfersend.h22
-rw-r--r--konversation/src/decoder.h38
-rw-r--r--konversation/src/editnotifydialog.cpp38
-rw-r--r--konversation/src/editnotifydialog.h8
-rw-r--r--konversation/src/emoticon.cpp60
-rw-r--r--konversation/src/emoticon.h16
-rw-r--r--konversation/src/guess_ja.cpp2
-rw-r--r--konversation/src/highlight.cpp18
-rw-r--r--konversation/src/highlight.h28
-rw-r--r--konversation/src/highlight_preferences.cpp86
-rw-r--r--konversation/src/highlight_preferences.h20
-rw-r--r--konversation/src/highlightviewitem.cpp18
-rw-r--r--konversation/src/highlightviewitem.h22
-rw-r--r--konversation/src/identity.cpp70
-rw-r--r--konversation/src/identity.h98
-rw-r--r--konversation/src/identitydialog.cpp210
-rw-r--r--konversation/src/identitydialog.h38
-rw-r--r--konversation/src/ignore.cpp6
-rw-r--r--konversation/src/ignore.h10
-rw-r--r--konversation/src/ignore_preferences.cpp54
-rw-r--r--konversation/src/ignore_preferences.h14
-rw-r--r--konversation/src/ignorelistviewitem.cpp6
-rw-r--r--konversation/src/ignorelistviewitem.h8
-rw-r--r--konversation/src/images.cpp82
-rw-r--r--konversation/src/images.h88
-rw-r--r--konversation/src/inputfilter.cpp252
-rw-r--r--konversation/src/inputfilter.h58
-rw-r--r--konversation/src/insertchardialog.cpp8
-rw-r--r--konversation/src/insertchardialog.h10
-rw-r--r--konversation/src/irccharsets.cpp56
-rw-r--r--konversation/src/irccharsets.h34
-rw-r--r--konversation/src/irccolorchooser.cpp22
-rw-r--r--konversation/src/irccolorchooser.h4
-rw-r--r--konversation/src/ircinput.cpp100
-rw-r--r--konversation/src/ircinput.h46
-rw-r--r--konversation/src/ircqueue.cpp26
-rw-r--r--konversation/src/ircqueue.h34
-rw-r--r--konversation/src/ircview.cpp398
-rw-r--r--konversation/src/ircview.h148
-rw-r--r--konversation/src/ircviewbox.cpp32
-rw-r--r--konversation/src/ircviewbox.h6
-rw-r--r--konversation/src/joinchanneldialog.cpp14
-rw-r--r--konversation/src/joinchanneldialog.h6
-rw-r--r--konversation/src/konsolepanel.cpp14
-rw-r--r--konversation/src/konsolepanel.h8
-rw-r--r--konversation/src/konvdcop.cpp110
-rw-r--r--konversation/src/konvdcop.h102
-rw-r--r--konversation/src/konversationapplication.cpp232
-rw-r--r--konversation/src/konversationapplication.h30
-rw-r--r--konversation/src/konversationmainwindow.cpp236
-rw-r--r--konversation/src/konversationmainwindow.h22
-rw-r--r--konversation/src/konversationsound.cpp6
-rw-r--r--konversation/src/konversationsound.h4
-rw-r--r--konversation/src/konversationstatusbar.cpp60
-rw-r--r--konversation/src/konversationstatusbar.h18
-rw-r--r--konversation/src/konvibookmarkhandler.cpp18
-rw-r--r--konversation/src/konvibookmarkhandler.h14
-rw-r--r--konversation/src/konvibookmarkmenu.cpp18
-rw-r--r--konversation/src/konvibookmarkmenu.h6
-rw-r--r--konversation/src/konviconfigdialog.cpp76
-rw-r--r--konversation/src/konviconfigdialog.h26
-rw-r--r--konversation/src/konviface.h84
-rw-r--r--konversation/src/konvisettingsdialog.cpp44
-rw-r--r--konversation/src/konvisettingsdialog.h10
-rw-r--r--konversation/src/linkaddressbook/addressbook.cpp88
-rw-r--r--konversation/src/linkaddressbook/addressbook.h50
-rw-r--r--konversation/src/linkaddressbook/addressbook_base.cpp130
-rw-r--r--konversation/src/linkaddressbook/addressbook_base.h42
-rw-r--r--konversation/src/linkaddressbook/addresseeitem.cpp18
-rw-r--r--konversation/src/linkaddressbook/addresseeitem.h8
-rw-r--r--konversation/src/linkaddressbook/kimiface.h48
-rw-r--r--konversation/src/linkaddressbook/linkaddressbookui.cpp46
-rw-r--r--konversation/src/linkaddressbook/linkaddressbookui.h22
-rw-r--r--konversation/src/linkaddressbook/nicklisttooltip.cpp16
-rw-r--r--konversation/src/linkaddressbook/nicklisttooltip.h12
-rw-r--r--konversation/src/linkaddressbook/nicksonlinetooltip.cpp16
-rw-r--r--konversation/src/linkaddressbook/nicksonlinetooltip.h12
-rw-r--r--konversation/src/logfilereader.cpp68
-rw-r--r--konversation/src/logfilereader.h10
-rw-r--r--konversation/src/modebutton.cpp8
-rw-r--r--konversation/src/modebutton.h4
-rw-r--r--konversation/src/multilineedit.cpp18
-rw-r--r--konversation/src/multilineedit.h8
-rw-r--r--konversation/src/multilinetextedit.cpp50
-rw-r--r--konversation/src/multilinetextedit.h12
-rw-r--r--konversation/src/nick.cpp36
-rw-r--r--konversation/src/nick.h14
-rw-r--r--konversation/src/nickinfo.cpp74
-rw-r--r--konversation/src/nickinfo.h82
-rw-r--r--konversation/src/nicklistbehavior_preferences.cpp18
-rw-r--r--konversation/src/nicklistbehavior_preferences.h10
-rw-r--r--konversation/src/nicklistview.cpp56
-rw-r--r--konversation/src/nicklistview.h22
-rw-r--r--konversation/src/nicksonline.cpp272
-rw-r--r--konversation/src/nicksonline.h68
-rw-r--r--konversation/src/nicksonlineitem.cpp8
-rw-r--r--konversation/src/nicksonlineitem.h16
-rw-r--r--konversation/src/notificationhandler.cpp60
-rw-r--r--konversation/src/notificationhandler.h38
-rw-r--r--konversation/src/osd.cpp100
-rw-r--r--konversation/src/osd.h60
-rw-r--r--konversation/src/osd_preferences.cpp42
-rw-r--r--konversation/src/osd_preferences.h12
-rw-r--r--konversation/src/outputfilter.cpp358
-rw-r--r--konversation/src/outputfilter.h176
-rw-r--r--konversation/src/query.cpp162
-rw-r--r--konversation/src/query.h52
-rw-r--r--konversation/src/queuetuner.cpp48
-rw-r--r--konversation/src/queuetuner.h12
-rw-r--r--konversation/src/quickbutton.cpp8
-rw-r--r--konversation/src/quickbutton.h10
-rw-r--r--konversation/src/quickbuttons_preferences.cpp54
-rw-r--r--konversation/src/quickbuttons_preferences.h14
-rw-r--r--konversation/src/quickconnectdialog.cpp48
-rw-r--r--konversation/src/quickconnectdialog.h16
-rw-r--r--konversation/src/rawlog.cpp4
-rw-r--r--konversation/src/rawlog.h2
-rw-r--r--konversation/src/scriptlauncher.cpp22
-rw-r--r--konversation/src/scriptlauncher.h8
-rw-r--r--konversation/src/searchbar.cpp76
-rw-r--r--konversation/src/searchbar.h16
-rw-r--r--konversation/src/server.cpp798
-rw-r--r--konversation/src/server.h336
-rw-r--r--konversation/src/serverdialog.cpp42
-rw-r--r--konversation/src/serverdialog.h16
-rw-r--r--konversation/src/servergroupdialog.cpp62
-rw-r--r--konversation/src/servergroupdialog.h12
-rw-r--r--konversation/src/servergroupsettings.cpp10
-rw-r--r--konversation/src/servergroupsettings.h46
-rw-r--r--konversation/src/serverison.cpp86
-rw-r--r--konversation/src/serverison.h20
-rw-r--r--konversation/src/serverlistdialog.cpp96
-rw-r--r--konversation/src/serverlistdialog.h32
-rw-r--r--konversation/src/serverlistview.cpp28
-rw-r--r--konversation/src/serverlistview.h10
-rw-r--r--konversation/src/serversettings.cpp6
-rw-r--r--konversation/src/serversettings.h16
-rw-r--r--konversation/src/ssllabel.cpp6
-rw-r--r--konversation/src/ssllabel.h6
-rw-r--r--konversation/src/sslsocket.cpp34
-rw-r--r--konversation/src/sslsocket.h8
-rw-r--r--konversation/src/statuspanel.cpp90
-rw-r--r--konversation/src/statuspanel.h42
-rw-r--r--konversation/src/tabs_preferences.cpp10
-rw-r--r--konversation/src/tabs_preferences.h2
-rw-r--r--konversation/src/theme_preferences.cpp78
-rw-r--r--konversation/src/theme_preferences.h10
-rw-r--r--konversation/src/topiccombobox.cpp12
-rw-r--r--konversation/src/topiccombobox.h10
-rw-r--r--konversation/src/topiclabel.cpp92
-rw-r--r--konversation/src/topiclabel.h52
-rw-r--r--konversation/src/trayicon.cpp12
-rw-r--r--konversation/src/trayicon.h14
-rw-r--r--konversation/src/unicode.cpp4
-rw-r--r--konversation/src/urlcatcher.cpp94
-rw-r--r--konversation/src/urlcatcher.h22
-rw-r--r--konversation/src/valuelistviewitem.cpp4
-rw-r--r--konversation/src/valuelistviewitem.h4
-rw-r--r--konversation/src/viewcontainer.cpp248
-rw-r--r--konversation/src/viewcontainer.h60
-rw-r--r--konversation/src/viewtree.cpp108
-rw-r--r--konversation/src/viewtree.h42
-rw-r--r--konversation/src/viewtreeitem.cpp74
-rw-r--r--konversation/src/viewtreeitem.h46
-rw-r--r--konversation/src/warnings_preferences.cpp38
-rw-r--r--konversation/src/warnings_preferences.h8
-rw-r--r--konversation/src/watchednicknames_preferences.cpp82
-rw-r--r--konversation/src/watchednicknames_preferences.h18
221 files changed, 6113 insertions, 6113 deletions
diff --git a/konversation/src/alias_preferences.cpp b/konversation/src/alias_preferences.cpp
index ed3498e..e51bb63 100644
--- a/konversation/src/alias_preferences.cpp
+++ b/konversation/src/alias_preferences.cpp
@@ -13,9 +13,9 @@
#include "alias_preferences.h"
#include "config/preferences.h"
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qheader.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqheader.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -25,7 +25,7 @@
#include <klistview.h>
-Alias_Config::Alias_Config(QWidget* parent, const char* name)
+Alias_Config::Alias_Config(TQWidget* parent, const char* name)
: Alias_ConfigUI(parent, name)
{
// reset flag to defined state (used to block signals when just selecting a new item)
@@ -38,15 +38,15 @@ Alias_Config::Alias_Config(QWidget* parent, const char* name)
aliasListView->setSorting(-1,false);
aliasListView->header()->setMovingEnabled(false);
- connect(aliasListView, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(entrySelected(QListViewItem*)));
- connect(aliasListView, SIGNAL(clicked(QListViewItem*)), this, SLOT(entrySelected(QListViewItem*)) );
- connect(aliasListView, SIGNAL(moved()), this, SIGNAL(modified()));
+ connect(aliasListView, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, TQT_SLOT(entrySelected(TQListViewItem*)));
+ connect(aliasListView, TQT_SIGNAL(clicked(TQListViewItem*)), this, TQT_SLOT(entrySelected(TQListViewItem*)) );
+ connect(aliasListView, TQT_SIGNAL(moved()), this, TQT_SIGNAL(modified()));
- connect(aliasInput, SIGNAL(textChanged(const QString&)), this, SLOT(nameChanged(const QString&)));
- connect(replacementInput, SIGNAL(textChanged(const QString&)), this, SLOT(actionChanged(const QString&)));
+ connect(aliasInput, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(nameChanged(const TQString&)));
+ connect(replacementInput, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(actionChanged(const TQString&)));
- connect(newButton, SIGNAL(clicked()), this, SLOT(addEntry()));
- connect(removeButton, SIGNAL(clicked()), this, SLOT(removeEntry()));
+ connect(newButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(addEntry()));
+ connect(removeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeEntry()));
}
Alias_Config::~Alias_Config()
@@ -60,7 +60,7 @@ void Alias_Config::loadSettings()
void Alias_Config::saveSettings()
{
- QStringList newList=currentAliasList();
+ TQStringList newList=currentAliasList();
Preferences::setAliasList(newList);
// saved list is now old list, to check for changes
@@ -78,14 +78,14 @@ bool Alias_Config::hasChanged()
return (currentAliasList() != m_oldAliasList);
}
-void Alias_Config::setAliasListView(const QStringList& aliasList)
+void Alias_Config::setAliasListView(const TQStringList& aliasList)
{
aliasListView->clear();
// Insert alias items backwards to get them sorted properly
for(int index=aliasList.count(); index!=0; index--)
{
- QString item=aliasList[index-1];
+ TQString item=aliasList[index-1];
new KListViewItem(aliasListView,item.section(' ',0,0),item.section(' ',1));
}
@@ -94,11 +94,11 @@ void Alias_Config::setAliasListView(const QStringList& aliasList)
m_oldAliasList=aliasList;
}
-QStringList Alias_Config::currentAliasList()
+TQStringList Alias_Config::currentAliasList()
{
- QStringList newList;
+ TQStringList newList;
- QListViewItem* item=aliasListView->itemAtIndex(0);
+ TQListViewItem* item=aliasListView->itemAtIndex(0);
while(item)
{
newList.append(item->text(0)+' '+item->text(1));
@@ -108,7 +108,7 @@ QStringList Alias_Config::currentAliasList()
}
// what to do when the user selects an item
-void Alias_Config::entrySelected(QListViewItem* aliasEntry)
+void Alias_Config::entrySelected(TQListViewItem* aliasEntry)
{
// play it safe, assume disabling all widgets first
bool enabled = false;
@@ -135,10 +135,10 @@ void Alias_Config::entrySelected(QListViewItem* aliasEntry)
}
// what to do when the user change the name of a quick button
-void Alias_Config::nameChanged(const QString& newName)
+void Alias_Config::nameChanged(const TQString& newName)
{
// get possible first selected item
- QListViewItem* item = aliasListView->selectedItem();
+ TQListViewItem* item = aliasListView->selectedItem();
// sanity check
if (item)
@@ -151,10 +151,10 @@ void Alias_Config::nameChanged(const QString& newName)
}
// what to do when the user change the action definition of a quick button
-void Alias_Config::actionChanged(const QString& newAction)
+void Alias_Config::actionChanged(const TQString& newAction)
{
// get possible first selected item
- QListViewItem* item = aliasListView->selectedItem();
+ TQListViewItem* item = aliasListView->selectedItem();
// sanity check
if (item)
@@ -170,7 +170,7 @@ void Alias_Config::actionChanged(const QString& newAction)
void Alias_Config::addEntry()
{
// add new item at the bottom of list view
- KListViewItem* newItem = new KListViewItem(aliasListView,aliasListView->lastChild(),i18n("New"),QString());
+ KListViewItem* newItem = new KListViewItem(aliasListView,aliasListView->lastChild(),i18n("New"),TQString());
// if successful ...
if (newItem)
{
@@ -190,13 +190,13 @@ void Alias_Config::addEntry()
void Alias_Config::removeEntry()
{
// get possible first selected item
- QListViewItem* item = aliasListView->selectedItem();
+ TQListViewItem* item = aliasListView->selectedItem();
// sanity check
if (item)
{
// get item below the current one
- QListViewItem* nextItem = item->itemBelow();
+ TQListViewItem* nextItem = item->itemBelow();
// if there was none, get the one above
if(!nextItem) nextItem = item->itemAbove();
diff --git a/konversation/src/alias_preferences.h b/konversation/src/alias_preferences.h
index 4f1cfff..4137e88 100644
--- a/konversation/src/alias_preferences.h
+++ b/konversation/src/alias_preferences.h
@@ -21,7 +21,7 @@ class Alias_Config : public Alias_ConfigUI, public KonviSettingsPage
Q_OBJECT
public:
- explicit Alias_Config(QWidget* parent, const char* name = 0);
+ explicit Alias_Config(TQWidget* parent, const char* name = 0);
~Alias_Config();
virtual void saveSettings();
@@ -33,19 +33,19 @@ class Alias_Config : public Alias_ConfigUI, public KonviSettingsPage
void modified();
protected slots:
- void entrySelected(QListViewItem* aliasEntry);
- void nameChanged(const QString& newName);
- void actionChanged(const QString& newAction);
+ void entrySelected(TQListViewItem* aliasEntry);
+ void nameChanged(const TQString& newName);
+ void actionChanged(const TQString& newAction);
void addEntry();
void removeEntry();
protected:
- void setAliasListView(const QStringList& aliasList);
+ void setAliasListView(const TQStringList& aliasList);
bool m_newItemSelected;
- QStringList m_oldAliasList;
- QStringList currentAliasList();
+ TQStringList m_oldAliasList;
+ TQStringList currentAliasList();
};
#endif
diff --git a/konversation/src/autoreplace_preferences.cpp b/konversation/src/autoreplace_preferences.cpp
index 67fd9cd..1f10b40 100644
--- a/konversation/src/autoreplace_preferences.cpp
+++ b/konversation/src/autoreplace_preferences.cpp
@@ -13,12 +13,12 @@
#include "autoreplace_preferences.h"
#include "config/preferences.h"
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qheader.h>
-#include <qtooltip.h>
-#include <qdialog.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqheader.h>
+#include <tqtooltip.h>
+#include <tqdialog.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -34,7 +34,7 @@
#define DIRECTION_BOTH 2
-Autoreplace_Config::Autoreplace_Config(QWidget* parent, const char* name)
+Autoreplace_Config::Autoreplace_Config(TQWidget* parent, const char* name)
: Autoreplace_ConfigUI(parent, name)
{
// reset flag to defined state (used to block signals when just selecting a new item)
@@ -46,12 +46,12 @@ Autoreplace_Config::Autoreplace_Config(QWidget* parent, const char* name)
if(installed)
{
regExpEditorButton->setEnabled(true);
- QToolTip::add(regExpEditorButton, i18n("Click to run Regular Expression Editor (KRegExpEditor)"));
+ TQToolTip::add(regExpEditorButton, i18n("Click to run Regular Expression Editor (KRegExpEditor)"));
}
else
{
regExpEditorButton->setEnabled(false);
- QToolTip::add(regExpEditorButton, i18n("The Regular Expression Editor (KRegExpEditor) is not installed"));
+ TQToolTip::add(regExpEditorButton, i18n("The Regular Expression Editor (KRegExpEditor) is not installed"));
}
// populate combobox
@@ -68,21 +68,21 @@ Autoreplace_Config::Autoreplace_Config(QWidget* parent, const char* name)
// populate listview
loadSettings();
- connect(patternListView, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(entrySelected(QListViewItem*)));
- connect(patternListView, SIGNAL(clicked(QListViewItem*)), this, SLOT(entrySelected(QListViewItem*)));
- connect(patternListView, SIGNAL(moved()), SIGNAL(modified()));
+ connect(patternListView, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, TQT_SLOT(entrySelected(TQListViewItem*)));
+ connect(patternListView, TQT_SIGNAL(clicked(TQListViewItem*)), this, TQT_SLOT(entrySelected(TQListViewItem*)));
+ connect(patternListView, TQT_SIGNAL(moved()), TQT_SIGNAL(modified()));
- connect(patternListView, SIGNAL(aboutToMove()), SLOT(disableSort()));
- connect(patternListView->header(), SIGNAL(clicked(int)), SLOT(sort(int)));
+ connect(patternListView, TQT_SIGNAL(aboutToMove()), TQT_SLOT(disableSort()));
+ connect(patternListView->header(), TQT_SIGNAL(clicked(int)), TQT_SLOT(sort(int)));
- connect(directionCombo, SIGNAL(activated(int)), this, SLOT(directionChanged(int)));
+ connect(directionCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(directionChanged(int)));
- connect(patternInput, SIGNAL(textChanged(const QString&)), this, SLOT(patternChanged(const QString&)));
- connect(regExpEditorButton, SIGNAL(clicked()), this, SLOT(showRegExpEditor()));
- connect(replacementInput, SIGNAL(textChanged(const QString&)), this, SLOT(replacementChanged(const QString&)));
+ connect(patternInput, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(patternChanged(const TQString&)));
+ connect(regExpEditorButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(showRegExpEditor()));
+ connect(replacementInput, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(replacementChanged(const TQString&)));
- connect(newButton, SIGNAL(clicked()), this, SLOT(addEntry()));
- connect(removeButton, SIGNAL(clicked()), this, SLOT(removeEntry()));
+ connect(newButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(addEntry()));
+ connect(removeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeEntry()));
}
Autoreplace_Config::~Autoreplace_Config()
@@ -98,7 +98,7 @@ void Autoreplace_Config::loadSettings()
}
// fill listview with autoreplace definitions
-void Autoreplace_Config::setAutoreplaceListView(const QStringList &autoreplaceList)
+void Autoreplace_Config::setAutoreplaceListView(const TQStringList &autoreplaceList)
{
// clear listView
patternListView->clear();
@@ -106,9 +106,9 @@ void Autoreplace_Config::setAutoreplaceListView(const QStringList &autoreplaceLi
for(unsigned int index=autoreplaceList.count();index!=0;index--)
{
// get autoreplace definition
- QString definition=autoreplaceList[index-1];
+ TQString definition=autoreplaceList[index-1];
// cut definition apart in name and action, and create a new listview item
- QCheckListItem* newItem=new QCheckListItem(patternListView,QString(),QCheckListItem::CheckBox);
+ TQCheckListItem* newItem=new TQCheckListItem(patternListView,TQString(),TQCheckListItem::CheckBox);
// Regular expression?
if(definition.section(',',0,0)=="1") newItem->setOn(true);
// direction input/output/both
@@ -137,7 +137,7 @@ void Autoreplace_Config::saveSettings()
config->setGroup("Autoreplace List");
// create empty list
- QStringList newList=currentAutoreplaceList();
+ TQStringList newList=currentAutoreplaceList();
// check if there are any patterns in the list view
if(newList.count())
@@ -146,13 +146,13 @@ void Autoreplace_Config::saveSettings()
for(unsigned int index=0;index<newList.count();index++)
{
// write the current entry's pattern and replacement (adds a "#" to preserve blanks at the end of the line)
- config->writeEntry(QString("Autoreplace%1").arg(index),newList[index]+'#');
+ config->writeEntry(TQString("Autoreplace%1").arg(index),newList[index]+'#');
} // for
}
// if there were no entries at all, write a dummy entry to prevent KConfigXT from "optimizing"
// the group out, which would in turn make konvi restore the default entries
else
- config->writeEntry("Empty List",QString());
+ config->writeEntry("Empty List",TQString());
// set internal autoreplace list
Preferences::setAutoreplaceList(newList);
@@ -166,18 +166,18 @@ void Autoreplace_Config::restorePageToDefaults()
setAutoreplaceListView(Preferences::defaultAutoreplaceList());
}
-QStringList Autoreplace_Config::currentAutoreplaceList()
+TQStringList Autoreplace_Config::currentAutoreplaceList()
{
// get first item of the autoreplace listview
- QListViewItem* item=patternListView->firstChild();
+ TQListViewItem* item=patternListView->firstChild();
// create empty list
- QStringList newList;
+ TQStringList newList;
// go through all items and save them into the configuration
while(item)
{
- QString checked="0";
- if(static_cast<QCheckListItem*>(item)->isOn()) checked="1";
+ TQString checked="0";
+ if(static_cast<TQCheckListItem*>(item)->isOn()) checked="1";
// remember entry in internal list (col 4 is hidden for input/output)
newList.append(checked+','+item->text(4)+','+item->text(2)+','+item->text(3));
@@ -197,7 +197,7 @@ bool Autoreplace_Config::hasChanged()
// slots
// what to do when the user selects an item
-void Autoreplace_Config::entrySelected(QListViewItem* autoreplaceEntry)
+void Autoreplace_Config::entrySelected(TQListViewItem* autoreplaceEntry)
{
// play it safe, assume disabling all widgets first
bool enabled=false;
@@ -216,7 +216,7 @@ void Autoreplace_Config::entrySelected(QListViewItem* autoreplaceEntry)
// set combobox to selected item
int itemIndex=0;
- QString direction=autoreplaceEntry->text(4);
+ TQString direction=autoreplaceEntry->text(4);
if(direction=="i") itemIndex=DIRECTION_INPUT;
else if(direction=="o") itemIndex=DIRECTION_OUTPUT;
else if(direction=="io") itemIndex=DIRECTION_BOTH;
@@ -246,13 +246,13 @@ void Autoreplace_Config::entrySelected(QListViewItem* autoreplaceEntry)
void Autoreplace_Config::directionChanged(int newDirection)
{
// get possible selected item
- QListViewItem* item=patternListView->selectedItem();
+ TQListViewItem* item=patternListView->selectedItem();
// sanity check
if(item)
{
// prepare hidden identifier string
- QString id;
+ TQString id;
// find the direction strings to set up in the item
if(newDirection==DIRECTION_INPUT) id="i";
else if(newDirection==DIRECTION_OUTPUT) id="o";
@@ -266,10 +266,10 @@ void Autoreplace_Config::directionChanged(int newDirection)
}
// what to do when the user changes the pattern of an entry
-void Autoreplace_Config::patternChanged(const QString& newPattern)
+void Autoreplace_Config::patternChanged(const TQString& newPattern)
{
// get possible selected item
- QListViewItem* item=patternListView->selectedItem();
+ TQListViewItem* item=patternListView->selectedItem();
// sanity check
if(item)
@@ -282,10 +282,10 @@ void Autoreplace_Config::patternChanged(const QString& newPattern)
}
// what to do when the user changes the replacement of an entry
-void Autoreplace_Config::replacementChanged(const QString& newReplacement)
+void Autoreplace_Config::replacementChanged(const TQString& newReplacement)
{
// get possible selected item
- QListViewItem* item=patternListView->selectedItem();
+ TQListViewItem* item=patternListView->selectedItem();
// sanity check
if(item)
@@ -303,7 +303,7 @@ void Autoreplace_Config::addEntry()
disableSort();
// add new item at the bottom of list view
- QCheckListItem* newItem=new QCheckListItem(patternListView,QString(),QCheckListItem::CheckBox);
+ TQCheckListItem* newItem=new TQCheckListItem(patternListView,TQString(),TQCheckListItem::CheckBox);
// if successful ...
if(newItem)
{
@@ -329,13 +329,13 @@ void Autoreplace_Config::addEntry()
void Autoreplace_Config::removeEntry()
{
// get possible first selected item
- QListViewItem* item=patternListView->selectedItem();
+ TQListViewItem* item=patternListView->selectedItem();
// sanity check
if(item)
{
// get item below the current one
- QListViewItem* nextItem=item->itemBelow();
+ TQListViewItem* nextItem=item->itemBelow();
// if there was none, get the one above
if(!nextItem) nextItem=item->itemAbove();
@@ -378,8 +378,8 @@ void Autoreplace_Config::disableSort()
void Autoreplace_Config::showRegExpEditor()
{
- QDialog *editorDialog =
- KParts::ComponentFactory::createInstanceFromQuery<QDialog>( "KRegExpEditor/KRegExpEditor" );
+ TQDialog *editorDialog =
+ KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor" );
if(editorDialog)
{
@@ -390,9 +390,9 @@ void Autoreplace_Config::showRegExpEditor()
reEditor->setRegExp(patternInput->text());
int dlgResult = editorDialog->exec();
- if(dlgResult == QDialog::Accepted)
+ if(dlgResult == TQDialog::Accepted)
{
- QString re = reEditor->regExp();
+ TQString re = reEditor->regExp();
patternInput->setText(re);
}
diff --git a/konversation/src/autoreplace_preferences.h b/konversation/src/autoreplace_preferences.h
index 303487c..a052f8f 100644
--- a/konversation/src/autoreplace_preferences.h
+++ b/konversation/src/autoreplace_preferences.h
@@ -22,7 +22,7 @@ class Autoreplace_Config : public Autoreplace_ConfigUI, public KonviSettingsPage
Q_OBJECT
public:
- explicit Autoreplace_Config(QWidget* parent, const char* name=NULL);
+ explicit Autoreplace_Config(TQWidget* parent, const char* name=NULL);
~Autoreplace_Config();
virtual void saveSettings();
@@ -35,10 +35,10 @@ class Autoreplace_Config : public Autoreplace_ConfigUI, public KonviSettingsPage
void modified();
protected slots:
- void entrySelected(QListViewItem* autoreplaceEntry);
+ void entrySelected(TQListViewItem* autoreplaceEntry);
void directionChanged(int newDirection);
- void patternChanged(const QString& newPattern);
- void replacementChanged(const QString& newReplacement);
+ void patternChanged(const TQString& newPattern);
+ void replacementChanged(const TQString& newReplacement);
void addEntry();
void removeEntry();
void sort(int column);
@@ -46,12 +46,12 @@ class Autoreplace_Config : public Autoreplace_ConfigUI, public KonviSettingsPage
void showRegExpEditor();
protected:
- void setAutoreplaceListView(const QStringList &autoreplaceList);
+ void setAutoreplaceListView(const TQStringList &autoreplaceList);
bool m_newItemSelected;
- QStringList m_oldAutoreplaceList;
- QStringList currentAutoreplaceList();
+ TQStringList m_oldAutoreplaceList;
+ TQStringList currentAutoreplaceList();
};
#endif
diff --git a/konversation/src/awaymanager.cpp b/konversation/src/awaymanager.cpp
index 5676bd1..30b1027 100644
--- a/konversation/src/awaymanager.cpp
+++ b/konversation/src/awaymanager.cpp
@@ -17,7 +17,7 @@
#include "server.h"
#include "preferences.h"
-#include <qtimer.h>
+#include <tqtimer.h>
#include <dcopref.h>
#include <kaction.h>
@@ -55,7 +55,7 @@ struct AwayManagerPrivate
bool useMit;
};
-AwayManager::AwayManager(QObject* parent) : QObject(parent)
+AwayManager::AwayManager(TQObject* parent) : TQObject(parent)
{
int dummy = 0;
dummy = dummy;
@@ -86,8 +86,8 @@ AwayManager::AwayManager(QObject* parent) : QObject(parent)
d->useMit = XScreenSaverQueryExtension(qt_xdisplay(), &dummy, &dummy);
#endif
- m_activityTimer = new QTimer(this, "AwayTimer");
- connect(m_activityTimer, SIGNAL(timeout()), this, SLOT(checkActivity()));
+ m_activityTimer = new TQTimer(this, "AwayTimer");
+ connect(m_activityTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(checkActivity()));
m_idleTime.start();
}
@@ -99,9 +99,9 @@ AwayManager::~AwayManager()
void AwayManager::identitiesChanged()
{
- QValueList<int> newIdentityList;
+ TQValueList<int> newIdentityList;
- QPtrList<Server> serverList = m_connectionManager->getServerList();
+ TQPtrList<Server> serverList = m_connectionManager->getServerList();
Server* server = 0;
for (server = serverList.first(); server; server = serverList.next())
@@ -238,7 +238,7 @@ void AwayManager::implementIdleAutoAway(bool activity)
{
m_idleTime.start();
- QPtrList<Server> serverList = m_connectionManager->getServerList();
+ TQPtrList<Server> serverList = m_connectionManager->getServerList();
Server* server = 0;
for (server = serverList.first(); server; server = serverList.next())
@@ -256,8 +256,8 @@ void AwayManager::implementIdleAutoAway(bool activity)
{
long int idleTime = m_idleTime.elapsed() / 1000;
- QValueList<int> identitiesIdleTimeExceeded;
- QValueList<int>::ConstIterator it;
+ TQValueList<int> identitiesIdleTimeExceeded;
+ TQValueList<int>::ConstIterator it;
for (it = m_identitiesOnAutoAway.begin(); it != m_identitiesOnAutoAway.end(); ++it)
{
@@ -265,7 +265,7 @@ void AwayManager::implementIdleAutoAway(bool activity)
identitiesIdleTimeExceeded.append((*it));
}
- QPtrList<Server> serverList = m_connectionManager->getServerList();
+ TQPtrList<Server> serverList = m_connectionManager->getServerList();
Server* server = 0;
for (server = serverList.first(); server; server = serverList.next())
@@ -284,7 +284,7 @@ void AwayManager::setManagedIdentitiesAway()
// on residual mouse activity after manual screensaver activation.
d->mouseX = -1;
- QPtrList<Server> serverList = m_connectionManager->getServerList();
+ TQPtrList<Server> serverList = m_connectionManager->getServerList();
Server* server = 0;
for (server = serverList.first(); server; server = serverList.next())
@@ -296,7 +296,7 @@ void AwayManager::setManagedIdentitiesAway()
void AwayManager::setManagedIdentitiesUnaway()
{
- QPtrList<Server> serverList = m_connectionManager->getServerList();
+ TQPtrList<Server> serverList = m_connectionManager->getServerList();
Server* server = 0;
for (server = serverList.first(); server; server = serverList.next())
@@ -311,9 +311,9 @@ void AwayManager::setManagedIdentitiesUnaway()
}
}
-void AwayManager::requestAllAway(const QString& reason)
+void AwayManager::requestAllAway(const TQString& reason)
{
- QPtrList<Server> serverList = m_connectionManager->getServerList();
+ TQPtrList<Server> serverList = m_connectionManager->getServerList();
Server* server = 0;
for (server = serverList.first(); server; server = serverList.next())
@@ -322,7 +322,7 @@ void AwayManager::requestAllAway(const QString& reason)
void AwayManager::requestAllUnaway()
{
- QPtrList<Server> serverList = m_connectionManager->getServerList();
+ TQPtrList<Server> serverList = m_connectionManager->getServerList();
Server* server = 0;
for (server = serverList.first(); server; server = serverList.next())
@@ -346,7 +346,7 @@ void AwayManager::updateGlobalAwayAction(bool away)
if (away)
{
- QPtrList<Server> serverList = m_connectionManager->getServerList();
+ TQPtrList<Server> serverList = m_connectionManager->getServerList();
Server* server = 0;
uint awayCount = 0;
diff --git a/konversation/src/awaymanager.h b/konversation/src/awaymanager.h
index 76819f3..5be461a 100644
--- a/konversation/src/awaymanager.h
+++ b/konversation/src/awaymanager.h
@@ -13,13 +13,13 @@
#define AWAYMANAGER_H
-#include <qobject.h>
-#include <qdatetime.h>
+#include <tqobject.h>
+#include <tqdatetime.h>
class ConnectionManager;
-class QTimer;
+class TQTimer;
struct AwayManagerPrivate;
@@ -30,7 +30,7 @@ class AwayManager : public QObject
Q_OBJECT
public:
- explicit AwayManager(QObject* parent = 0);
+ explicit AwayManager(TQObject* parent = 0);
~AwayManager();
@@ -40,7 +40,7 @@ class AwayManager : public QObject
void identityOnline(int identityId);
void identityOffline(int identityId);
- void requestAllAway(const QString& reason = "");
+ void requestAllAway(const TQString& reason = "");
void requestAllUnaway();
void setManagedIdentitiesAway();
@@ -62,10 +62,10 @@ class AwayManager : public QObject
AwayManagerPrivate* d;
- QTime m_idleTime;
- QTimer* m_activityTimer;
+ TQTime m_idleTime;
+ TQTimer* m_activityTimer;
- QValueList<int> m_identitiesOnAutoAway;
+ TQValueList<int> m_identitiesOnAutoAway;
ConnectionManager* m_connectionManager;
};
diff --git a/konversation/src/blowfish/blowfish.cpp b/konversation/src/blowfish/blowfish.cpp
index 7951202..5115501 100644
--- a/konversation/src/blowfish/blowfish.cpp
+++ b/konversation/src/blowfish/blowfish.cpp
@@ -14,14 +14,14 @@
#include "server.h"
#include "channel.h"
-#include <qcstring.h>
-#include <qstringlist.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
namespace Konversation
{
// Find n'th occurrence of separator in input and return the index
- int findOccurrence(const QCString& input, const QCString& separator, int nth)
+ int findOccurrence(const TQCString& input, const TQCString& separator, int nth)
{
int j=1;
uint i;
@@ -39,15 +39,15 @@ namespace Konversation
return i;
}
- void decrypt(const QString& recipient, QCString& cipher, Server* server)
+ void decrypt(const TQString& recipient, TQCString& cipher, Server* server)
{
- QCString key = server->getKeyForRecipient(recipient);
+ TQCString key = server->getKeyForRecipient(recipient);
if(!key.isEmpty())
{
int index = findOccurrence(cipher, ":", 2);
- QCString backup = cipher.mid(0,index+1);
- QCString tmp = cipher.mid(index+1);
+ TQCString backup = cipher.mid(0,index+1);
+ TQCString tmp = cipher.mid(index+1);
char* tmp2;
if(server->identifyMsgEnabled()) // Workaround braindead Freenode prefixing messages with +
@@ -63,8 +63,8 @@ namespace Konversation
else
cipher = cipher.mid(4);
- QCString ckey( key.length()+2 );
- QCString result( cipher.length()+1 );
+ TQCString ckey( key.length()+2 );
+ TQCString result( cipher.length()+1 );
qstrncpy(result.data(), cipher.data(), cipher.length());
qstrncpy(ckey.data(), key.data(), key.length()+1);
tmp2 = decrypt_string(ckey.data(),result.data());
@@ -77,15 +77,15 @@ namespace Konversation
}
}
- void decryptTopic(const QString& recipient, QCString& cipher, Server* server)
+ void decryptTopic(const TQString& recipient, TQCString& cipher, Server* server)
{
- QCString key = server->getKeyForRecipient(recipient);
+ TQCString key = server->getKeyForRecipient(recipient);
if(!key.isEmpty())
{
int index = findOccurrence(cipher, ":", 2);
- QCString backup = cipher.mid(0,index+1);
- QCString tmp = cipher.mid(index+1);
+ TQCString backup = cipher.mid(0,index+1);
+ TQCString tmp = cipher.mid(index+1);
char* tmp2;
if(tmp.mid(0,4) == "+OK ") // FiSH style topic
@@ -95,8 +95,8 @@ namespace Konversation
else
return;
- QCString result( cipher.length()+1 );
- QCString ckey( key.length()+2 );
+ TQCString result( cipher.length()+1 );
+ TQCString ckey( key.length()+2 );
qstrncpy(ckey.data(), key.data(), key.length()+1);
qstrncpy(result.data(), cipher.data(), cipher.length());
tmp2 = decrypt_string(ckey.data(),result.data());
@@ -109,7 +109,7 @@ namespace Konversation
}
}
- bool encrypt(const QString& key, QCString& cipher)
+ bool encrypt(const TQString& key, TQCString& cipher)
{
if(key.isEmpty())
return false;
@@ -118,10 +118,10 @@ namespace Konversation
cipher = cipher.mid(3);
else
{
- QCString ckey(key.local8Bit());
+ TQCString ckey(key.local8Bit());
char *tmp = encrypt_string(ckey.data(), cipher.data());
- cipher = QCString("+OK ") + tmp;
+ cipher = TQCString("+OK ") + tmp;
free(tmp);
}
return true;
diff --git a/konversation/src/blowfish/blowfish.h b/konversation/src/blowfish/blowfish.h
index 0c37317..e8e84c6 100644
--- a/konversation/src/blowfish/blowfish.h
+++ b/konversation/src/blowfish/blowfish.h
@@ -15,16 +15,16 @@
class Server;
-class QString;
-class QCString;
+class TQString;
+class TQCString;
namespace Konversation
{
- int findOccurrence(const QCString& input, const QCString& separator, int nth);
- void decrypt(const QString& recipient, QCString& cipher, Server* server);
- void decryptTopic(const QString& recipient, QCString& cipher, Server* server);
- bool encrypt(const QString& key, QCString& cipher);
+ int findOccurrence(const TQCString& input, const TQCString& separator, int nth);
+ void decrypt(const TQString& recipient, TQCString& cipher, Server* server);
+ void decryptTopic(const TQString& recipient, TQCString& cipher, Server* server);
+ bool encrypt(const TQString& key, TQCString& cipher);
}
#endif
diff --git a/konversation/src/channel.cpp b/konversation/src/channel.cpp
index 38a7e63..04a4020 100644
--- a/konversation/src/channel.cpp
+++ b/konversation/src/channel.cpp
@@ -32,24 +32,24 @@
#include "linkaddressbook/linkaddressbookui.h"
#include "linkaddressbook/addressbook.h"
-#include <qlabel.h>
-#include <qvbox.h>
-#include <qevent.h>
-#include <qhbox.h>
-#include <qgrid.h>
-#include <qdragobject.h>
-#include <qsizepolicy.h>
-#include <qheader.h>
-#include <qregexp.h>
-#include <qtooltip.h>
-#include <qsplitter.h>
-#include <qcheckbox.h>
-#include <qtimer.h>
-#include <qcombobox.h>
-#include <qtextcodec.h>
-#include <qwhatsthis.h>
-#include <qtoolbutton.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
+#include <tqevent.h>
+#include <tqhbox.h>
+#include <tqgrid.h>
+#include <tqdragobject.h>
+#include <tqsizepolicy.h>
+#include <tqheader.h>
+#include <tqregexp.h>
+#include <tqtooltip.h>
+#include <tqsplitter.h>
+#include <tqcheckbox.h>
+#include <tqtimer.h>
+#include <tqcombobox.h>
+#include <tqtextcodec.h>
+#include <tqwhatsthis.h>
+#include <tqtoolbutton.h>
+#include <tqlayout.h>
#include <kprocess.h>
@@ -65,7 +65,7 @@
#include <kwin.h>
-Channel::Channel(QWidget* parent, QString _name) : ChatWindow(parent)
+Channel::Channel(TQWidget* parent, TQString _name) : ChatWindow(parent)
{
// init variables
@@ -107,38 +107,38 @@ Channel::Channel(QWidget* parent, QString _name) : ChatWindow(parent)
setChannelEncodingSupported(true);
// Build some size policies for the widgets
- QSizePolicy hfixed = QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
- QSizePolicy hmodest = QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
- QSizePolicy vmodest = QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
- QSizePolicy vfixed = QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
- QSizePolicy modest = QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
- QSizePolicy greedy = QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
-
- m_vertSplitter = new QSplitter(Qt::Vertical, this);
+ TQSizePolicy hfixed = TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred);
+ TQSizePolicy hmodest = TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding);
+ TQSizePolicy vmodest = TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Preferred);
+ TQSizePolicy vfixed = TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed);
+ TQSizePolicy modest = TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Preferred);
+ TQSizePolicy greedy = TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+
+ m_vertSplitter = new TQSplitter(Qt::Vertical, this);
m_vertSplitter->setOpaqueResize(KGlobalSettings::opaqueResize());
- QWidget* topicWidget = new QWidget(m_vertSplitter);
- m_vertSplitter->setResizeMode(topicWidget,QSplitter::KeepSize);
+ TQWidget* topicWidget = new TQWidget(m_vertSplitter);
+ m_vertSplitter->setResizeMode(topicWidget,TQSplitter::KeepSize);
- QGridLayout* topicLayout = new QGridLayout(topicWidget, 2, 3, 0, 0);
+ TQGridLayout* topicLayout = new TQGridLayout(topicWidget, 2, 3, 0, 0);
- m_topicButton = new QToolButton(topicWidget);
+ m_topicButton = new TQToolButton(topicWidget);
m_topicButton->setIconSet(SmallIconSet("edit", 16));
- QToolTip::add(m_topicButton, i18n("Edit Channel Settings"));
- connect(m_topicButton, SIGNAL(clicked()), this, SLOT(showOptionsDialog()));
+ TQToolTip::add(m_topicButton, i18n("Edit Channel Settings"));
+ connect(m_topicButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(showOptionsDialog()));
topicLine = new Konversation::TopicLabel(topicWidget);
- QWhatsThis::add(topicLine, i18n("<qt>Every channel on IRC has a topic associated with it. This is simply a message that everybody can see.<p>If you are an operator, or the channel mode <em>'T'</em> has not been set, then you can change the topic by clicking the Edit Channel Properties button to the left of the topic. You can also view the history of topics there.</qt>"));
- connect(topicLine, SIGNAL(setStatusBarTempText(const QString&)), this, SIGNAL(setStatusBarTempText(const QString&)));
- connect(topicLine, SIGNAL(clearStatusBarTempText()), this, SIGNAL(clearStatusBarTempText()));
- connect(topicLine,SIGNAL(popupCommand(int)),this,SLOT(popupChannelCommand(int)));
+ TQWhatsThis::add(topicLine, i18n("<qt>Every channel on IRC has a topic associated with it. This is simply a message that everybody can see.<p>If you are an operator, or the channel mode <em>'T'</em> has not been set, then you can change the topic by clicking the Edit Channel Properties button to the left of the topic. You can also view the history of topics there.</qt>"));
+ connect(topicLine, TQT_SIGNAL(setStatusBarTempText(const TQString&)), this, TQT_SIGNAL(setStatusBarTempText(const TQString&)));
+ connect(topicLine, TQT_SIGNAL(clearStatusBarTempText()), this, TQT_SIGNAL(clearStatusBarTempText()));
+ connect(topicLine,TQT_SIGNAL(popupCommand(int)),this,TQT_SLOT(popupChannelCommand(int)));
topicLayout->addWidget(m_topicButton, 0, 0);
topicLayout->addMultiCellWidget(topicLine, 0, 1, 1, 1);
// The box holding the channel modes
- modeBox = new QHBox(topicWidget);
+ modeBox = new TQHBox(topicWidget);
modeBox->setSizePolicy(hfixed);
modeT = new ModeButton("T",modeBox,0);
modeN = new ModeButton("N",modeBox,1);
@@ -149,29 +149,29 @@ Channel::Channel(QWidget* parent, QString _name) : ChatWindow(parent)
modeK = new ModeButton("K",modeBox,6);
modeL = new ModeButton("L",modeBox,7);
- QWhatsThis::add(modeT, i18n("<qt>These control the <em>mode</em> of the channel. Only an operator can change these.<p>The <b>T</b>opic mode means that only the channel operator can change the topic for the channel.</qt>"));
- QWhatsThis::add(modeN, i18n("<qt>These control the <em>mode</em> of the channel. Only an operator can change these.<p><b>N</b>o messages from outside means that users that are not in the channel cannot send messages that everybody in the channel can see. Almost all channels have this set to prevent nuisance messages.</qt>"));
- QWhatsThis::add(modeS, i18n("<qt>These control the <em>mode</em> of the channel. Only an operator can change these.<p>A <b>S</b>ecret channel will not show up in the channel list, nor will any user be able to see that you are in the channel with the <em>WHOIS</em> command or anything similar. Only the people that are in the same channel will know that you are in this channel, if this mode is set.</qt>"));
- QWhatsThis::add(modeI, i18n("<qt>These control the <em>mode</em> of the channel. Only an operator can change these.<p>An <b>I</b>nvite only channel means that people can only join the channel if they are invited. To invite someone, a channel operator needs to issue the command <em>/invite nick</em> from within the channel.</qt>"));
- QWhatsThis::add(modeP, i18n("<qt>These control the <em>mode</em> of the channel. Only an operator can change these.<p>A <b>P</b>rivate channel is shown in a listing of all channels, but the topic is not shown. A user's <em>WHOIS</e> may or may not show them as being in a private channel depending on the IRC server.</qt>"));
- QWhatsThis::add(modeM, i18n("<qt>These control the <em>mode</em> of the channel. Only an operator can change these.<p>A <b>M</b>oderated channel is one where only operators, half-operators and those with voice can talk.</qt>"));
- QWhatsThis::add(modeK, i18n("<qt>These control the <em>mode</em> of the channel. Only an operator can change these.<p>A <b>P</b>rotected channel requires users to enter a password in order to join.</qt>"));
- QWhatsThis::add(modeL, i18n("<qt>These control the <em>mode</em> of the channel. Only an operator can change these.<p>A channel that has a user <b>L</b>imit means that only that many users can be in the channel at any one time. Some channels have a bot that sits in the channel and changes this automatically depending on how busy the channel is.</qt>"));
-
- connect(modeT,SIGNAL(clicked(int,bool)),this,SLOT(modeButtonClicked(int,bool)));
- connect(modeN,SIGNAL(clicked(int,bool)),this,SLOT(modeButtonClicked(int,bool)));
- connect(modeS,SIGNAL(clicked(int,bool)),this,SLOT(modeButtonClicked(int,bool)));
- connect(modeI,SIGNAL(clicked(int,bool)),this,SLOT(modeButtonClicked(int,bool)));
- connect(modeP,SIGNAL(clicked(int,bool)),this,SLOT(modeButtonClicked(int,bool)));
- connect(modeM,SIGNAL(clicked(int,bool)),this,SLOT(modeButtonClicked(int,bool)));
- connect(modeK,SIGNAL(clicked(int,bool)),this,SLOT(modeButtonClicked(int,bool)));
- connect(modeL,SIGNAL(clicked(int,bool)),this,SLOT(modeButtonClicked(int,bool)));
+ TQWhatsThis::add(modeT, i18n("<qt>These control the <em>mode</em> of the channel. Only an operator can change these.<p>The <b>T</b>opic mode means that only the channel operator can change the topic for the channel.</qt>"));
+ TQWhatsThis::add(modeN, i18n("<qt>These control the <em>mode</em> of the channel. Only an operator can change these.<p><b>N</b>o messages from outside means that users that are not in the channel cannot send messages that everybody in the channel can see. Almost all channels have this set to prevent nuisance messages.</qt>"));
+ TQWhatsThis::add(modeS, i18n("<qt>These control the <em>mode</em> of the channel. Only an operator can change these.<p>A <b>S</b>ecret channel will not show up in the channel list, nor will any user be able to see that you are in the channel with the <em>WHOIS</em> command or anything similar. Only the people that are in the same channel will know that you are in this channel, if this mode is set.</qt>"));
+ TQWhatsThis::add(modeI, i18n("<qt>These control the <em>mode</em> of the channel. Only an operator can change these.<p>An <b>I</b>nvite only channel means that people can only join the channel if they are invited. To invite someone, a channel operator needs to issue the command <em>/invite nick</em> from within the channel.</qt>"));
+ TQWhatsThis::add(modeP, i18n("<qt>These control the <em>mode</em> of the channel. Only an operator can change these.<p>A <b>P</b>rivate channel is shown in a listing of all channels, but the topic is not shown. A user's <em>WHOIS</e> may or may not show them as being in a private channel depending on the IRC server.</qt>"));
+ TQWhatsThis::add(modeM, i18n("<qt>These control the <em>mode</em> of the channel. Only an operator can change these.<p>A <b>M</b>oderated channel is one where only operators, half-operators and those with voice can talk.</qt>"));
+ TQWhatsThis::add(modeK, i18n("<qt>These control the <em>mode</em> of the channel. Only an operator can change these.<p>A <b>P</b>rotected channel requires users to enter a password in order to join.</qt>"));
+ TQWhatsThis::add(modeL, i18n("<qt>These control the <em>mode</em> of the channel. Only an operator can change these.<p>A channel that has a user <b>L</b>imit means that only that many users can be in the channel at any one time. Some channels have a bot that sits in the channel and changes this automatically depending on how busy the channel is.</qt>"));
+
+ connect(modeT,TQT_SIGNAL(clicked(int,bool)),this,TQT_SLOT(modeButtonClicked(int,bool)));
+ connect(modeN,TQT_SIGNAL(clicked(int,bool)),this,TQT_SLOT(modeButtonClicked(int,bool)));
+ connect(modeS,TQT_SIGNAL(clicked(int,bool)),this,TQT_SLOT(modeButtonClicked(int,bool)));
+ connect(modeI,TQT_SIGNAL(clicked(int,bool)),this,TQT_SLOT(modeButtonClicked(int,bool)));
+ connect(modeP,TQT_SIGNAL(clicked(int,bool)),this,TQT_SLOT(modeButtonClicked(int,bool)));
+ connect(modeM,TQT_SIGNAL(clicked(int,bool)),this,TQT_SLOT(modeButtonClicked(int,bool)));
+ connect(modeK,TQT_SIGNAL(clicked(int,bool)),this,TQT_SLOT(modeButtonClicked(int,bool)));
+ connect(modeL,TQT_SIGNAL(clicked(int,bool)),this,TQT_SLOT(modeButtonClicked(int,bool)));
limit=new KLineEdit(modeBox);
- QToolTip::add(limit, i18n("Maximum users allowed in channel"));
- QWhatsThis::add(limit, i18n("<qt>This is the channel user limit - the maximum number of users that can be in the channel at a time. If you are an operator, you can set this. The channel mode <b>T</b>opic (button to left) will automatically be set if set this.</qt>"));
- connect(limit,SIGNAL (returnPressed()),this,SLOT (channelLimitChanged()) );
- connect(limit,SIGNAL (lostFocus()), this, SLOT(channelLimitChanged()) );
+ TQToolTip::add(limit, i18n("Maximum users allowed in channel"));
+ TQWhatsThis::add(limit, i18n("<qt>This is the channel user limit - the maximum number of users that can be in the channel at a time. If you are an operator, you can set this. The channel mode <b>T</b>opic (button to left) will automatically be set if set this.</qt>"));
+ connect(limit,TQT_SIGNAL (returnPressed()),this,TQT_SLOT (channelLimitChanged()) );
+ connect(limit,TQT_SIGNAL (lostFocus()), this, TQT_SLOT(channelLimitChanged()) );
topicLayout->addWidget(modeBox, 0, 2);
topicLayout->setRowStretch(1, 10);
@@ -181,27 +181,27 @@ Channel::Channel(QWidget* parent, QString _name) : ChatWindow(parent)
showModeButtons(Preferences::showModeButtons());
// (this) The main Box, holding the channel view/topic and the input line
- m_horizSplitter = new QSplitter(m_vertSplitter);
+ m_horizSplitter = new TQSplitter(m_vertSplitter);
m_horizSplitter->setOpaqueResize( KGlobalSettings::opaqueResize() );
// Server will be set later in setServer()
IRCViewBox* ircViewBox = new IRCViewBox(m_horizSplitter, NULL);
setTextView(ircViewBox->ircView());
- connect(textView,SIGNAL(popupCommand(int)),this,SLOT(popupChannelCommand(int)));
- connect(topicLine, SIGNAL(currentChannelChanged(const QString&)),textView,SLOT(setCurrentChannel(const QString&)));
+ connect(textView,TQT_SIGNAL(popupCommand(int)),this,TQT_SLOT(popupChannelCommand(int)));
+ connect(topicLine, TQT_SIGNAL(currentChannelChanged(const TQString&)),textView,TQT_SLOT(setCurrentChannel(const TQString&)));
// The box that holds the Nick List and the quick action buttons
- nickListButtons = new QVBox(m_horizSplitter);
- m_horizSplitter->setResizeMode(nickListButtons,QSplitter::KeepSize);
+ nickListButtons = new TQVBox(m_horizSplitter);
+ m_horizSplitter->setResizeMode(nickListButtons,TQSplitter::KeepSize);
nickListButtons->setSpacing(spacing());
nicknameListView=new NickListView(nickListButtons, this);
- nicknameListView->setHScrollBarMode(QScrollView::AlwaysOff);
+ nicknameListView->setHScrollBarMode(TQScrollView::AlwaysOff);
nicknameListView->setSelectionModeExt(KListView::Extended);
nicknameListView->setAllColumnsShowFocus(true);
nicknameListView->setSorting(1,true);
- nicknameListView->addColumn(QString());
- nicknameListView->addColumn(QString());
+ nicknameListView->addColumn(TQString());
+ nicknameListView->addColumn(TQString());
nicknameListView->setColumnWidthMode(1,KListView::Maximum);
nicknameListView->header()->hide();
@@ -219,18 +219,18 @@ Channel::Channel(QWidget* parent, QString _name) : ChatWindow(parent)
buttonsGrid=0;
// The box holding the Nickname button and Channel input
- commandLineBox = new QHBox(this);
+ commandLineBox = new TQHBox(this);
commandLineBox->setSpacing(spacing());
- nicknameCombobox = new QComboBox(commandLineBox);
+ nicknameCombobox = new TQComboBox(commandLineBox);
nicknameCombobox->setEditable(true);
nicknameCombobox->insertStringList(Preferences::nicknameList());
- QWhatsThis::add(nicknameCombobox, i18n("<qt>This shows your current nick, and any alternatives you have set up. If you select or type in a different nickname, then a request will be sent to the IRC server to change your nick. If the server allows it, the new nickname will be selected. If you type in a new nickname, you need to press 'Enter' at the end.<p>You can add change the alternative nicknames from the <em>Identities</em> option in the <em>File</em> menu.</qt>"));
+ TQWhatsThis::add(nicknameCombobox, i18n("<qt>This shows your current nick, and any alternatives you have set up. If you select or type in a different nickname, then a request will be sent to the IRC server to change your nick. If the server allows it, the new nickname will be selected. If you type in a new nickname, you need to press 'Enter' at the end.<p>You can add change the alternative nicknames from the <em>Identities</em> option in the <em>File</em> menu.</qt>"));
oldNick = nicknameCombobox->currentText();
- awayLabel = new QLabel(i18n("(away)"), commandLineBox);
+ awayLabel = new TQLabel(i18n("(away)"), commandLineBox);
awayLabel->hide();
- blowfishLabel = new QLabel(commandLineBox);
+ blowfishLabel = new TQLabel(commandLineBox);
blowfishLabel->hide();
blowfishLabel->setPixmap(KGlobal::iconLoader()->loadIcon("encrypted", KIcon::Toolbar));
channelInput = new IRCInput(commandLineBox);
@@ -240,8 +240,8 @@ Channel::Channel(QWidget* parent, QString _name) : ChatWindow(parent)
channelInput->installEventFilter(this);
// Set the widgets size policies
- m_topicButton->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
- topicLine->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum));
+ m_topicButton->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed));
+ topicLine->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum));
commandLineBox->setSizePolicy(vfixed);
@@ -268,57 +268,57 @@ Channel::Channel(QWidget* parent, QString _name) : ChatWindow(parent)
getTextView()->setSizePolicy(greedy);
nicknameListView->setSizePolicy(hmodest);
- connect(channelInput,SIGNAL (submit()),this,SLOT (channelTextEntered()) );
- connect(channelInput,SIGNAL (envelopeCommand()),this,SLOT (channelPassthroughCommand()) );
- connect(channelInput,SIGNAL (nickCompletion()),this,SLOT (completeNick()) );
- connect(channelInput,SIGNAL (endCompletion()),this,SLOT (endCompleteNick()) );
- connect(channelInput,SIGNAL (textPasted(const QString&)),this,SLOT (textPasted(const QString&)) );
+ connect(channelInput,TQT_SIGNAL (submit()),this,TQT_SLOT (channelTextEntered()) );
+ connect(channelInput,TQT_SIGNAL (envelopeCommand()),this,TQT_SLOT (channelPassthroughCommand()) );
+ connect(channelInput,TQT_SIGNAL (nickCompletion()),this,TQT_SLOT (completeNick()) );
+ connect(channelInput,TQT_SIGNAL (endCompletion()),this,TQT_SLOT (endCompleteNick()) );
+ connect(channelInput,TQT_SIGNAL (textPasted(const TQString&)),this,TQT_SLOT (textPasted(const TQString&)) );
- connect(getTextView(), SIGNAL(textPasted(bool)), channelInput, SLOT(paste(bool)));
- connect(getTextView(),SIGNAL (gotFocus()),channelInput,SLOT (setFocus()) );
- connect(getTextView(),SIGNAL (sendFile()),this,SLOT (sendFileMenu()) );
- connect(getTextView(),SIGNAL (autoText(const QString&)),this,SLOT (sendChannelText(const QString&)) );
+ connect(getTextView(), TQT_SIGNAL(textPasted(bool)), channelInput, TQT_SLOT(paste(bool)));
+ connect(getTextView(),TQT_SIGNAL (gotFocus()),channelInput,TQT_SLOT (setFocus()) );
+ connect(getTextView(),TQT_SIGNAL (sendFile()),this,TQT_SLOT (sendFileMenu()) );
+ connect(getTextView(),TQT_SIGNAL (autoText(const TQString&)),this,TQT_SLOT (sendChannelText(const TQString&)) );
- connect(nicknameListView,SIGNAL (popupCommand(int)),this,SLOT (popupCommand(int)) );
- connect(nicknameListView,SIGNAL (doubleClicked(QListViewItem*)),this,SLOT (doubleClickCommand(QListViewItem*)) );
- connect(nicknameListView,SIGNAL (dropped(QDropEvent*,QListViewItem*)),this,SLOT (filesDropped(QDropEvent*)) );
- connect(nicknameCombobox,SIGNAL (activated(int)),this,SLOT(nicknameComboboxChanged()));
+ connect(nicknameListView,TQT_SIGNAL (popupCommand(int)),this,TQT_SLOT (popupCommand(int)) );
+ connect(nicknameListView,TQT_SIGNAL (doubleClicked(TQListViewItem*)),this,TQT_SLOT (doubleClickCommand(TQListViewItem*)) );
+ connect(nicknameListView,TQT_SIGNAL (dropped(TQDropEvent*,TQListViewItem*)),this,TQT_SLOT (filesDropped(TQDropEvent*)) );
+ connect(nicknameCombobox,TQT_SIGNAL (activated(int)),this,TQT_SLOT(nicknameComboboxChanged()));
if(nicknameCombobox->lineEdit())
- connect(nicknameCombobox->lineEdit(), SIGNAL (lostFocus()),this,SLOT(nicknameComboboxChanged()));
+ connect(nicknameCombobox->lineEdit(), TQT_SIGNAL (lostFocus()),this,TQT_SLOT(nicknameComboboxChanged()));
nicknameList.setAutoDelete(true);
setLog(Preferences::log());
- connect(&userhostTimer,SIGNAL (timeout()),this,SLOT (autoUserhost()));
+ connect(&userhostTimer,TQT_SIGNAL (timeout()),this,TQT_SLOT (autoUserhost()));
// every few seconds try to get more userhosts
userhostTimer.start(10000);
- connect(&m_whoTimer,SIGNAL (timeout()),this,SLOT (autoWho()));
+ connect(&m_whoTimer,TQT_SIGNAL (timeout()),this,TQT_SLOT (autoWho()));
// every 5 minutes decrease everyone's activity by 1 unit
m_fadeActivityTimer.start(5*60*1000);
- connect(&m_fadeActivityTimer, SIGNAL(timeout()), this, SLOT(fadeActivity()));
+ connect(&m_fadeActivityTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(fadeActivity()));
// re-schedule when the settings were changed
- connect(Preferences::self(), SIGNAL (autoContinuousWhoChanged()),this,SLOT (scheduleAutoWho()));
+ connect(Preferences::self(), TQT_SIGNAL (autoContinuousWhoChanged()),this,TQT_SLOT (scheduleAutoWho()));
updateAppearance();
//FIXME JOHNFLUX
- // connect( Konversation::Addressbook::self()->getAddressBook(), SIGNAL( addressBookChanged( AddressBook * ) ), this, SLOT( slotLoadAddressees() ) );
- // connect( Konversation::Addressbook::self(), SIGNAL(addresseesChanged()), this, SLOT(slotLoadAddressees()));
+ // connect( Konversation::Addressbook::self()->getAddressBook(), TQT_SIGNAL( addressBookChanged( AddressBook * ) ), this, TQT_SLOT( slotLoadAddressees() ) );
+ // connect( Konversation::Addressbook::self(), TQT_SIGNAL(addresseesChanged()), this, TQT_SLOT(slotLoadAddressees()));
}
//FIXME there is some logic in setLogfileName that needs to be split out and called here if the server display name gets changed
void Channel::setServer(Server* server)
{
if (m_server != server)
- connect(server, SIGNAL(connectionStateChanged(Server*, Konversation::ConnectionState)),
- SLOT(connectionStateChanged(Server*, Konversation::ConnectionState)));
+ connect(server, TQT_SIGNAL(connectionStateChanged(Server*, Konversation::ConnectionState)),
+ TQT_SLOT(connectionStateChanged(Server*, Konversation::ConnectionState)));
ChatWindow::setServer(server);
if (server->getKeyForRecipient(getName()))
blowfishLabel->show();
@@ -347,14 +347,14 @@ void Channel::setEncryptedOutput(bool e)
if (e) {
blowfishLabel->show();
//scan the channel topic and decrypt it if necessary
- QString topic(m_topicHistory[0].section(' ',2));
+ TQString topic(m_topicHistory[0].section(' ',2));
//prepend two colons to make it appear to be an irc message for decryption,
// \r because it won't decrypt without it, even though the message did not have a \r
// when encrypted. Bring on the QCA!
- QCString cipher="::"+topic.utf8()+'\x0d';
+ TQCString cipher="::"+topic.utf8()+'\x0d';
Konversation::decryptTopic(getName(), cipher, m_server);
- topic=QString::fromUtf8(cipher.data()+2, cipher.length()-2);
+ topic=TQString::fromUtf8(cipher.data()+2, cipher.length()-2);
m_topicHistory[0] = m_topicHistory[0].section(' ', 0, 1) + ' ' + topic;
topicLine->setText(topic);
emit topicHistoryChanged();
@@ -396,7 +396,7 @@ ChannelNickPtr Channel::getOwnChannelNick()
return m_ownChannelNick;
}
-ChannelNickPtr Channel::getChannelNick(const QString &ircnick)
+ChannelNickPtr Channel::getChannelNick(const TQString &ircnick)
{
return m_server->getChannelNick(getName(), ircnick);
}
@@ -421,25 +421,25 @@ void Channel::showOptionsDialog()
m_optionsDialog->show();
}
-void Channel::filesDropped(QDropEvent* e)
+void Channel::filesDropped(TQDropEvent* e)
{
- QPoint p(nicknameListView->contentsToViewport(e->pos()));
+ TQPoint p(nicknameListView->contentsToViewport(e->pos()));
Nick* it = dynamic_cast<Nick*>(nicknameListView->itemAt(p));
if (!it) return;
- QStrList uris;
- if (QUriDrag::decode(e,uris))
+ TQStrList uris;
+ if (TQUriDrag::decode(e,uris))
m_server->sendURIs(uris, it->getChannelNick()->getNickname());
}
-void Channel::textPasted(const QString& text)
+void Channel::textPasted(const TQString& text)
{
if(m_server)
{
- QStringList multiline=QStringList::split('\n',text);
+ TQStringList multiline=TQStringList::split('\n',text);
for(unsigned int index=0;index<multiline.count();index++)
{
- QString line=multiline[index];
- QString cChar(Preferences::commandChar());
+ TQString line=multiline[index];
+ TQString cChar(Preferences::commandChar());
// make sure that lines starting with command char get escaped
if(line.startsWith(cChar)) line=cChar+line;
sendChannelText(line);
@@ -459,12 +459,12 @@ void Channel::popupChannelCommand(int id)
// Will be connected to NickListView::popupCommand(int)
void Channel::popupCommand(int id)
{
- QString pattern;
- QString cc = Preferences::commandChar();
- QString args;
- QString question;
+ TQString pattern;
+ TQString cc = Preferences::commandChar();
+ TQString args;
+ TQString question;
bool raw=false;
- QStringList nickList = getSelectedNickList();
+ TQStringList nickList = getSelectedNickList();
switch(id)
{
@@ -568,8 +568,8 @@ void Channel::popupCommand(int id)
break;
case Konversation::Ping:
{
- unsigned int time_t = QDateTime::currentDateTime().toTime_t();
- pattern=QString(cc+"CTCP %u PING %1").arg(time_t);
+ unsigned int time_t = TQDateTime::currentDateTime().toTime_t();
+ pattern=TQString(cc+"CTCP %u PING %1").arg(time_t);
}
break;
case Konversation::Kick:
@@ -626,9 +626,9 @@ void Channel::popupCommand(int id)
break;
case Konversation::UnignoreNick:
{
- QStringList selectedIgnoredNicks;
+ TQStringList selectedIgnoredNicks;
- for (QStringList::Iterator it=nickList.begin(); it!=nickList.end(); ++it)
+ for (TQStringList::Iterator it=nickList.begin(); it!=nickList.end(); ++it)
{
if (Preferences::isIgnored((*it)))
selectedIgnoredNicks.append((*it));
@@ -649,7 +649,7 @@ void Channel::popupCommand(int id)
{
if (m_server->getServerGroup())
{
- for (QStringList::Iterator it=nickList.begin(); it!=nickList.end(); ++it)
+ for (TQStringList::Iterator it=nickList.begin(); it!=nickList.end(); ++it)
{
if (!Preferences::isNotify(m_server->getServerGroup()->id(), (*it)))
Preferences::addNotify(m_server->getServerGroup()->id(), (*it));
@@ -663,13 +663,13 @@ void Channel::popupCommand(int id)
{
pattern.replace("%c",getName());
- QString command;
+ TQString command;
if (pattern.contains("%l"))
{
- QStringList list;
+ TQStringList list;
- for (QStringList::Iterator it=nickList.begin(); it!=nickList.end(); ++it)
+ for (TQStringList::Iterator it=nickList.begin(); it!=nickList.end(); ++it)
list.append((*it));
command = pattern.replace("%l", list.join(" "));
@@ -681,9 +681,9 @@ void Channel::popupCommand(int id)
}
else
{
- QStringList patternList = QStringList::split('\n',pattern);
+ TQStringList patternList = TQStringList::split('\n',pattern);
- for (QStringList::Iterator it=nickList.begin(); it!=nickList.end(); ++it)
+ for (TQStringList::Iterator it=nickList.begin(); it!=nickList.end(); ++it)
{
for (unsigned int index = 0; index<patternList.count(); index++)
{
@@ -701,7 +701,7 @@ void Channel::popupCommand(int id)
}
// Will be connected to NickListView::doubleClicked()
-void Channel::doubleClickCommand(QListViewItem* item)
+void Channel::doubleClickCommand(TQListViewItem* item)
{
if(item)
{
@@ -719,8 +719,8 @@ void Channel::completeNick()
channelInput->getCursorPosition(&oldPos,&pos);// oldPos is a dummy here, taking the paragraph parameter
oldPos = channelInput->getOldCursorPosition();
- QString line=channelInput->text();
- QString newLine;
+ TQString line=channelInput->text();
+ TQString newLine;
// Check if completion position is out of range
if(completionPosition >= nicknameList.count()) completionPosition = 0;
@@ -736,7 +736,7 @@ void Channel::completeNick()
// If the cursor is at beginning of line, insert last completion
if(pos == 0 && !channelInput->lastCompletion().isEmpty())
{
- QString addStart(Preferences::nickCompleteSuffixStart());
+ TQString addStart(Preferences::nickCompleteSuffixStart());
newLine = channelInput->lastCompletion() + addStart;
// New cursor position is behind nickname
pos = newLine.length();
@@ -752,7 +752,7 @@ void Channel::completeNick()
// step back to last space or start of line
while(pos && line[pos-1] != ' ') pos--;
// copy search pattern (lowercase)
- QString pattern = line.mid(pos, oldPos - pos);
+ TQString pattern = line.mid(pos, oldPos - pos);
// copy line to newLine-buffer
newLine = line;
@@ -760,13 +760,13 @@ void Channel::completeNick()
if(!pattern.isEmpty())
{
bool complete = false;
- QString foundNick;
+ TQString foundNick;
// try to find matching nickname in list of names
if(Preferences::nickCompletionMode() == 1 ||
Preferences::nickCompletionMode() == 2)
{ // Shell like completion
- QStringList found;
+ TQStringList found;
foundNick = nicknameList.completeNick(pattern, complete, found,
(Preferences::nickCompletionMode() == 2),
Preferences::nickCompletionCaseSensitive());
@@ -775,7 +775,7 @@ void Channel::completeNick()
{
if(Preferences::nickCompletionMode() == 1)
{
- QString nicksFound = found.join(" ");
+ TQString nicksFound = found.join(" ");
appendServerMessage(i18n("Completion"), i18n("Possible completions: %1.").arg(nicksFound));
}
else
@@ -787,7 +787,7 @@ void Channel::completeNick()
else if(Preferences::nickCompletionMode() == 0)
{
if(mode == '\0') {
- QPtrListIterator<Nick> it(nicknameList);
+ TQPtrListIterator<Nick> it(nicknameList);
uint timeStamp = 0;
int listPosition = 0;
Nick* nick = 0;
@@ -811,11 +811,11 @@ void Channel::completeNick()
// remember old nick completion position
unsigned int oldCompletionPosition = completionPosition;
complete = true;
- QString prefixCharacter = Preferences::prefixCharacter();
+ TQString prefixCharacter = Preferences::prefixCharacter();
do
{
- QString lookNick = nicknameList.at(completionPosition)->getChannelNick()->getNickname();
+ TQString lookNick = nicknameList.at(completionPosition)->getChannelNick()->getNickname();
if(!prefixCharacter.isEmpty() && lookNick.contains(prefixCharacter))
{
@@ -854,7 +854,7 @@ void Channel::completeNick()
if(pos && complete)
{
channelInput->setLastCompletion(foundNick);
- QString addMiddle = Preferences::nickCompleteSuffixMiddle();
+ TQString addMiddle = Preferences::nickCompleteSuffixMiddle();
newLine.insert(pos, foundNick + addMiddle);
pos = pos + foundNick.length() + addMiddle.length();
}
@@ -862,7 +862,7 @@ void Channel::completeNick()
else if(complete)
{
channelInput->setLastCompletion(foundNick);
- QString addStart = Preferences::nickCompleteSuffixStart();
+ TQString addStart = Preferences::nickCompleteSuffixStart();
newLine.insert(pos, foundNick + addStart);
pos = pos + foundNick.length() + addStart.length();
}
@@ -891,7 +891,7 @@ void Channel::endCompleteNick()
else completionPosition=nicknameList.count()-1;
}
-void Channel::setName(const QString& newName)
+void Channel::setName(const TQString& newName)
{
ChatWindow::setName(newName);
setLogfileName(newName.lower());
@@ -915,13 +915,13 @@ void Channel::setAutoJoin(bool autojoin)
{
Konversation::ChannelSettings before;
- QPtrList<Channel> channelList = m_server->getChannelList();
+ TQPtrList<Channel> channelList = m_server->getChannelList();
if (channelList.count() > 1)
{
- QPtrListIterator<Channel> it(channelList);
+ TQPtrListIterator<Channel> it(channelList);
Channel* channel;
- QMap<int, Channel*> channelMap;
+ TQMap<int, Channel*> channelMap;
int index = -1;
int ownIndex = m_server->getViewContainer()->getViewIndex(this);
@@ -937,7 +937,7 @@ void Channel::setAutoJoin(bool autojoin)
if (channelMap.count())
{
- QMap<int, Channel*>::Iterator it2;
+ TQMap<int, Channel*>::Iterator it2;
for (it2 = channelMap.begin(); it2 != channelMap.end(); ++it2)
{
@@ -965,11 +965,11 @@ void Channel::setAutoJoin(bool autojoin)
-QString Channel::getPassword()
+TQString Channel::getPassword()
{
- QString password;
+ TQString password;
- for (QStringList::const_iterator it = m_modeList.begin(); it != m_modeList.end(); ++it)
+ for (TQStringList::const_iterator it = m_modeList.begin(); it != m_modeList.end(); ++it)
{
if ((*it)[0] == 'k') password = (*it).mid(1);
}
@@ -995,7 +995,7 @@ void Channel::sendFileMenu()
void Channel::channelTextEntered()
{
- QString line = channelInput->text();
+ TQString line = channelInput->text();
channelInput->setText ("");
if(line.lower().stripWhiteSpace() == Preferences::commandChar()+"clear")
@@ -1015,8 +1015,8 @@ void Channel::channelTextEntered()
void Channel::channelPassthroughCommand()
{
- QString commandChar = Preferences::commandChar();
- QString line = channelInput->text();
+ TQString commandChar = Preferences::commandChar();
+ TQString line = channelInput->text();
channelInput->setText("");
@@ -1031,22 +1031,22 @@ void Channel::channelPassthroughCommand()
}
}
-void Channel::sendChannelText(const QString& sendLine)
+void Channel::sendChannelText(const TQString& sendLine)
{
// create a work copy
- QString outputAll(sendLine);
+ TQString outputAll(sendLine);
// replace aliases and wildcards
if(m_server->getOutputFilter()->replaceAliases(outputAll))
{
outputAll = m_server->parseWildcards(outputAll,m_server->getNickname(),getName(),getPassword(),
- getSelectedNickList(),QString());
+ getSelectedNickList(),TQString());
}
// Send all strings, one after another
- QStringList outList=QStringList::split(QRegExp("[\r\n]+"),outputAll);
+ TQStringList outList=TQStringList::split(TQRegExp("[\r\n]+"),outputAll);
for(unsigned int index=0;index<outList.count();index++)
{
- QString output(outList[index]);
+ TQString output(outList[index]);
// encoding stuff is done in Server()
Konversation::OutputFilterResult result = m_server->getOutputFilter()->parse(m_server->getNickname(),output,getName());
@@ -1063,7 +1063,7 @@ void Channel::sendChannelText(const QString& sendLine)
else if (result.outputList.count())
{
Q_ASSERT(result.type==Konversation::Message);
- for ( QStringList::Iterator it = result.outputList.begin(); it != result.outputList.end(); ++it )
+ for ( TQStringList::Iterator it = result.outputList.begin(); it != result.outputList.end(); ++it )
{
append(m_server->getNickname(), *it);
}
@@ -1080,14 +1080,14 @@ void Channel::sendChannelText(const QString& sendLine)
} // for
}
-void Channel::setNickname(const QString& newNickname)
+void Channel::setNickname(const TQString& newNickname)
{
nicknameCombobox->setCurrentText(newNickname);
}
-QStringList Channel::getSelectedNickList()
+TQStringList Channel::getSelectedNickList()
{
- QStringList result;
+ TQStringList result;
if (channelCommand)
result.append(textView->getContextNick());
@@ -1140,14 +1140,14 @@ void Channel::channelLimitChanged()
void Channel::modeButtonClicked(int id, bool on)
{
char mode[]={'t','n','s','i','p','m','k','l'};
- QString command("MODE %1 %2%3 %4");
- QString args = getPassword();
+ TQString command("MODE %1 %2%3 %4");
+ TQString args = getPassword();
if (mode[id] == 'k')
{
if (args.isEmpty())
{
- QCString newPassword;
+ TQCString newPassword;
int result = KPasswordDialog::getPassword(newPassword, i18n("Channel Password"));
@@ -1177,10 +1177,10 @@ void Channel::modeButtonClicked(int id, bool on)
m_server->queue(command.arg(getName()).arg((on) ? "+" : "-").arg(mode[id]).arg(args));
}
-void Channel::quickButtonClicked(const QString &buttonText)
+void Channel::quickButtonClicked(const TQString &buttonText)
{
// parse wildcards (toParse,nickname,channelName,nickList,queryName,parameter)
- QString out=m_server->parseWildcards(buttonText,m_server->getNickname(),getName(),getPassword(),getSelectedNickList(),QString());
+ TQString out=m_server->parseWildcards(buttonText,m_server->getNickname(),getName(),getPassword(),getSelectedNickList(),TQString());
// are there any newlines in the definition?
if(out.find('\n')!=-1)
@@ -1193,11 +1193,11 @@ void Channel::quickButtonClicked(const QString &buttonText)
void Channel::addNickname(ChannelNickPtr channelnick)
{
- QString nickname = channelnick->loweredNickname();
+ TQString nickname = channelnick->loweredNickname();
Nick* nick=0;
Nick* lookNick;
- QPtrListIterator<Nick> it(nicknameList);
+ TQPtrListIterator<Nick> it(nicknameList);
while((lookNick = it.current()) != 0)
{
@@ -1238,11 +1238,11 @@ void Channel::fastAddNickname(ChannelNickPtr channelnick)
nicknameList.append(nick);
}
-void Channel::nickRenamed(const QString &oldNick, const NickInfo& nickInfo)
+void Channel::nickRenamed(const TQString &oldNick, const NickInfo& nickInfo)
{
/* Did we change our nick name? */
- QString newNick = nickInfo.getNickname();
+ TQString newNick = nickInfo.getNickname();
if(newNick == m_server->getNickname()) /* Check newNick because m_server->getNickname() is already updated to new nick */
{
@@ -1268,7 +1268,7 @@ void Channel::joinNickname(ChannelNickPtr channelNick)
appendCommandMessage(i18n("Join"),i18n("%1 is the channel and %2 is our hostmask",
"You have joined the channel %1 (%2).").arg(getName()).arg(channelNick->getHostmask()),false, false, true);
m_ownChannelNick = channelNick;
- connect(m_ownChannelNick, SIGNAL(channelNickChanged()), SLOT(refreshModeButtons()));
+ connect(m_ownChannelNick, TQT_SIGNAL(channelNickChanged()), TQT_SLOT(refreshModeButtons()));
refreshModeButtons();
setActive(true);
@@ -1280,22 +1280,22 @@ void Channel::joinNickname(ChannelNickPtr channelNick)
}
else
{
- QString nick = channelNick->getNickname();
- QString hostname = channelNick->getHostmask();
+ TQString nick = channelNick->getNickname();
+ TQString hostname = channelNick->getHostmask();
appendCommandMessage(i18n("Join"), i18n("%1 is the nick joining and %2 the hostmask of that nick",
"%1 has joined this channel (%2).").arg(nick).arg(hostname),false, false);
addNickname(channelNick);
}
}
-void Channel::removeNick(ChannelNickPtr channelNick, const QString &reason, bool quit)
+void Channel::removeNick(ChannelNickPtr channelNick, const TQString &reason, bool quit)
{
- QString displayReason = reason;
+ TQString displayReason = reason;
if(!displayReason.isEmpty())
{
// if the reason contains text markup characters, play it safe and reset all
- if(displayReason.find(QRegExp("[\\0000-\\0037]")) != -1)
+ if(displayReason.find(TQRegExp("[\\0000-\\0037]")) != -1)
displayReason += "\017";
}
@@ -1359,14 +1359,14 @@ void Channel::removeNick(ChannelNickPtr channelNick, const QString &reason, bool
}
}
-void Channel::kickNick(ChannelNickPtr channelNick, const QString &kicker, const QString &reason)
+void Channel::kickNick(ChannelNickPtr channelNick, const TQString &kicker, const TQString &reason)
{
- QString displayReason = reason;
+ TQString displayReason = reason;
if(!displayReason.isEmpty())
{
// if the reason contains text markup characters, play it safe and reset all
- if(displayReason.find(QRegExp("[\\0000-\\0037]")) != -1)
+ if(displayReason.find(TQRegExp("[\\0000-\\0037]")) != -1)
displayReason += "\017";
}
@@ -1450,10 +1450,10 @@ void Channel::kickNick(ChannelNickPtr channelNick, const QString &kicker, const
}
}
-Nick* Channel::getNickByName(const QString &lookname)
+Nick* Channel::getNickByName(const TQString &lookname)
{
- QString lcLookname = lookname.lower();
- QPtrListIterator<Nick> it(nicknameList);
+ TQString lcLookname = lookname.lower();
+ TQPtrListIterator<Nick> it(nicknameList);
while(it.current() != 0)
{
@@ -1502,17 +1502,17 @@ void Channel::adjustOps(int value)
void Channel::emitUpdateInfo()
{
- QString info = getName() + " - ";
+ TQString info = getName() + " - ";
info += i18n("%n nick", "%n nicks", numberOfNicks());
info += i18n(" (%n op)", " (%n ops)", numberOfOps());
emit updateInfo(info);
}
-void Channel::setTopic(const QString &newTopic)
+void Channel::setTopic(const TQString &newTopic)
{
appendCommandMessage(i18n("Topic"), i18n("The channel topic is \"%1\".").arg(newTopic));
- QString topic = Konversation::removeIrcMarkup(newTopic);
+ TQString topic = Konversation::removeIrcMarkup(newTopic);
topicLine->setText(topic);
topicAuthorUnknown=true; // if we only get called with a topic, it was a 332, which usually has a 333 next
@@ -1521,12 +1521,12 @@ void Channel::setTopic(const QString &newTopic)
if(m_topicHistory.first().section(' ', 2) != newTopic)
{
- m_topicHistory.prepend(QString("%1 "+i18n("unknown")+" %2").arg(QDateTime::currentDateTime().toTime_t()).arg(newTopic));
+ m_topicHistory.prepend(TQString("%1 "+i18n("unknown")+" %2").arg(TQDateTime::currentDateTime().toTime_t()).arg(newTopic));
emit topicHistoryChanged();
}
}
-void Channel::setTopic(const QString &nickname, const QString &newTopic) // Overloaded
+void Channel::setTopic(const TQString &nickname, const TQString &newTopic) // Overloaded
{
if(nickname == m_server->getNickname())
{
@@ -1537,43 +1537,43 @@ void Channel::setTopic(const QString &nickname, const QString &newTopic) // Over
appendCommandMessage(i18n("Topic"), i18n("%1 sets the channel topic to \"%2\".").arg(nickname).arg(newTopic));
}
- m_topicHistory.prepend(QString("%1 %2 %3").arg(QDateTime::currentDateTime().toTime_t()).arg(nickname).arg(newTopic));
- QString topic = Konversation::removeIrcMarkup(newTopic);
+ m_topicHistory.prepend(TQString("%1 %2 %3").arg(TQDateTime::currentDateTime().toTime_t()).arg(nickname).arg(newTopic));
+ TQString topic = Konversation::removeIrcMarkup(newTopic);
topicLine->setText(topic);
emit topicHistoryChanged();
}
-QStringList Channel::getTopicHistory()
+TQStringList Channel::getTopicHistory()
{
return m_topicHistory;
}
-QString Channel::getTopic()
+TQString Channel::getTopic()
{
return m_topicHistory[0];
}
-void Channel::setTopicAuthor(const QString& newAuthor, QDateTime time)
+void Channel::setTopicAuthor(const TQString& newAuthor, TQDateTime time)
{
if (time.isNull() || !time.isValid())
- time=QDateTime::currentDateTime();
+ time=TQDateTime::currentDateTime();
if(topicAuthorUnknown)
{
- m_topicHistory[0] = QString("%1").arg(time.toTime_t()) + ' ' + newAuthor + ' ' + m_topicHistory[0].section(' ', 2);
+ m_topicHistory[0] = TQString("%1").arg(time.toTime_t()) + ' ' + newAuthor + ' ' + m_topicHistory[0].section(' ', 2);
topicAuthorUnknown = false;
emit topicHistoryChanged();
}
}
-void Channel::updateMode(const QString& sourceNick, char mode, bool plus, const QString &parameter)
+void Channel::updateMode(const TQString& sourceNick, char mode, bool plus, const TQString &parameter)
{
//Note for future expansion: doing m_server->getChannelNick(getName(), sourceNick); may not return a valid channelNickPtr if the
//mode is updated by the server.
- QString message;
+ TQString message;
ChannelNickPtr parameterChannelNick=m_server->getChannelNick(getName(), parameter);
bool fromMe=false;
@@ -2000,10 +2000,10 @@ void Channel::updateMode(const QString& sourceNick, char mode, bool plus, const
void Channel::clearModeList()
{
- QString k;
+ TQString k;
// Keep channel password in the backing store, for rejoins.
- for (QStringList::const_iterator it = m_modeList.begin(); it != m_modeList.end(); ++it)
+ for (TQStringList::const_iterator it = m_modeList.begin(); it != m_modeList.end(); ++it)
{
if ((*it)[0] == 'k') k = (*it);
}
@@ -2041,7 +2041,7 @@ void Channel::clearModeList()
emit modesChanged();
}
-void Channel::updateModeWidgets(char mode, bool plus, const QString &parameter)
+void Channel::updateModeWidgets(char mode, bool plus, const TQString &parameter)
{
ModeButton* widget=0;
@@ -2063,13 +2063,13 @@ void Channel::updateModeWidgets(char mode, bool plus, const QString &parameter)
if(plus)
{
- m_modeList.append(QString(mode + parameter));
+ m_modeList.append(TQString(mode + parameter));
}
else
{
- QStringList removable = m_modeList.grep(QRegExp(QString("^%1.*").arg(mode)));
+ TQStringList removable = m_modeList.grep(TQRegExp(TQString("^%1.*").arg(mode)));
- for(QStringList::iterator it = removable.begin(); it != removable.end(); ++it)
+ for(TQStringList::iterator it = removable.begin(); it != removable.end(); ++it)
{
m_modeList.remove(m_modeList.find((*it)));
}
@@ -2077,14 +2077,14 @@ void Channel::updateModeWidgets(char mode, bool plus, const QString &parameter)
emit modesChanged();
}
-void Channel::updateQuickButtons(const QStringList &newButtonList)
+void Channel::updateQuickButtons(const TQStringList &newButtonList)
{
// remove quick buttons from memory and GUI
while(buttonList.count())
{
QuickButton* button=buttonList.at(0);
// remove tool tips as well
- QToolTip::remove(button);
+ TQToolTip::remove(button);
buttonList.remove(button);
delete button;
}
@@ -2092,21 +2092,21 @@ void Channel::updateQuickButtons(const QStringList &newButtonList)
if(buttonsGrid)delete buttonsGrid;
// the grid that holds the quick action buttons
- buttonsGrid = new QGrid(2, nickListButtons);
+ buttonsGrid = new TQGrid(2, nickListButtons);
// add new quick buttons
for(unsigned int index=0;index<newButtonList.count();index++)
{
// generate empty buttons first, text will be added later
- QuickButton* quickButton = new QuickButton(QString(), QString(), buttonsGrid);
+ QuickButton* quickButton = new QuickButton(TQString(), TQString(), buttonsGrid);
buttonList.append(quickButton);
- connect(quickButton, SIGNAL(clicked(const QString &)), this, SLOT(quickButtonClicked(const QString &)));
+ connect(quickButton, TQT_SIGNAL(clicked(const TQString &)), this, TQT_SLOT(quickButtonClicked(const TQString &)));
// Get the button definition
- QString buttonText=newButtonList[index];
+ TQString buttonText=newButtonList[index];
// Extract button label
- QString buttonLabel=buttonText.section(',',0,0);
+ TQString buttonLabel=buttonText.section(',',0,0);
// Extract button definition
buttonText=buttonText.section(',',1);
@@ -2114,11 +2114,11 @@ void Channel::updateQuickButtons(const QStringList &newButtonList)
quickButton->setDefinition(buttonText);
// Add tool tips
- QString toolTip=buttonText.replace("&","&amp;").
+ TQString toolTip=buttonText.replace("&","&amp;").
replace("<","&lt;").
replace(">","&gt;");
- QToolTip::add(quickButton,toolTip);
+ TQToolTip::add(quickButton,toolTip);
quickButton->show();
} // for
@@ -2193,7 +2193,7 @@ void Channel::indicateAway(bool show)
}
}
-void Channel::showEvent(QShowEvent*)
+void Channel::showEvent(TQShowEvent*)
{
// If the show quick/mode button settings have changed, apply the changes now
if(quickButtonsChanged)
@@ -2219,8 +2219,8 @@ void Channel::showEvent(QShowEvent*)
void Channel::syncSplitters()
{
- QValueList<int> vertSizes = Preferences::topicSplitterSizes();
- QValueList<int> horizSizes = Preferences::channelSplitterSizes();
+ TQValueList<int> vertSizes = Preferences::topicSplitterSizes();
+ TQValueList<int> horizSizes = Preferences::channelSplitterSizes();
if (vertSizes.isEmpty())
{
@@ -2243,7 +2243,7 @@ void Channel::syncSplitters()
void Channel::updateAppearance()
{
- QColor fg,bg,abg;
+ TQColor fg,bg,abg;
if(Preferences::inputFieldsBackgroundColor())
{
@@ -2276,7 +2276,7 @@ void Channel::updateAppearance()
else
{
getTextView()->setViewBackground(Preferences::color(Preferences::TextViewBackground),
- QString());
+ TQString());
}
if (Preferences::customTextFont())
@@ -2322,7 +2322,7 @@ void Channel::updateAppearance()
void Channel::nicknameComboboxChanged()
{
- QString newNick=nicknameCombobox->currentText();
+ TQString newNick=nicknameCombobox->currentText();
oldNick=m_server->getNickname();
if(oldNick!=newNick)
{
@@ -2333,7 +2333,7 @@ void Channel::nicknameComboboxChanged()
}
}
-void Channel::changeNickname(const QString& newNickname)
+void Channel::changeNickname(const TQString& newNickname)
{
if (!newNickname.isEmpty())
m_server->queue("NICK "+newNickname);
@@ -2345,15 +2345,15 @@ void Channel::resetNickList()
purgeNicks();
}
-void Channel::addPendingNickList(const QStringList& pendingChannelNickList)
+void Channel::addPendingNickList(const TQStringList& pendingChannelNickList)
{
if(pendingChannelNickList.isEmpty())
return;
if (!m_processingTimer)
{
- m_processingTimer = new QTimer(this);
- connect(m_processingTimer, SIGNAL(timeout()), this, SLOT(processPendingNicks()));
+ m_processingTimer = new TQTimer(this);
+ connect(m_processingTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(processPendingNicks()));
}
m_pendingChannelNickLists.append(pendingChannelNickList);
@@ -2390,17 +2390,17 @@ void Channel::refreshModeButtons()
limit->setEnabled(enable);
// Tooltips for the ModeButtons
- QString opOnly;
+ TQString opOnly;
if(!enable) opOnly = i18n("You have to be an operator to change this.");
- QToolTip::add(modeT, i18n("Topic can be changed by channel operator only. %1").arg(opOnly));
- QToolTip::add(modeN, i18n("No messages to channel from clients on the outside. %1").arg(opOnly));
- QToolTip::add(modeS, i18n("Secret channel. %1").arg(opOnly));
- QToolTip::add(modeI, i18n("Invite only channel. %1").arg(opOnly));
- QToolTip::add(modeP, i18n("Private channel. %1").arg(opOnly));
- QToolTip::add(modeM, i18n("Moderated channel. %1").arg(opOnly));
- QToolTip::add(modeK, i18n("Protect channel with a password."));
- QToolTip::add(modeL, i18n("Set user limit to channel."));
+ TQToolTip::add(modeT, i18n("Topic can be changed by channel operator only. %1").arg(opOnly));
+ TQToolTip::add(modeN, i18n("No messages to channel from clients on the outside. %1").arg(opOnly));
+ TQToolTip::add(modeS, i18n("Secret channel. %1").arg(opOnly));
+ TQToolTip::add(modeI, i18n("Invite only channel. %1").arg(opOnly));
+ TQToolTip::add(modeP, i18n("Private channel. %1").arg(opOnly));
+ TQToolTip::add(modeM, i18n("Moderated channel. %1").arg(opOnly));
+ TQToolTip::add(modeK, i18n("Protect channel with a password."));
+ TQToolTip::add(modeL, i18n("Set user limit to channel."));
}
@@ -2416,9 +2416,9 @@ void Channel::autoUserhost()
{
int limit = 5;
- QString nickString;
- QPtrList<Nick> nickList = getNickList();
- QPtrListIterator<Nick> it(nickList);
+ TQString nickString;
+ TQPtrList<Nick> nickList = getNickList();
+ TQPtrListIterator<Nick> it(nickList);
Nick* nick;
while((nick = it.current()) != 0)
@@ -2441,7 +2441,7 @@ void Channel::setAutoUserhost(bool state)
if(state)
{
// we can't have automatic resizing with three columns; the hostname column is too wide
- nicknameListView->setHScrollBarMode(QScrollView::Auto);
+ nicknameListView->setHScrollBarMode(TQScrollView::Auto);
// restart userhost timer
userhostTimer.start(10000);
@@ -2449,12 +2449,12 @@ void Channel::setAutoUserhost(bool state)
if(nicknameListView->columns()==2)
{
// re-add the hostmask column
- nicknameListView->addColumn(QString());
+ nicknameListView->addColumn(TQString());
nicknameListView->setColumnWidthMode(2,KListView::Maximum);
- nicknameListView->setResizeMode(QListView::NoColumn);
+ nicknameListView->setResizeMode(TQListView::NoColumn);
// re-add already known hostmasks
- QListViewItem* item=nicknameListView->itemAtIndex(0);
+ TQListViewItem* item=nicknameListView->itemAtIndex(0);
while(item)
{
Nick* lookNick=getNickByName(item->text(1));
@@ -2467,9 +2467,9 @@ void Channel::setAutoUserhost(bool state)
{
userhostTimer.stop();
if(nicknameListView->columns()==3) nicknameListView->removeColumn(2);
- nicknameListView->setHScrollBarMode(QScrollView::AlwaysOff);
+ nicknameListView->setHScrollBarMode(TQScrollView::AlwaysOff);
// make the nick column resize itself automatically to prevent horizontal scrollbar
- nicknameListView->setResizeMode(QListView::LastColumn);
+ nicknameListView->setResizeMode(TQListView::LastColumn);
}
}
@@ -2496,7 +2496,7 @@ void Channel::autoWho()
void Channel::fadeActivity()
{
- QPtrListIterator<Nick> it( nicknameList );
+ TQPtrListIterator<Nick> it( nicknameList );
Nick *nick;
while ( (nick = it.current()) != 0 ) {
++it;
@@ -2504,7 +2504,7 @@ void Channel::fadeActivity()
}
}
-QString Channel::getTextInLine()
+TQString Channel::getTextInLine()
{
return channelInput->text();
}
@@ -2519,7 +2519,7 @@ bool Channel::searchView()
return true;
}
-void Channel::appendInputText(const QString& s, bool fromCursor)
+void Channel::appendInputText(const TQString& s, bool fromCursor)
{
if(!fromCursor)
{
@@ -2570,7 +2570,7 @@ void Channel::setActive(bool active)
purgeNicks();
getTextView()->setNickAndChannelContextMenusEnabled(false);
nicknameCombobox->setEnabled(false);
- topicLine->setText(QString::null);
+ topicLine->setText(TQString::null);
clearModeList();
clearBanList();
}
@@ -2600,7 +2600,7 @@ void Channel::showTopic(bool show)
void Channel::processPendingNicks()
{
- QString nickname = m_pendingChannelNickLists.first()[m_currentIndex];
+ TQString nickname = m_pendingChannelNickLists.first()[m_currentIndex];
bool admin = false;
bool owner = false;
@@ -2656,17 +2656,17 @@ void Channel::processPendingNicks()
}
}
-void Channel::setChannelEncoding(const QString& encoding) // virtual
+void Channel::setChannelEncoding(const TQString& encoding) // virtual
{
Preferences::setChannelEncoding(m_server->getDisplayName(), getName(), encoding);
}
-QString Channel::getChannelEncoding() // virtual
+TQString Channel::getChannelEncoding() // virtual
{
return Preferences::channelEncoding(m_server->getDisplayName(), getName());
}
-QString Channel::getChannelEncodingDefaultDesc() // virtual
+TQString Channel::getChannelEncodingDefaultDesc() // virtual
{
return i18n("Identity Default ( %1 )").arg(getServer()->getIdentity()->getCodecName());
}
@@ -2701,8 +2701,8 @@ void Channel::requestNickListSort()
{
if(!m_delayedSortTimer)
{
- m_delayedSortTimer = new QTimer(this);
- connect(m_delayedSortTimer, SIGNAL(timeout()), this, SLOT(sortNickList()));
+ m_delayedSortTimer = new TQTimer(this);
+ connect(m_delayedSortTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(sortNickList()));
}
if(!m_delayedSortTimer->isActive())
@@ -2731,9 +2731,9 @@ void Channel::setIdentity(const IdentityPtr identity)
}
}
-bool Channel::eventFilter(QObject* watched, QEvent* e)
+bool Channel::eventFilter(TQObject* watched, TQEvent* e)
{
- if((watched == nicknameListView) && (e->type() == QEvent::Resize) && splittersInitialized && isShown())
+ if((watched == nicknameListView) && (e->type() == TQEvent::Resize) && splittersInitialized && isShown())
{
if (!topicSplitterHidden && !channelSplitterHidden)
{
@@ -2753,9 +2753,9 @@ bool Channel::eventFilter(QObject* watched, QEvent* e)
return ChatWindow::eventFilter(watched, e);
}
-void Channel::addBan(const QString& ban)
+void Channel::addBan(const TQString& ban)
{
- for ( QStringList::Iterator it = m_BanList.begin(); it != m_BanList.end(); ++it )
+ for ( TQStringList::Iterator it = m_BanList.begin(); it != m_BanList.end(); ++it )
{
if ((*it).section(' ', 0, 0) == ban.section(' ', 0, 0))
{
@@ -2771,9 +2771,9 @@ void Channel::addBan(const QString& ban)
emit banAdded(ban);
}
-void Channel::removeBan(const QString& ban)
+void Channel::removeBan(const TQString& ban)
{
- for ( QStringList::Iterator it = m_BanList.begin(); it != m_BanList.end(); ++it )
+ for ( TQStringList::Iterator it = m_BanList.begin(); it != m_BanList.end(); ++it )
{
if ((*it).section(' ', 0, 0) == ban)
{
@@ -2791,13 +2791,13 @@ void Channel::clearBanList()
emit banListCleared();
}
-void Channel::append(const QString& nickname, const QString& message)
+void Channel::append(const TQString& nickname, const TQString& message)
{
if(nickname != getServer()->getNickname()) {
Nick* nick = getNickByName(nickname);
if(nick) {
- nick->getChannelNick()->setTimeStamp(QDateTime::currentDateTime().toTime_t());
+ nick->getChannelNick()->setTimeStamp(TQDateTime::currentDateTime().toTime_t());
}
}
@@ -2805,13 +2805,13 @@ void Channel::append(const QString& nickname, const QString& message)
nickActive(nickname);
}
-void Channel::appendAction(const QString& nickname, const QString& message)
+void Channel::appendAction(const TQString& nickname, const TQString& message)
{
if(nickname != getServer()->getNickname()) {
Nick* nick = getNickByName(nickname);
if(nick) {
- nick->getChannelNick()->setTimeStamp(QDateTime::currentDateTime().toTime_t());
+ nick->getChannelNick()->setTimeStamp(TQDateTime::currentDateTime().toTime_t());
}
}
@@ -2819,7 +2819,7 @@ void Channel::appendAction(const QString& nickname, const QString& message)
nickActive(nickname);
}
-void Channel::nickActive(const QString& nickname) //FIXME reported to crash, can't reproduce
+void Channel::nickActive(const TQString& nickname) //FIXME reported to crash, can't reproduce
{
ChannelNickPtr nick=getChannelNick(nickname);
//XXX Would be nice to know why it can be null here...
@@ -2833,7 +2833,7 @@ void Channel::nickActive(const QString& nickname) //FIXME reported to crash, can
// NickList
//
-NickList::NickList() : QPtrList<Nick>()
+NickList::NickList() : TQPtrList<Nick>()
{
m_compareMethod = NickList::AlphaNumeric;
}
@@ -2844,41 +2844,41 @@ void NickList::setCompareMethod(CompareMethod method)
}
//doesn't the following somehow duplicate NickListViewItem::compare()?
-int NickList::compareItems(QPtrCollection::Item item1, QPtrCollection::Item item2)
+int NickList::compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2)
{
if(m_compareMethod == NickList::TimeStamp) {
int returnValue = static_cast<Nick*>(item2)->getChannelNick()->timeStamp() - static_cast<Nick*>(item1)->getChannelNick()->timeStamp();
if(returnValue == 0) {
- returnValue = QString::compare(static_cast<Nick*>(item1)->getChannelNick()->loweredNickname(),
+ returnValue = TQString::compare(static_cast<Nick*>(item1)->getChannelNick()->loweredNickname(),
static_cast<Nick*>(item2)->getChannelNick()->loweredNickname());
}
return returnValue;
}
- return QString::compare(static_cast<Nick*>(item1)->getChannelNick()->loweredNickname(),
+ return TQString::compare(static_cast<Nick*>(item1)->getChannelNick()->loweredNickname(),
static_cast<Nick*>(item2)->getChannelNick()->loweredNickname());
}
-QString NickList::completeNick(const QString& pattern, bool& complete, QStringList& found,
+TQString NickList::completeNick(const TQString& pattern, bool& complete, TQStringList& found,
bool skipNonAlfaNum, bool caseSensitive)
{
found.clear();
- QString prefix = "^";
- QString newNick;
- QString prefixCharacter = Preferences::prefixCharacter();
+ TQString prefix = "^";
+ TQString newNick;
+ TQString prefixCharacter = Preferences::prefixCharacter();
NickList foundNicks;
foundNicks.setCompareMethod(NickList::TimeStamp);
- if((pattern.find(QRegExp("^(\\d|\\w)")) != -1) && skipNonAlfaNum)
+ if((pattern.find(TQRegExp("^(\\d|\\w)")) != -1) && skipNonAlfaNum)
{
prefix = "^([^\\d\\w]|[\\_]){0,}";
}
- QRegExp regexp(prefix + QRegExp::escape(pattern));
+ TQRegExp regexp(prefix + TQRegExp::escape(pattern));
regexp.setCaseSensitive(caseSensitive);
- QPtrListIterator<Nick> it(*this);
+ TQPtrListIterator<Nick> it(*this);
while(it.current() != 0)
{
@@ -2899,7 +2899,7 @@ QString NickList::completeNick(const QString& pattern, bool& complete, QStringLi
foundNicks.sort();
- QPtrListIterator<Nick> it2(foundNicks);
+ TQPtrListIterator<Nick> it2(foundNicks);
while(it2.current() != 0)
{
@@ -2911,14 +2911,14 @@ QString NickList::completeNick(const QString& pattern, bool& complete, QStringLi
{
bool ok = true;
unsigned int patternLength = pattern.length();
- QString firstNick = found[0];
+ TQString firstNick = found[0];
unsigned int firstNickLength = firstNick.length();
unsigned int foundCount = found.count();
while(ok && ((patternLength) < firstNickLength))
{
++patternLength;
- QStringList tmp = found.grep(firstNick.left(patternLength), caseSensitive);
+ TQStringList tmp = found.grep(firstNick.left(patternLength), caseSensitive);
if(tmp.count() != foundCount)
{
@@ -2936,12 +2936,12 @@ QString NickList::completeNick(const QString& pattern, bool& complete, QStringLi
return found[0];
}
- return QString();
+ return TQString();
}
-bool NickList::containsNick(const QString& nickname)
+bool NickList::containsNick(const TQString& nickname)
{
- QPtrListIterator<Nick> it(*this);
+ TQPtrListIterator<Nick> it(*this);
while (it.current() != 0)
{
diff --git a/konversation/src/channel.h b/konversation/src/channel.h
index e04d52b..1fd6ff5 100644
--- a/konversation/src/channel.h
+++ b/konversation/src/channel.h
@@ -19,22 +19,22 @@
#include "channelnick.h"
#include "nick.h"
-#include <qtimer.h>
-#include <qstring.h>
-
-
-class QPushButton;
-class QCheckBox;
-class QLabel;
-class QTimer;
-class QListViewItem;
-class QHBox;
-class QStringList;
-class QSplitter;
-class QGrid;
-class QComboBox;
-class QDropEvent;
-class QToolButton;
+#include <tqtimer.h>
+#include <tqstring.h>
+
+
+class TQPushButton;
+class TQCheckBox;
+class TQLabel;
+class TQTimer;
+class TQListViewItem;
+class TQHBox;
+class TQStringList;
+class TQSplitter;
+class TQGrid;
+class TQComboBox;
+class TQDropEvent;
+class TQToolButton;
class KLineEdit;
@@ -50,22 +50,22 @@ namespace Konversation
class ChannelOptionsDialog;
}
-class NickList : public QPtrList<Nick>
+class NickList : public TQPtrList<Nick>
{
public:
NickList();
enum CompareMethod { AlphaNumeric, TimeStamp };
- QString completeNick(const QString& pattern, bool& complete, QStringList& found,
+ TQString completeNick(const TQString& pattern, bool& complete, TQStringList& found,
bool skipNonAlfaNum, bool caseSensitive);
void setCompareMethod(CompareMethod method);
- bool containsNick(const QString& nickname);
+ bool containsNick(const TQString& nickname);
protected:
- virtual int compareItems(QPtrCollection::Item item1, QPtrCollection::Item item2);
+ virtual int compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2);
private:
CompareMethod m_compareMethod;
@@ -76,24 +76,24 @@ class Channel : public ChatWindow
Q_OBJECT
public:
- explicit Channel(QWidget* parent, QString name);
+ explicit Channel(TQWidget* parent, TQString name);
~Channel();
//META
virtual bool canBeFrontView();
virtual bool searchView();
- virtual void append(const QString& nickname,const QString& message);
- virtual void appendAction(const QString& nickname,const QString& message);
- void nickActive(const QString& nickname);
+ virtual void append(const TQString& nickname,const TQString& message);
+ virtual void appendAction(const TQString& nickname,const TQString& message);
+ void nickActive(const TQString& nickname);
//General administrative stuff
public:
- void setName(const QString& newName);
- QString getPassword();
+ void setName(const TQString& newName);
+ TQString getPassword();
const Konversation::ChannelSettings channelSettings();
- QString getPassword() const;
+ TQString getPassword() const;
virtual void setServer(Server* newServer);
void setIdentity(const IdentityPtr identity);
@@ -105,9 +105,9 @@ class Channel : public ChatWindow
//Unsure of future placement and/or continued existence of these members
int numberOfNicks() const { return nicks; }
int numberOfOps() const { return ops; }
- virtual void setChannelEncoding(const QString& encoding);
- virtual QString getChannelEncoding();
- virtual QString getChannelEncodingDefaultDesc();
+ virtual void setChannelEncoding(const TQString& encoding);
+ virtual TQString getChannelEncoding();
+ virtual TQString getChannelEncodingDefaultDesc();
virtual bool isInsertSupported() { return true; }
protected:
@@ -116,7 +116,7 @@ class Channel : public ChatWindow
void setActive(bool active);
public slots:
- void setNickname(const QString& newNickname);
+ void setNickname(const TQString& newNickname);
void scheduleAutoWho();
void setAutoUserhost(bool state);
void rejoin();
@@ -131,16 +131,16 @@ class Channel : public ChatWindow
//Nicklist
public:
ChannelNickPtr getOwnChannelNick();
- ChannelNickPtr getChannelNick(const QString &ircnick);
+ ChannelNickPtr getChannelNick(const TQString &ircnick);
void joinNickname(ChannelNickPtr channelNick);
- void removeNick(ChannelNickPtr channelNick, const QString &reason, bool quit);
- void kickNick(ChannelNickPtr channelNick, const QString &kicker, const QString &reason);
+ void removeNick(ChannelNickPtr channelNick, const TQString &reason, bool quit);
+ void kickNick(ChannelNickPtr channelNick, const TQString &kicker, const TQString &reason);
void addNickname(ChannelNickPtr channelNick);
- void nickRenamed(const QString &oldNick, const NickInfo& channelnick);
+ void nickRenamed(const TQString &oldNick, const NickInfo& channelnick);
void resetNickList();
- void addPendingNickList(const QStringList& pendingChannelNickList);
- Nick *getNickByName(const QString& lookname);
+ void addPendingNickList(const TQStringList& pendingChannelNickList);
+ Nick *getNickByName(const TQString& lookname);
NickList getNickList() { return nicknameList; }
void adjustNicks(int value);
@@ -161,7 +161,7 @@ class Channel : public ChatWindow
* The internal variable topicAuthorUnknown stores whether the "<author>" bit is there or not.
*
* */
- QString getTopic();
+ TQString getTopic();
/** Get the channel topic history sorted in reverse chronological order.
*
* Each topic may or may not have the author that set it at the start of the string,
@@ -169,11 +169,11 @@ class Channel : public ChatWindow
*
* @return a list of topics this channel used to have, current at the top.
*/
- QStringList getTopicHistory();
+ TQStringList getTopicHistory();
- void setTopic(const QString& topic);
- void setTopic(const QString& nickname, const QString& topic);
- void setTopicAuthor(const QString& author, QDateTime t);
+ void setTopic(const TQString& topic);
+ void setTopic(const TQString& nickname, const TQString& topic);
+ void setTopicAuthor(const TQString& author, TQDateTime t);
signals:
void topicHistoryChanged();
@@ -188,7 +188,7 @@ class Channel : public ChatWindow
void clearModeList();
/// Get the list of modes that this channel has - e.g. {+l,+s,-m}
//TODO: does this method return a list of all modes, all modes that have been changed, or all modes that are +?
- QStringList getModeList() const { return m_modeList; }
+ TQStringList getModeList() const { return m_modeList; }
/** Outputs a message on the channel, and modifies the mode for a ChannelNick.
* @param sourceNick The server or the nick of the person that made the mode change.
@@ -196,7 +196,7 @@ class Channel : public ChatWindow
* @param plus True if the mode is being granted, false if it's being taken away.
* @param parameter This depends on what the mode change is. In most cases it is the nickname of the person that is being given voice/op/admin etc. See the code.
*/
- void updateMode(const QString& sourceNick, char mode, bool plus, const QString &parameter);
+ void updateMode(const TQString& sourceNick, char mode, bool plus, const TQString &parameter);
signals:
void modesChanged();
@@ -204,28 +204,28 @@ class Channel : public ChatWindow
//Bans
public:
- void addBan(const QString& ban);
- void removeBan(const QString& ban);
+ void addBan(const TQString& ban);
+ void removeBan(const TQString& ban);
void clearBanList();
- QStringList getBanList() const { return m_BanList; }
+ TQStringList getBanList() const { return m_BanList; }
signals:
- void banAdded(const QString& newban);
- void banRemoved(const QString& newban);
+ void banAdded(const TQString& newban);
+ void banRemoved(const TQString& newban);
void banListCleared();
//Generic GUI
public:
- virtual bool eventFilter(QObject* watched, QEvent* e);
+ virtual bool eventFilter(TQObject* watched, TQEvent* e);
//Specific GUI
public:
- void updateModeWidgets(char mode, bool plus, const QString &parameter);
- void updateQuickButtons(const QStringList &newButtonList);
+ void updateModeWidgets(char mode, bool plus, const TQString &parameter);
+ void updateQuickButtons(const TQStringList &newButtonList);
/// Get the contents of the input line.
- virtual QString getTextInLine();
+ virtual TQString getTextInLine();
/// Sounds suspiciously like a destructor..
virtual bool closeYourself(bool askForConfirmation=true);
@@ -233,7 +233,7 @@ class Channel : public ChatWindow
ChannelNickList getSelectedChannelNicks();
///TODO: this looks like a half-arsed overload.
- QStringList getSelectedNickList();
+ TQStringList getSelectedNickList();
NickListView* getNickListView() const { return nicknameListView; }
@@ -246,12 +246,12 @@ class Channel : public ChatWindow
void updateAppearance();
void channelTextEntered();
void channelPassthroughCommand();
- void sendChannelText(const QString& line);
+ void sendChannelText(const TQString& line);
void showOptionsDialog();
void showQuickButtons(bool show);
void showModeButtons(bool show);
- void appendInputText(const QString& s, bool fromCursor);
+ void appendInputText(const TQString& s, bool fromCursor);
virtual void indicateAway(bool show);
void showTopic(bool show);
void showNicknameBox(bool show);
@@ -264,18 +264,18 @@ class Channel : public ChatWindow
protected slots:
void completeNick(); ///< I guess this is a GUI function, might be nice to have at DCOP level though --argonel
void endCompleteNick();
- void filesDropped(QDropEvent* e);
- void quickButtonClicked(const QString& definition);
+ void filesDropped(TQDropEvent* e);
+ void quickButtonClicked(const TQString& definition);
void modeButtonClicked(int id,bool on);
void channelLimitChanged();
void popupChannelCommand(int id); ///< Connected to IRCView::popupCommand()
void popupCommand(int id); ///< Connected to NickListView::popupCommand()
- void doubleClickCommand(QListViewItem*); ///< Connected to NickListView::doubleClicked()
+ void doubleClickCommand(TQListViewItem*); ///< Connected to NickListView::doubleClicked()
// Dialogs
- void changeNickname(const QString& newNickname);
+ void changeNickname(const TQString& newNickname);
- void textPasted(const QString& text); ///< connected to IRCInput::textPasted() - used to handle large/multiline pastings
+ void textPasted(const TQString& text); ///< connected to IRCInput::textPasted() - used to handle large/multiline pastings
void sendFileMenu(); ///< connected to IRCInput::sendFile()
void nicknameComboboxChanged();
@@ -289,7 +289,7 @@ class Channel : public ChatWindow
void sortNickList();
protected:
- void showEvent(QShowEvent* event);
+ void showEvent(TQShowEvent* event);
void syncSplitters();
/// Called from ChatWindow adjustFocus
virtual void childAdjustFocus();
@@ -311,14 +311,14 @@ class Channel : public ChatWindow
unsigned int completionPosition;
- QSplitter* m_horizSplitter;
- QSplitter* m_vertSplitter;
- QWidget* topicWidget;
- QToolButton* m_topicButton;
+ TQSplitter* m_horizSplitter;
+ TQSplitter* m_vertSplitter;
+ TQWidget* topicWidget;
+ TQToolButton* m_topicButton;
Konversation::TopicLabel* topicLine;
//TODO: abstract these
- QHBox* modeBox;
+ TQHBox* modeBox;
ModeButton* modeT;
ModeButton* modeN;
ModeButton* modeS;
@@ -331,39 +331,39 @@ class Channel : public ChatWindow
KLineEdit* limit; //TODO: this GUI element is the only storage for the mode
NickListView* nicknameListView;
- QHBox* commandLineBox;
- QVBox* nickListButtons;
- QGrid* buttonsGrid;
- QComboBox* nicknameCombobox;
- QString oldNick; ///< GUI
- QLabel* awayLabel;
- QLabel* blowfishLabel;
+ TQHBox* commandLineBox;
+ TQVBox* nickListButtons;
+ TQGrid* buttonsGrid;
+ TQComboBox* nicknameCombobox;
+ TQString oldNick; ///< GUI
+ TQLabel* awayLabel;
+ TQLabel* blowfishLabel;
IRCInput* channelInput;
NickChangeDialog* nickChangeDialog;
- QPtrList<QuickButton> buttonList;
+ TQPtrList<QuickButton> buttonList;
//Members from here to end are not GUI
bool m_joined;
NickList nicknameList;
- QTimer userhostTimer;
+ TQTimer userhostTimer;
- QStringList m_topicHistory;
- QStringList m_BanList;
+ TQStringList m_topicHistory;
+ TQStringList m_BanList;
bool topicAuthorUnknown; ///< Stores whether the "<author>" bit is there or not.
bool m_firstAutoWhoDone;
- QTimer m_whoTimer; ///< For continuous auto /WHO
- QTimer m_fadeActivityTimer; ///< For the smoothing function used in activity sorting
+ TQTimer m_whoTimer; ///< For continuous auto /WHO
+ TQTimer m_fadeActivityTimer; ///< For the smoothing function used in activity sorting
- QValueList<QStringList> m_pendingChannelNickLists;
+ TQValueList<TQStringList> m_pendingChannelNickLists;
int m_opsToAdd;
uint m_currentIndex;
- QTimer* m_processingTimer;
- QTimer* m_delayedSortTimer;
+ TQTimer* m_processingTimer;
+ TQTimer* m_delayedSortTimer;
- QStringList m_modeList;
+ TQStringList m_modeList;
ChannelNickPtr m_ownChannelNick;
bool pendingNicks; ///< are there still nicks to be added by /names reply?
diff --git a/konversation/src/channeldialog.cpp b/konversation/src/channeldialog.cpp
index 2c07d5f..f6cc746 100644
--- a/konversation/src/channeldialog.cpp
+++ b/konversation/src/channeldialog.cpp
@@ -11,10 +11,10 @@
#include "channeldialog.h"
#include "servergroupsettings.h"
-#include <qlayout.h>
-#include <qframe.h>
-#include <qlabel.h>
-#include <qlineedit.h>
+#include <tqlayout.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -23,20 +23,20 @@
namespace Konversation
{
- ChannelDialog::ChannelDialog(const QString& title, QWidget *parent, const char *name)
+ ChannelDialog::ChannelDialog(const TQString& title, TQWidget *parent, const char *name)
: KDialogBase(Plain, title, Ok|Cancel, Ok, parent, name)
{
- QFrame* mainWidget = plainPage();
- QGridLayout* mainLayout = new QGridLayout(mainWidget, 1, 2, 0, spacingHint());
+ TQFrame* mainWidget = plainPage();
+ TQGridLayout* mainLayout = new TQGridLayout(mainWidget, 1, 2, 0, spacingHint());
- QLabel* channelLbl = new QLabel(i18n("C&hannel:"), mainWidget);
- m_channelEdit = new QLineEdit(mainWidget);
+ TQLabel* channelLbl = new TQLabel(i18n("C&hannel:"), mainWidget);
+ m_channelEdit = new TQLineEdit(mainWidget);
m_channelEdit->setMaxLength(50);
channelLbl->setBuddy(m_channelEdit);
- QLabel* passwordLbl = new QLabel(i18n("Pass&word:"), mainWidget);
- m_passwordEdit = new QLineEdit(mainWidget);
- m_passwordEdit->setEchoMode(QLineEdit::Password);
+ TQLabel* passwordLbl = new TQLabel(i18n("Pass&word:"), mainWidget);
+ m_passwordEdit = new TQLineEdit(mainWidget);
+ m_passwordEdit->setEchoMode(TQLineEdit::Password);
passwordLbl->setBuddy(m_passwordEdit);
mainLayout->addWidget(channelLbl, 0, 0);
diff --git a/konversation/src/channeldialog.h b/konversation/src/channeldialog.h
index 7af0195..1b57a76 100644
--- a/konversation/src/channeldialog.h
+++ b/konversation/src/channeldialog.h
@@ -15,7 +15,7 @@
#include <kdialogbase.h>
-class QLineEdit;
+class TQLineEdit;
namespace Konversation
{
@@ -27,7 +27,7 @@ namespace Konversation
Q_OBJECT
public:
- explicit ChannelDialog(const QString& title, QWidget *parent = 0, const char *name = 0);
+ explicit ChannelDialog(const TQString& title, TQWidget *parent = 0, const char *name = 0);
~ChannelDialog();
void setChannelSettings(const ChannelSettings& channel);
@@ -37,8 +37,8 @@ namespace Konversation
void slotOk();
private:
- QLineEdit* m_channelEdit;
- QLineEdit* m_passwordEdit;
+ TQLineEdit* m_channelEdit;
+ TQLineEdit* m_passwordEdit;
};
diff --git a/konversation/src/channellistpanel.cpp b/konversation/src/channellistpanel.cpp
index 3b20d57..d55ead5 100644
--- a/konversation/src/channellistpanel.cpp
+++ b/konversation/src/channellistpanel.cpp
@@ -18,17 +18,17 @@
#include "server.h"
#include "common.h"
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qgrid.h>
-#include <qlabel.h>
-#include <qspinbox.h>
-#include <qpushbutton.h>
-#include <qhgroupbox.h>
-#include <qregexp.h>
-#include <qcheckbox.h>
-#include <qtimer.h>
-#include <qwhatsthis.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqgrid.h>
+#include <tqlabel.h>
+#include <tqspinbox.h>
+#include <tqpushbutton.h>
+#include <tqhgroupbox.h>
+#include <tqregexp.h>
+#include <tqcheckbox.h>
+#include <tqtimer.h>
+#include <tqwhatsthis.h>
#include <krun.h>
#include <klistview.h>
@@ -41,7 +41,7 @@
#include <kdeversion.h>
-ChannelListPanel::ChannelListPanel(QWidget* parent) : ChatWindow(parent)
+ChannelListPanel::ChannelListPanel(TQWidget* parent) : ChatWindow(parent)
{
setType(ChatWindow::ChannelList);
setName(i18n("Channel List"));
@@ -60,40 +60,40 @@ ChannelListPanel::ChannelListPanel(QWidget* parent) : ChatWindow(parent)
setTopicTarget(false);
setRegExp(false);
- filterTextChanged(QString());
+ filterTextChanged(TQString());
- QHGroupBox* filterGroup=new QHGroupBox(i18n("Filter Settings"),this);
- QGrid* mainGrid=new QGrid(2,Qt::Vertical,filterGroup);
+ TQHGroupBox* filterGroup=new TQHGroupBox(i18n("Filter Settings"),this);
+ TQGrid* mainGrid=new TQGrid(2,Qt::Vertical,filterGroup);
mainGrid->setSpacing(spacing());
- QLabel* minLabel=new QLabel(i18n("Minimum users:"),mainGrid);
- QLabel* maxLabel=new QLabel(i18n("Maximum users:"),mainGrid);
- QSpinBox* minUsersSpin=new QSpinBox(0, 9999, 1, mainGrid,"min_users_spin");
- QWhatsThis::add(minUsersSpin, i18n("You can limit the channel list to those channels with a minimum number of users here. Choosing 0 disables this criterion."));
- QSpinBox* maxUsersSpin=new QSpinBox(0, 9999, 1, mainGrid,"max_users_spin");
- QWhatsThis::add(maxUsersSpin, i18n("You can limit the channel list to those channels with a maximum number of users here. Choosing 0 disables this criterion."));
+ TQLabel* minLabel=new TQLabel(i18n("Minimum users:"),mainGrid);
+ TQLabel* maxLabel=new TQLabel(i18n("Maximum users:"),mainGrid);
+ TQSpinBox* minUsersSpin=new TQSpinBox(0, 9999, 1, mainGrid,"min_users_spin");
+ TQWhatsThis::add(minUsersSpin, i18n("You can limit the channel list to those channels with a minimum number of users here. Choosing 0 disables this criterion."));
+ TQSpinBox* maxUsersSpin=new TQSpinBox(0, 9999, 1, mainGrid,"max_users_spin");
+ TQWhatsThis::add(maxUsersSpin, i18n("You can limit the channel list to those channels with a maximum number of users here. Choosing 0 disables this criterion."));
minUsersSpin->setValue(getMinUsers());
maxUsersSpin->setValue(getMaxUsers());
minLabel->setBuddy(minUsersSpin);
maxLabel->setBuddy(maxUsersSpin);
- QLabel* patternLabel=new QLabel(i18n("Filter pattern:"),mainGrid);
- new QLabel(i18n("Filter target:"),mainGrid);
+ TQLabel* patternLabel=new TQLabel(i18n("Filter pattern:"),mainGrid);
+ new TQLabel(i18n("Filter target:"),mainGrid);
filterInput=new KLineEdit(mainGrid,"channel_list_filter_input");
- QWhatsThis::add(filterInput, i18n("Enter a filter string here."));
+ TQWhatsThis::add(filterInput, i18n("Enter a filter string here."));
filterInput->setText(getFilterText());
patternLabel->setBuddy(filterInput);
- QHBox* targetBox=new QHBox(mainGrid);
+ TQHBox* targetBox=new TQHBox(mainGrid);
targetBox->setSpacing(spacing());
- channelFilter=new QCheckBox(i18n("Channel"),targetBox,"filter_target_channel_check");
- topicFilter=new QCheckBox(i18n("Topic"),targetBox,"filter_target_topic_check");
- regexpCheck=new QCheckBox(i18n("Regular expression"),targetBox,"regexp_check");
- applyFilter=new QPushButton(i18n("Apply Filter"),targetBox,"apply_filter_button");
- QWhatsThis::add(applyFilter, i18n("Click here to retrieve the list of channels from the server and apply the filter."));
+ channelFilter=new TQCheckBox(i18n("Channel"),targetBox,"filter_target_channel_check");
+ topicFilter=new TQCheckBox(i18n("Topic"),targetBox,"filter_target_topic_check");
+ regexpCheck=new TQCheckBox(i18n("Regular expression"),targetBox,"regexp_check");
+ applyFilter=new TQPushButton(i18n("Apply Filter"),targetBox,"apply_filter_button");
+ TQWhatsThis::add(applyFilter, i18n("Click here to retrieve the list of channels from the server and apply the filter."));
channelFilter->setChecked(getChannelTarget());
topicFilter->setChecked(getTopicTarget());
@@ -102,7 +102,7 @@ ChannelListPanel::ChannelListPanel(QWidget* parent) : ChatWindow(parent)
targetBox->setStretchFactor(topicFilter,10);
channelListView=new KListView(this,"channel_list_view");
- QWhatsThis::add(channelListView, i18n("The filtered list of channels is displayed here. Notice that if you do not use regular expressions, Konversation lists any channel whose name contains the filter string you entered. The channel name does not have to start with the string you entered.\n\nSelect a channel you want to join by clicking on it. Right click on the channel to get a list of all web addresses mentioned in the channel's topic."));
+ TQWhatsThis::add(channelListView, i18n("The filtered list of channels is displayed here. Notice that if you do not use regular expressions, Konversation lists any channel whose name contains the filter string you entered. The channel name does not have to start with the string you entered.\n\nSelect a channel you want to join by clicking on it. Right click on the channel to get a list of all web addresses mentioned in the channel's topic."));
channelListView->addColumn(i18n("Channel Name"));
channelListView->addColumn(i18n("Users"));
channelListView->addColumn(i18n("Channel Topic"));
@@ -110,51 +110,51 @@ ChannelListPanel::ChannelListPanel(QWidget* parent) : ChatWindow(parent)
channelListView->setResizeMode( KListView::LastColumn );
channelListView->setSortColumn(-1); //Disable sorting
- QHBox* statsBox=new QHBox(this);
+ TQHBox* statsBox=new TQHBox(this);
statsBox->setSpacing(spacing());
- QLabel* channelsLabel=new QLabel(QString(),statsBox);
- QLabel* usersLabel=new QLabel(QString(),statsBox);
+ TQLabel* channelsLabel=new TQLabel(TQString(),statsBox);
+ TQLabel* usersLabel=new TQLabel(TQString(),statsBox);
statsBox->setStretchFactor(usersLabel,10);
- QHBox* actionBox=new QHBox(this);
+ TQHBox* actionBox=new TQHBox(this);
actionBox->setSpacing(spacing());
- refreshListButton=new QPushButton(i18n("Refresh List"),actionBox,"refresh_list_button");
- QPushButton* saveListButton=new QPushButton(i18n("Save List..."),actionBox,"save_list_button");
- joinChannelButton=new QPushButton(i18n("Join Channel"),actionBox,"join_channel_button");
- QWhatsThis::add(joinChannelButton, i18n("Click here to join the channel. A new tab is created for the channel."));
+ refreshListButton=new TQPushButton(i18n("Refresh List"),actionBox,"refresh_list_button");
+ TQPushButton* saveListButton=new TQPushButton(i18n("Save List..."),actionBox,"save_list_button");
+ joinChannelButton=new TQPushButton(i18n("Join Channel"),actionBox,"join_channel_button");
+ TQWhatsThis::add(joinChannelButton, i18n("Click here to join the channel. A new tab is created for the channel."));
- connect(&updateTimer,SIGNAL (timeout()),this,SLOT (updateDisplay()));
+ connect(&updateTimer,TQT_SIGNAL (timeout()),this,TQT_SLOT (updateDisplay()));
// double click on channel entry joins the channel
- connect(channelListView,SIGNAL (doubleClicked(QListViewItem*)),
- this,SLOT (joinChannelClicked()) );
+ connect(channelListView,TQT_SIGNAL (doubleClicked(TQListViewItem*)),
+ this,TQT_SLOT (joinChannelClicked()) );
- connect(channelListView,SIGNAL (contextMenu (KListView*, QListViewItem*, const QPoint&) ),
- this, SLOT (contextMenu (KListView*, QListViewItem*, const QPoint&)) );
+ connect(channelListView,TQT_SIGNAL (contextMenu (KListView*, TQListViewItem*, const TQPoint&) ),
+ this, TQT_SLOT (contextMenu (KListView*, TQListViewItem*, const TQPoint&)) );
- connect(minUsersSpin,SIGNAL (valueChanged(int)),this,SLOT(setMinUsers(int)) );
- connect(maxUsersSpin,SIGNAL (valueChanged(int)),this,SLOT(setMaxUsers(int)) );
- connect(this,SIGNAL (adjustMinValue(int)),minUsersSpin,SLOT (setValue(int)) );
- connect(this,SIGNAL (adjustMaxValue(int)),maxUsersSpin,SLOT (setValue(int)) );
+ connect(minUsersSpin,TQT_SIGNAL (valueChanged(int)),this,TQT_SLOT(setMinUsers(int)) );
+ connect(maxUsersSpin,TQT_SIGNAL (valueChanged(int)),this,TQT_SLOT(setMaxUsers(int)) );
+ connect(this,TQT_SIGNAL (adjustMinValue(int)),minUsersSpin,TQT_SLOT (setValue(int)) );
+ connect(this,TQT_SIGNAL (adjustMaxValue(int)),maxUsersSpin,TQT_SLOT (setValue(int)) );
- connect(filterInput,SIGNAL (textChanged(const QString&)),this,SLOT (filterTextChanged(const QString&)) );
- connect(filterInput,SIGNAL (returnPressed()),this,SLOT (applyFilterClicked()) );
+ connect(filterInput,TQT_SIGNAL (textChanged(const TQString&)),this,TQT_SLOT (filterTextChanged(const TQString&)) );
+ connect(filterInput,TQT_SIGNAL (returnPressed()),this,TQT_SLOT (applyFilterClicked()) );
- connect(channelFilter,SIGNAL (clicked()),this,SLOT (channelTargetClicked()) );
- connect(topicFilter,SIGNAL (clicked()),this,SLOT (topicTargetClicked()) );
- connect(regexpCheck,SIGNAL (clicked()),this,SLOT (regExpClicked()) );
+ connect(channelFilter,TQT_SIGNAL (clicked()),this,TQT_SLOT (channelTargetClicked()) );
+ connect(topicFilter,TQT_SIGNAL (clicked()),this,TQT_SLOT (topicTargetClicked()) );
+ connect(regexpCheck,TQT_SIGNAL (clicked()),this,TQT_SLOT (regExpClicked()) );
- connect(applyFilter,SIGNAL (clicked()),this,SLOT (applyFilterClicked()) );
+ connect(applyFilter,TQT_SIGNAL (clicked()),this,TQT_SLOT (applyFilterClicked()) );
- connect(refreshListButton,SIGNAL (clicked()),this,SLOT (refreshList()) );
- connect(saveListButton,SIGNAL (clicked()),this,SLOT (saveList()) );
- connect(joinChannelButton,SIGNAL (clicked()),this,SLOT (joinChannelClicked()) );
+ connect(refreshListButton,TQT_SIGNAL (clicked()),this,TQT_SLOT (refreshList()) );
+ connect(saveListButton,TQT_SIGNAL (clicked()),this,TQT_SLOT (saveList()) );
+ connect(joinChannelButton,TQT_SIGNAL (clicked()),this,TQT_SLOT (joinChannelClicked()) );
- connect(this,SIGNAL (updateNumUsers(const QString&)),usersLabel,SLOT (setText(const QString&)) );
- connect(this,SIGNAL (updateNumChannels(const QString&)),channelsLabel,SLOT (setText(const QString&)) );
+ connect(this,TQT_SIGNAL (updateNumUsers(const TQString&)),usersLabel,TQT_SLOT (setText(const TQString&)) );
+ connect(this,TQT_SIGNAL (updateNumChannels(const TQString&)),channelsLabel,TQT_SLOT (setText(const TQString&)) );
updateUsersChannels();
}
@@ -184,9 +184,9 @@ void ChannelListPanel::refreshList()
void ChannelListPanel::saveList()
{
// Ask user for file name
- QString fileName=KFileDialog::getSaveFileName(
- QString(),
- QString(),
+ TQString fileName=KFileDialog::getSaveFileName(
+ TQString(),
+ TQString(),
this,
i18n("Save Channel List"));
@@ -196,7 +196,7 @@ void ChannelListPanel::saveList()
unsigned int maxChannelWidth=0;
unsigned int maxNicksWidth=0;
- QListViewItem* item = channelListView->firstChild();
+ TQListViewItem* item = channelListView->firstChild();
while(item)
{
if(item->isVisible())
@@ -216,14 +216,14 @@ void ChannelListPanel::saveList()
}
// now save the list to disk
- QFile listFile(fileName);
+ TQFile listFile(fileName);
listFile.open(IO_WriteOnly);
// wrap the file into a stream
- QTextStream stream(&listFile);
+ TQTextStream stream(&listFile);
- QString header(i18n("Konversation Channel List: %1 - %2\n\n")
+ TQString header(i18n("Konversation Channel List: %1 - %2\n\n")
.arg(m_server->getServerName())
- .arg(QDateTime::currentDateTime().toString()));
+ .arg(TQDateTime::currentDateTime().toString()));
// send header to stream
stream << header;
@@ -234,16 +234,16 @@ void ChannelListPanel::saveList()
{
if(item->isVisible())
{
- QString channelName;
+ TQString channelName;
channelName.fill(' ',maxChannelWidth);
channelName.replace(0,item->text(0).length(),item->text(0));
- QString nicksPad;
+ TQString nicksPad;
nicksPad.fill(' ',maxNicksWidth);
- QString nicksNum(nicksPad+item->text(1));
+ TQString nicksNum(nicksPad+item->text(1));
nicksNum=nicksNum.right(maxNicksWidth);
- QString line(channelName+' '+nicksNum+' '+item->text(2)+'\n');
+ TQString line(channelName+' '+nicksNum+' '+item->text(2)+'\n');
// send final line to stream
stream << line;
@@ -258,16 +258,16 @@ void ChannelListPanel::saveList()
void ChannelListPanel::joinChannelClicked()
{
- QListViewItem* item=channelListView->selectedItem();
+ TQListViewItem* item=channelListView->selectedItem();
if(item)
{
emit joinChannel(item->text(0));
}
}
-void ChannelListPanel::addToChannelList(const QString& channel,int users,const QString& topic)
+void ChannelListPanel::addToChannelList(const TQString& channel,int users,const TQString& topic)
{
- pendingChannels.append(channel + ' ' + QString::number(users)
+ pendingChannels.append(channel + ' ' + TQString::number(users)
+ ' ' + Konversation::removeIrcMarkup(topic));
// set internal numbers of channels and users, display will be updated by a timer
@@ -290,11 +290,11 @@ void ChannelListPanel::updateDisplay()
if(!pendingChannels.isEmpty())
{
// fetch next channel line
- QString channelLine = pendingChannels.first();
+ TQString channelLine = pendingChannels.first();
// split it up into the single parts we need
- QString channel = channelLine.section(' ',0,0);
- QString users = channelLine.section(' ',1,1);
- QString topic = channelLine.section(' ',2);
+ TQString channel = channelLine.section(' ',0,0);
+ TQString users = channelLine.section(' ',1,1);
+ TQString topic = channelLine.section(' ',2);
ChannelListViewItem* item = new ChannelListViewItem(channelListView, channel, users, topic);
applyFilterToItem(item);
pendingChannels.pop_front();
@@ -310,7 +310,7 @@ void ChannelListPanel::updateDisplay()
}
}
-void ChannelListPanel::filterTextChanged(const QString& newText)
+void ChannelListPanel::filterTextChanged(const TQString& newText)
{
filterText=newText;
}
@@ -380,7 +380,7 @@ bool ChannelListPanel::getRegExp()
return regExp;
}
-const QString& ChannelListPanel::getFilterText()
+const TQString& ChannelListPanel::getFilterText()
{
return filterText;
}
@@ -425,7 +425,7 @@ void ChannelListPanel::regExpClicked()
setRegExp(regexpCheck->state()==2);
}
-void ChannelListPanel::applyFilterToItem(QListViewItem* item)
+void ChannelListPanel::applyFilterToItem(TQListViewItem* item)
{
bool visible=true;
@@ -440,12 +440,12 @@ void ChannelListPanel::applyFilterToItem(QListViewItem* item)
{
if(getChannelTarget())
{
- if(item->text(0).find(QRegExp(getFilterText(),false,!getRegExp()))==-1) visible=false;
+ if(item->text(0).find(TQRegExp(getFilterText(),false,!getRegExp()))==-1) visible=false;
}
if(getTopicTarget())
{
- if(item->text(2).find(QRegExp(getFilterText(),false,!getRegExp()))==-1) visible=false;
+ if(item->text(2).find(TQRegExp(getFilterText(),false,!getRegExp()))==-1) visible=false;
}
}
@@ -466,7 +466,7 @@ void ChannelListPanel::applyFilterClicked()
}
else
{
- QListViewItem* item = channelListView->firstChild();
+ TQListViewItem* item = channelListView->firstChild();
setVisibleChannels(0);
setVisibleUsers(0);
@@ -498,15 +498,15 @@ void ChannelListPanel::childAdjustFocus()
{
}
-void ChannelListPanel::contextMenu (KListView* /* l */, QListViewItem* i, const QPoint& p)
+void ChannelListPanel::contextMenu (KListView* /* l */, TQListViewItem* i, const TQPoint& p)
{
if(!i) return;
KPopupMenu* showURLmenu = new KPopupMenu(this);
showURLmenu->insertTitle( i18n("Open URL") );
- QString filteredLine(i->text(2));
+ TQString filteredLine(i->text(2));
- QRegExp pattern("((http://|https://|ftp://|nntp://|news://|gopher://|www\\.|ftp\\.)"
+ TQRegExp pattern("((http://|https://|ftp://|nntp://|news://|gopher://|www\\.|ftp\\.)"
// IP Address
"([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}|"
// Decimal IP address
@@ -529,8 +529,8 @@ void ChannelListPanel::contextMenu (KListView* /* l */, QListViewItem* i, const
pos=pattern.pos();
// Extract url
- QString url=pattern.capturedTexts()[0];
- QString href(url);
+ TQString url=pattern.capturedTexts()[0];
+ TQString href(url);
// clean up href for browser
if(href.startsWith("www.")) href="http://"+href;
@@ -561,14 +561,14 @@ void ChannelListPanel::contextMenu (KListView* /* l */, QListViewItem* i, const
int selected = showURLmenu->exec(p);
if (selected!=-1)
{
- QMenuItem* item = showURLmenu->findItem( selected );
+ TQMenuItem* item = showURLmenu->findItem( selected );
new KRun(KURL(item->text().replace("&&","&")));
}
delete showURLmenu;
}
-void ChannelListPanel::appendInputText(const QString& text, bool fromCursor)
+void ChannelListPanel::appendInputText(const TQString& text, bool fromCursor)
{
Q_UNUSED(fromCursor);
filterInput->setText(filterInput->text() + text);
@@ -584,12 +584,12 @@ void ChannelListPanel::serverOnline(bool online)
void ChannelListPanel::emitUpdateInfo()
{
- QString info;
+ TQString info;
info = i18n("Channel List for %1").arg(m_server->getDisplayName());
emit updateInfo(info);
}
-void ChannelListPanel::setFilter(const QString& filter)
+void ChannelListPanel::setFilter(const TQString& filter)
{
filterInput->setText(filter);
}
diff --git a/konversation/src/channellistpanel.h b/konversation/src/channellistpanel.h
index fa51ddf..7f82f16 100644
--- a/konversation/src/channellistpanel.h
+++ b/konversation/src/channellistpanel.h
@@ -17,15 +17,15 @@
#include "chatwindow.h"
-#include <qtimer.h>
+#include <tqtimer.h>
-class QCheckBox;
-class QStringList;
-class QTimer;
-class QListView;
-class QListViewItem;
-class QPushButton;
+class TQCheckBox;
+class TQStringList;
+class TQTimer;
+class TQListView;
+class TQListViewItem;
+class TQPushButton;
class KListView;
class KLineEdit;
@@ -36,7 +36,7 @@ class ChannelListPanel : public ChatWindow
Q_OBJECT
public:
- explicit ChannelListPanel(QWidget* parent);
+ explicit ChannelListPanel(TQWidget* parent);
~ChannelListPanel();
virtual bool closeYourself();
@@ -44,17 +44,17 @@ class ChannelListPanel : public ChatWindow
signals:
void refreshChannelList();
- void joinChannel(const QString& channelName);
+ void joinChannel(const TQString& channelName);
void adjustMinValue(int num);
void adjustMaxValue(int num);
- void updateNumUsers(const QString& num);
- void updateNumChannels(const QString& num);
+ void updateNumUsers(const TQString& num);
+ void updateNumChannels(const TQString& num);
public slots:
- void addToChannelList(const QString& channel,int users,const QString& topic);
+ void addToChannelList(const TQString& channel,int users,const TQString& topic);
- virtual void appendInputText(const QString&, bool fromCursor);
- void setFilter(const QString& filter);
+ virtual void appendInputText(const TQString&, bool fromCursor);
+ void setFilter(const TQString& filter);
void applyFilterClicked();
@@ -67,12 +67,12 @@ class ChannelListPanel : public ChatWindow
void setMinUsers(int num);
void setMaxUsers(int num);
- void filterTextChanged(const QString& newText);
+ void filterTextChanged(const TQString& newText);
void channelTargetClicked();
void topicTargetClicked();
void regExpClicked();
- void contextMenu (KListView* l, QListViewItem* i, const QPoint& p);
+ void contextMenu (KListView* l, TQListViewItem* i, const TQPoint& p);
//Used to disable functions when not connected
virtual void serverOnline(bool online);
@@ -106,8 +106,8 @@ class ChannelListPanel : public ChatWindow
int getMinUsers();
int getMaxUsers();
- const QString& getFilterText();
- void applyFilterToItem(QListViewItem* item);
+ const TQString& getFilterText();
+ void applyFilterToItem(TQListViewItem* item);
void updateUsersChannels();
@@ -125,22 +125,22 @@ class ChannelListPanel : public ChatWindow
bool regExp;
// store channels to be inserted in ListView here first
- QStringList pendingChannels;
- QTimer updateTimer;
+ TQStringList pendingChannels;
+ TQTimer updateTimer;
- QCheckBox* channelFilter;
- QCheckBox* topicFilter;
- QCheckBox* regexpCheck;
+ TQCheckBox* channelFilter;
+ TQCheckBox* topicFilter;
+ TQCheckBox* regexpCheck;
- QPushButton* applyFilter;
- QPushButton* refreshListButton;
- QPushButton* joinChannelButton;
+ TQPushButton* applyFilter;
+ TQPushButton* refreshListButton;
+ TQPushButton* joinChannelButton;
KListView* channelListView;
KLineEdit* filterInput;
- QString filterText;
+ TQString filterText;
int m_oldSortColumn;
};
diff --git a/konversation/src/channellistviewitem.cpp b/konversation/src/channellistviewitem.cpp
index fad3eab..4a6b0f5 100644
--- a/konversation/src/channellistviewitem.cpp
+++ b/konversation/src/channellistviewitem.cpp
@@ -15,7 +15,7 @@
#include "channellistviewitem.h"
-ChannelListViewItem::ChannelListViewItem(KListView* parent, const QString& channel, const QString& users, const QString& topic)
+ChannelListViewItem::ChannelListViewItem(KListView* parent, const TQString& channel, const TQString& users, const TQString& topic)
: KListViewItem(parent,channel,users,topic)
{
}
@@ -24,7 +24,7 @@ ChannelListViewItem::~ChannelListViewItem()
{
}
-int ChannelListViewItem::compare(QListViewItem* item, int col, bool ascending) const
+int ChannelListViewItem::compare(TQListViewItem* item, int col, bool ascending) const
{
if(col==1)
{
diff --git a/konversation/src/channellistviewitem.h b/konversation/src/channellistviewitem.h
index 28d9437..c44f9e0 100644
--- a/konversation/src/channellistviewitem.h
+++ b/konversation/src/channellistviewitem.h
@@ -15,7 +15,7 @@
#ifndef CHANNELLISTVIEWITEM_H
#define CHANNELLISTVIEWITEM_H
-#include <qstring.h>
+#include <tqstring.h>
#include <klistview.h>
@@ -23,9 +23,9 @@
class ChannelListViewItem : public KListViewItem
{
public:
- ChannelListViewItem(KListView* parent, const QString& channel, const QString& users, const QString& topic);
+ ChannelListViewItem(KListView* parent, const TQString& channel, const TQString& users, const TQString& topic);
~ChannelListViewItem();
- int compare(QListViewItem* item, int col, bool ascending) const;
+ int compare(TQListViewItem* item, int col, bool ascending) const;
};
#endif
diff --git a/konversation/src/channelnick.cpp b/konversation/src/channelnick.cpp
index 8640acd..f158550 100644
--- a/konversation/src/channelnick.cpp
+++ b/konversation/src/channelnick.cpp
@@ -179,28 +179,28 @@ bool ChannelNick::setOp(bool state)
//Purely provided for convience because they are used so often.
//Just calls nickInfo->getNickname() etc
-QString ChannelNick::getNickname() const
+TQString ChannelNick::getNickname() const
{
if ( this )
return nickInfo->getNickname();
else
- return QString();
+ return TQString();
}
-QString ChannelNick::getHostmask() const
+TQString ChannelNick::getHostmask() const
{
if ( this )
return nickInfo->getHostmask();
else
- return QString();
+ return TQString();
}
-QString ChannelNick::tooltip()
+TQString ChannelNick::tooltip()
{
- // if(addressee.isEmpty()) return QString();
+ // if(addressee.isEmpty()) return TQString();
KABC::Addressee addressee = nickInfo->getAddressee();
- QString strTooltip;
- QTextStream tooltip( &strTooltip, IO_WriteOnly );
+ TQString strTooltip;
+ TQTextStream tooltip( &strTooltip, IO_WriteOnly );
tooltip << "<qt>";
@@ -208,7 +208,7 @@ QString ChannelNick::tooltip()
nickInfo->tooltipTableData(tooltip);
- QStringList modes;
+ TQStringList modes;
if(isOp()) modes << i18n("Operator");
if(isAdmin()) modes << i18n("Admin");
if(isOwner()) modes << i18n("Owner");
@@ -222,11 +222,11 @@ QString ChannelNick::tooltip()
}
tooltip << "</table></qt>";
//kdDebug() << strTooltip << endl;
- //if(!dirty) return QString();
+ //if(!dirty) return TQString();
return strTooltip;
}
-QString ChannelNick::loweredNickname() const
+TQString ChannelNick::loweredNickname() const
{
return nickInfo->loweredNickname();
}
diff --git a/konversation/src/channelnick.h b/konversation/src/channelnick.h
index a7c5bbc..f07b2bc 100644
--- a/konversation/src/channelnick.h
+++ b/konversation/src/channelnick.h
@@ -20,7 +20,7 @@
#include <ksharedptr.h>
-class ChannelNick : public QObject, public KShared
+class ChannelNick : public TQObject, public KShared
{
Q_OBJECT
@@ -55,10 +55,10 @@ class ChannelNick : public QObject, public KShared
NickInfoPtr getNickInfo() const;
//Purely provided for convenience because they are used so often.
//Just calls nickInfo->getNickname() etc
- QString getNickname() const;
- QString loweredNickname() const;
- QString getHostmask() const;
- QString tooltip();
+ TQString getNickname() const;
+ TQString loweredNickname() const;
+ TQString getHostmask() const;
+ TQString tooltip();
private:
NickInfoPtr nickInfo;
bool isop;
@@ -84,12 +84,12 @@ typedef KSharedPtr<ChannelNick> ChannelNickPtr;
/** A ChannelNickMap is a list of ChannelNick pointers, indexed and sorted by
* lowercase nickname.
*/
-typedef QMap<QString,ChannelNickPtr> ChannelNickMap;
+typedef TQMap<TQString,ChannelNickPtr> ChannelNickMap;
-typedef QValueList<ChannelNickPtr> ChannelNickList;
+typedef TQValueList<ChannelNickPtr> ChannelNickList;
/** A ChannelMembershipMap is a list of ChannelNickMap pointers, indexed and
* sorted by lowercase channel name.
*/
-typedef QMap<QString,ChannelNickMap *> ChannelMembershipMap;
+typedef TQMap<TQString,ChannelNickMap *> ChannelMembershipMap;
#endif /* CHANNEL_NICK_H */
diff --git a/konversation/src/channeloptionsdialog.cpp b/konversation/src/channeloptionsdialog.cpp
index e10f950..5681872 100644
--- a/konversation/src/channeloptionsdialog.cpp
+++ b/konversation/src/channeloptionsdialog.cpp
@@ -16,11 +16,11 @@
#include "channeloptionsui.h"
#include "channel.h"
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
-#include <qheader.h>
-#include <qtoolbutton.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqregexp.h>
+#include <tqheader.h>
+#include <tqtoolbutton.h>
#include <klocale.h>
#include <klistview.h>
@@ -48,7 +48,7 @@ namespace Konversation
// don't allow sorting. most recent topic is always first
m_widget->topicHistoryList->setSortColumn(-1);
m_widget->clearButton->setIconSet(SmallIconSet("locationbar_erase"));
- m_widget->banList->setDefaultRenameAction(QListView::Accept);
+ m_widget->banList->setDefaultRenameAction(TQListView::Accept);
m_widget->banListSearchLine->setListView(m_widget->banList);
// hide column where the complete topic will be put in for convenience
m_widget->topicHistoryList->hideColumn(2);
@@ -58,28 +58,28 @@ namespace Konversation
m_channel = channel;
m_editingTopic = false;
- connect(m_widget->topicHistoryList, SIGNAL(clicked(QListViewItem*)), this, SLOT(topicHistoryItemClicked(QListViewItem*)));
- connect(m_widget->topicHistoryList, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(topicHistoryItemClicked(QListViewItem*)));
- connect(m_widget->toggleAdvancedModes, SIGNAL(clicked()), this, SLOT(toggleAdvancedModes()));
- connect(m_widget->topicEdit, SIGNAL(modificationChanged(bool)), this, SLOT(topicBeingEdited(bool)));
+ connect(m_widget->topicHistoryList, TQT_SIGNAL(clicked(TQListViewItem*)), this, TQT_SLOT(topicHistoryItemClicked(TQListViewItem*)));
+ connect(m_widget->topicHistoryList, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, TQT_SLOT(topicHistoryItemClicked(TQListViewItem*)));
+ connect(m_widget->toggleAdvancedModes, TQT_SIGNAL(clicked()), this, TQT_SLOT(toggleAdvancedModes()));
+ connect(m_widget->topicEdit, TQT_SIGNAL(modificationChanged(bool)), this, TQT_SLOT(topicBeingEdited(bool)));
- connect(m_channel, SIGNAL(topicHistoryChanged()), this, SLOT(refreshTopicHistory()));
+ connect(m_channel, TQT_SIGNAL(topicHistoryChanged()), this, TQT_SLOT(refreshTopicHistory()));
- connect(m_channel, SIGNAL(modesChanged()), this, SLOT(refreshModes()));
- connect(m_channel->getOwnChannelNick(), SIGNAL(channelNickChanged()), this, SLOT(refreshEnableModes()));
+ connect(m_channel, TQT_SIGNAL(modesChanged()), this, TQT_SLOT(refreshModes()));
+ connect(m_channel->getOwnChannelNick(), TQT_SIGNAL(channelNickChanged()), this, TQT_SLOT(refreshEnableModes()));
- connect(this, SIGNAL(cancelClicked()), this, SLOT(cancelClicked()));
- connect(this, SIGNAL(okClicked()), this, SLOT(changeOptions()));
- connect(this, SIGNAL(okClicked()), this, SLOT(okClicked()));
+ connect(this, TQT_SIGNAL(cancelClicked()), this, TQT_SLOT(cancelClicked()));
+ connect(this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(changeOptions()));
+ connect(this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(okClicked()));
- connect(m_channel, SIGNAL(banAdded(const QString&)), this, SLOT(addBan(const QString&)));
- connect(m_channel, SIGNAL(banRemoved(const QString&)), this, SLOT(removeBan(const QString&)));
- connect(m_channel, SIGNAL(banListCleared()), m_widget->banList, SLOT(clear()));
+ connect(m_channel, TQT_SIGNAL(banAdded(const TQString&)), this, TQT_SLOT(addBan(const TQString&)));
+ connect(m_channel, TQT_SIGNAL(banRemoved(const TQString&)), this, TQT_SLOT(removeBan(const TQString&)));
+ connect(m_channel, TQT_SIGNAL(banListCleared()), m_widget->banList, TQT_SLOT(clear()));
- connect(m_widget->addBan, SIGNAL(clicked()), this, SLOT(addBanClicked()));
- connect(m_widget->removeBan, SIGNAL(clicked()), this, SLOT(removeBanClicked()));
- connect(m_widget->banList, SIGNAL(itemRenamed (QListViewItem*)), this, SLOT(banEdited(QListViewItem*)));
- connect(m_widget->banList, SIGNAL(itemRenamed (QListViewItem*, int, const QString&)), this, SLOT(banEdited(QListViewItem*)));
+ connect(m_widget->addBan, TQT_SIGNAL(clicked()), this, TQT_SLOT(addBanClicked()));
+ connect(m_widget->removeBan, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeBanClicked()));
+ connect(m_widget->banList, TQT_SIGNAL(itemRenamed (TQListViewItem*)), this, TQT_SLOT(banEdited(TQListViewItem*)));
+ connect(m_widget->banList, TQT_SIGNAL(itemRenamed (TQListViewItem*, int, const TQString&)), this, TQT_SLOT(banEdited(TQListViewItem*)));
refreshTopicHistory();
refreshBanList();
@@ -93,7 +93,7 @@ namespace Konversation
void ChannelOptionsDialog::changeOptions()
{
- QString newTopic = topic(), oldTopic=m_channel->getTopicHistory().first().section(' ', 2);
+ TQString newTopic = topic(), oldTopic=m_channel->getTopicHistory().first().section(' ', 2);
if(newTopic != oldTopic)
{
@@ -107,20 +107,20 @@ namespace Konversation
m_channel->sendChannelText(Preferences::commandChar() + "TOPIC " + m_channel->getName() + ' ' + newTopic);
}
- QStringList newModeList = modes();
- QStringList currentModeList = m_channel->getModeList();
- QStringList rmModes;
- QStringList addModes;
- QStringList tmp;
- QString modeString;
+ TQStringList newModeList = modes();
+ TQStringList currentModeList = m_channel->getModeList();
+ TQStringList rmModes;
+ TQStringList addModes;
+ TQStringList tmp;
+ TQString modeString;
bool plus;
- QString command("MODE %1 %2%3 %4");
+ TQString command("MODE %1 %2%3 %4");
- for(QStringList::iterator it = newModeList.begin(); it != newModeList.end(); ++it)
+ for(TQStringList::iterator it = newModeList.begin(); it != newModeList.end(); ++it)
{
modeString = (*it).mid(1);
plus = ((*it)[0] == '+');
- tmp = currentModeList.grep(QRegExp('^' + modeString));
+ tmp = currentModeList.grep(TQRegExp('^' + modeString));
if(tmp.isEmpty() && plus)
{
@@ -158,19 +158,19 @@ namespace Konversation
m_editingTopic = state;
}
- QString ChannelOptionsDialog::topic()
+ TQString ChannelOptionsDialog::topic()
{
return m_widget->topicEdit->text().replace("\n"," ");
}
void ChannelOptionsDialog::refreshTopicHistory()
{
- QStringList history = m_channel->getTopicHistory();
+ TQStringList history = m_channel->getTopicHistory();
m_widget->topicHistoryList->clear();
- for(QStringList::const_iterator it = history.fromLast(); it != history.end(); --it)
+ for(TQStringList::const_iterator it = history.fromLast(); it != history.end(); --it)
{
- QDateTime date;
+ TQDateTime date;
date.setTime_t((*it).section(' ', 0 ,0).toUInt());
new KListViewItem(m_widget->topicHistoryList, (*it).section(' ', 1, 1), date.toString(Qt::LocalDate), (*it).section(' ', 2));
}
@@ -182,7 +182,7 @@ namespace Konversation
m_widget->topicEdit->setText(history.first().section(' ', 2));
}
- void ChannelOptionsDialog::topicHistoryItemClicked(QListViewItem* item)
+ void ChannelOptionsDialog::topicHistoryItemClicked(TQListViewItem* item)
{
// if they didn't click on anything, item is null
if(item)
@@ -216,7 +216,7 @@ namespace Konversation
void ChannelOptionsDialog::refreshAllowedChannelModes()
{
- QString modeString = m_channel->getServer()->allowedChannelModes();
+ TQString modeString = m_channel->getServer()->allowedChannelModes();
// These modes are handled in a special way: ntimslkbeI
modeString.remove('t');
modeString.remove('n');
@@ -234,13 +234,13 @@ namespace Konversation
for(unsigned int i = 0; i < modeString.length(); i++)
{
- new QCheckListItem(m_widget->otherModesList, QString(modeString[i]), QCheckListItem::CheckBox);
+ new TQCheckListItem(m_widget->otherModesList, TQString(modeString[i]), TQCheckListItem::CheckBox);
}
}
void ChannelOptionsDialog::refreshModes()
{
- QStringList modes = m_channel->getModeList();
+ TQStringList modes = m_channel->getModeList();
m_widget->topicModeChBox->setChecked(false);
m_widget->messageModeChBox->setChecked(false);
@@ -252,17 +252,17 @@ namespace Konversation
m_widget->keyModeChBox->setChecked(false);
m_widget->keyModeEdit->setText("");
- QListViewItem* item = m_widget->otherModesList->firstChild();
+ TQListViewItem* item = m_widget->otherModesList->firstChild();
while(item)
{
- static_cast<QCheckListItem*>(item)->setOn(false);
+ static_cast<TQCheckListItem*>(item)->setOn(false);
item = item->nextSibling();
}
char mode;
- for(QStringList::const_iterator it = modes.begin(); it != modes.end(); ++it)
+ for(TQStringList::const_iterator it = modes.begin(); it != modes.end(); ++it)
{
mode = (*it)[0];
@@ -295,7 +295,7 @@ namespace Konversation
{
bool found = false;
item = m_widget->otherModesList->firstChild();
- QString modeString;
+ TQString modeString;
modeString = mode;
while(item && !found)
@@ -303,7 +303,7 @@ namespace Konversation
if(item->text(0) == modeString)
{
found = true;
- static_cast<QCheckListItem*>(item)->setOn(true);
+ static_cast<TQCheckListItem*>(item)->setOn(true);
item->setText(1, (*it).mid(1));
}
else
@@ -320,10 +320,10 @@ namespace Konversation
refreshEnableModes();
}
- QStringList ChannelOptionsDialog::modes()
+ TQStringList ChannelOptionsDialog::modes()
{
- QStringList modes;
- QString mode;
+ TQStringList modes;
+ TQString mode;
mode = (m_widget->topicModeChBox->isChecked() ? "+" : "-");
mode += 't';
@@ -332,7 +332,7 @@ namespace Konversation
mode += 'n';
modes.append(mode);
mode = (m_widget->userLimitChBox->isChecked() ? "+" : "-");
- mode += 'l' + QString::number( m_widget->userLimitEdit->value() );
+ mode += 'l' + TQString::number( m_widget->userLimitEdit->value() );
modes.append(mode);
mode = (m_widget->inviteModeChBox->isChecked() ? "+" : "-");
mode += 'i';
@@ -357,11 +357,11 @@ namespace Konversation
modes.append(mode);
}
- QListViewItem* item = m_widget->otherModesList->firstChild();
+ TQListViewItem* item = m_widget->otherModesList->firstChild();
while(item)
{
- mode = (static_cast<QCheckListItem*>(item)->isOn() ? "+" : "-");
+ mode = (static_cast<TQCheckListItem*>(item)->isOn() ? "+" : "-");
mode += item->text(0) + item->text(1);
modes.append(mode);
item = item->nextSibling();
@@ -374,30 +374,30 @@ namespace Konversation
void ChannelOptionsDialog::refreshBanList()
{
- QStringList banlist = m_channel->getBanList();
+ TQStringList banlist = m_channel->getBanList();
m_widget->banList->clear();
- for (QStringList::const_iterator it = banlist.fromLast(); it != banlist.end(); --it)
+ for (TQStringList::const_iterator it = banlist.fromLast(); it != banlist.end(); --it)
addBan((*it));
}
- void ChannelOptionsDialog::addBan(const QString& newban)
+ void ChannelOptionsDialog::addBan(const TQString& newban)
{
new BanListViewItem(m_widget->banList, newban.section(' ', 0, 0), newban.section(' ', 1, 1).section('!', 0, 0), newban.section(' ', 2 ,2).toUInt());
}
- void ChannelOptionsDialog::removeBan(const QString& ban)
+ void ChannelOptionsDialog::removeBan(const TQString& ban)
{
delete m_widget->banList->findItem(ban, 0);
}
- void ChannelOptionsDialog::banEdited(QListViewItem *edited)
+ void ChannelOptionsDialog::banEdited(TQListViewItem *edited)
{
if (edited == m_NewBan)
{
if (!m_NewBan->text(0).isEmpty())
{
- m_channel->getServer()->requestBan(QStringList(m_NewBan->text(0)), m_channel->getName(), QString());
+ m_channel->getServer()->requestBan(TQStringList(m_NewBan->text(0)), m_channel->getName(), TQString());
}
// We will delete the item and let the addBan slot handle
@@ -418,7 +418,7 @@ namespace Konversation
if (!new_edited->text(0).isEmpty())
{
- m_channel->getServer()->requestBan(QStringList(new_edited->text(0)), m_channel->getName(), QString());
+ m_channel->getServer()->requestBan(TQStringList(new_edited->text(0)), m_channel->getName(), TQString());
}
// We delete the existing item because it's possible the server may
@@ -446,7 +446,7 @@ namespace Konversation
{
if (m_widget->banList->renameLineEdit()->isShown())
{
- QKeyEvent e(QEvent::KeyPress, Qt::Key_Escape, 27, Qt::NoButton);
+ TQKeyEvent e(TQEvent::KeyPress, Qt::Key_Escape, 27, Qt::NoButton);
KApplication::sendEvent(m_widget->banList->renameLineEdit(), &e);
}
@@ -459,7 +459,7 @@ namespace Konversation
{
if (m_widget->banList->renameLineEdit()->isShown())
{
- QKeyEvent e(QEvent::KeyPress, Qt::Key_Return, 13, Qt::NoButton);
+ TQKeyEvent e(TQEvent::KeyPress, Qt::Key_Return, 13, Qt::NoButton);
KApplication::sendEvent(m_widget->banList->renameLineEdit(), &e);
}
@@ -467,33 +467,33 @@ namespace Konversation
// This is our implementation of BanListViewItem
- BanListViewItem::BanListViewItem(QListView *parent)
+ BanListViewItem::BanListViewItem(TQListView *parent)
: KListViewItem(parent)
{
m_isNewBan = 0;
}
- BanListViewItem::BanListViewItem(QListView *parent, bool isNew)
+ BanListViewItem::BanListViewItem(TQListView *parent, bool isNew)
: KListViewItem(parent)
{
m_isNewBan = isNew;
}
- BanListViewItem::BanListViewItem (QListView *parent, const QString& label1, const QString& label2,
+ BanListViewItem::BanListViewItem (TQListView *parent, const TQString& label1, const TQString& label2,
uint timestamp) : KListViewItem(parent, label1, label2)
{
m_isNewBan = 0;
m_timestamp.setTime_t(timestamp);
}
- BanListViewItem::BanListViewItem (QListView *parent, bool isNew, const QString& label1, const QString& label2,
+ BanListViewItem::BanListViewItem (TQListView *parent, bool isNew, const TQString& label1, const TQString& label2,
uint timestamp) : KListViewItem(parent, label1, label2)
{
m_isNewBan = isNew;
m_timestamp.setTime_t(timestamp);
}
- QString BanListViewItem::text(int column) const
+ TQString BanListViewItem::text(int column) const
{
if (column == 2)
return KGlobal::locale()->formatDateTime(m_timestamp, true, true);
@@ -501,7 +501,7 @@ namespace Konversation
return KListViewItem::text(column);
}
- int BanListViewItem::compare(QListViewItem *i, int col, bool ascending) const
+ int BanListViewItem::compare(TQListViewItem *i, int col, bool ascending) const
{
if (col == 2)
{
diff --git a/konversation/src/channeloptionsdialog.h b/konversation/src/channeloptionsdialog.h
index b947fee..d848e1b 100644
--- a/konversation/src/channeloptionsdialog.h
+++ b/konversation/src/channeloptionsdialog.h
@@ -14,7 +14,7 @@
#include "channel.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdialogbase.h>
#include <klistview.h>
@@ -31,8 +31,8 @@ namespace Konversation
explicit ChannelOptionsDialog(Channel *channel);
~ChannelOptionsDialog();
- QString topic();
- QStringList modes();
+ TQString topic();
+ TQStringList modes();
public slots:
@@ -43,17 +43,17 @@ namespace Konversation
void toggleAdvancedModes();
void refreshBanList();
- void addBan(const QString& newban);
+ void addBan(const TQString& newban);
void addBanClicked();
- void removeBan(const QString& ban);
+ void removeBan(const TQString& ban);
void removeBanClicked();
- void banEdited(QListViewItem *edited);
+ void banEdited(TQListViewItem *edited);
void changeOptions();
protected slots:
- void topicHistoryItemClicked(QListViewItem* item);
+ void topicHistoryItemClicked(TQListViewItem* item);
void topicBeingEdited(bool state);
void cancelClicked();
@@ -62,7 +62,7 @@ namespace Konversation
protected:
bool m_editingTopic;
- QListViewItem *m_NewBan;
+ TQListViewItem *m_NewBan;
private:
@@ -77,25 +77,25 @@ namespace Konversation
class BanListViewItem : public KListViewItem
{
public:
- explicit BanListViewItem( QListView *parent );
- BanListViewItem(QListView *parent, bool isNew);
- BanListViewItem(QListView *parent, const QString& label1, const QString& label2 = QString(), uint timestamp = 0);
- BanListViewItem (QListView *parent, bool isNew, const QString& label1, const QString& label2 = QString(), uint timestamp = 0);
+ explicit BanListViewItem( TQListView *parent );
+ BanListViewItem(TQListView *parent, bool isNew);
+ BanListViewItem(TQListView *parent, const TQString& label1, const TQString& label2 = TQString(), uint timestamp = 0);
+ BanListViewItem (TQListView *parent, bool isNew, const TQString& label1, const TQString& label2 = TQString(), uint timestamp = 0);
- QString getOldValue() { return m_oldValue; }
- QDateTime timestamp() { return m_timestamp; }
+ TQString getOldValue() { return m_oldValue; }
+ TQDateTime timestamp() { return m_timestamp; }
- virtual QString text(int column) const;
- virtual int compare(QListViewItem *i, int col, bool ascending) const;
+ virtual TQString text(int column) const;
+ virtual int compare(TQListViewItem *i, int col, bool ascending) const;
virtual void startRename(int col);
protected:
virtual void cancelRename(int col);
- QString m_oldValue;
+ TQString m_oldValue;
bool m_isNewBan;
- QDateTime m_timestamp;
+ TQDateTime m_timestamp;
};
}
diff --git a/konversation/src/chatwindow.cpp b/konversation/src/chatwindow.cpp
index b3a024b..6349576 100644
--- a/konversation/src/chatwindow.cpp
+++ b/konversation/src/chatwindow.cpp
@@ -17,12 +17,12 @@
#include "konversationapplication.h"
#include "logfilereader.h"
-#include <qdatetime.h>
-#include <qdir.h>
-#include <qregexp.h>
-#include <qtextcodec.h>
-#include <qtooltip.h>
-#include <qlayout.h>
+#include <tqdatetime.h>
+#include <tqdir.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
+#include <tqtooltip.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kdialog.h>
@@ -31,7 +31,7 @@
#include <kaction.h>
-ChatWindow::ChatWindow(QWidget* parent) : QVBox(parent)
+ChatWindow::ChatWindow(TQWidget* parent) : TQVBox(parent)
{
setName("ChatWindowObject");
setTextView(0);
@@ -65,19 +65,19 @@ void ChatWindow::updateAppearance()
if (textView)
{
if (Preferences::showIRCViewScrollBar())
- textView->setVScrollBarMode(QScrollView::AlwaysOn);
+ textView->setVScrollBarMode(TQScrollView::AlwaysOn);
else
- textView->setVScrollBarMode(QScrollView::AlwaysOff);
+ textView->setVScrollBarMode(TQScrollView::AlwaysOff);
}
}
-void ChatWindow::setName(const QString& newName)
+void ChatWindow::setName(const TQString& newName)
{
name=newName;
emit nameChanged(this,newName);
}
-QString ChatWindow::getName()
+TQString ChatWindow::getName()
{
return name;
}
@@ -101,7 +101,7 @@ void ChatWindow::setServer(Server* newServer)
else
{
m_server=newServer;
- connect(m_server,SIGNAL (serverOnline(bool)),this,SLOT (serverOnline(bool)) );
+ connect(m_server,TQT_SIGNAL (serverOnline(bool)),this,TQT_SLOT (serverOnline(bool)) );
// check if we need to set up the signals
if(getType() != ChannelList)
@@ -135,38 +135,38 @@ void ChatWindow::setTextView(IRCView* newView)
if(Preferences::showIRCViewScrollBar())
{
- textView->setVScrollBarMode(QScrollView::Auto);
+ textView->setVScrollBarMode(TQScrollView::Auto);
}
else
{
- textView->setVScrollBarMode(QScrollView::AlwaysOff);
+ textView->setVScrollBarMode(TQScrollView::AlwaysOff);
}
textView->setChatWin(this);
- connect(textView,SIGNAL(textToLog(const QString&)), this,SLOT(logText(const QString&)));
- connect(textView,SIGNAL(setStatusBarTempText(const QString&)), this, SIGNAL(setStatusBarTempText(const QString&)));
- connect(textView,SIGNAL(clearStatusBarTempText()), this, SIGNAL(clearStatusBarTempText()));
+ connect(textView,TQT_SIGNAL(textToLog(const TQString&)), this,TQT_SLOT(logText(const TQString&)));
+ connect(textView,TQT_SIGNAL(setStatusBarTempText(const TQString&)), this, TQT_SIGNAL(setStatusBarTempText(const TQString&)));
+ connect(textView,TQT_SIGNAL(clearStatusBarTempText()), this, TQT_SIGNAL(clearStatusBarTempText()));
}
-void ChatWindow::appendRaw(const QString& message, bool suppressTimestamps)
+void ChatWindow::appendRaw(const TQString& message, bool suppressTimestamps)
{
if(!textView) return;
textView->appendRaw(message, suppressTimestamps);
}
-void ChatWindow::append(const QString& nickname,const QString& message)
+void ChatWindow::append(const TQString& nickname,const TQString& message)
{
if(!textView) return ;
textView->append(nickname,message);
}
-void ChatWindow::appendQuery(const QString& nickname,const QString& message, bool inChannel)
+void ChatWindow::appendQuery(const TQString& nickname,const TQString& message, bool inChannel)
{
if(!textView) return ;
textView->appendQuery(nickname,message, inChannel);
}
-void ChatWindow::appendAction(const QString& nickname, const QString& message)
+void ChatWindow::appendAction(const TQString& nickname, const TQString& message)
{
if(!textView) return;
@@ -176,19 +176,19 @@ void ChatWindow::appendAction(const QString& nickname, const QString& message)
textView->appendChannelAction(nickname, message);
}
-void ChatWindow::appendServerMessage(const QString& type,const QString& message, bool parseURL)
+void ChatWindow::appendServerMessage(const TQString& type,const TQString& message, bool parseURL)
{
if(!textView) return ;
textView->appendServerMessage(type,message, parseURL);
}
-void ChatWindow::appendCommandMessage(const QString& command,const QString& message, bool important, bool parseURL, bool self)
+void ChatWindow::appendCommandMessage(const TQString& command,const TQString& message, bool important, bool parseURL, bool self)
{
if(!textView) return ;
textView->appendCommandMessage(command,message,important, parseURL, self);
}
-void ChatWindow::appendBacklogMessage(const QString& firstColumn,const QString& message)
+void ChatWindow::appendBacklogMessage(const TQString& firstColumn,const TQString& message)
{
if(!textView) return ;
textView->appendBacklogMessage(firstColumn,message);
@@ -196,7 +196,7 @@ void ChatWindow::appendBacklogMessage(const QString& firstColumn,const QString&
void ChatWindow::cdIntoLogPath()
{
- QDir logPath=QDir::home();
+ TQDir logPath=TQDir::home();
// Try to "cd" into the logfile path
if(!logPath.cd(Preferences::logfilePath(),true))
{
@@ -213,7 +213,7 @@ void ChatWindow::cdIntoLogPath()
logfile.setName(logPath.path()+'/'+logName);
}
-void ChatWindow::setLogfileName(const QString& name)
+void ChatWindow::setLogfileName(const TQString& name)
{
// Only change name of logfile if the window was new.
if(firstLog)
@@ -226,7 +226,7 @@ void ChatWindow::setLogfileName(const QString& name)
else if (m_server)
{
// make sure that no path delimiters are in the name
- logName = QString(m_server->getDisplayName().lower()).append('_').append(name).append(".log").replace('/','_');
+ logName = TQString(m_server->getDisplayName().lower()).append('_').append(name).append(".log").replace('/','_');
}
// load backlog to show
@@ -240,19 +240,19 @@ void ChatWindow::setLogfileName(const QString& name)
{
unsigned long filePosition;
- QString backlogLine;
- QTextStream backlog(&logfile);
- backlog.setEncoding(QTextStream::UnicodeUTF8);
+ TQString backlogLine;
+ TQTextStream backlog(&logfile);
+ backlog.setEncoding(TQTextStream::UnicodeUTF8);
- QStringList firstColumns;
- QStringList messages;
+ TQStringList firstColumns;
+ TQStringList messages;
int offset = 0;
unsigned int lastPacketHeadPosition = backlog.device()->size();
const unsigned int packetSize = 4096;
while(messages.count() < (unsigned int)Preferences::backlogLines() && backlog.device()->size() > packetSize * offset)
{
- QStringList firstColumnsInPacket;
- QStringList messagesInPacket;
+ TQStringList firstColumnsInPacket;
+ TQStringList messagesInPacket;
// packetSize * offset < size <= packetSize * ( offset + 1 )
@@ -286,7 +286,7 @@ void ChatWindow::setLogfileName(const QString& name)
if(backlogLine.find('\t') != -1)
{
// extract first column from log
- QString backlogFirst = backlogLine.left(backlogLine.find('\t'));
+ TQString backlogFirst = backlogLine.left(backlogLine.find('\t'));
// cut first column from line
backlogLine = backlogLine.mid(backlogLine.find('\t') + 1);
// Logfile is in utf8 so we don't need to do encoding stuff here
@@ -318,8 +318,8 @@ void ChatWindow::setLogfileName(const QString& name)
}
}
- QStringList::Iterator itFirstColumn = firstColumns.begin();
- QStringList::Iterator itMessage = messages.begin();
+ TQStringList::Iterator itFirstColumn = firstColumns.begin();
+ TQStringList::Iterator itMessage = messages.begin();
for( ; itFirstColumn != firstColumns.end() ; ++itFirstColumn, ++itMessage )
appendBacklogMessage(*itFirstColumn, *itMessage);
}
@@ -327,7 +327,7 @@ void ChatWindow::setLogfileName(const QString& name)
}
}
-void ChatWindow::logText(const QString& text)
+void ChatWindow::logText(const TQString& text)
{
if(log)
{
@@ -337,19 +337,19 @@ void ChatWindow::logText(const QString& text)
if(logfile.open(IO_WriteOnly | IO_Append))
{
// wrap the file into a stream
- QTextStream logStream(&logfile);
+ TQTextStream logStream(&logfile);
// write log in utf8 to help i18n
- logStream.setEncoding(QTextStream::UnicodeUTF8);
+ logStream.setEncoding(TQTextStream::UnicodeUTF8);
if(firstLog)
{
- QString intro(i18n("\n*** Logfile started\n*** on %1\n\n").arg(QDateTime::currentDateTime().toString()));
+ TQString intro(i18n("\n*** Logfile started\n*** on %1\n\n").arg(TQDateTime::currentDateTime().toString()));
logStream << intro;
firstLog=false;
}
- QTime time=QTime::currentTime();
- QString logLine(QString("[%1] [%2] %3\n").arg(QDate::currentDate(Qt::LocalTime).toString()).
+ TQTime time=TQTime::currentTime();
+ TQString logLine(TQString("[%1] [%2] %3\n").arg(TQDate::currentDate(Qt::LocalTime).toString()).
arg(time.toString("hh:mm:ss")).arg(text));
logStream << logLine;
@@ -402,9 +402,9 @@ void ChatWindow::setLog(bool activate)
}
// reimplement this in all panels that have user input
-QString ChatWindow::getTextInLine()
+TQString ChatWindow::getTextInLine()
{
- return QString();
+ return TQString();
}
bool ChatWindow::canBeFrontView()
@@ -423,7 +423,7 @@ void ChatWindow::indicateAway(bool)
}
// reimplement this in all panels that have user input
-void ChatWindow::appendInputText(const QString&, bool)
+void ChatWindow::appendInputText(const TQString&, bool)
{
}
@@ -435,11 +435,11 @@ bool ChatWindow::closeYourself(bool /* askForConfirmation */)
return true;
}
-bool ChatWindow::eventFilter(QObject* watched, QEvent* e)
+bool ChatWindow::eventFilter(TQObject* watched, TQEvent* e)
{
- if(e->type() == QEvent::KeyPress)
+ if(e->type() == TQEvent::KeyPress)
{
- QKeyEvent* ke = static_cast<QKeyEvent*>(e);
+ TQKeyEvent* ke = static_cast<TQKeyEvent*>(e);
bool scrollMod = (Preferences::useMultiRowInputBox() ? false : (ke->state() == Qt::ShiftButton));
@@ -447,7 +447,7 @@ bool ChatWindow::eventFilter(QObject* watched, QEvent* e)
{
if(textView)
{
- QScrollBar* sbar = textView->verticalScrollBar();
+ TQScrollBar* sbar = textView->verticalScrollBar();
sbar->setValue(sbar->value() - sbar->lineStep());
}
@@ -457,7 +457,7 @@ bool ChatWindow::eventFilter(QObject* watched, QEvent* e)
{
if(textView)
{
- QScrollBar* sbar = textView->verticalScrollBar();
+ TQScrollBar* sbar = textView->verticalScrollBar();
sbar->setValue(sbar->value() + sbar->lineStep());
}
@@ -467,7 +467,7 @@ bool ChatWindow::eventFilter(QObject* watched, QEvent* e)
{
if(textView)
{
- QScrollBar* sbar = textView->verticalScrollBar();
+ TQScrollBar* sbar = textView->verticalScrollBar();
sbar->setValue(sbar->value() - sbar->pageStep());
}
@@ -477,7 +477,7 @@ bool ChatWindow::eventFilter(QObject* watched, QEvent* e)
{
if(textView)
{
- QScrollBar* sbar = textView->verticalScrollBar();
+ TQScrollBar* sbar = textView->verticalScrollBar();
sbar->setValue(sbar->value() + sbar->pageStep());
}
@@ -486,7 +486,7 @@ bool ChatWindow::eventFilter(QObject* watched, QEvent* e)
}
- return QVBox::eventFilter(watched, e);
+ return TQVBox::eventFilter(watched, e);
}
void ChatWindow::adjustFocus()
@@ -496,11 +496,11 @@ void ChatWindow::adjustFocus()
void ChatWindow::emitUpdateInfo()
{
- QString info = getName();
+ TQString info = getName();
emit updateInfo(info);
}
-QColor ChatWindow::highlightColor()
+TQColor ChatWindow::highlightColor()
{
return getTextView()->highlightColor();
}
diff --git a/konversation/src/chatwindow.h b/konversation/src/chatwindow.h
index 55c0efc..b063970 100644
--- a/konversation/src/chatwindow.h
+++ b/konversation/src/chatwindow.h
@@ -16,8 +16,8 @@
#include "identity.h"
#include "common.h"
-#include <qvbox.h>
-#include <qfile.h>
+#include <tqvbox.h>
+#include <tqfile.h>
class IRCView;
@@ -29,7 +29,7 @@ class ChatWindow : public QVBox
Q_OBJECT
public:
- explicit ChatWindow(QWidget* parent);
+ explicit ChatWindow(TQWidget* parent);
~ChatWindow();
enum WindowType
@@ -67,23 +67,23 @@ class ChatWindow : public QVBox
IRCView* getTextView() const;
void setLog(bool activate);
- QString getName();
+ TQString getName();
void setType(WindowType newType);
WindowType getType();
- virtual void append(const QString& nickname,const QString& message);
- virtual void appendRaw(const QString& message, bool suppressTimestamps=false);
- virtual void appendQuery(const QString& nickname,const QString& message, bool inChannel = false);
- virtual void appendAction(const QString& nickname,const QString& message);
- virtual void appendServerMessage(const QString& type,const QString& message, bool parseURL = true);
- virtual void appendCommandMessage(const QString& command, const QString& message, bool important = true,
+ virtual void append(const TQString& nickname,const TQString& message);
+ virtual void appendRaw(const TQString& message, bool suppressTimestamps=false);
+ virtual void appendQuery(const TQString& nickname,const TQString& message, bool inChannel = false);
+ virtual void appendAction(const TQString& nickname,const TQString& message);
+ virtual void appendServerMessage(const TQString& type,const TQString& message, bool parseURL = true);
+ virtual void appendCommandMessage(const TQString& command, const TQString& message, bool important = true,
bool parseURL = true, bool self = false);
- virtual void appendBacklogMessage(const QString& firstColumn,const QString& message);
+ virtual void appendBacklogMessage(const TQString& firstColumn,const TQString& message);
- QWidget* parentWidget;
+ TQWidget* parentWidget;
- virtual QString getTextInLine();
+ virtual TQString getTextInLine();
/** Clean up and close this tab. Return false if you want to cancel the close. */
virtual bool closeYourself(bool askForConfirmation = true);
/** Reimplement this to return true in all classes that /can/ become front view.
@@ -96,13 +96,13 @@ class ChatWindow : public QVBox
virtual bool notificationsEnabled() { return m_notificationsEnabled; }
- virtual bool eventFilter(QObject* watched, QEvent* e);
+ virtual bool eventFilter(TQObject* watched, TQEvent* e);
- QString logFileName() { return logfile.name(); }
+ TQString logFileName() { return logfile.name(); }
- virtual void setChannelEncoding(const QString& /* encoding */) {}
- virtual QString getChannelEncoding() { return QString(); }
- virtual QString getChannelEncodingDefaultDesc() { return QString(); }
+ virtual void setChannelEncoding(const TQString& /* encoding */) {}
+ virtual TQString getChannelEncoding() { return TQString(); }
+ virtual TQString getChannelEncodingDefaultDesc() { return TQString(); }
bool isChannelEncodingSupported() const;
/** Force updateInfo(info) to be emitted.
@@ -121,18 +121,18 @@ class ChatWindow : public QVBox
virtual bool areIRCColorsSupported() {return false; }
Konversation::TabNotifyType currentTabNotification() { return m_currentTabNotify; }
- QColor highlightColor();
+ TQColor highlightColor();
signals:
- void nameChanged(ChatWindow* view, const QString& newName);
+ void nameChanged(ChatWindow* view, const TQString& newName);
//void online(ChatWindow* myself, bool state);
/** Emit this signal when you want to change the status bar text for this tab.
* It is ignored if this tab isn't focused.
*/
- void updateInfo(const QString &info);
+ void updateInfo(const TQString &info);
void updateTabNotification(ChatWindow* chatWin, const Konversation::TabNotifyType& type);
- void setStatusBarTempText(const QString&);
+ void setStatusBarTempText(const TQString&);
void clearStatusBarTempText();
void closing(ChatWindow* myself);
@@ -140,7 +140,7 @@ class ChatWindow : public QVBox
public slots:
void updateAppearance();
- void logText(const QString& text);
+ void logText(const TQString& text);
/**
* This is called when a chat window gains focus.
@@ -150,7 +150,7 @@ class ChatWindow : public QVBox
*/
void adjustFocus();
- virtual void appendInputText(const QString&, bool fromCursor);
+ virtual void appendInputText(const TQString&, bool fromCursor);
virtual void indicateAway(bool away);
@@ -169,12 +169,12 @@ class ChatWindow : public QVBox
* The name is the string that is shown in the tab.
* @param newName The name to show in the tab
*/
- virtual void setName(const QString& newName);
+ virtual void setName(const TQString& newName);
/** Called from adjustFocus */
virtual void childAdjustFocus() = 0;
- void setLogfileName(const QString& name);
+ void setLogfileName(const TQString& name);
void setChannelEncodingSupported(bool enabled);
void cdIntoLogPath();
@@ -183,17 +183,17 @@ class ChatWindow : public QVBox
bool log;
bool firstLog;
- QString name;
- QString logName;
+ TQString name;
+ TQString logName;
- QFont font;
+ TQFont font;
IRCView* textView;
/** A pointer to the server this chatwindow is part of.
* Not always non-null - e.g. for konsolepanel
*/
Server* m_server;
- QFile logfile;
+ TQFile logfile;
WindowType type;
bool m_notificationsEnabled;
diff --git a/konversation/src/common.cpp b/konversation/src/common.cpp
index afd6c97..12e8554 100644
--- a/konversation/src/common.cpp
+++ b/konversation/src/common.cpp
@@ -14,12 +14,12 @@
#include "konversationapplication.h"
#include "config/preferences.h"
-#include <qcstring.h>
-#include <qstring.h>
-#include <qregexp.h>
-#include <qpixmap.h>
-#include <qbitmap.h>
-#include <qpainter.h>
+#include <tqcstring.h>
+#include <tqstring.h>
+#include <tqregexp.h>
+#include <tqpixmap.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
#include <klocale.h>
@@ -29,35 +29,35 @@ namespace Konversation
#include "guess_ja.cpp"
#include "unicode.cpp"
- static QRegExp colorRegExp("((\003([0-9]|0[0-9]|1[0-5])(,([0-9]|0[0-9]|1[0-5])|)|\017)|\x02|\x09|\x13|\x16|\x1f)");
- static QRegExp urlPattern("((www\\.(?!\\.)|(fish|irc|(f|sf|ht)tp(|s))://)(\\.?[\\d\\w/,\\':~\\?=;#@\\-\\+\\%\\*\\{\\}\\!\\(\\)]|&)+)|"
+ static TQRegExp colorRegExp("((\003([0-9]|0[0-9]|1[0-5])(,([0-9]|0[0-9]|1[0-5])|)|\017)|\x02|\x09|\x13|\x16|\x1f)");
+ static TQRegExp urlPattern("((www\\.(?!\\.)|(fish|irc|(f|sf|ht)tp(|s))://)(\\.?[\\d\\w/,\\':~\\?=;#@\\-\\+\\%\\*\\{\\}\\!\\(\\)]|&)+)|"
"([-.\\d\\w]+@[-.\\d\\w]{2,}\\.[\\w]{2,})");
- static QRegExp tdlPattern("(.*)\\.(\\w+),$");
+ static TQRegExp tdlPattern("(.*)\\.(\\w+),$");
- QString removeIrcMarkup(const QString& text)
+ TQString removeIrcMarkup(const TQString& text)
{
- QString escaped = text;
+ TQString escaped = text;
// Escape text decoration
escaped.remove(colorRegExp);
// Remove Mirc's 0x03 characters too, they show up as rectangles
- escaped.remove(QChar(0x03));
+ escaped.remove(TQChar(0x03));
return escaped;
}
- QString tagURLs(const QString& text, const QString& fromNick, bool useCustomColor)
+ TQString tagURLs(const TQString& text, const TQString& fromNick, bool useCustomColor)
{
- // QTime timer;
+ // TQTime timer;
// timer.start();
- QString filteredLine = text;
- QString linkColor = Preferences::color(Preferences::Hyperlink).name();
- QString link;
- QString insertText;
+ TQString filteredLine = text;
+ TQString linkColor = Preferences::color(Preferences::Hyperlink).name();
+ TQString link;
+ TQString insertText;
int pos = 0;
int urlLen = 0;
- QString href;
+ TQString href;
if(useCustomColor)
{
@@ -70,7 +70,7 @@ namespace Konversation
if(filteredLine.contains("#"))
{
- QRegExp chanExp("(^|\\s|^\"|\\s\"|,|'|\\(|\\:|!|@|%|\\+)(#[^,\\s;\\)\\:\\/\\(\\<\\>]*[^.,\\s;\\)\\:\\/\\(\"\''\\<\\>])");
+ TQRegExp chanExp("(^|\\s|^\"|\\s\"|,|'|\\(|\\:|!|@|%|\\+)(#[^,\\s;\\)\\:\\/\\(\\<\\>]*[^.,\\s;\\)\\:\\/\\(\"\''\\<\\>])");
while((pos = chanExp.search(filteredLine, pos)) >= 0)
{
href = chanExp.cap(2);
@@ -78,7 +78,7 @@ namespace Konversation
pos += chanExp.cap(1).length();
// HACK:Use space as a placeholder for \ as Qt tries to be clever and does a replace to / in urls in QTextEdit
- insertText = link.arg(QString(href).replace('\\', " "), href);
+ insertText = link.arg(TQString(href).replace('\\', " "), href);
filteredLine.replace(pos, urlLen, insertText);
pos += insertText.length();
}
@@ -88,7 +88,7 @@ namespace Konversation
urlLen = 0;
urlPattern.setCaseSensitive(false);
- QString protocol;
+ TQString protocol;
if(useCustomColor)
{
@@ -101,7 +101,7 @@ namespace Konversation
while((pos = urlPattern.search(filteredLine, pos)) >= 0)
{
- QString append;
+ TQString append;
// check if the matched text is already replaced as a channel
if ( filteredLine.findRev( "<a", pos ) > filteredLine.findRev( "</a>", pos ) )
@@ -151,7 +151,7 @@ namespace Konversation
// Use \x0b as a placeholder for & so we can readd them after changing all & in the normal text to &amp;
// HACK Replace % with \x03 in the url to keep Qt from doing stupid things
- insertText = link.arg(protocol, QString(href).replace('&', "\x0b").replace('%', "\x03"), href) + append;
+ insertText = link.arg(protocol, TQString(href).replace('&', "\x0b").replace('%', "\x03"), href) + append;
filteredLine.replace(pos, urlLen, insertText);
pos += insertText.length();
KonversationApplication::instance()->storeUrl(fromNick, href);
@@ -169,24 +169,24 @@ namespace Konversation
//TODO: there's room for optimization as pahlibar said. (strm)
// the below two functions were taken from kopeteonlinestatus.cpp.
- QBitmap overlayMasks( const QBitmap *under, const QBitmap *over )
+ TQBitmap overlayMasks( const TQBitmap *under, const TQBitmap *over )
{
- if ( !under && !over ) return QBitmap();
+ if ( !under && !over ) return TQBitmap();
if ( !under ) return *over;
if ( !over ) return *under;
- QBitmap result = *under;
+ TQBitmap result = *under;
bitBlt( &result, 0, 0, over, 0, 0, over->width(), over->height(), Qt::OrROP );
return result;
}
- QPixmap overlayPixmaps( const QPixmap &under, const QPixmap &over )
+ TQPixmap overlayPixmaps( const TQPixmap &under, const TQPixmap &over )
{
if ( over.isNull() ) return under;
- QImage imResult; imResult=under;
- QImage imOver; imOver=over;
- QPixmap result;
+ TQImage imResult; imResult=under;
+ TQImage imOver; imOver=over;
+ TQPixmap result;
bitBlt(&imResult,0,0,&imOver,0,0,imOver.width(),imOver.height(),0);
result=imResult;
diff --git a/konversation/src/common.h b/konversation/src/common.h
index fe5fa6d..f6af01a 100644
--- a/konversation/src/common.h
+++ b/konversation/src/common.h
@@ -13,18 +13,18 @@
#ifndef COMMON_H
#define COMMON_H
-class QCString;
-class QString;
-class QBitmap;
-class QPixmap;
+class TQCString;
+class TQString;
+class TQBitmap;
+class TQPixmap;
namespace Konversation
{
- QString removeIrcMarkup(const QString& text);
- QString tagURLs(const QString& text, const QString& fromNick, bool useCustomColor = true);
- QBitmap overlayMasks( const QBitmap *under, const QBitmap *over );
- QPixmap overlayPixmaps(const QPixmap &under, const QPixmap &over);
- bool isUtf8(const QCString& text);
+ TQString removeIrcMarkup(const TQString& text);
+ TQString tagURLs(const TQString& text, const TQString& fromNick, bool useCustomColor = true);
+ TQBitmap overlayMasks( const TQBitmap *under, const TQBitmap *over );
+ TQPixmap overlayPixmaps(const TQPixmap &under, const TQPixmap &over);
+ bool isUtf8(const TQCString& text);
enum TabNotifyType
{
diff --git a/konversation/src/config/preferences.cpp b/konversation/src/config/preferences.cpp
index 9910256..5534ac8 100644
--- a/konversation/src/config/preferences.cpp
+++ b/konversation/src/config/preferences.cpp
@@ -30,9 +30,9 @@
#include <kurl.h>
#include <kuser.h>
-#include <qpalette.h>
-#include <qregexp.h>
-#include <qfileinfo.h>
+#include <tqpalette.h>
+#include <tqregexp.h>
+#include <tqfileinfo.h>
Preferences *Preferences::mSelf = 0;
@@ -62,7 +62,7 @@ Preferences::Preferences()
mIdentity->setIdent(user.loginName());
mIdentity->setRealName(user.fullName());
- QStringList nickList;
+ TQStringList nickList;
nickList.append(user.loginName());
nickList.append(user.loginName() + '_');
nickList.append(user.loginName() + "__");
@@ -96,9 +96,9 @@ const Konversation::ServerGroupList Preferences::serverGroupList()
return self()->mServerGroupList;
}
-const QStringList Preferences::defaultQuickButtonList()
+const TQStringList Preferences::defaultQuickButtonList()
{
- return QStringList() << "Op,/OP %u%n"
+ return TQStringList() << "Op,/OP %u%n"
<< "DeOp,/DEOP %u%n"
<< "WhoIs,/WHOIS %s,%%u%n"
<< "Version,/CTCP %s,%%u VERSION%n"
@@ -108,12 +108,12 @@ const QStringList Preferences::defaultQuickButtonList()
<< "Quit,/QUIT Leaving...%n";
}
-const QStringList Preferences::quickButtonList()
+const TQStringList Preferences::quickButtonList()
{
return self()->mQuickButtonList;
}
-void Preferences::setQuickButtonList(const QStringList newList)
+void Preferences::setQuickButtonList(const TQStringList newList)
{
self()->mQuickButtonList=newList;
}
@@ -125,19 +125,19 @@ void Preferences::clearQuickButtonList()
// --------------------------- AutoReplace ---------------------------
-const QStringList Preferences::defaultAutoreplaceList()
+const TQStringList Preferences::defaultAutoreplaceList()
{
- return QStringList() << "1,o,\\[\\[([^\\s]+)\\]\\],http://en.wikipedia.org/wiki/Special:Search?go=Go&search=%1"
+ return TQStringList() << "1,o,\\[\\[([^\\s]+)\\]\\],http://en.wikipedia.org/wiki/Special:Search?go=Go&search=%1"
<< "1,o,([Dd][Bb][Uu][Gg]:)(\\w+),http://bugs.debian.org/%2"
<< "1,o,(BUG:|bug:)([0-9]+),http://bugs.kde.org/show_bug.cgi?id=%2";
}
-const QStringList Preferences::autoreplaceList()
+const TQStringList Preferences::autoreplaceList()
{
return self()->mAutoreplaceList;
}
-void Preferences::setAutoreplaceList(const QStringList newList)
+void Preferences::setAutoreplaceList(const TQStringList newList)
{
self()->mAutoreplaceList=newList;
}
@@ -182,7 +182,7 @@ const Konversation::ServerGroupSettingsPtr Preferences::serverGroupById(int id)
return 0;
}
-const Konversation::ServerGroupSettingsPtr Preferences::serverGroupByServer(const QString& server)
+const Konversation::ServerGroupSettingsPtr Preferences::serverGroupByServer(const TQString& server)
{
if (!self()->mServerGroupList.count())
{
@@ -205,7 +205,7 @@ const Konversation::ServerGroupSettingsPtr Preferences::serverGroupByServer(cons
return 0;
}
-int Preferences::serverGroupIdByName(const QString& serverGroup)
+int Preferences::serverGroupIdByName(const TQString& serverGroup)
{
Konversation::ServerGroupList::iterator it;
@@ -220,7 +220,7 @@ int Preferences::serverGroupIdByName(const QString& serverGroup)
return -1;
}
-bool Preferences::isServerGroup(const QString& server)
+bool Preferences::isServerGroup(const TQString& server)
{
Konversation::ServerGroupList::iterator it;
@@ -256,42 +256,42 @@ void Preferences::removeServerGroup(int id)
}
-const QPtrList<Highlight> Preferences::highlightList()
+const TQPtrList<Highlight> Preferences::highlightList()
{
return self()->mHighlightList;
}
-void Preferences::setHighlightList(QPtrList<Highlight> newList)
+void Preferences::setHighlightList(TQPtrList<Highlight> newList)
{
self()->mHighlightList.clear();
self()->mHighlightList=newList;
}
-void Preferences::addHighlight(const QString& newHighlight,
+void Preferences::addHighlight(const TQString& newHighlight,
bool regExp,
-const QColor &newColor,
-const QString& sound,
-const QString& autoText)
+const TQColor &newColor,
+const TQString& sound,
+const TQString& autoText)
{
self()->mHighlightList.append(new Highlight(newHighlight,regExp,newColor,KURL(sound),autoText));
}
-void Preferences::setIgnoreList(QPtrList<Ignore> newList)
+void Preferences::setIgnoreList(TQPtrList<Ignore> newList)
{
self()->mIgnoreList.clear();
self()->mIgnoreList=newList;
}
-void Preferences::addIgnore(const QString &newIgnore)
+void Preferences::addIgnore(const TQString &newIgnore)
{
- QStringList ignore = QStringList::split(',',newIgnore);
+ TQStringList ignore = TQStringList::split(',',newIgnore);
removeIgnore(ignore[0]);
self()->mIgnoreList.append(new Ignore(ignore[0],ignore[1].toInt()));
}
-bool Preferences::removeIgnore(const QString &oldIgnore)
+bool Preferences::removeIgnore(const TQString &oldIgnore)
{
- QPtrListIterator<Ignore> ignoreList( self()->mIgnoreList );
+ TQPtrListIterator<Ignore> ignoreList( self()->mIgnoreList );
while (ignoreList.current())
{
@@ -306,9 +306,9 @@ bool Preferences::removeIgnore(const QString &oldIgnore)
return false;
}
-bool Preferences::isIgnored(const QString &nickname)
+bool Preferences::isIgnored(const TQString &nickname)
{
- QPtrListIterator<Ignore> ignoreList( self()->mIgnoreList );
+ TQPtrListIterator<Ignore> ignoreList( self()->mIgnoreList );
while (ignoreList.current())
{
@@ -322,30 +322,30 @@ bool Preferences::isIgnored(const QString &nickname)
return false;
}
-void Preferences::setNotifyList(const QMap<int, QStringList> &newList)
+void Preferences::setNotifyList(const TQMap<int, TQStringList> &newList)
{ self()->mNotifyList=newList; }
-const QMap<int, QStringList> Preferences::notifyList() { return self()->mNotifyList; }
+const TQMap<int, TQStringList> Preferences::notifyList() { return self()->mNotifyList; }
-const QStringList Preferences::notifyListByGroupName(const QString& groupName)
+const TQStringList Preferences::notifyListByGroupName(const TQString& groupName)
{
int id=serverGroupIdByName(groupName);
if (id && self()->mNotifyList.find(id) != self()->mNotifyList.end())
return self()->mNotifyList[id];
else
- return QStringList();
+ return TQStringList();
}
-const QString Preferences::notifyStringByGroupName(const QString& groupName)
+const TQString Preferences::notifyStringByGroupName(const TQString& groupName)
{
return notifyListByGroupName(groupName).join(" ");
}
-bool Preferences::addNotify(int serverGroupId, const QString& newPattern)
+bool Preferences::addNotify(int serverGroupId, const TQString& newPattern)
{
if (!self()->mNotifyList[serverGroupId].contains(newPattern))
{
- QStringList nicknameList = self()->mNotifyList[serverGroupId];
+ TQStringList nicknameList = self()->mNotifyList[serverGroupId];
nicknameList.append(newPattern);
self()->mNotifyList[serverGroupId] = nicknameList;
return true;
@@ -353,14 +353,14 @@ bool Preferences::addNotify(int serverGroupId, const QString& newPattern)
return false;
}
-bool Preferences::removeNotify(const QString& groupName, const QString& pattern)
+bool Preferences::removeNotify(const TQString& groupName, const TQString& pattern)
{
int id=serverGroupIdByName(groupName);
if(!id) return false;
if (self()->mNotifyList.find(id) != self()->mNotifyList.end())
{
- QStringList nicknameList = self()->mNotifyList[id];
+ TQStringList nicknameList = self()->mNotifyList[id];
nicknameList.remove(pattern);
if (nicknameList.isEmpty())
self()->mNotifyList.remove(id);
@@ -371,11 +371,11 @@ bool Preferences::removeNotify(const QString& groupName, const QString& pattern)
return false;
}
-bool Preferences::isNotify(int serverGroupId, const QString& pattern)
+bool Preferences::isNotify(int serverGroupId, const TQString& pattern)
{
if (self()->mNotifyList.find(serverGroupId) != self()->mNotifyList.end())
{
- QStringList nicknameList = self()->mNotifyList[serverGroupId];
+ TQStringList nicknameList = self()->mNotifyList[serverGroupId];
if (nicknameList.contains(pattern)) return true;
}
@@ -407,10 +407,10 @@ void Preferences::setIdentityList(const IdentityList& list)
self()->mIdentityList = list;
}
-const IdentityPtr Preferences::identityByName(const QString& name)
+const IdentityPtr Preferences::identityByName(const TQString& name)
{
- QValueList<IdentityPtr> identities = identityList();
- QValueList<IdentityPtr>::iterator it = identities.begin();
+ TQValueList<IdentityPtr> identities = identityList();
+ TQValueList<IdentityPtr>::iterator it = identities.begin();
while(it != identities.end())
{
@@ -428,8 +428,8 @@ const IdentityPtr Preferences::identityByName(const QString& name)
const IdentityPtr Preferences::identityById(int id)
{
- QValueList<IdentityPtr> identList = identityList();
- for(QValueList<IdentityPtr>::iterator it = identList.begin(); it != identList.end(); ++it)
+ TQValueList<IdentityPtr> identList = identityList();
+ for(TQValueList<IdentityPtr>::iterator it = identList.begin(); it != identList.end(); ++it)
{
if((*it)->id() == id)
{
@@ -440,15 +440,15 @@ const IdentityPtr Preferences::identityById(int id)
return identList.first();
}
-QStringList Preferences::defaultAliasList()
+TQStringList Preferences::defaultAliasList()
{
// Auto-alias scripts
- QStringList scripts = KGlobal::dirs()->findAllResources("data","konversation/scripts/*");
- QFileInfo* fileInfo = new QFileInfo();
- QStringList aliasList;
- QString newAlias;
+ TQStringList scripts = KGlobal::dirs()->findAllResources("data","konversation/scripts/*");
+ TQFileInfo* fileInfo = new TQFileInfo();
+ TQStringList aliasList;
+ TQString newAlias;
- for (QStringList::ConstIterator it = scripts.begin(); it != scripts.end(); ++it)
+ for (TQStringList::ConstIterator it = scripts.begin(); it != scripts.end(); ++it)
{
fileInfo->setFile(*it);
if (fileInfo->isExecutable())
@@ -478,33 +478,33 @@ QStringList Preferences::defaultAliasList()
}
-const QString Preferences::realName() { return self()->mIdentityList[0]->getRealName(); }
-void Preferences::setRealName(const QString &name) { self()->mIdentityList[0]->setRealName(name); }
+const TQString Preferences::realName() { return self()->mIdentityList[0]->getRealName(); }
+void Preferences::setRealName(const TQString &name) { self()->mIdentityList[0]->setRealName(name); }
-const QString Preferences::ident() { return self()->mIdentityList[0]->getIdent(); }
-void Preferences::setIdent(const QString &ident) { self()->mIdentityList[0]->setIdent(ident); }
+const TQString Preferences::ident() { return self()->mIdentityList[0]->getIdent(); }
+void Preferences::setIdent(const TQString &ident) { self()->mIdentityList[0]->setIdent(ident); }
-const QString Preferences::partReason() { return self()->mIdentityList[0]->getPartReason(); }
-void Preferences::setPartReason(const QString &newReason) { self()->mIdentityList[0]->setPartReason(newReason); }
+const TQString Preferences::partReason() { return self()->mIdentityList[0]->getPartReason(); }
+void Preferences::setPartReason(const TQString &newReason) { self()->mIdentityList[0]->setPartReason(newReason); }
-const QString Preferences::kickReason() { return self()->mIdentityList[0]->getKickReason(); }
-void Preferences::setKickReason(const QString &newReason) { self()->mIdentityList[0]->setKickReason(newReason); }
+const TQString Preferences::kickReason() { return self()->mIdentityList[0]->getKickReason(); }
+void Preferences::setKickReason(const TQString &newReason) { self()->mIdentityList[0]->setKickReason(newReason); }
bool Preferences::showAwayMessage() { return self()->mIdentityList[0]->getShowAwayMessage(); }
void Preferences::setShowAwayMessage(bool state) { self()->mIdentityList[0]->setShowAwayMessage(state); }
-const QString Preferences::awayMessage() { return self()->mIdentityList[0]->getAwayMessage(); }
-void Preferences::setAwayMessage(const QString &newMessage) { self()->mIdentityList[0]->setAwayMessage(newMessage); }
-const QString Preferences::unAwayMessage() { return self()->mIdentityList[0]->getReturnMessage(); }
-void Preferences::setUnAwayMessage(const QString &newMessage) { self()->mIdentityList[0]->setReturnMessage(newMessage); }
+const TQString Preferences::awayMessage() { return self()->mIdentityList[0]->getAwayMessage(); }
+void Preferences::setAwayMessage(const TQString &newMessage) { self()->mIdentityList[0]->setAwayMessage(newMessage); }
+const TQString Preferences::unAwayMessage() { return self()->mIdentityList[0]->getReturnMessage(); }
+void Preferences::setUnAwayMessage(const TQString &newMessage) { self()->mIdentityList[0]->setReturnMessage(newMessage); }
void Preferences::clearIgnoreList() { self()->mIgnoreList.clear(); }
-const QPtrList<Ignore> Preferences::ignoreList() { return self()->mIgnoreList; }
+const TQPtrList<Ignore> Preferences::ignoreList() { return self()->mIgnoreList; }
-const QString Preferences::nickname(int index) { return self()->mIdentityList[0]->getNickname(index); }
-const QStringList Preferences::nicknameList() { return self()->mIdentityList[0]->getNicknameList(); }
-void Preferences::setNickname(int index,const QString &newName) { self()->mIdentityList[0]->setNickname(index,newName); }
-void Preferences::setNicknameList(const QStringList &newList) { self()->mIdentityList[0]->setNicknameList(newList); }
+const TQString Preferences::nickname(int index) { return self()->mIdentityList[0]->getNickname(index); }
+const TQStringList Preferences::nicknameList() { return self()->mIdentityList[0]->getNicknameList(); }
+void Preferences::setNickname(int index,const TQString &newName) { self()->mIdentityList[0]->setNickname(index,newName); }
+void Preferences::setNicknameList(const TQStringList &newList) { self()->mIdentityList[0]->setNicknameList(newList); }
void Preferences::setShowTrayIcon(bool state)
{
@@ -524,7 +524,7 @@ void Preferences::setAutoUserhost(bool state)
PreferencesBase::setAutoUserhost(state);
}
-bool Preferences::dialogFlag(const QString& flagName)
+bool Preferences::dialogFlag(const TQString& flagName)
{
KConfig* config=KApplication::kApplication()->config();
@@ -536,7 +536,7 @@ bool Preferences::dialogFlag(const QString& flagName)
return true;
}
-void Preferences::setDialogFlag(const QString& flagName,bool state)
+void Preferences::setDialogFlag(const TQString& flagName,bool state)
{
KConfig* config=KApplication::kApplication()->config();
@@ -555,49 +555,49 @@ void Preferences::setDialogFlag(const QString& flagName,bool state)
// Channel Encodings
-const QString Preferences::channelEncoding(const QString& server,const QString& channel)
+const TQString Preferences::channelEncoding(const TQString& server,const TQString& channel)
{
return channelEncoding(serverGroupIdByName(server),channel);
}
-const QString Preferences::channelEncoding(int serverGroupId,const QString& channel)
+const TQString Preferences::channelEncoding(int serverGroupId,const TQString& channel)
{
if(self()->mChannelEncodingsMap.contains(serverGroupId))
if(self()->mChannelEncodingsMap[serverGroupId].contains(channel.lower()))
return self()->mChannelEncodingsMap[serverGroupId][channel.lower()];
- return QString();
+ return TQString();
}
-void Preferences::setChannelEncoding(const QString& server,const QString& channel,const QString& encoding)
+void Preferences::setChannelEncoding(const TQString& server,const TQString& channel,const TQString& encoding)
{
setChannelEncoding(serverGroupIdByName(server),channel,encoding);
}
-void Preferences::setChannelEncoding(int serverGroupId,const QString& channel,const QString& encoding)
+void Preferences::setChannelEncoding(int serverGroupId,const TQString& channel,const TQString& encoding)
{
self()->mChannelEncodingsMap[serverGroupId][channel.lower()]=encoding;
}
-const QValueList<int> Preferences::channelEncodingsServerGroupIdList()
+const TQValueList<int> Preferences::channelEncodingsServerGroupIdList()
{
return self()->mChannelEncodingsMap.keys();
}
-const QStringList Preferences::channelEncodingsChannelList(int serverGroupId)
+const TQStringList Preferences::channelEncodingsChannelList(int serverGroupId)
{
return self()->mChannelEncodingsMap[serverGroupId].keys();
}
-const QString Preferences::defaultNicknameSortingOrder()
+const TQString Preferences::defaultNicknameSortingOrder()
{
return "qpohv-";
}
// override to add %u if needed
-QString Preferences::webBrowserCmd()
+TQString Preferences::webBrowserCmd()
{
// add %u to command if it's not in there
- QString cmd=self()->mWebBrowserCmd;
+ TQString cmd=self()->mWebBrowserCmd;
if(cmd.find("%u")==-1) cmd+=" %u";
return cmd;
}
diff --git a/konversation/src/config/preferences.h b/konversation/src/config/preferences.h
index ed27d0a..5ee6bda 100644
--- a/konversation/src/config/preferences.h
+++ b/konversation/src/config/preferences.h
@@ -20,14 +20,14 @@
#include "identity.h"
#include "preferences_base.h"
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qsize.h>
-#include <qvaluelist.h>
-#include <qstringlist.h>
-#include <qfont.h>
-#include <qcolor.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqsize.h>
+#include <tqvaluelist.h>
+#include <tqstringlist.h>
+#include <tqfont.h>
+#include <tqcolor.h>
+#include <tqmap.h>
#include <kdeversion.h>
@@ -44,7 +44,7 @@ NoRightsColor (int)
class Ignore;
class Highlight;
-class Preferences : public QObject, public PreferencesBase
+class Preferences : public TQObject, public PreferencesBase
{
Q_OBJECT
@@ -65,44 +65,44 @@ class Preferences : public QObject, public PreferencesBase
static void setServerGroupList(const Konversation::ServerGroupList& list);
static void addServerGroup(Konversation::ServerGroupSettingsPtr serverGroup);
static const Konversation::ServerGroupSettingsPtr serverGroupById(int id);
- static const Konversation::ServerGroupSettingsPtr serverGroupByServer(const QString& server);
- static int serverGroupIdByName(const QString& serverGroup);
- static bool isServerGroup(const QString& server);
+ static const Konversation::ServerGroupSettingsPtr serverGroupByServer(const TQString& server);
+ static int serverGroupIdByName(const TQString& serverGroup);
+ static bool isServerGroup(const TQString& server);
static void removeServerGroup(int id);
/** Returns a list of alias set up by default. This is a set of aliases for the scripts found. */
- static QStringList defaultAliasList();
+ static TQStringList defaultAliasList();
//notifylist is in kconfigxt - FIXME
- static const QMap<int, QStringList> notifyList();
- static const QStringList notifyListByGroupName(const QString& groupName);
- static const QString notifyStringByGroupName(const QString& groupName);
- static void setNotifyList(const QMap<int, QStringList>& newList);
- static bool addNotify(int serverGroupId, const QString& newPattern);
- static bool removeNotify(const QString& groupName, const QString& pattern);
- static bool isNotify(int serverGroupId, const QString& pattern);
+ static const TQMap<int, TQStringList> notifyList();
+ static const TQStringList notifyListByGroupName(const TQString& groupName);
+ static const TQString notifyStringByGroupName(const TQString& groupName);
+ static void setNotifyList(const TQMap<int, TQStringList>& newList);
+ static bool addNotify(int serverGroupId, const TQString& newPattern);
+ static bool removeNotify(const TQString& groupName, const TQString& pattern);
+ static bool isNotify(int serverGroupId, const TQString& pattern);
static bool hasNotifyList(int serverGroupId);
- static const QPtrList<Highlight> highlightList();
- static void setHighlightList(QPtrList<Highlight> newList);
- static void addHighlight(const QString& newHighlight,bool regExp, const QColor &color,const QString& sound,const QString& autoText);
+ static const TQPtrList<Highlight> highlightList();
+ static void setHighlightList(TQPtrList<Highlight> newList);
+ static void addHighlight(const TQString& newHighlight,bool regExp, const TQColor &color,const TQString& sound,const TQString& autoText);
/* All of the below work on the first (default) identity in your identity list*/
- static void addIgnore(const QString &newIgnore);
- static bool removeIgnore(const QString &oldIgnore);
- static bool isIgnored(const QString &nickname);
+ static void addIgnore(const TQString &newIgnore);
+ static bool removeIgnore(const TQString &oldIgnore);
+ static bool isIgnored(const TQString &nickname);
static void clearIgnoreList();
- static const QPtrList<Ignore> ignoreList();
- static void setIgnoreList(QPtrList<Ignore> newList);
+ static const TQPtrList<Ignore> ignoreList();
+ static void setIgnoreList(TQPtrList<Ignore> newList);
- static const QStringList quickButtonList();
- static const QStringList defaultQuickButtonList();
- static void setQuickButtonList(const QStringList newList);
+ static const TQStringList quickButtonList();
+ static const TQStringList defaultQuickButtonList();
+ static void setQuickButtonList(const TQStringList newList);
static void clearQuickButtonList();
- static const QStringList autoreplaceList();
- static const QStringList defaultAutoreplaceList();
- static void setAutoreplaceList(const QStringList newList);
+ static const TQStringList autoreplaceList();
+ static const TQStringList defaultAutoreplaceList();
+ static void setAutoreplaceList(const TQStringList newList);
static void clearAutoreplaceList();
static void addIdentity(IdentityPtr identity);
@@ -110,43 +110,43 @@ class Preferences : public QObject, public PreferencesBase
static void clearIdentityList();
static const IdentityList identityList();
static void setIdentityList(const IdentityList& list);
- static const IdentityPtr identityByName(const QString& name);
+ static const IdentityPtr identityByName(const TQString& name);
static const IdentityPtr identityById(int id);
- static const QString ident();
- static void setIdent(const QString &ident);
- static const QString realName();
- static void setRealName(const QString &name);
- static const QString partReason();
- static void setPartReason(const QString &newReason);
- static const QString kickReason();
- static void setKickReason(const QString &newReason);
+ static const TQString ident();
+ static void setIdent(const TQString &ident);
+ static const TQString realName();
+ static void setRealName(const TQString &name);
+ static const TQString partReason();
+ static void setPartReason(const TQString &newReason);
+ static const TQString kickReason();
+ static void setKickReason(const TQString &newReason);
static void setShowAwayMessage(bool state);
static bool showAwayMessage();
- static const QString awayMessage();
- static void setAwayMessage(const QString &newMessage);
- static const QString unAwayMessage();
- static void setUnAwayMessage(const QString &newMessage);
- static const QString defaultNicknameSortingOrder();
- static const QString nickname(int index);
- static const QStringList nicknameList();
- static void setNickname(int index,const QString &newName);
- static void setNicknameList(const QStringList &newList);
-
- static bool dialogFlag(const QString& flagName);
- static void setDialogFlag(const QString& flagName,bool state);
-
- static const QString channelEncoding(const QString& server,const QString& channel);
- static const QString channelEncoding(int serverGroupId,const QString& channel);
- static void setChannelEncoding(const QString& server,const QString& channel,const QString& encoding);
- static void setChannelEncoding(int serverGroupId,const QString& channel,const QString& encoding);
- static const QValueList<int> channelEncodingsServerGroupIdList();
- static const QStringList channelEncodingsChannelList(int serverGroupId);
+ static const TQString awayMessage();
+ static void setAwayMessage(const TQString &newMessage);
+ static const TQString unAwayMessage();
+ static void setUnAwayMessage(const TQString &newMessage);
+ static const TQString defaultNicknameSortingOrder();
+ static const TQString nickname(int index);
+ static const TQStringList nicknameList();
+ static void setNickname(int index,const TQString &newName);
+ static void setNicknameList(const TQStringList &newList);
+
+ static bool dialogFlag(const TQString& flagName);
+ static void setDialogFlag(const TQString& flagName,bool state);
+
+ static const TQString channelEncoding(const TQString& server,const TQString& channel);
+ static const TQString channelEncoding(int serverGroupId,const TQString& channel);
+ static void setChannelEncoding(const TQString& server,const TQString& channel,const TQString& encoding);
+ static void setChannelEncoding(int serverGroupId,const TQString& channel,const TQString& encoding);
+ static const TQValueList<int> channelEncodingsServerGroupIdList();
+ static const TQStringList channelEncodingsChannelList(int serverGroupId);
static void setShowTrayIcon(bool state);
static void setTrayNotify(bool state);
static void setAutoUserhost(bool state);
- static QString webBrowserCmd();
+ static TQString webBrowserCmd();
signals:
void requestServerConnection(int number);
@@ -157,13 +157,13 @@ class Preferences : public QObject, public PreferencesBase
protected:
IdentityPtr mIdentity;
Konversation::ServerGroupList mServerGroupList;
- QPtrList<Ignore> mIgnoreList;
- QValueList<IdentityPtr> mIdentityList;
- QPtrList<Highlight> mHighlightList;
- QMap<int, QStringList> mNotifyList; // network id, list of nicks
- QMap< int,QMap<QString,QString> > mChannelEncodingsMap; // mChannelEncodingsMap[serverGroupdId][channelName]
- QStringList mQuickButtonList;
- QStringList mAutoreplaceList;
- QString mSortingOrder;
+ TQPtrList<Ignore> mIgnoreList;
+ TQValueList<IdentityPtr> mIdentityList;
+ TQPtrList<Highlight> mHighlightList;
+ TQMap<int, TQStringList> mNotifyList; // network id, list of nicks
+ TQMap< int,TQMap<TQString,TQString> > mChannelEncodingsMap; // mChannelEncodingsMap[serverGroupdId][channelName]
+ TQStringList mQuickButtonList;
+ TQStringList mAutoreplaceList;
+ TQString mSortingOrder;
};
#endif
diff --git a/konversation/src/connectionmanager.cpp b/konversation/src/connectionmanager.cpp
index bb491c3..294adec 100644
--- a/konversation/src/connectionmanager.cpp
+++ b/konversation/src/connectionmanager.cpp
@@ -18,23 +18,23 @@
#include "konversationmainwindow.h"
#include "statuspanel.h"
-#include <qregexp.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kmessagebox.h>
-ConnectionManager::ConnectionManager(QObject* parent) : QObject(parent)
+ConnectionManager::ConnectionManager(TQObject* parent) : TQObject(parent)
{
- connect(this, SIGNAL(requestReconnect(Server*)), this, SLOT(handleReconnect(Server*)));
+ connect(this, TQT_SIGNAL(requestReconnect(Server*)), this, TQT_SLOT(handleReconnect(Server*)));
}
ConnectionManager::~ConnectionManager()
{
}
-void ConnectionManager::connectTo(Konversation::ConnectionFlag flag, const QString& target,
- const QString& port, const QString& password, const QString& nick, const QString& channel,
+void ConnectionManager::connectTo(Konversation::ConnectionFlag flag, const TQString& target,
+ const TQString& port, const TQString& password, const TQString& nick, const TQString& channel,
bool useSSL)
{
ConnectionSettings settings;
@@ -110,22 +110,22 @@ void ConnectionManager::connectTo(Konversation::ConnectionFlag flag, ConnectionS
enlistConnection(server->connectionId(), server);
- connect(server, SIGNAL(destroyed(int)), this, SLOT(delistConnection(int)));
+ connect(server, TQT_SIGNAL(destroyed(int)), this, TQT_SLOT(delistConnection(int)));
- connect(server, SIGNAL(connectionStateChanged(Server*, Konversation::ConnectionState)),
- this, SLOT(handleConnectionStateChange(Server*, Konversation::ConnectionState)));
+ connect(server, TQT_SIGNAL(connectionStateChanged(Server*, Konversation::ConnectionState)),
+ this, TQT_SLOT(handleConnectionStateChange(Server*, Konversation::ConnectionState)));
- connect(server, SIGNAL(awayState(bool)), this, SIGNAL(connectionChangedAwayState(bool)));
+ connect(server, TQT_SIGNAL(awayState(bool)), this, TQT_SIGNAL(connectionChangedAwayState(bool)));
- connect(server, SIGNAL(nicksNowOnline(Server*, const QStringList&, bool)),
- mainWindow, SLOT(setOnlineList(Server*, const QStringList&,bool)));
- connect(server, SIGNAL(awayInsertRememberLine(Server*)),
- mainWindow, SIGNAL(triggerRememberLines(Server*)));
+ connect(server, TQT_SIGNAL(nicksNowOnline(Server*, const TQStringList&, bool)),
+ mainWindow, TQT_SLOT(setOnlineList(Server*, const TQStringList&,bool)));
+ connect(server, TQT_SIGNAL(awayInsertRememberLine(Server*)),
+ mainWindow, TQT_SIGNAL(triggerRememberLines(Server*)));
- connect(mainWindow, SIGNAL(startNotifyTimer(int)), server, SLOT(startNotifyTimer(int)));
+ connect(mainWindow, TQT_SIGNAL(startNotifyTimer(int)), server, TQT_SLOT(startNotifyTimer(int)));
- connect(server, SIGNAL(multiServerCommand(const QString&, const QString&)),
- konvApp, SLOT(sendMultiServerCommand(const QString&, const QString&)));
+ connect(server, TQT_SIGNAL(multiServerCommand(const TQString&, const TQString&)),
+ konvApp, TQT_SLOT(sendMultiServerCommand(const TQString&, const TQString&)));
}
void ConnectionManager::enlistConnection(int connectionId, Server* server)
@@ -216,7 +216,7 @@ void ConnectionManager::handleReconnect(Server* server)
server->getConnectionSettings().incrementReconnectCount();
- QTimer::singleShot(Preferences::reconnectDelay() * 1000, server, SLOT(connectToIRCServer()));
+ TQTimer::singleShot(Preferences::reconnectDelay() * 1000, server, TQT_SLOT(connectToIRCServer()));
}
else
server->getStatusView()->appendServerMessage(i18n("Error"), i18n("Reconnection attempts exceeded."));
@@ -224,34 +224,34 @@ void ConnectionManager::handleReconnect(Server* server)
void ConnectionManager::quitServers()
{
- QMap<int, Server*>::ConstIterator it;
+ TQMap<int, Server*>::ConstIterator it;
for (it = m_connectionList.begin(); it != m_connectionList.end(); ++it)
it.data()->quitServer();
}
-void ConnectionManager::decodeIrcUrl(const QString& url, ConnectionSettings& settings)
+void ConnectionManager::decodeIrcUrl(const TQString& url, ConnectionSettings& settings)
{
if (!url.startsWith("irc://")) return;
- QString mangledUrl = url;
+ TQString mangledUrl = url;
- mangledUrl.remove(QRegExp("^irc:/+"));
+ mangledUrl.remove(TQRegExp("^irc:/+"));
if (mangledUrl.isEmpty()) return;
// Parsing address and channel.
- QStringList mangledUrlSegments;
+ TQStringList mangledUrlSegments;
- mangledUrlSegments = QStringList::split('/', mangledUrl, false);
+ mangledUrlSegments = TQStringList::split('/', mangledUrl, false);
// Check for ",isserver".
if (mangledUrlSegments[0].contains(','))
{
- QStringList addressSegments;
+ TQStringList addressSegments;
bool checkIfServerGroup = true;
- addressSegments = QStringList::split(',', mangledUrlSegments[0], false);
+ addressSegments = TQStringList::split(',', mangledUrlSegments[0], false);
if (addressSegments.grep("isserver", false).size() > 0)
checkIfServerGroup = false;
@@ -261,7 +261,7 @@ void ConnectionManager::decodeIrcUrl(const QString& url, ConnectionSettings& set
else
decodeAddress(mangledUrlSegments[0], settings);
- QString channel;
+ TQString channel;
Konversation::ChannelSettings channelSettings;
// Grabbing channel from in front of potential ?key=value parameters.
@@ -271,14 +271,14 @@ void ConnectionManager::decodeIrcUrl(const QString& url, ConnectionSettings& set
if (!channel.isEmpty())
{
// Add default prefix to channel if necessary.
- if (!channel.contains(QRegExp("^[#+&]{1}")))
+ if (!channel.contains(TQRegExp("^[#+&]{1}")))
channel = '#' + channel;
channelSettings.setName(channel);
}
// Parsing ?key=value parameters.
- QString parameterString;
+ TQString parameterString;
if (mangledUrlSegments.size() > 1)
parameterString = mangledUrlSegments[1].section('?', 1);
@@ -288,7 +288,7 @@ void ConnectionManager::decodeIrcUrl(const QString& url, ConnectionSettings& set
if (!parameterString.isEmpty())
{
- QRegExp parameterCatcher;
+ TQRegExp parameterCatcher;
parameterCatcher.setPattern("pass=([^&]+)");
@@ -312,11 +312,11 @@ void ConnectionManager::decodeIrcUrl(const QString& url, ConnectionSettings& set
settings.setInitialChannel(channelSettings);
}
-void ConnectionManager::decodeAddress(const QString& address, ConnectionSettings& settings,
+void ConnectionManager::decodeAddress(const TQString& address, ConnectionSettings& settings,
bool checkIfServerGroup)
{
- QString host;
- QString port = "6667";
+ TQString host;
+ TQString port = "6667";
// Full-length IPv6 address with port
// Example: RFC 2732 notation: [2001:0DB8:0000:0000:0000:0000:1428:57ab]:6666
@@ -342,7 +342,7 @@ void ConnectionManager::decodeAddress(const QString& address, ConnectionSettings
}
else
{
- QString addressCopy = address;
+ TQString addressCopy = address;
host = addressCopy.remove("[").remove("]");
}
}
@@ -404,7 +404,7 @@ bool ConnectionManager::reuseExistingConnection(ConnectionSettings& settings, bo
KonversationApplication* konvApp = static_cast<KonversationApplication *>(kapp);
KonversationMainWindow* mainWindow = konvApp->getMainWindow();
- QMap<int, Server*>::ConstIterator it;
+ TQMap<int, Server*>::ConstIterator it;
for (it = m_connectionList.begin(); it != m_connectionList.end(); ++it)
{
@@ -496,7 +496,7 @@ bool ConnectionManager::validateIdentity(IdentityPtr identity, bool interactive)
KonversationApplication* konvApp = static_cast<KonversationApplication *>(kapp);
KonversationMainWindow* mainWindow = konvApp->getMainWindow();
- QString errors;
+ TQString errors;
if (identity->getIdent().isEmpty())
errors+=i18n("Please fill in your <b>Ident</b>.<br>");
@@ -536,11 +536,11 @@ bool ConnectionManager::validateIdentity(IdentityPtr identity, bool interactive)
return true;
}
-QPtrList<Server> ConnectionManager::getServerList()
+TQPtrList<Server> ConnectionManager::getServerList()
{
- QPtrList<Server> serverList;
+ TQPtrList<Server> serverList;
- QMap<int, Server*>::ConstIterator it;
+ TQMap<int, Server*>::ConstIterator it;
for (it = m_connectionList.begin(); it != m_connectionList.end(); ++it)
serverList.append(it.data());
@@ -556,9 +556,9 @@ Server* ConnectionManager::getServerByConnectionId(int connectionId)
return 0;
}
-Server* ConnectionManager::getServerByName(const QString& name)
+Server* ConnectionManager::getServerByName(const TQString& name)
{
- QMap<int, Server*>::ConstIterator it;
+ TQMap<int, Server*>::ConstIterator it;
for (it = m_connectionList.begin(); it != m_connectionList.end(); ++it)
{
diff --git a/konversation/src/connectionmanager.h b/konversation/src/connectionmanager.h
index 9ada279..77495b7 100644
--- a/konversation/src/connectionmanager.h
+++ b/konversation/src/connectionmanager.h
@@ -15,7 +15,7 @@
#include "server.h"
#include "identity.h"
-#include <qobject.h>
+#include <tqobject.h>
class ConnectionSettings;
@@ -25,15 +25,15 @@ class ConnectionManager : public QObject
Q_OBJECT
public:
- explicit ConnectionManager(QObject* parent = 0);
+ explicit ConnectionManager(TQObject* parent = 0);
~ConnectionManager();
uint connectionCount() const { return m_connectionList.count(); }
- QPtrList<Server> getServerList();
+ TQPtrList<Server> getServerList();
Server* getServerByConnectionId(int connectionId);
- Server* getServerByName(const QString& name);
+ Server* getServerByName(const TQString& name);
Server* getAnyServer();
void quitServers();
@@ -42,11 +42,11 @@ class ConnectionManager : public QObject
public slots:
void connectTo(Konversation::ConnectionFlag flag,
- const QString& target,
- const QString& port = "",
- const QString& password = "",
- const QString& nick = "",
- const QString& channel = "",
+ const TQString& target,
+ const TQString& port = "",
+ const TQString& password = "",
+ const TQString& nick = "",
+ const TQString& channel = "",
bool useSSL = false);
void connectTo(Konversation::ConnectionFlag flag, int serverGroupId);
@@ -77,17 +77,17 @@ class ConnectionManager : public QObject
private:
void enlistConnection(int connectionId, Server* server);
- void decodeIrcUrl(const QString& url, ConnectionSettings& settings);
+ void decodeIrcUrl(const TQString& url, ConnectionSettings& settings);
- void decodeAddress(const QString& address,
+ void decodeAddress(const TQString& address,
ConnectionSettings& settings,
bool checkIfServerGroup = true);
bool reuseExistingConnection(ConnectionSettings& settings, bool interactive);
bool validateIdentity(IdentityPtr identity, bool interactive = true);
- QMap<int, Server*> m_connectionList;
- QValueList<uint> m_activeIdentities;
+ TQMap<int, Server*> m_connectionList;
+ TQValueList<uint> m_activeIdentities;
enum ConnectionDupe { SameServer, SameServerGroup };
};
diff --git a/konversation/src/connectionsettings.cpp b/konversation/src/connectionsettings.cpp
index f835406..c1da973 100644
--- a/konversation/src/connectionsettings.cpp
+++ b/konversation/src/connectionsettings.cpp
@@ -29,7 +29,7 @@ bool ConnectionSettings::isValid()
return true;
}
-QString ConnectionSettings::name() const
+TQString ConnectionSettings::name() const
{
if (m_serverGroup)
return m_serverGroup->name();
@@ -45,7 +45,7 @@ IdentityPtr ConnectionSettings::identity() const
return Preferences::identityById(0);
}
-QString ConnectionSettings::initialNick() const
+TQString ConnectionSettings::initialNick() const
{
if (!m_initialNick.isEmpty())
return m_initialNick;
diff --git a/konversation/src/connectionsettings.h b/konversation/src/connectionsettings.h
index caa01ce..216baa6 100644
--- a/konversation/src/connectionsettings.h
+++ b/konversation/src/connectionsettings.h
@@ -15,7 +15,7 @@
#include "servergroupsettings.h"
#include "serversettings.h"
-#include <qstring.h>
+#include <tqstring.h>
class ConnectionSettings
@@ -26,7 +26,7 @@ class ConnectionSettings
bool isValid();
- QString name() const;
+ TQString name() const;
Konversation::ServerSettings server() const { return m_server; }
void setServer(Konversation::ServerSettings server) { m_server = server; }
@@ -36,8 +36,8 @@ class ConnectionSettings
IdentityPtr identity() const;
- QString initialNick() const;
- void setInitialNick(const QString& nick) { m_initialNick = nick; }
+ TQString initialNick() const;
+ void setInitialNick(const TQString& nick) { m_initialNick = nick; }
Konversation::ChannelSettings initialChannel() const { return m_initialChannel; }
void setInitialChannel(Konversation::ChannelSettings& channel) { m_initialChannel = channel; }
@@ -51,7 +51,7 @@ class ConnectionSettings
Konversation::ServerSettings m_server;
Konversation::ServerGroupSettingsPtr m_serverGroup;
- QString m_initialNick;
+ TQString m_initialNick;
Konversation::ChannelSettings m_initialChannel;
uint m_reconnectCount;
diff --git a/konversation/src/dcc_preferences.cpp b/konversation/src/dcc_preferences.cpp
index 89ad86b..8dd652a 100644
--- a/konversation/src/dcc_preferences.cpp
+++ b/konversation/src/dcc_preferences.cpp
@@ -12,23 +12,23 @@
#include "dcc_preferences.h"
-#include <qcombobox.h>
-#include <qlineedit.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
#include <klocale.h>
-DCC_Config::DCC_Config(QWidget *parent, const char* name) :
+DCC_Config::DCC_Config(TQWidget *parent, const char* name) :
DCC_ConfigUI(parent,name)
{
languageChange();
- connect(kcfg_DccMethodToGetOwnIp, SIGNAL(activated(int)), this, SLOT(dccMethodChanged(int))); dccMethodChanged(kcfg_DccMethodToGetOwnIp->currentItem());
+ connect(kcfg_DccMethodToGetOwnIp, TQT_SIGNAL(activated(int)), this, TQT_SLOT(dccMethodChanged(int))); dccMethodChanged(kcfg_DccMethodToGetOwnIp->currentItem());
}
void DCC_Config::show()
{
- QWidget::show();
+ TQWidget::show();
kcfg_DccSpecificOwnIp->setEnabled(kcfg_DccMethodToGetOwnIp->currentItem() == 2);
}
diff --git a/konversation/src/dcc_preferences.h b/konversation/src/dcc_preferences.h
index cfbcf51..2b6cdaa 100644
--- a/konversation/src/dcc_preferences.h
+++ b/konversation/src/dcc_preferences.h
@@ -16,14 +16,14 @@
#include "dcc_preferencesui.h"
-class QComboBox;
+class TQComboBox;
class DCC_Config : public DCC_ConfigUI
{
Q_OBJECT
public:
- DCC_Config(QWidget* parent, const char* name);
+ DCC_Config(TQWidget* parent, const char* name);
~DCC_Config();
public slots:
diff --git a/konversation/src/dccchat.cpp b/konversation/src/dccchat.cpp
index 37b8b6f..71b3946 100644
--- a/konversation/src/dccchat.cpp
+++ b/konversation/src/dccchat.cpp
@@ -27,11 +27,11 @@
#include <sys/types.h>
#include <netinet/in.h>
-#include <qvbox.h>
-#include <qhostaddress.h>
-#include <qtextcodec.h>
-#include <qsplitter.h>
-#include <qpopupmenu.h>
+#include <tqvbox.h>
+#include <tqhostaddress.h>
+#include <tqtextcodec.h>
+#include <tqsplitter.h>
+#include <tqpopupmenu.h>
#include <klineedit.h>
#include <klocale.h>
@@ -45,7 +45,7 @@
#define DCCCHAT_BUFFER_SIZE 1024
-DccChat::DccChat(QWidget* parent, bool listen, Server* server, const QString& ownNick, const QString& partnerNick, const QString& partnerHost, int partnerPort)
+DccChat::DccChat(TQWidget* parent, bool listen, Server* server, const TQString& ownNick, const TQString& partnerNick, const TQString& partnerHost, int partnerPort)
: ChatWindow(parent)
{
kdDebug() << "DccChat::DccChat() [BEGIN]" << endl;
@@ -62,7 +62,7 @@ DccChat::DccChat(QWidget* parent, bool listen, Server* server, const QString& ow
setType(ChatWindow::DccChat);
setChannelEncodingSupported(true);
- m_headerSplitter = new QSplitter(Qt::Vertical, this);
+ m_headerSplitter = new TQSplitter(Qt::Vertical, this);
m_sourceLine = new Konversation::TopicLabel(m_headerSplitter);
@@ -76,7 +76,7 @@ DccChat::DccChat(QWidget* parent, bool listen, Server* server, const QString& ow
ChatWindow::setName( '-' + m_partnerNick + '-' );
ChatWindow::setLogfileName( '-' + m_partnerNick + '-' );
- QPopupMenu* popup = textView->getPopup();
+ TQPopupMenu* popup = textView->getPopup();
if (popup)
{
@@ -90,18 +90,18 @@ DccChat::DccChat(QWidget* parent, bool listen, Server* server, const QString& ow
}
// connect the signals and slots
- connect( m_dccChatInput, SIGNAL( submit() ), this, SLOT( dccChatTextEntered() ) );
- connect( m_dccChatInput, SIGNAL( textPasted( const QString& ) ), this, SLOT( textPasted( const QString& ) ) );
+ connect( m_dccChatInput, TQT_SIGNAL( submit() ), this, TQT_SLOT( dccChatTextEntered() ) );
+ connect( m_dccChatInput, TQT_SIGNAL( textPasted( const TQString& ) ), this, TQT_SLOT( textPasted( const TQString& ) ) );
- connect( getTextView(), SIGNAL( textPasted(bool) ), m_dccChatInput, SLOT( paste(bool) ) );
- connect( getTextView(), SIGNAL( gotFocus() ), m_dccChatInput, SLOT( setFocus() ) );
- connect( getTextView(), SIGNAL( autoText(const QString&) ), this, SLOT( sendDccChatText( const QString& ) ) );
+ connect( getTextView(), TQT_SIGNAL( textPasted(bool) ), m_dccChatInput, TQT_SLOT( paste(bool) ) );
+ connect( getTextView(), TQT_SIGNAL( gotFocus() ), m_dccChatInput, TQT_SLOT( setFocus() ) );
+ connect( getTextView(), TQT_SIGNAL( autoText(const TQString&) ), this, TQT_SLOT( sendDccChatText( const TQString& ) ) );
if (listen)
{
listenForPartner();
- QString ownNumericalIp = DccCommon::textIpToNumericalIp( DccCommon::getOwnIp( server ) );
- server->requestDccChat( m_partnerNick, ownNumericalIp, QString::number( m_ownPort ) );
+ TQString ownNumericalIp = DccCommon::textIpToNumericalIp( DccCommon::getOwnIp( server ) );
+ server->requestDccChat( m_partnerNick, ownNumericalIp, TQString::number( m_ownPort ) );
}
else
{
@@ -127,7 +127,7 @@ void DccChat::listenForPartner()
kdDebug() << "DccChat::listenForPartner() [BEGIN]" << endl;
// Set up server socket
- QString failedReason;
+ TQString failedReason;
if ( Preferences::dccSpecificChatPorts() )
m_listenSocket = DccCommon::createServerSocketAndListen( this, &failedReason, Preferences::dccChatPortsFirst(), Preferences::dccChatPortsLast() );
else
@@ -138,7 +138,7 @@ void DccChat::listenForPartner()
return;
}
- connect( m_listenSocket, SIGNAL(readyAccept()), this, SLOT(heardPartner()) );
+ connect( m_listenSocket, TQT_SIGNAL(readyAccept()), this, TQT_SLOT(heardPartner()) );
// Get our own port number
m_ownPort = DccCommon::getServerSocketPort( m_listenSocket );
@@ -151,7 +151,7 @@ void DccChat::listenForPartner()
void DccChat::connectToPartner()
{
- QHostAddress ip;
+ TQHostAddress ip;
ip.setAddress(m_partnerHost.toUInt());
m_partnerHost=ip.toString();
@@ -161,7 +161,7 @@ void DccChat::connectToPartner()
m_sourceLine->setText( i18n( "%1 = nickname, %2 = IP, %3 = port", "DCC chat with %1 on %2:%3." ).arg( m_partnerNick ).arg( host ).arg( m_partnerPort ) );
- m_dccSocket = new KNetwork::KStreamSocket( m_partnerHost, QString::number( m_partnerPort ), this );
+ m_dccSocket = new KNetwork::KStreamSocket( m_partnerHost, TQString::number( m_partnerPort ), this );
m_dccSocket->setBlocking(false);
m_dccSocket->setFamily(KNetwork::KResolver::InetFamily);
@@ -170,11 +170,11 @@ void DccChat::connectToPartner()
m_dccSocket->setTimeout(10000);
m_dccSocket->blockSignals(false);
- connect( m_dccSocket, SIGNAL( hostFound() ), this, SLOT( lookupFinished() ) );
- connect( m_dccSocket, SIGNAL( connected( const KResolverEntry& ) ), this, SLOT( dccChatConnectionSuccess() ) );
- connect( m_dccSocket, SIGNAL( gotError( int ) ), this, SLOT( dccChatBroken( int ) ) );
- connect( m_dccSocket, SIGNAL( readyRead() ), this, SLOT( readData() ) );
- connect( m_dccSocket, SIGNAL( closed() ), this, SLOT( socketClosed() ) );
+ connect( m_dccSocket, TQT_SIGNAL( hostFound() ), this, TQT_SLOT( lookupFinished() ) );
+ connect( m_dccSocket, TQT_SIGNAL( connected( const KResolverEntry& ) ), this, TQT_SLOT( dccChatConnectionSuccess() ) );
+ connect( m_dccSocket, TQT_SIGNAL( gotError( int ) ), this, TQT_SLOT( dccChatBroken( int ) ) );
+ connect( m_dccSocket, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( readData() ) );
+ connect( m_dccSocket, TQT_SIGNAL( closed() ), this, TQT_SLOT( socketClosed() ) );
m_dccSocket->connect();
@@ -214,8 +214,8 @@ void DccChat::readData()
int available=0;
int actual=0;
char* buffer=0;
- QString line;
- QTextCodec* codec = Konversation::IRCCharsets::self()->codecForName(m_encoding.isEmpty() ? Konversation::IRCCharsets::self()->encodingForLocale() : m_encoding);
+ TQString line;
+ TQTextCodec* codec = Konversation::IRCCharsets::self()->codecForName(m_encoding.isEmpty() ? Konversation::IRCCharsets::self()->encodingForLocale() : m_encoding);
available = m_dccSocket->bytesAvailable();
if( available > 0 )
@@ -226,17 +226,17 @@ void DccChat::readData()
line.append( codec->toUnicode( buffer ) );
delete[] buffer;
- QStringList lines = QStringList::split( '\n', line );
+ TQStringList lines = TQStringList::split( '\n', line );
- for( QStringList::iterator itLine = lines.begin() ; itLine != lines.end() ; itLine++ )
+ for( TQStringList::iterator itLine = lines.begin() ; itLine != lines.end() ; itLine++ )
{
if( (*itLine).startsWith( "\x01" ) )
{
// cut out the CTCP command
- QString ctcp = (*itLine).mid( 1, (*itLine).find( 1, 1 ) - 1 );
+ TQString ctcp = (*itLine).mid( 1, (*itLine).find( 1, 1 ) - 1 );
- QString ctcpCommand = ctcp.section( " ", 0, 0 );
- QString ctcpArgument = ctcp.section( " ", 1 );
+ TQString ctcpCommand = ctcp.section( " ", 0, 0 );
+ TQString ctcpArgument = ctcp.section( " ", 1 );
if( ctcpCommand.lower() == "action" )
appendAction( m_partnerNick, ctcpArgument );
@@ -254,7 +254,7 @@ void DccChat::readData()
void DccChat::dccChatTextEntered()
{
- QString line = m_dccChatInput->text();
+ TQString line = m_dccChatInput->text();
m_dccChatInput->setText("");
if ( line.lower() == Preferences::commandChar()+"clear" )
{
@@ -266,36 +266,36 @@ void DccChat::dccChatTextEntered()
}
}
-void DccChat::sendDccChatText(const QString& sendLine)
+void DccChat::sendDccChatText(const TQString& sendLine)
{
kdDebug() << k_funcinfo << " BEGIN" << endl;
// create a work copy
- QString output(sendLine);
- QString cc=Preferences::commandChar();
+ TQString output(sendLine);
+ TQString cc=Preferences::commandChar();
if(!output.isEmpty())
{
- QStringList lines = QStringList::split('\n',output);
+ TQStringList lines = TQStringList::split('\n',output);
// wrap socket into a stream
- QTextStream stream(m_dccSocket);
+ TQTextStream stream(m_dccSocket);
// init stream props
stream.setCodec(Konversation::IRCCharsets::self()->codecForName(m_encoding.isEmpty() ? Konversation::IRCCharsets::self()->encodingForLocale() : m_encoding));
- for( QStringList::iterator itLine = lines.begin() ; itLine != lines.end() ; itLine++ )
+ for( TQStringList::iterator itLine = lines.begin() ; itLine != lines.end() ; itLine++ )
{
- QString line( *itLine );
+ TQString line( *itLine );
// replace aliases and wildcards
- // if(filter.replaceAliases(line)) line=server->parseWildcards(line,nick,getName(),QString::null,QString::null,QString::null);
+ // if(filter.replaceAliases(line)) line=server->parseWildcards(line,nick,getName(),TQString::null,TQString::null,TQString::null);
// line=filter.parse(nick,line,getName());
// convert /me actions
- QString cmd=line.section(' ', 0,0).lower();
+ TQString cmd=line.section(' ', 0,0).lower();
if (cmd == cc+"me")
{
appendAction( m_ownNick, line.section( " ", 1 ) );
- line=QString("\x01%1 %2\x01").arg("ACTION").arg(line.section(" ",1));
+ line=TQString("\x01%1 %2\x01").arg("ACTION").arg(line.section(" ",1));
}
else if (cmd == cc+"close")
{
@@ -324,9 +324,9 @@ void DccChat::heardPartner()
return;
}
- connect( m_dccSocket, SIGNAL( readyRead() ), this, SLOT( readData() ) );
- connect( m_dccSocket, SIGNAL( closed() ), this, SLOT( socketClosed() ) );
- connect( m_dccSocket, SIGNAL( gotError( int ) ), this, SLOT( dccChatBroken( int ) ) );
+ connect( m_dccSocket, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( readData() ) );
+ connect( m_dccSocket, TQT_SIGNAL( closed() ), this, TQT_SLOT( socketClosed() ) );
+ connect( m_dccSocket, TQT_SIGNAL( gotError( int ) ), this, TQT_SLOT( dccChatBroken( int ) ) );
// the listen socket isn't needed anymore
disconnect( m_listenSocket, 0, 0, 0 );
@@ -346,7 +346,7 @@ void DccChat::socketClosed()
m_dccSocket = 0;
}
-void DccChat::textPasted(const QString& text)
+void DccChat::textPasted(const TQString& text)
{
sendDccChatText(text);
}
@@ -371,12 +371,12 @@ int DccChat::getOwnPort()
return m_ownPort;
}
-QString DccChat::getTextInLine()
+TQString DccChat::getTextInLine()
{
return m_dccChatInput->text();
}
-void DccChat::appendInputText( const QString& s, bool fromCursor )
+void DccChat::appendInputText( const TQString& s, bool fromCursor )
{
if(!fromCursor)
{
@@ -398,26 +398,26 @@ bool DccChat::closeYourself(bool)
return true;
}
-void DccChat::setChannelEncoding(const QString& encoding) // virtual
+void DccChat::setChannelEncoding(const TQString& encoding) // virtual
{
m_encoding = encoding;
}
-QString DccChat::getChannelEncoding() // virtual
+TQString DccChat::getChannelEncoding() // virtual
{
return m_encoding;
}
-QString DccChat::getChannelEncodingDefaultDesc() // virtual
+TQString DccChat::getChannelEncodingDefaultDesc() // virtual
{
return i18n("Default ( %1 )").arg(Konversation::IRCCharsets::self()->encodingForLocale());
}
-void DccChat::showEvent(QShowEvent* /* event */)
+void DccChat::showEvent(TQShowEvent* /* event */)
{
if(m_initialShow) {
m_initialShow = false;
- QValueList<int> sizes;
+ TQValueList<int> sizes;
sizes << m_sourceLine->sizeHint().height() << (height() - m_sourceLine->sizeHint().height());
m_headerSplitter->setSizes(sizes);
}
@@ -425,8 +425,8 @@ void DccChat::showEvent(QShowEvent* /* event */)
void DccChat::updateAppearance()
{
- QColor fg;
- QColor bg;
+ TQColor fg;
+ TQColor bg;
if(Preferences::inputFieldsBackgroundColor())
{
@@ -453,7 +453,7 @@ void DccChat::updateAppearance()
else
{
getTextView()->setViewBackground(Preferences::color(Preferences::TextViewBackground),
- QString());
+ TQString());
}
if (Preferences::customTextFont())
diff --git a/konversation/src/dccchat.h b/konversation/src/dccchat.h
index d4a5f13..438df98 100644
--- a/konversation/src/dccchat.h
+++ b/konversation/src/dccchat.h
@@ -16,7 +16,7 @@
#include "chatwindow.h"
-class QSplitter;
+class TQSplitter;
class IRCInput;
class KLineEdit;
@@ -38,26 +38,26 @@ class DccChat : public ChatWindow
Q_OBJECT
public:
- DccChat(QWidget* parent, bool listen, Server* server, const QString& ownNick, const QString& partnerNick, const QString& partnerHost = QString(), int partnerPort = 0);
+ DccChat(TQWidget* parent, bool listen, Server* server, const TQString& ownNick, const TQString& partnerNick, const TQString& partnerHost = TQString(), int partnerPort = 0);
~DccChat();
- virtual QString getTextInLine();
+ virtual TQString getTextInLine();
virtual bool closeYourself(bool askForConfirmation=true);
virtual bool canBeFrontView();
virtual bool searchView();
int getOwnPort();
- virtual void setChannelEncoding(const QString& encoding);
- virtual QString getChannelEncoding();
- virtual QString getChannelEncodingDefaultDesc();
+ virtual void setChannelEncoding(const TQString& encoding);
+ virtual TQString getChannelEncoding();
+ virtual TQString getChannelEncodingDefaultDesc();
virtual bool isInsertSupported() { return true; }
- QString getOwnNick() { return m_ownNick; }
+ TQString getOwnNick() { return m_ownNick; }
public slots:
- void appendInputText(const QString& s, bool fromCursor);
+ void appendInputText(const TQString& s, bool fromCursor);
void updateAppearance();
protected slots:
@@ -66,8 +66,8 @@ class DccChat : public ChatWindow
void dccChatBroken(int error);
void readData();
void dccChatTextEntered();
- void sendDccChatText(const QString& sendLine);
- void textPasted(const QString& text);
+ void sendDccChatText(const TQString& sendLine);
+ void textPasted(const TQString& text);
void heardPartner();
void socketClosed();
@@ -75,27 +75,27 @@ class DccChat : public ChatWindow
void listenForPartner();
void connectToPartner();
- virtual void showEvent(QShowEvent* event);
+ virtual void showEvent(TQShowEvent* event);
/** Called from ChatWindow adjustFocus */
virtual void childAdjustFocus();
- QString m_ownNick;
- QString m_partnerNick;
- QString m_partnerHost;
+ TQString m_ownNick;
+ TQString m_partnerNick;
+ TQString m_partnerHost;
int m_partnerPort;
- QString host;
+ TQString host;
- //QString m_ip;
+ //TQString m_ip;
int m_ownPort;
- QSplitter* m_headerSplitter;
+ TQSplitter* m_headerSplitter;
Konversation::TopicLabel* m_sourceLine;
IRCInput* m_dccChatInput;
KNetwork::KStreamSocket* m_dccSocket;
KNetwork::KServerSocket* m_listenSocket;
- QString m_encoding;
+ TQString m_encoding;
bool m_initialShow;
};
diff --git a/konversation/src/dcccommon.cpp b/konversation/src/dcccommon.cpp
index d03548d..7af67c2 100644
--- a/konversation/src/dcccommon.cpp
+++ b/konversation/src/dcccommon.cpp
@@ -16,32 +16,32 @@
#include <arpa/inet.h>
-#include <qhostaddress.h>
+#include <tqhostaddress.h>
#include <klocale.h>
#include <kresolver.h>
#include <kserversocket.h>
-QString DccCommon::textIpToNumericalIp( const QString& ipString )
+TQString DccCommon::textIpToNumericalIp( const TQString& ipString )
{
- QHostAddress ip;
+ TQHostAddress ip;
ip.setAddress( ipString );
- return QString::number( ip.ip4Addr() );
+ return TQString::number( ip.ip4Addr() );
}
-QString DccCommon::numericalIpToTextIp( const QString& numericalIp )
+TQString DccCommon::numericalIpToTextIp( const TQString& numericalIp )
{
- QHostAddress ip;
+ TQHostAddress ip;
ip.setAddress( numericalIp.toULong() );
return ip.toString();
}
-QString DccCommon::getOwnIp( Server* server )
+TQString DccCommon::getOwnIp( Server* server )
{
- QString ownIp;
+ TQString ownIp;
int methodId = Preferences::dccMethodToGetOwnIp();
if ( methodId == 1 && server )
@@ -69,7 +69,7 @@ QString DccCommon::getOwnIp( Server* server )
return ownIp;
}
-KNetwork::KServerSocket* DccCommon::createServerSocketAndListen( QObject* parent, QString* failedReason, int minPort, int maxPort )
+KNetwork::KServerSocket* DccCommon::createServerSocketAndListen( TQObject* parent, TQString* failedReason, int minPort, int maxPort )
{
KNetwork::KServerSocket* socket = new KNetwork::KServerSocket( parent );
socket->setFamily( KNetwork::KResolver::InetFamily );
@@ -80,7 +80,7 @@ KNetwork::KServerSocket* DccCommon::createServerSocketAndListen( QObject* parent
bool found = false; // whether succeeded to set port
for ( int port = minPort; port <= maxPort ; ++port )
{
- socket->setAddress( QString::number( port ) );
+ socket->setAddress( TQString::number( port ) );
bool success = socket->listen();
if ( ( found = ( success && socket->error() == KNetwork::KSocketBase::NoError ) ) )
break;
diff --git a/konversation/src/dcccommon.h b/konversation/src/dcccommon.h
index f3e8220..b556524 100644
--- a/konversation/src/dcccommon.h
+++ b/konversation/src/dcccommon.h
@@ -12,9 +12,9 @@
#ifndef DCCCOMMON_H
#define DCCCOMMON_H
-#include <qstring.h>
+#include <tqstring.h>
-class QObject;
+class TQObject;
namespace KNetwork
{
@@ -27,16 +27,16 @@ class DccCommon
{
public:
// converts an IP text like "127.0.0.1" to a number.
- static QString textIpToNumericalIp( const QString& ipString );
+ static TQString textIpToNumericalIp( const TQString& ipString );
// converts a numerical IP text like "12345678" to a normal IP text.
- static QString numericalIpToTextIp( const QString& numericalIp );
+ static TQString numericalIpToTextIp( const TQString& numericalIp );
// returns the self IP following the setting.
- static QString getOwnIp( Server* server = 0 );
+ static TQString getOwnIp( Server* server = 0 );
// creates an instance of KNetwork::ServerSocket following the DCC settings
- static KNetwork::KServerSocket* createServerSocketAndListen( QObject* parent = 0, QString* failedReason = 0, int minPort = 0, int maxPort = 0 );
+ static KNetwork::KServerSocket* createServerSocketAndListen( TQObject* parent = 0, TQString* failedReason = 0, int minPort = 0, int maxPort = 0 );
// returns the port number from a server socket
static int getServerSocketPort( KNetwork::KServerSocket* serverSocket );
diff --git a/konversation/src/dccrecipientdialog.cpp b/konversation/src/dccrecipientdialog.cpp
index 8c86caf..bb5d334 100644
--- a/konversation/src/dccrecipientdialog.cpp
+++ b/konversation/src/dccrecipientdialog.cpp
@@ -14,24 +14,24 @@
#include "dccrecipientdialog.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klineedit.h>
#include <klocale.h>
#include <kdebug.h>
-QString DccRecipientDialog::selectedNickname; // static
+TQString DccRecipientDialog::selectedNickname; // static
-DccRecipientDialog::DccRecipientDialog(QWidget* parent, const QStringList &list,const QSize &size) :
+DccRecipientDialog::DccRecipientDialog(TQWidget* parent, const TQStringList &list,const TQSize &size) :
KDialogBase(parent,"dcc_recipient_dialog",true,i18n("Select Recipient"),
KDialogBase::Ok | KDialogBase::Cancel,KDialogBase::Ok,true)
{
// Create the top level widget
- QWidget* page=new QWidget(this);
+ TQWidget* page=new TQWidget(this);
setMainWidget(page);
// Add the layout to the widget
- QVBoxLayout* dialogLayout=new QVBoxLayout(page);
+ TQVBoxLayout* dialogLayout=new TQVBoxLayout(page);
dialogLayout->setSpacing(spacingHint());
// Add the nickname list widget
KListBox* nicknameList=new KListBox(page,"recipient_list");
@@ -44,8 +44,8 @@ DccRecipientDialog::DccRecipientDialog(QWidget* parent, const QStringList &list,
dialogLayout->addWidget(nicknameList);
dialogLayout->addWidget(nicknameInput);
- connect(nicknameList,SIGNAL (highlighted(QListBoxItem*)),this,SLOT (newNicknameSelected(QListBoxItem*)) );
- connect(nicknameList,SIGNAL (doubleClicked(QListBoxItem*)),this,SLOT (newNicknameSelectedQuit(QListBoxItem*)) );
+ connect(nicknameList,TQT_SIGNAL (highlighted(TQListBoxItem*)),this,TQT_SLOT (newNicknameSelected(TQListBoxItem*)) );
+ connect(nicknameList,TQT_SIGNAL (doubleClicked(TQListBoxItem*)),this,TQT_SLOT (newNicknameSelectedQuit(TQListBoxItem*)) );
setButtonOK(KGuiItem(i18n("&OK"),"button_ok",i18n("Select nickname and close the window")));
setButtonCancel(KGuiItem(i18n("&Cancel"),"button_cancel",i18n("Close the window without changes")));
@@ -58,17 +58,17 @@ DccRecipientDialog::~DccRecipientDialog()
{
}
-QString DccRecipientDialog::getSelectedNickname()
+TQString DccRecipientDialog::getSelectedNickname()
{
return selectedNickname;
}
-void DccRecipientDialog::newNicknameSelected(QListBoxItem* item)
+void DccRecipientDialog::newNicknameSelected(TQListBoxItem* item)
{
nicknameInput->setText(item->text());
}
-void DccRecipientDialog::newNicknameSelectedQuit(QListBoxItem* item)
+void DccRecipientDialog::newNicknameSelectedQuit(TQListBoxItem* item)
{
newNicknameSelected(item);
selectedNickname=nicknameInput->text();
@@ -78,7 +78,7 @@ void DccRecipientDialog::newNicknameSelectedQuit(QListBoxItem* item)
void DccRecipientDialog::slotCancel()
{
- selectedNickname=QString();
+ selectedNickname=TQString();
KDialogBase::slotCancel();
}
@@ -88,9 +88,9 @@ void DccRecipientDialog::slotOk()
KDialogBase::slotOk();
}
-QString DccRecipientDialog::getNickname(QWidget* parent, const QStringList& list)
+TQString DccRecipientDialog::getNickname(TQWidget* parent, const TQStringList& list)
{
- QSize size; // TODO: get it from Preferences
+ TQSize size; // TODO: get it from Preferences
DccRecipientDialog dlg(parent,list,size);
dlg.exec();
diff --git a/konversation/src/dccrecipientdialog.h b/konversation/src/dccrecipientdialog.h
index 94d77ca..5964612 100644
--- a/konversation/src/dccrecipientdialog.h
+++ b/konversation/src/dccrecipientdialog.h
@@ -25,22 +25,22 @@ class DccRecipientDialog : public KDialogBase
Q_OBJECT
public:
- DccRecipientDialog(QWidget* parent, const QStringList &list, const QSize &size);
+ DccRecipientDialog(TQWidget* parent, const TQStringList &list, const TQSize &size);
~DccRecipientDialog();
- static QString getNickname(QWidget* parent, const QStringList& list);
+ static TQString getNickname(TQWidget* parent, const TQStringList& list);
protected slots:
- void newNicknameSelected(QListBoxItem* item);
+ void newNicknameSelected(TQListBoxItem* item);
// KDE double click
- void newNicknameSelectedQuit(QListBoxItem* item);
+ void newNicknameSelectedQuit(TQListBoxItem* item);
void slotOk();
void slotCancel();
protected:
- QString getSelectedNickname();
- static QString selectedNickname;
+ TQString getSelectedNickname();
+ static TQString selectedNickname;
KLineEdit* nicknameInput;
};
diff --git a/konversation/src/dccresumedialog.cpp b/konversation/src/dccresumedialog.cpp
index b8376b8..30b687b 100644
--- a/konversation/src/dccresumedialog.cpp
+++ b/konversation/src/dccresumedialog.cpp
@@ -13,10 +13,10 @@
#include "dccresumedialog.h"
#include "dcctransferrecv.h"
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qvbox.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
#include <kdebug.h>
#include <klocale.h>
@@ -24,7 +24,7 @@
#include <kurlrequester.h>
-DccResumeDialog::ReceiveAction DccResumeDialog::ask(DccTransferRecv* item, const QString& message, int enabledActions, ReceiveAction defaultAction)
+DccResumeDialog::ReceiveAction DccResumeDialog::ask(DccTransferRecv* item, const TQString& message, int enabledActions, ReceiveAction defaultAction)
{
int enabledButtonCodes = 0;
KDialogBase::ButtonCode defaultButtonCode = KDialogBase::Ok;
@@ -54,7 +54,7 @@ DccResumeDialog::ReceiveAction DccResumeDialog::ask(DccTransferRecv* item, const
return ra;
}
-DccResumeDialog::DccResumeDialog(DccTransferRecv* item, const QString& caption, const QString& message, int enabledActions, int enabledButtonCodes,
+DccResumeDialog::DccResumeDialog(DccTransferRecv* item, const TQString& caption, const TQString& message, int enabledActions, int enabledButtonCodes,
KDialogBase::ButtonCode defaultButtonCode)
: KDialogBase(0, "dcc_resume_dialog", true, caption, enabledButtonCodes, defaultButtonCode, true)
, m_item(item)
@@ -64,40 +64,40 @@ DccResumeDialog::DccResumeDialog(DccTransferRecv* item, const QString& caption,
if(enabledButtonCodes & KDialogBase::User1)
setButtonText(KDialogBase::User1, i18n("&Resume"));
- QFrame* page = new QFrame(this);
- QVBoxLayout* pageLayout = new QVBoxLayout(page);
+ TQFrame* page = new TQFrame(this);
+ TQVBoxLayout* pageLayout = new TQVBoxLayout(page);
pageLayout->setSpacing(spacingHint());
setMainWidget(page);
- QLabel* labelMessage = new QLabel(page);
+ TQLabel* labelMessage = new TQLabel(page);
labelMessage->setText(message);
m_urlreqFileURL = new KURLRequester(m_item->getFileURL().prettyURL(), page);
- connect(m_urlreqFileURL, SIGNAL(textChanged(const QString&)), this, SLOT(updateDialogButtons()));
+ connect(m_urlreqFileURL, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateDialogButtons()));
pageLayout->addWidget(labelMessage);
pageLayout->addWidget(m_urlreqFileURL);
if(m_enabledActions & RA_Rename)
{
- QFrame* filePathToolsFrame = new QFrame(page);
- QHBoxLayout* filePathToolsLayout = new QHBoxLayout(filePathToolsFrame);
+ TQFrame* filePathToolsFrame = new TQFrame(page);
+ TQHBoxLayout* filePathToolsLayout = new TQHBoxLayout(filePathToolsFrame);
filePathToolsLayout->setSpacing(spacingHint());
- QPushButton* btnDefaultName = new QPushButton(i18n("O&riginal Filename"),filePathToolsFrame);
- QPushButton* btnSuggestNewName = new QPushButton(i18n("Suggest &New Filename"),filePathToolsFrame);
- filePathToolsLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding));
+ TQPushButton* btnDefaultName = new TQPushButton(i18n("O&riginal Filename"),filePathToolsFrame);
+ TQPushButton* btnSuggestNewName = new TQPushButton(i18n("Suggest &New Filename"),filePathToolsFrame);
+ filePathToolsLayout->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding));
filePathToolsLayout->addWidget(btnDefaultName);
filePathToolsLayout->addWidget(btnSuggestNewName);
- connect(btnSuggestNewName, SIGNAL(clicked()), this, SLOT(suggestNewName()));
- connect(btnDefaultName, SIGNAL(clicked()), this, SLOT(setDefaultName()));
+ connect(btnSuggestNewName, TQT_SIGNAL(clicked()), this, TQT_SLOT(suggestNewName()));
+ connect(btnDefaultName, TQT_SIGNAL(clicked()), this, TQT_SLOT(setDefaultName()));
pageLayout->addWidget(filePathToolsFrame);
}
updateDialogButtons();
- setInitialSize(QSize(500, sizeHint().height()));
+ setInitialSize(TQSize(500, sizeHint().height()));
}
@@ -146,8 +146,8 @@ void DccResumeDialog::updateDialogButtons() // slot
// taken and adapted from kio::renamedlg.cpp
void DccResumeDialog::suggestNewName() // slot
{
- QString dotSuffix, suggestedName;
- QString basename = m_urlreqFileURL->url().section("/", -1);
+ TQString dotSuffix, suggestedName;
+ TQString basename = m_urlreqFileURL->url().section("/", -1);
KURL baseURL(m_urlreqFileURL->url().section("/", 0, -2));
int index = basename.find( '.' );
@@ -160,7 +160,7 @@ void DccResumeDialog::suggestNewName() // slot
int pos = basename.findRev( '_' );
if(pos != -1 )
{
- QString tmp = basename.mid( pos+1 );
+ TQString tmp = basename.mid( pos+1 );
bool ok;
int number = tmp.toInt( &ok );
if ( !ok ) // ok there is no number
@@ -170,7 +170,7 @@ void DccResumeDialog::suggestNewName() // slot
else
{
// yes there's already a number behind the _ so increment it by one
- basename.replace( pos+1, tmp.length(), QString::number(number+1) );
+ basename.replace( pos+1, tmp.length(), TQString::number(number+1) );
suggestedName = basename + dotSuffix;
}
}
@@ -182,7 +182,7 @@ void DccResumeDialog::suggestNewName() // slot
// TODO: network transparency. However, using NetAccess from a modal dialog
// could be a problem, no? (given that it uses a modal widget itself....)
if ( baseURL.isLocalFile() )
- exists = QFileInfo( baseURL.path(+1) + suggestedName ).exists();
+ exists = TQFileInfo( baseURL.path(+1) + suggestedName ).exists();
m_urlreqFileURL->setURL( baseURL.path(+1) + suggestedName );
diff --git a/konversation/src/dccresumedialog.h b/konversation/src/dccresumedialog.h
index 03135f8..418f923 100644
--- a/konversation/src/dccresumedialog.h
+++ b/konversation/src/dccresumedialog.h
@@ -34,7 +34,7 @@ class DccResumeDialog : public KDialogBase
virtual ~DccResumeDialog();
- static ReceiveAction ask(DccTransferRecv* item, const QString& message, int enabledActions, ReceiveAction defaultAction);
+ static ReceiveAction ask(DccTransferRecv* item, const TQString& message, int enabledActions, ReceiveAction defaultAction);
protected slots:
void slotOk();
@@ -45,7 +45,7 @@ class DccResumeDialog : public KDialogBase
void updateDialogButtons();
protected:
- DccResumeDialog(DccTransferRecv* item, const QString& caption, const QString& message, int enabledActions, int enabledButtonCodes, KDialogBase::ButtonCode defaultButtonCode);
+ DccResumeDialog(DccTransferRecv* item, const TQString& caption, const TQString& message, int enabledActions, int enabledButtonCodes, KDialogBase::ButtonCode defaultButtonCode);
// UI
KURLRequester* m_urlreqFileURL;
diff --git a/konversation/src/dcctransfer.cpp b/konversation/src/dcctransfer.cpp
index 30ae5c2..c12147f 100644
--- a/konversation/src/dcctransfer.cpp
+++ b/konversation/src/dcctransfer.cpp
@@ -14,13 +14,13 @@
#include "dcctransfer.h"
#include "preferences.h"
-#include <qfileinfo.h>
-#include <qhostaddress.h>
+#include <tqfileinfo.h>
+#include <tqhostaddress.h>
#include <kdebug.h>
-DccTransfer::DccTransfer( DccType dccType, QObject* parent ) : QObject(parent)
+DccTransfer::DccTransfer( DccType dccType, TQObject* parent ) : TQObject(parent)
{
kdDebug() << "DccTransfer::DccTransfer()" << endl;
@@ -41,9 +41,9 @@ DccTransfer::DccTransfer( DccType dccType, QObject* parent ) : QObject(parent)
m_bufferSize = Preferences::dccBufferSize();
m_buffer = new char[ m_bufferSize ];
- connect( &m_loggerTimer, SIGNAL( timeout() ), this, SLOT( logTransfer() ) );
+ connect( &m_loggerTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( logTransfer() ) );
- m_timeOffer = QDateTime::currentDateTime();
+ m_timeOffer = TQDateTime::currentDateTime();
}
DccTransfer::~DccTransfer()
@@ -54,7 +54,7 @@ DccTransfer::~DccTransfer()
}
DccTransfer::DccTransfer( const DccTransfer& obj )
- : QObject()
+ : TQObject()
{
m_buffer = 0;
m_bufferSize = 0;
@@ -92,7 +92,7 @@ void DccTransfer::setConnectionId( int id )
m_connectionId = id;
}
-void DccTransfer::setPartnerNick( const QString& nick )
+void DccTransfer::setPartnerNick( const TQString& nick )
{
if ( getStatus() == Configuring || getStatus() == Queued )
m_partnerNick = nick;
@@ -116,7 +116,7 @@ bool DccTransfer::queue()
void DccTransfer::startTransferLogger()
{
- m_timeTransferStarted = QDateTime::currentDateTime();
+ m_timeTransferStarted = TQDateTime::currentDateTime();
m_loggerBaseTime.start();
m_loggerTimer.start( 100 );
}
@@ -124,7 +124,7 @@ void DccTransfer::startTransferLogger()
void DccTransfer::finishTransferLogger()
{
if ( m_timeTransferFinished.isNull() )
- m_timeTransferFinished = QDateTime::currentDateTime();
+ m_timeTransferFinished = TQDateTime::currentDateTime();
m_loggerTimer.stop();
updateTransferMeters();
}
@@ -137,7 +137,7 @@ void DccTransfer::logTransfer()
updateTransferMeters();
}
-void DccTransfer::setStatus( DccStatus status, const QString& statusDetail )
+void DccTransfer::setStatus( DccStatus status, const TQString& statusDetail )
{
bool changed = ( status != m_status );
DccStatus oldStatus = m_status;
@@ -156,8 +156,8 @@ void DccTransfer::updateTransferMeters()
// update CurrentSpeed
// remove too old data
- QValueList<int>::iterator itTime = m_transferLogTime.begin();
- QValueList<KIO::fileoffset_t>::iterator itPos = m_transferLogPosition.begin();
+ TQValueList<int>::iterator itTime = m_transferLogTime.begin();
+ TQValueList<KIO::fileoffset_t>::iterator itPos = m_transferLogPosition.begin();
while ( itTime != m_transferLogTime.end() && ( m_transferLogTime.last() - (*itTime) > timeToCalc * 1000 ) )
{
itTime = m_transferLogTime.remove( itTime );
@@ -165,7 +165,7 @@ void DccTransfer::updateTransferMeters()
}
// shift the base of the time (m_transferLoggerBaseTime)
- // reason: QTime can't handle a time longer than 24 hours
+ // reason: TQTime can't handle a time longer than 24 hours
int shiftOffset = m_loggerBaseTime.restart();
itTime = m_transferLogTime.begin();
for ( ; itTime != m_transferLogTime.end() ; ++itTime )
@@ -174,7 +174,7 @@ void DccTransfer::updateTransferMeters()
if ( m_transferLogTime.count() >= 2 )
{
// FIXME: precision of average speed is too bad
- m_averageSpeed = (double)( m_transferringPosition - m_transferStartPosition ) / (double)m_timeTransferStarted.secsTo( QDateTime::currentDateTime() );
+ m_averageSpeed = (double)( m_transferringPosition - m_transferStartPosition ) / (double)m_timeTransferStarted.secsTo( TQDateTime::currentDateTime() );
m_currentSpeed = (double)( m_transferLogPosition.last() - m_transferLogPosition.front() ) / (double)( m_transferLogTime.last() - m_transferLogTime.front() ) * 1000;
}
else // avoid zero devision
@@ -206,9 +206,9 @@ void DccTransfer::updateTransferMeters()
}
}
-QString DccTransfer::sanitizeFileName( const QString& fileName )
+TQString DccTransfer::sanitizeFileName( const TQString& fileName )
{
- QString fileNameTmp = QFileInfo( fileName ).fileName();
+ TQString fileNameTmp = TQFileInfo( fileName ).fileName();
if ( fileNameTmp.startsWith( "." ) )
fileNameTmp.replace( 0, 1, '_' ); // Don't create hidden files
if ( fileNameTmp.isEmpty() )
@@ -217,12 +217,12 @@ QString DccTransfer::sanitizeFileName( const QString& fileName )
}
//FIXME: IPv6 support
-QString DccTransfer::getNumericalIpText( const QString& ipString )
+TQString DccTransfer::getNumericalIpText( const TQString& ipString )
{
- QHostAddress ip;
+ TQHostAddress ip;
ip.setAddress( ipString );
- return QString::number( ip.ip4Addr() );
+ return TQString::number( ip.ip4Addr() );
}
unsigned long DccTransfer::intel( unsigned long value )
@@ -245,12 +245,12 @@ DccTransfer::DccStatus DccTransfer::getStatus() const
return m_status;
}
-const QString& DccTransfer::getStatusDetail() const
+const TQString& DccTransfer::getStatusDetail() const
{
return m_statusDetail;
}
-QDateTime DccTransfer::getTimeOffer() const
+TQDateTime DccTransfer::getTimeOffer() const
{
return m_timeOffer;
}
@@ -260,32 +260,32 @@ int DccTransfer::getConnectionId() const
return m_connectionId;
}
-QString DccTransfer::getOwnIp() const
+TQString DccTransfer::getOwnIp() const
{
return m_ownIp;
}
-QString DccTransfer::getOwnPort() const
+TQString DccTransfer::getOwnPort() const
{
return m_ownPort;
}
-QString DccTransfer::getPartnerNick() const
+TQString DccTransfer::getPartnerNick() const
{
return m_partnerNick;
}
-QString DccTransfer::getPartnerIp() const
+TQString DccTransfer::getPartnerIp() const
{
return m_partnerIp;
}
-QString DccTransfer::getPartnerPort() const
+TQString DccTransfer::getPartnerPort() const
{
return m_partnerPort;
}
-QString DccTransfer::getFileName() const
+TQString DccTransfer::getFileName() const
{
return m_fileName;
}
@@ -320,7 +320,7 @@ bool DccTransfer::isReverse() const
return m_reverse;
}
-QString DccTransfer::getReverseToken() const
+TQString DccTransfer::getReverseToken() const
{
return m_reverseToken;
}
@@ -345,12 +345,12 @@ int DccTransfer::getProgress() const
return (int)( ( (double)getTransferringPosition() / (double)getFileSize() ) * 100 );
}
-QDateTime DccTransfer::getTimeTransferStarted() const
+TQDateTime DccTransfer::getTimeTransferStarted() const
{
return m_timeTransferStarted;
}
-QDateTime DccTransfer::getTimeTransferFinished() const
+TQDateTime DccTransfer::getTimeTransferFinished() const
{
return m_timeTransferFinished;
}
diff --git a/konversation/src/dcctransfer.h b/konversation/src/dcctransfer.h
index d264def..f558fa4 100644
--- a/konversation/src/dcctransfer.h
+++ b/konversation/src/dcctransfer.h
@@ -18,9 +18,9 @@
#ifndef DCCTRANSFER_H
#define DCCTRANSFER_H
-#include <qdatetime.h>
-#include <qobject.h>
-#include <qtimer.h>
+#include <tqdatetime.h>
+#include <tqobject.h>
+#include <tqtimer.h>
#include <kurl.h>
#include <kio/global.h>
@@ -58,7 +58,7 @@ class DccTransfer : public QObject
InfiniteValue = -3
};
- DccTransfer( DccType dccType, QObject* parent );
+ DccTransfer( DccType dccType, TQObject* parent );
virtual ~DccTransfer();
// info of DccTransfer can be copied with this constructor.
@@ -66,35 +66,35 @@ class DccTransfer : public QObject
DccType getType() const;
DccStatus getStatus() const;
- const QString& getStatusDetail() const;
- QDateTime getTimeOffer() const;
+ const TQString& getStatusDetail() const;
+ TQDateTime getTimeOffer() const;
int getConnectionId() const;
- QString getOwnIp() const;
- QString getOwnPort() const;
- QString getPartnerNick() const;
- QString getPartnerIp() const;
- QString getPartnerPort() const;
- QString getFileName() const;
+ TQString getOwnIp() const;
+ TQString getOwnPort() const;
+ TQString getPartnerNick() const;
+ TQString getPartnerIp() const;
+ TQString getPartnerPort() const;
+ TQString getFileName() const;
KIO::filesize_t getFileSize() const;
KIO::fileoffset_t getTransferringPosition() const;
KIO::fileoffset_t getTransferStartPosition() const;
KURL getFileURL() const;
bool isResumed() const;
bool isReverse() const;
- QString getReverseToken() const;
+ TQString getReverseToken() const;
transferspeed_t getAverageSpeed() const;
transferspeed_t getCurrentSpeed() const;
int getTimeLeft() const;
int getProgress() const;
- QDateTime getTimeTransferStarted() const;
- QDateTime getTimeTransferFinished() const;
+ TQDateTime getTimeTransferStarted() const;
+ TQDateTime getTimeTransferFinished() const;
// common settings for DccTransferRecv / DccTransferSend
// REQUIRED
void setConnectionId( int connectionId );
// REQUIRED
- void setPartnerNick( const QString& nick );
+ void setPartnerNick( const TQString& nick );
signals:
void transferStarted( DccTransfer* item );
@@ -107,12 +107,12 @@ class DccTransfer : public QObject
virtual void abort() {};
protected:
- void setStatus( DccStatus status, const QString& statusDetail = QString() );
+ void setStatus( DccStatus status, const TQString& statusDetail = TQString() );
void startTransferLogger();
void finishTransferLogger();
- static QString sanitizeFileName( const QString& fileName );
- static QString getNumericalIpText( const QString& ipString );
+ static TQString sanitizeFileName( const TQString& fileName );
+ static TQString getNumericalIpText( const TQString& ipString );
static unsigned long intel( unsigned long value );
protected slots:
@@ -122,25 +122,25 @@ class DccTransfer : public QObject
// transfer information
DccType m_type;
DccStatus m_status;
- QString m_statusDetail;
+ TQString m_statusDetail;
bool m_resumed;
bool m_reverse;
- QString m_reverseToken;
+ TQString m_reverseToken;
KIO::fileoffset_t m_transferringPosition;
KIO::fileoffset_t m_transferStartPosition;
/*
- QValueList<QDateTime> m_transferTimeLog; // write per packet to calc CPS
- QValueList<KIO::fileoffset_t> m_transferPositionLog; // write per packet to calc CPS
+ TQValueList<TQDateTime> m_transferTimeLog; // write per packet to calc CPS
+ TQValueList<KIO::fileoffset_t> m_transferPositionLog; // write per packet to calc CPS
*/
// we'll communicate with the partner via this server
int m_connectionId;
- QString m_partnerNick;
- QString m_partnerIp; // null when unknown
- QString m_partnerPort;
- QString m_ownIp;
- QString m_ownPort;
+ TQString m_partnerNick;
+ TQString m_partnerIp; // null when unknown
+ TQString m_partnerPort;
+ TQString m_ownIp;
+ TQString m_ownPort;
unsigned long m_bufferSize;
char* m_buffer;
@@ -150,7 +150,7 @@ class DccTransfer : public QObject
* For receiving, it holds the filename as the sender said.
* So be careful, it can contain "../" and so on.
*/
- QString m_fileName;
+ TQString m_fileName;
/** The file size of the complete file sending/recieving. */
KIO::filesize_t m_fileSize;
@@ -168,15 +168,15 @@ class DccTransfer : public QObject
void updateTransferMeters();
private:
- QDateTime m_timeOffer;
- QDateTime m_timeTransferStarted;
- //QDateTime m_timeLastActive;
- QDateTime m_timeTransferFinished;
-
- QTimer m_loggerTimer;
- QTime m_loggerBaseTime; // for calculating CPS
- QValueList<int> m_transferLogTime;
- QValueList<KIO::fileoffset_t> m_transferLogPosition;
+ TQDateTime m_timeOffer;
+ TQDateTime m_timeTransferStarted;
+ //TQDateTime m_timeLastActive;
+ TQDateTime m_timeTransferFinished;
+
+ TQTimer m_loggerTimer;
+ TQTime m_loggerBaseTime; // for calculating CPS
+ TQValueList<int> m_transferLogTime;
+ TQValueList<KIO::fileoffset_t> m_transferLogPosition;
transferspeed_t m_averageSpeed;
transferspeed_t m_currentSpeed;
diff --git a/konversation/src/dcctransferdetailedinfopanel.cpp b/konversation/src/dcctransferdetailedinfopanel.cpp
index f7a55ff..8aec7d0 100644
--- a/konversation/src/dcctransferdetailedinfopanel.cpp
+++ b/konversation/src/dcctransferdetailedinfopanel.cpp
@@ -19,8 +19,8 @@
#include "connectionmanager.h"
#include "server.h"
-#include <qlabel.h>
-#include <qtimer.h>
+#include <tqlabel.h>
+#include <tqtimer.h>
#include <klineedit.h>
#include <klocale.h>
@@ -30,15 +30,15 @@
#include <ksqueezedtextlabel.h>
-DccTransferDetailedInfoPanel::DccTransferDetailedInfoPanel( QWidget* parent, const char* name )
+DccTransferDetailedInfoPanel::DccTransferDetailedInfoPanel( TQWidget* parent, const char* name )
: DccTransferDetailedInfoPanelUI( parent, name )
{
- m_autoViewUpdateTimer = new QTimer( this );
+ m_autoViewUpdateTimer = new TQTimer( this );
- connect( m_urlreqLocation, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotLocationChanged( const QString& ) ) );
- connect( m_buttonOpenFolder, SIGNAL( clicked() ), this, SLOT( slotOpenFolderButtonClicked() ) );
- connect( KonversationApplication::instance()->getDccTransferManager(), SIGNAL( fileURLChanged( DccTransferRecv* ) ),
- this, SLOT( updateView() ) ); // it's a little rough..
+ connect( m_urlreqLocation, TQT_SIGNAL( textChanged( const TQString& ) ), this, TQT_SLOT( slotLocationChanged( const TQString& ) ) );
+ connect( m_buttonOpenFolder, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotOpenFolderButtonClicked() ) );
+ connect( KonversationApplication::instance()->getDccTransferManager(), TQT_SIGNAL( fileURLChanged( DccTransferRecv* ) ),
+ this, TQT_SLOT( updateView() ) ); // it's a little rough..
}
DccTransferDetailedInfoPanel::~DccTransferDetailedInfoPanel()
@@ -55,7 +55,7 @@ void DccTransferDetailedInfoPanel::setItem( DccTransferPanelItem* item )
// because m_item can have been deleted already.
// set up the auto view-update timer
- connect( m_autoViewUpdateTimer, SIGNAL( timeout() ), this, SLOT( updateView() ) );
+ connect( m_autoViewUpdateTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( updateView() ) );
m_item = item;
@@ -63,7 +63,7 @@ void DccTransferDetailedInfoPanel::setItem( DccTransferPanelItem* item )
// otherwise the information will not be updated every 0.5sec
if (m_item->transfer()->getStatus() == DccTransfer::Transferring)
m_autoViewUpdateTimer->start(500, false);
- connect( m_item->transfer(), SIGNAL( statusChanged( DccTransfer*, int, int ) ), this, SLOT( slotTransferStatusChanged( DccTransfer*, int, int ) ) );
+ connect( m_item->transfer(), TQT_SIGNAL( statusChanged( DccTransfer*, int, int ) ), this, TQT_SLOT( slotTransferStatusChanged( DccTransfer*, int, int ) ) );
updateView();
}
@@ -73,7 +73,7 @@ void DccTransferDetailedInfoPanel::updateView()
DccTransfer* transfer = m_item->transfer();
// Type:
- QString type( transfer->getType() == DccTransfer::Send ? i18n( "DCC Send" ) : i18n( "DCC Receive" ) );
+ TQString type( transfer->getType() == DccTransfer::Send ? i18n( "DCC Send" ) : i18n( "DCC Receive" ) );
if ( transfer->isReverse() )
type += i18n( " (Reverse DCC)" );
m_labelDccType->setText( type );
@@ -90,14 +90,14 @@ void DccTransferDetailedInfoPanel::updateView()
m_buttonOpenFolder->setEnabled( !m_urlreqLocation->lineEdit()->text().isEmpty() );
// Partner:
- QString partnerInfoServerName;
+ TQString partnerInfoServerName;
if ( transfer->getConnectionId() == -1 )
partnerInfoServerName = i18n( "Unknown server" );
else if ( KonversationApplication::instance()->getConnectionManager()->getServerByConnectionId( transfer->getConnectionId() ) )
partnerInfoServerName = KonversationApplication::instance()->getConnectionManager()->getServerByConnectionId( transfer->getConnectionId() )->getServerName();
else
partnerInfoServerName = i18n( "Unknown server" );
- QString partnerInfo( i18n( "%1 on %2" )
+ TQString partnerInfo( i18n( "%1 on %2" )
.arg( transfer->getPartnerNick().isEmpty() ? "?" : transfer->getPartnerNick() )
.arg( partnerInfoServerName ) );
if ( !transfer->getPartnerIp().isEmpty() )
@@ -146,7 +146,7 @@ void DccTransferDetailedInfoPanel::updateView()
// The transfer is still in progress
if ( transfer->getTimeTransferFinished().isNull() )
- transferringTime = transfer->getTimeTransferStarted().secsTo( QDateTime::currentDateTime() );
+ transferringTime = transfer->getTimeTransferStarted().secsTo( TQDateTime::currentDateTime() );
// The transfer has finished
else
transferringTime = transfer->getTimeTransferStarted().secsTo( transfer->getTimeTransferFinished() );
@@ -191,7 +191,7 @@ void DccTransferDetailedInfoPanel::slotTransferStatusChanged( DccTransfer* /* tr
}
}
-void DccTransferDetailedInfoPanel::slotLocationChanged( const QString& url )
+void DccTransferDetailedInfoPanel::slotLocationChanged( const TQString& url )
{
if ( m_item->transfer()->getType() == DccTransfer::Receive )
{
@@ -202,11 +202,11 @@ void DccTransferDetailedInfoPanel::slotLocationChanged( const QString& url )
void DccTransferDetailedInfoPanel::slotOpenFolderButtonClicked()
{
- QString urlString = m_urlreqLocation->lineEdit()->text();
+ TQString urlString = m_urlreqLocation->lineEdit()->text();
if ( !urlString.isEmpty() )
{
KURL url = KURL::fromPathOrURL( urlString );
- url.setFileName( QString() );
+ url.setFileName( TQString() );
new KRun( url, 0, true, true );
}
}
diff --git a/konversation/src/dcctransferdetailedinfopanel.h b/konversation/src/dcctransferdetailedinfopanel.h
index 38eb692..a5358a4 100644
--- a/konversation/src/dcctransferdetailedinfopanel.h
+++ b/konversation/src/dcctransferdetailedinfopanel.h
@@ -15,7 +15,7 @@
#include "dcctransferdetailedinfopanelui.h"
-class QTimer;
+class TQTimer;
class DccTransfer;
class DccTransferPanelItem;
@@ -25,7 +25,7 @@ class DccTransferDetailedInfoPanel : public DccTransferDetailedInfoPanelUI
Q_OBJECT
public:
- explicit DccTransferDetailedInfoPanel( QWidget* parent = 0, const char* name = 0 );
+ explicit DccTransferDetailedInfoPanel( TQWidget* parent = 0, const char* name = 0 );
virtual ~DccTransferDetailedInfoPanel();
void setItem( DccTransferPanelItem* item );
@@ -33,12 +33,12 @@ class DccTransferDetailedInfoPanel : public DccTransferDetailedInfoPanelUI
private slots:
void updateView();
void slotTransferStatusChanged( DccTransfer* transfer, int newStatus, int oldStatus );
- void slotLocationChanged( const QString& url );
+ void slotLocationChanged( const TQString& url );
void slotOpenFolderButtonClicked();
private:
DccTransferPanelItem* m_item;
- QTimer* m_autoViewUpdateTimer;
+ TQTimer* m_autoViewUpdateTimer;
};
#endif // DCCTRANSFERDETAILEDINFOPANEL_H
diff --git a/konversation/src/dcctransfermanager.cpp b/konversation/src/dcctransfermanager.cpp
index 41b73bd..ec36840 100644
--- a/konversation/src/dcctransfermanager.cpp
+++ b/konversation/src/dcctransfermanager.cpp
@@ -18,16 +18,16 @@
#include <kdebug.h>
-DccTransferManager::DccTransferManager( QObject* parent )
- : QObject( parent )
+DccTransferManager::DccTransferManager( TQObject* parent )
+ : TQObject( parent )
{
// initial number
m_nextReverseTokenNumber = 1001;
m_defaultIncomingFolder = Preferences::dccPath();
- connect( KonversationApplication::instance(), SIGNAL( appearanceChanged() ),
- this, SLOT( slotSettingsChanged() ) );
+ connect( KonversationApplication::instance(), TQT_SIGNAL( appearanceChanged() ),
+ this, TQT_SLOT( slotSettingsChanged() ) );
}
DccTransferManager::~DccTransferManager()
@@ -40,7 +40,7 @@ DccTransferRecv* DccTransferManager::newDownload()
{
DccTransferRecv* transfer = new DccTransferRecv(this);
m_recvItems.push_back( transfer );
- connect( transfer, SIGNAL( done( DccTransfer* ) ), this, SLOT( removeRecvItem( DccTransfer* ) ) );
+ connect( transfer, TQT_SIGNAL( done( DccTransfer* ) ), this, TQT_SLOT( removeRecvItem( DccTransfer* ) ) );
initTransfer( transfer );
return transfer;
}
@@ -49,17 +49,17 @@ DccTransferSend* DccTransferManager::newUpload()
{
DccTransferSend* transfer = new DccTransferSend(this);
m_sendItems.push_back( transfer );
- connect( transfer, SIGNAL( done( DccTransfer* ) ), this, SLOT( removeSendItem( DccTransfer* ) ) );
+ connect( transfer, TQT_SIGNAL( done( DccTransfer* ) ), this, TQT_SLOT( removeSendItem( DccTransfer* ) ) );
initTransfer( transfer );
return transfer;
}
-DccTransferRecv* DccTransferManager::resumeDownload( int connectionId, const QString& partnerNick, const QString& fileName, const QString& ownPort, unsigned long position )
+DccTransferRecv* DccTransferManager::resumeDownload( int connectionId, const TQString& partnerNick, const TQString& fileName, const TQString& ownPort, unsigned long position )
{
DccTransferRecv* transfer = 0;
// find applicable one
- QValueListConstIterator< DccTransferRecv* > it;
+ TQValueListConstIterator< DccTransferRecv* > it;
for ( it = m_recvItems.begin() ; it != m_recvItems.end() ; ++it )
{
if ( ( (*it)->getStatus() == DccTransfer::Queued || (*it)->getStatus() == DccTransfer::WaitingRemote ) &&
@@ -84,12 +84,12 @@ DccTransferRecv* DccTransferManager::resumeDownload( int connectionId, const QSt
return transfer;
}
-DccTransferSend* DccTransferManager::resumeUpload( int connectionId, const QString& partnerNick, const QString& fileName, const QString& ownPort, unsigned long position )
+DccTransferSend* DccTransferManager::resumeUpload( int connectionId, const TQString& partnerNick, const TQString& fileName, const TQString& ownPort, unsigned long position )
{
DccTransferSend* transfer = 0;
// find applicable one
- QValueListConstIterator< DccTransferSend* > it;
+ TQValueListConstIterator< DccTransferSend* > it;
for ( it = m_sendItems.begin() ; it != m_sendItems.end() ; ++it )
{
if ( ( (*it)->getStatus() == DccTransfer::Queued || (*it)->getStatus() == DccTransfer::WaitingRemote ) &&
@@ -114,13 +114,13 @@ DccTransferSend* DccTransferManager::resumeUpload( int connectionId, const QStri
return transfer;
}
-DccTransferSend* DccTransferManager::startReverseSending( int connectionId, const QString& partnerNick, const QString& fileName, const QString& partnerHost, const QString& partnerPort, unsigned long fileSize, const QString& token )
+DccTransferSend* DccTransferManager::startReverseSending( int connectionId, const TQString& partnerNick, const TQString& fileName, const TQString& partnerHost, const TQString& partnerPort, unsigned long fileSize, const TQString& token )
{
kdDebug() << "DccTransferManager::startReverseSending(): server group ID: " << connectionId << ", partner: " << partnerNick << ", filename: " << fileName << ", partner IP: " << partnerHost << ", parnter port: " << partnerPort << ", filesize: " << fileSize << ", token: " << token << endl;
DccTransferSend* transfer = 0;
// find applicable one
- QValueListConstIterator< DccTransferSend* > it;
+ TQValueListConstIterator< DccTransferSend* > it;
for ( it = m_sendItems.begin() ; it != m_sendItems.end() ; ++it )
{
if (
@@ -145,14 +145,14 @@ DccTransferSend* DccTransferManager::startReverseSending( int connectionId, cons
void DccTransferManager::initTransfer( DccTransfer* transfer )
{
- connect( transfer, SIGNAL( statusChanged( DccTransfer*, int, int ) ), this, SLOT( slotTransferStatusChanged( DccTransfer*, int, int ) ) );
+ connect( transfer, TQT_SIGNAL( statusChanged( DccTransfer*, int, int ) ), this, TQT_SLOT( slotTransferStatusChanged( DccTransfer*, int, int ) ) );
emit newTransferAdded( transfer );
}
bool DccTransferManager::isLocalFileInWritingProcess( const KURL& url ) const
{
- QValueListConstIterator< DccTransferRecv* > it;
+ TQValueListConstIterator< DccTransferRecv* > it;
for ( it = m_recvItems.begin() ; it != m_recvItems.end() ; ++it )
{
if ( ( (*it)->getStatus() == DccTransfer::Connecting ||
@@ -172,14 +172,14 @@ int DccTransferManager::generateReverseTokenNumber()
bool DccTransferManager::hasActiveTransfers()
{
- QValueListConstIterator< DccTransferSend* > it;
+ TQValueListConstIterator< DccTransferSend* > it;
for ( it = m_sendItems.begin() ; it != m_sendItems.end() ; ++it )
{
if ((*it)->getStatus() == DccTransfer::Transferring)
return true;
}
- QValueListConstIterator< DccTransferRecv* > it2;
+ TQValueListConstIterator< DccTransferRecv* > it2;
for ( it2 = m_recvItems.begin() ; it2 != m_recvItems.end() ; ++it2 )
{
if ((*it2)->getStatus() == DccTransfer::Transferring)
@@ -202,7 +202,7 @@ void DccTransferManager::slotSettingsChanged()
// update the default incoming directory for already existed DCCRECV items
if ( Preferences::dccPath() != m_defaultIncomingFolder )
{
- QValueListConstIterator< DccTransferRecv* > it;
+ TQValueListConstIterator< DccTransferRecv* > it;
for ( it = m_recvItems.begin() ; it != m_recvItems.end() ; ++it )
{
if ( (*it)->getStatus() == DccTransfer::Queued &&
diff --git a/konversation/src/dcctransfermanager.h b/konversation/src/dcctransfermanager.h
index 0f2d655..7aad8b8 100644
--- a/konversation/src/dcctransfermanager.h
+++ b/konversation/src/dcctransfermanager.h
@@ -20,8 +20,8 @@
#include "dcctransfer.h"
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
class KURL;
@@ -34,7 +34,7 @@ class DccTransferManager : public QObject
Q_OBJECT
public:
- DccTransferManager( QObject* parent = 0 );
+ DccTransferManager( TQObject* parent = 0 );
~DccTransferManager();
signals:
@@ -56,14 +56,14 @@ class DccTransferManager : public QObject
/**
* @return a DccTransferRecv item if applicable one found, otherwise 0.
*/
- DccTransferRecv* resumeDownload(int connectionId, const QString& partnerNick, const QString& fileName, const QString& ownPort, unsigned long position );
+ DccTransferRecv* resumeDownload(int connectionId, const TQString& partnerNick, const TQString& fileName, const TQString& ownPort, unsigned long position );
/**
* @return a DccTransferSend item if applicable one found, otherwise 0.
*/
- DccTransferSend* resumeUpload(int connectionId, const QString& partnerNick, const QString& fileName, const QString& ownPort, unsigned long position );
+ DccTransferSend* resumeUpload(int connectionId, const TQString& partnerNick, const TQString& fileName, const TQString& ownPort, unsigned long position );
- DccTransferSend* startReverseSending(int connectionId, const QString& partnerNick, const QString& fileName, const QString& partnerHost, const QString& partnerPort, unsigned long fileSize, const QString& token );
+ DccTransferSend* startReverseSending(int connectionId, const TQString& partnerNick, const TQString& fileName, const TQString& partnerHost, const TQString& partnerPort, unsigned long fileSize, const TQString& token );
bool isLocalFileInWritingProcess( const KURL& localUrl ) const;
@@ -85,11 +85,11 @@ class DccTransferManager : public QObject
void slotSettingsChanged();
private:
- QValueList< DccTransferSend* > m_sendItems;
- QValueList< DccTransferRecv* > m_recvItems;
+ TQValueList< DccTransferSend* > m_sendItems;
+ TQValueList< DccTransferRecv* > m_recvItems;
int m_nextReverseTokenNumber;
- QString m_defaultIncomingFolder; // store here to know if this settings is changed
+ TQString m_defaultIncomingFolder; // store here to know if this settings is changed
};
#endif // DCCTRANSFERMANAGER_H
diff --git a/konversation/src/dcctransferpanel.cpp b/konversation/src/dcctransferpanel.cpp
index 3a2df9c..9420545 100644
--- a/konversation/src/dcctransferpanel.cpp
+++ b/konversation/src/dcctransferpanel.cpp
@@ -20,11 +20,11 @@
#include "dcctransfersend.h"
#include "preferences.h"
-#include <qhbox.h>
-#include <qheader.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
-#include <qvbox.h>
+#include <tqhbox.h>
+#include <tqheader.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
+#include <tqvbox.h>
#include <kdebug.h>
#include <kdeversion.h>
@@ -40,20 +40,20 @@
#include <kapplication.h>
-DccTransferPanel::DccTransferPanel(QWidget* parent) : ChatWindow(parent)
+DccTransferPanel::DccTransferPanel(TQWidget* parent) : ChatWindow(parent)
{
setType(ChatWindow::DccTransferPanel);
setName(i18n("DCC Status"));
initGUI();
- connect( KonversationApplication::instance()->getDccTransferManager(), SIGNAL( newTransferAdded( DccTransfer* ) ), this, SLOT( slotNewTransferAdded( DccTransfer* ) ) );
+ connect( KonversationApplication::instance()->getDccTransferManager(), TQT_SIGNAL( newTransferAdded( DccTransfer* ) ), this, TQT_SLOT( slotNewTransferAdded( DccTransfer* ) ) );
}
DccTransferPanel::~DccTransferPanel()
{
// remember column widths
- QValueList<int> columnWidths;
+ TQValueList<int> columnWidths;
for ( uint i = 0 ; i < Column::COUNT ; ++i )
columnWidths.push_back( m_listView->columnWidth( i ) );
Preferences::setDccColumnWidths( columnWidths );
@@ -65,7 +65,7 @@ void DccTransferPanel::initGUI()
m_listView = new KListView(this,"dcc_control_panel");
- m_listView->setSelectionMode(QListView::Extended);
+ m_listView->setSelectionMode(TQListView::Extended);
m_listView->setDragEnabled(true);
m_listView->setAcceptDrops(true);
m_listView->setSorting(-1,false);
@@ -85,11 +85,11 @@ void DccTransferPanel::initGUI()
m_listView->setColumnText(Column::CurrentSpeed, i18n("Speed"));
m_listView->setColumnText(Column::SenderAddress, i18n("Sender Address"));
- QValueList<int> columnWidths = Preferences::dccColumnWidths();
+ TQValueList<int> columnWidths = Preferences::dccColumnWidths();
for ( uint i = 0 ; i < Column::COUNT && i < columnWidths.count() ; ++i )
m_listView->setColumnWidth( i, columnWidths[i] );
- m_listView->setColumnWidthMode(Column::FileName, QListView::Manual);
+ m_listView->setColumnWidthMode(Column::FileName, TQListView::Manual);
m_listView->setColumnAlignment(Column::OfferDate, AlignHCenter);
m_listView->setColumnAlignment(Column::Progress, AlignHCenter);
@@ -99,37 +99,37 @@ void DccTransferPanel::initGUI()
m_listView->setSorting(Column::OfferDate, false);
- connect(m_listView,SIGNAL (selectionChanged()),this,SLOT (updateButton()) );
+ connect(m_listView,TQT_SIGNAL (selectionChanged()),this,TQT_SLOT (updateButton()) );
// detailed info panel
m_detailPanel = new DccTransferDetailedInfoPanel(this);
// button
- QHBox* buttonsBox=new QHBox(this);
+ TQHBox* buttonsBox=new TQHBox(this);
buttonsBox->setSpacing(spacing());
// convenience, undeffed below again to avoid name clashes
#define icon(s) KGlobal::iconLoader()->loadIconSet( s, KIcon::Small )
- m_buttonAccept = new QPushButton(icon("player_play"), i18n("Accept"), buttonsBox, "start_dcc");
- m_buttonAbort = new QPushButton(icon("stop"), i18n("Abort"), buttonsBox, "abort_dcc");
- m_buttonClear = new QPushButton(icon("editdelete"), i18n("Clear"), buttonsBox, "clear_dcc");
- m_buttonOpen = new QPushButton(icon("exec"), i18n("Open File"), buttonsBox, "open_dcc_file");
- m_buttonDetail = new QPushButton(icon("view_text"), i18n("Details"), buttonsBox, "detail_dcc");
+ m_buttonAccept = new TQPushButton(icon("player_play"), i18n("Accept"), buttonsBox, "start_dcc");
+ m_buttonAbort = new TQPushButton(icon("stop"), i18n("Abort"), buttonsBox, "abort_dcc");
+ m_buttonClear = new TQPushButton(icon("editdelete"), i18n("Clear"), buttonsBox, "clear_dcc");
+ m_buttonOpen = new TQPushButton(icon("exec"), i18n("Open File"), buttonsBox, "open_dcc_file");
+ m_buttonDetail = new TQPushButton(icon("view_text"), i18n("Details"), buttonsBox, "detail_dcc");
m_buttonDetail->setToggleButton( true );
- QToolTip::add( m_buttonAccept, i18n( "Start receiving" ) );
- QToolTip::add( m_buttonAbort, i18n( "Abort the transfer(s)" ) );
- QToolTip::add( m_buttonOpen, i18n( "Run the file" ) );
- QToolTip::add( m_buttonDetail, i18n( "View DCC transfer details" ) );
-
- connect( m_buttonAccept, SIGNAL(clicked()), this, SLOT(acceptDcc()) );
- connect( m_buttonAbort, SIGNAL(clicked()), this, SLOT(abortDcc()) );
- connect( m_buttonClear, SIGNAL(clicked()), this, SLOT(clearDcc()) );
- connect( m_buttonOpen, SIGNAL(clicked()), this, SLOT(runDcc()) );
- //connect( m_buttonDetail, SIGNAL(clicked()), this, SLOT(openDetail()) );
- connect( m_buttonDetail, SIGNAL(toggled(bool)), m_detailPanel, SLOT(setShown(bool)) );
+ TQToolTip::add( m_buttonAccept, i18n( "Start receiving" ) );
+ TQToolTip::add( m_buttonAbort, i18n( "Abort the transfer(s)" ) );
+ TQToolTip::add( m_buttonOpen, i18n( "Run the file" ) );
+ TQToolTip::add( m_buttonDetail, i18n( "View DCC transfer details" ) );
+
+ connect( m_buttonAccept, TQT_SIGNAL(clicked()), this, TQT_SLOT(acceptDcc()) );
+ connect( m_buttonAbort, TQT_SIGNAL(clicked()), this, TQT_SLOT(abortDcc()) );
+ connect( m_buttonClear, TQT_SIGNAL(clicked()), this, TQT_SLOT(clearDcc()) );
+ connect( m_buttonOpen, TQT_SIGNAL(clicked()), this, TQT_SLOT(runDcc()) );
+ //connect( m_buttonDetail, TQT_SIGNAL(clicked()), this, TQT_SLOT(openDetail()) );
+ connect( m_buttonDetail, TQT_SIGNAL(toggled(bool)), m_detailPanel, TQT_SLOT(setShown(bool)) );
m_buttonDetail->setOn(true);
@@ -151,13 +151,13 @@ void DccTransferPanel::initGUI()
#undef icon
- connect(m_listView, SIGNAL(contextMenuRequested(QListViewItem*,const QPoint&,int)), this, SLOT(popupRequested(QListViewItem*,const QPoint&,int)));
- connect(m_popup, SIGNAL(activated(int)), this, SLOT(popupActivated(int)));
+ connect(m_listView, TQT_SIGNAL(contextMenuRequested(TQListViewItem*,const TQPoint&,int)), this, TQT_SLOT(popupRequested(TQListViewItem*,const TQPoint&,int)));
+ connect(m_popup, TQT_SIGNAL(activated(int)), this, TQT_SLOT(popupActivated(int)));
// misc.
- connect(m_listView, SIGNAL(doubleClicked(QListViewItem*,const QPoint&,int)), this, SLOT(doubleClicked(QListViewItem*,const QPoint&,int)));
+ connect(m_listView, TQT_SIGNAL(doubleClicked(TQListViewItem*,const TQPoint&,int)), this, TQT_SLOT(doubleClicked(TQListViewItem*,const TQPoint&,int)));
- connect(m_listView, SIGNAL(currentChanged(QListViewItem*)), this, SLOT(setDetailPanelItem(QListViewItem*)));
+ connect(m_listView, TQT_SIGNAL(currentChanged(TQListViewItem*)), this, TQT_SLOT(setDetailPanelItem(TQListViewItem*)));
updateButton();
}
@@ -165,7 +165,7 @@ void DccTransferPanel::initGUI()
void DccTransferPanel::slotNewTransferAdded( DccTransfer* transfer )
{
DccTransferPanelItem* item = new DccTransferPanelItem( this, transfer );
- connect( transfer, SIGNAL( statusChanged( DccTransfer*, int, int ) ), this, SLOT( slotTransferStatusChanged() ) );
+ connect( transfer, TQT_SIGNAL( statusChanged( DccTransfer*, int, int ) ), this, TQT_SLOT( slotTransferStatusChanged() ) );
if ( m_listView->childCount() == 1 )
{
m_listView->clearSelection();
@@ -194,7 +194,7 @@ void DccTransferPanel::updateButton()
selectAllCompleted = false;
int selectedItems = 0;
- QListViewItemIterator it( m_listView );
+ TQListViewItemIterator it( m_listView );
while( it.current() )
{
@@ -258,7 +258,7 @@ void DccTransferPanel::updateButton()
m_popup->setItemEnabled( Popup::Info, info );
}
-void DccTransferPanel::setDetailPanelItem(QListViewItem* item_)
+void DccTransferPanel::setDetailPanelItem(TQListViewItem* item_)
{
if ( item_ )
{
@@ -269,7 +269,7 @@ void DccTransferPanel::setDetailPanelItem(QListViewItem* item_)
void DccTransferPanel::acceptDcc()
{
- QListViewItemIterator it( m_listView );
+ TQListViewItemIterator it( m_listView );
while( it.current() )
{
if( it.current()->isSelected() )
@@ -285,7 +285,7 @@ void DccTransferPanel::acceptDcc()
void DccTransferPanel::abortDcc()
{
- QListViewItemIterator it( m_listView );
+ TQListViewItemIterator it( m_listView );
while( it.current() )
{
if( it.current()->isSelected() )
@@ -301,7 +301,7 @@ void DccTransferPanel::abortDcc()
void DccTransferPanel::resendFile()
{
- QListViewItemIterator it( m_listView );
+ TQListViewItemIterator it( m_listView );
while( it.current() )
{
if( it.current()->isSelected() )
@@ -329,8 +329,8 @@ void DccTransferPanel::resendFile()
void DccTransferPanel::clearDcc()
{
- QPtrList<QListViewItem> lst;
- QListViewItemIterator it( m_listView );
+ TQPtrList<TQListViewItem> lst;
+ TQListViewItemIterator it( m_listView );
while( it.current() )
{
DccTransferPanelItem* item = static_cast<DccTransferPanelItem*>( it.current() );
@@ -342,7 +342,7 @@ void DccTransferPanel::clearDcc()
// Figure out the first 'gap' in the selection and select that item,
// or, if there are no gaps, select first item below the selection
- QPtrListIterator<QListViewItem> selected( lst );
+ TQPtrListIterator<TQListViewItem> selected( lst );
bool itemSelected = false;
while( selected.current() )
{
@@ -370,7 +370,7 @@ void DccTransferPanel::clearDcc()
void DccTransferPanel::runDcc()
{
- QListViewItemIterator it( m_listView );
+ TQListViewItemIterator it( m_listView );
while( it.current() )
{
if( it.current()->isSelected() )
@@ -386,7 +386,7 @@ void DccTransferPanel::runDcc()
void DccTransferPanel::showFileInfo()
{
- QListViewItemIterator it( m_listView );
+ TQListViewItemIterator it( m_listView );
while( it.current() )
{
if( it.current()->isSelected() )
@@ -401,7 +401,7 @@ void DccTransferPanel::showFileInfo()
void DccTransferPanel::selectAll()
{
- QListViewItemIterator it( m_listView );
+ TQListViewItemIterator it( m_listView );
while ( it.current() )
{
m_listView->setSelected( *it, true );
@@ -412,7 +412,7 @@ void DccTransferPanel::selectAll()
void DccTransferPanel::selectAllCompleted()
{
- QListViewItemIterator it( m_listView );
+ TQListViewItemIterator it( m_listView );
while ( it.current() )
{
DccTransferPanelItem* item=static_cast<DccTransferPanelItem*>( it.current() );
@@ -422,7 +422,7 @@ void DccTransferPanel::selectAllCompleted()
updateButton();
}
-void DccTransferPanel::popupRequested(QListViewItem* /* item */, const QPoint& pos, int /* col */) // slot
+void DccTransferPanel::popupRequested(TQListViewItem* /* item */, const TQPoint& pos, int /* col */) // slot
{
updateButton();
m_popup->popup(pos);
@@ -440,7 +440,7 @@ void DccTransferPanel::popupActivated( int id ) // slot
else if ( id == Popup::Resend ) resendFile();
}
-void DccTransferPanel::doubleClicked(QListViewItem* _item, const QPoint& /* _pos */, int /* _col */)
+void DccTransferPanel::doubleClicked(TQListViewItem* _item, const TQPoint& /* _pos */, int /* _col */)
{
DccTransferPanelItem* item = static_cast<DccTransferPanelItem*>(_item);
item->runFile();
diff --git a/konversation/src/dcctransferpanel.h b/konversation/src/dcctransferpanel.h
index 882edb7..3a9c1a7 100644
--- a/konversation/src/dcctransferpanel.h
+++ b/konversation/src/dcctransferpanel.h
@@ -19,8 +19,8 @@
#include "dcctransferpanelitem.h"
-class QContextMenuEvent;
-class QPushButton;
+class TQContextMenuEvent;
+class TQPushButton;
class KListView;
class KPopupMenu;
@@ -66,7 +66,7 @@ class DccTransferPanel : public ChatWindow
};
};
- DccTransferPanel(QWidget* parent);
+ DccTransferPanel(TQWidget* parent);
~DccTransferPanel();
KListView* getListView();
@@ -84,14 +84,14 @@ class DccTransferPanel : public ChatWindow
void selectAll();
void selectAllCompleted();
- void popupRequested(QListViewItem* item,const QPoint& pos,int col);
+ void popupRequested(TQListViewItem* item,const TQPoint& pos,int col);
void popupActivated(int id);
- void doubleClicked(QListViewItem* _item,const QPoint& _pos,int _col);
+ void doubleClicked(TQListViewItem* _item,const TQPoint& _pos,int _col);
void updateButton();
- void setDetailPanelItem(QListViewItem* item_);
+ void setDetailPanelItem(TQListViewItem* item_);
protected:
/** Called from ChatWindow adjustFocus */
@@ -104,10 +104,10 @@ class DccTransferPanel : public ChatWindow
DccTransferDetailedInfoPanel* m_detailPanel;
- QPushButton* m_buttonAccept;
- QPushButton* m_buttonAbort;
- QPushButton* m_buttonClear;
- QPushButton* m_buttonOpen;
- QPushButton* m_buttonDetail;
+ TQPushButton* m_buttonAccept;
+ TQPushButton* m_buttonAbort;
+ TQPushButton* m_buttonClear;
+ TQPushButton* m_buttonOpen;
+ TQPushButton* m_buttonDetail;
};
#endif
diff --git a/konversation/src/dcctransferpanelitem.cpp b/konversation/src/dcctransferpanelitem.cpp
index 811828c..e0ebc49 100644
--- a/konversation/src/dcctransferpanelitem.cpp
+++ b/konversation/src/dcctransferpanelitem.cpp
@@ -18,10 +18,10 @@
#include "konversationapplication.h"
#include "config/preferences.h"
-#include <qheader.h>
-#include <qhostaddress.h>
-#include <qstyle.h>
-#include <qtimer.h>
+#include <tqheader.h>
+#include <tqhostaddress.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <kfilemetainfo.h>
@@ -46,11 +46,11 @@ DccTransferPanelItem::DccTransferPanelItem( DccTransferPanel* panel, DccTransfer
m_progressBar->setCenterIndicator( true );
m_progressBar->setPercentageVisible( true );
- connect( m_transfer, SIGNAL( transferStarted( DccTransfer* ) ), this, SLOT( startAutoViewUpdate() ) );
- connect( m_transfer, SIGNAL( done( DccTransfer* ) ), this, SLOT( stopAutoViewUpdate() ) );
- connect( m_transfer, SIGNAL( done( DccTransfer* ) ), this, SLOT( backupTransferInfo( DccTransfer* ) ) );
+ connect( m_transfer, TQT_SIGNAL( transferStarted( DccTransfer* ) ), this, TQT_SLOT( startAutoViewUpdate() ) );
+ connect( m_transfer, TQT_SIGNAL( done( DccTransfer* ) ), this, TQT_SLOT( stopAutoViewUpdate() ) );
+ connect( m_transfer, TQT_SIGNAL( done( DccTransfer* ) ), this, TQT_SLOT( backupTransferInfo( DccTransfer* ) ) );
- connect( m_transfer, SIGNAL( statusChanged( DccTransfer*, int, int ) ), this, SLOT( slotStatusChanged( DccTransfer*, int, int ) ) );
+ connect( m_transfer, TQT_SIGNAL( statusChanged( DccTransfer*, int, int ) ), this, TQT_SLOT( slotStatusChanged( DccTransfer*, int, int ) ) );
updateView();
}
@@ -88,7 +88,7 @@ void DccTransferPanelItem::updateView()
}
-int DccTransferPanelItem::compare( QListViewItem* i, int col, bool ascending ) const
+int DccTransferPanelItem::compare( TQListViewItem* i, int col, bool ascending ) const
{
DccTransferPanelItem* item = static_cast<DccTransferPanelItem*>( i );
@@ -125,9 +125,9 @@ int DccTransferPanelItem::compare( QListViewItem* i, int col, bool ascending ) c
return 0;
break;
default:
- return QListViewItem::compare( i, col, ascending );
+ return TQListViewItem::compare( i, col, ascending );
}
- return QListViewItem::compare( i, col, ascending );
+ return TQListViewItem::compare( i, col, ascending );
}
void DccTransferPanelItem::slotStatusChanged( DccTransfer* /* transfer */, int newStatus, int /* oldStatus */ )
@@ -141,8 +141,8 @@ void DccTransferPanelItem::slotStatusChanged( DccTransfer* /* transfer */, int n
void DccTransferPanelItem::startAutoViewUpdate()
{
stopAutoViewUpdate();
- m_autoUpdateViewTimer = new QTimer( this );
- connect( m_autoUpdateViewTimer, SIGNAL( timeout() ), this, SLOT( updateView()) );
+ m_autoUpdateViewTimer = new TQTimer( this );
+ connect( m_autoUpdateViewTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( updateView()) );
m_autoUpdateViewTimer->start( 500 );
}
@@ -156,7 +156,7 @@ void DccTransferPanelItem::stopAutoViewUpdate()
}
}
-void DccTransferPanelItem::paintCell( QPainter* painter, const QColorGroup& colorgroup, int column, int width, int alignment ) // virtual public
+void DccTransferPanelItem::paintCell( TQPainter* painter, const TQColorGroup& colorgroup, int column, int width, int alignment ) // virtual public
{
KListViewItem::paintCell( painter, colorgroup, column, width, alignment );
if ( column == DccTransferPanel::Column::Progress )
@@ -167,8 +167,8 @@ void DccTransferPanelItem::showProgressBar()
{
if ( m_transfer->getFileSize() )
{
- QRect rect = listView()->itemRect( this );
- QHeader *head = listView()->header();
+ TQRect rect = listView()->itemRect( this );
+ TQHeader *head = listView()->header();
rect.setLeft( head->sectionPos( DccTransferPanel::Column::Progress ) - head->offset() );
rect.setWidth( head->sectionSize( DccTransferPanel::Column::Progress ) );
m_progressBar->setGeometry( rect );
@@ -186,18 +186,18 @@ void DccTransferPanelItem::openFileInfoDialog()
{
if ( m_transfer->getType() == DccTransfer::Send || m_transfer->getStatus() == DccTransfer::Done )
{
- QStringList infoList;
+ TQStringList infoList;
- QString path=m_transfer->getFileURL().path();
+ TQString path=m_transfer->getFileURL().path();
// get meta info object
- KFileMetaInfo fileInfo(path,QString(),KFileMetaInfo::Everything);
+ KFileMetaInfo fileInfo(path,TQString(),KFileMetaInfo::Everything);
// is there any info for this file?
if(!fileInfo.isEmpty())
{
// get list of meta information groups
- QStringList groupList=fileInfo.groups();
+ TQStringList groupList=fileInfo.groups();
// look inside for keys
for(unsigned int index=0;index<groupList.count();index++)
{
@@ -209,7 +209,7 @@ void DccTransferPanelItem::openFileInfoDialog()
// append group name to list
infoList.append(groupList[index]);
// get list of keys in this group
- QStringList keys=group.keys();
+ TQStringList keys=group.keys();
for(unsigned keyIndex=0;keyIndex<keys.count();keyIndex++)
{
// get meta information item for this key
@@ -259,7 +259,7 @@ void DccTransferPanelItem::backupTransferInfo( DccTransfer* transfer )
m_isTransferInstanceBackup = true;
}
-QString DccTransferPanelItem::getTypeText() const
+TQString DccTransferPanelItem::getTypeText() const
{
if ( m_transfer->getType() == DccTransfer::Send )
return i18n( "Send" );
@@ -267,7 +267,7 @@ QString DccTransferPanelItem::getTypeText() const
return i18n( "Receive" );
}
-QPixmap DccTransferPanelItem::getTypeIcon() const
+TQPixmap DccTransferPanelItem::getTypeIcon() const
{
if ( m_transfer->getType() == DccTransfer::Send )
return KGlobal::iconLoader()->loadIcon( "up", KIcon::Small );
@@ -275,9 +275,9 @@ QPixmap DccTransferPanelItem::getTypeIcon() const
return KGlobal::iconLoader()->loadIcon( "down", KIcon::Small );
}
-QPixmap DccTransferPanelItem::getStatusIcon() const
+TQPixmap DccTransferPanelItem::getStatusIcon() const
{
- QString icon;
+ TQString icon;
switch ( m_transfer->getStatus() )
{
case DccTransfer::Queued:
@@ -304,7 +304,7 @@ QPixmap DccTransferPanelItem::getStatusIcon() const
return KGlobal::iconLoader()->loadIcon( icon, KIcon::Small );
}
-QString DccTransferPanelItem::getStatusText() const
+TQString DccTransferPanelItem::getStatusText() const
{
DccTransfer::DccStatus status = m_transfer->getStatus();
DccTransfer::DccType type = m_transfer->getType();
@@ -328,15 +328,15 @@ QString DccTransferPanelItem::getStatusText() const
else if ( status == DccTransfer::Aborted )
return i18n( "Aborted" );
- return QString();
+ return TQString();
}
-QString DccTransferPanelItem::getFileSizePrettyText() const
+TQString DccTransferPanelItem::getFileSizePrettyText() const
{
return KIO::convertSize( m_transfer->getFileSize() );
}
-QString DccTransferPanelItem::getPositionPrettyText( bool detailed ) const
+TQString DccTransferPanelItem::getPositionPrettyText( bool detailed ) const
{
if ( detailed )
return KGlobal::locale()->formatNumber( m_transfer->getTransferringPosition(), 0 ) + " / " +
@@ -345,9 +345,9 @@ QString DccTransferPanelItem::getPositionPrettyText( bool detailed ) const
return KIO::convertSize( m_transfer->getTransferringPosition() ) + " / " + KIO::convertSize( m_transfer->getFileSize() );
}
-QString DccTransferPanelItem::getTimeLeftPrettyText() const
+TQString DccTransferPanelItem::getTimeLeftPrettyText() const
{
- QString text;
+ TQString text;
if ( m_transfer->getTimeLeft() == DccTransfer::NotInTransfer )
;
@@ -359,45 +359,45 @@ QString DccTransferPanelItem::getTimeLeftPrettyText() const
return text;
}
-QString DccTransferPanelItem::getAverageSpeedPrettyText() const
+TQString DccTransferPanelItem::getAverageSpeedPrettyText() const
{
return getSpeedPrettyText( m_transfer->getAverageSpeed() );
}
-QString DccTransferPanelItem::getCurrentSpeedPrettyText() const
+TQString DccTransferPanelItem::getCurrentSpeedPrettyText() const
{
return getSpeedPrettyText( m_transfer->getCurrentSpeed() );
}
-QString DccTransferPanelItem::getSenderAddressPrettyText() const
+TQString DccTransferPanelItem::getSenderAddressPrettyText() const
{
if ( m_transfer->getType() == DccTransfer::Send )
- return QString( "%1:%2" ).arg( m_transfer->getOwnIp() ).arg( m_transfer->getOwnPort() );
+ return TQString( "%1:%2" ).arg( m_transfer->getOwnIp() ).arg( m_transfer->getOwnPort() );
else
- return QString( "%1:%2" ).arg( m_transfer->getPartnerIp() ).arg( m_transfer->getPartnerPort() );
+ return TQString( "%1:%2" ).arg( m_transfer->getPartnerIp() ).arg( m_transfer->getPartnerPort() );
}
-QString DccTransferPanelItem::getSpeedPrettyText( transferspeed_t speed )
+TQString DccTransferPanelItem::getSpeedPrettyText( transferspeed_t speed )
{
if ( speed == DccTransfer::Calculating || speed == DccTransfer::InfiniteValue )
- return QString( "?" );
+ return TQString( "?" );
else if ( speed == DccTransfer::NotInTransfer )
- return QString();
+ return TQString();
else
return i18n("%1/sec").arg( KIO::convertSize( (KIO::fileoffset_t)speed ) );
}
-QString DccTransferPanelItem::secToHMS( long sec )
+TQString DccTransferPanelItem::secToHMS( long sec )
{
int remSec = sec;
int remHour = remSec / 3600; remSec -= remHour * 3600;
int remMin = remSec / 60; remSec -= remMin * 60;
- // remHour can be more than 25, so we can't use QTime here.
- return QString( "%1:%2:%3" )
- .arg( QString::number( remHour ).rightJustify( 2, '0', false ) )
- .arg( QString::number( remMin ).rightJustify( 2, '0' ) )
- .arg( QString::number( remSec ).rightJustify( 2, '0' ) );
+ // remHour can be more than 25, so we can't use TQTime here.
+ return TQString( "%1:%2:%3" )
+ .arg( TQString::number( remHour ).rightJustify( 2, '0', false ) )
+ .arg( TQString::number( remMin ).rightJustify( 2, '0' ) )
+ .arg( TQString::number( remSec ).rightJustify( 2, '0' ) );
}
#include "dcctransferpanelitem.moc"
diff --git a/konversation/src/dcctransferpanelitem.h b/konversation/src/dcctransferpanelitem.h
index e9fbb84..051de88 100644
--- a/konversation/src/dcctransferpanelitem.h
+++ b/konversation/src/dcctransferpanelitem.h
@@ -18,15 +18,15 @@
#include "dcctransfer.h"
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <klistview.h>
#include <kurl.h>
#include <kio/global.h>
-class QStringList;
-class QTimer;
+class TQStringList;
+class TQTimer;
class KProgress;
@@ -37,7 +37,7 @@ namespace KIO
class DccTransferPanel;
-class DccTransferPanelItem : public QObject, public KListViewItem
+class DccTransferPanelItem : public TQObject, public KListViewItem
{
Q_OBJECT
@@ -45,9 +45,9 @@ class DccTransferPanelItem : public QObject, public KListViewItem
DccTransferPanelItem( DccTransferPanel* panel, DccTransfer* transfer );
virtual ~DccTransferPanelItem();
- virtual void paintCell( QPainter* painter, const QColorGroup& colorgroup, int column, int width, int alignment );
+ virtual void paintCell( TQPainter* painter, const TQColorGroup& colorgroup, int column, int width, int alignment );
- virtual int compare( QListViewItem* i, int col, bool ascending ) const;
+ virtual int compare( TQListViewItem* i, int col, bool ascending ) const;
void runFile();
void openFileInfoDialog();
@@ -55,19 +55,19 @@ class DccTransferPanelItem : public QObject, public KListViewItem
DccTransfer* transfer() const { return m_transfer; }
// called from updateView()
- QString getTypeText() const;
- QPixmap getTypeIcon() const;
- QPixmap getStatusIcon() const;
- QString getStatusText() const;
- QString getFileSizePrettyText() const;
- QString getPositionPrettyText( bool detailed = false ) const;
- QString getTimeLeftPrettyText() const;
- QString getAverageSpeedPrettyText() const;
- QString getCurrentSpeedPrettyText() const;
- QString getSenderAddressPrettyText() const;
-
- static QString getSpeedPrettyText( transferspeed_t speed );
- static QString secToHMS( long sec );
+ TQString getTypeText() const;
+ TQPixmap getTypeIcon() const;
+ TQPixmap getStatusIcon() const;
+ TQString getStatusText() const;
+ TQString getFileSizePrettyText() const;
+ TQString getPositionPrettyText( bool detailed = false ) const;
+ TQString getTimeLeftPrettyText() const;
+ TQString getAverageSpeedPrettyText() const;
+ TQString getCurrentSpeedPrettyText() const;
+ TQString getSenderAddressPrettyText() const;
+
+ static TQString getSpeedPrettyText( transferspeed_t speed );
+ static TQString secToHMS( long sec );
private slots:
void slotStatusChanged( DccTransfer* transfer, int newStatus, int oldStatus );
@@ -91,7 +91,7 @@ class DccTransferPanelItem : public QObject, public KListViewItem
void showProgressBar(); // called from printCell()
// UI
- QTimer* m_autoUpdateViewTimer;
+ TQTimer* m_autoUpdateViewTimer;
KProgress* m_progressBar;
};
diff --git a/konversation/src/dcctransferrecv.cpp b/konversation/src/dcctransferrecv.cpp
index a1b69d3..a5ff971 100644
--- a/konversation/src/dcctransferrecv.cpp
+++ b/konversation/src/dcctransferrecv.cpp
@@ -57,7 +57,7 @@ connectionSuccess() : called by recvSocket
*/
-DccTransferRecv::DccTransferRecv(QObject* parent)
+DccTransferRecv::DccTransferRecv(TQObject* parent)
: DccTransfer( DccTransfer::Receive, parent )
{
kdDebug() << "DccTransferRecv::DccTransferRecv()" << endl;
@@ -66,8 +66,8 @@ DccTransferRecv::DccTransferRecv(QObject* parent)
m_recvSocket = 0;
m_writeCacheHandler = 0;
- m_connectionTimer = new QTimer( this );
- connect( m_connectionTimer, SIGNAL( timeout() ), this, SLOT( connectionTimeout() ) );
+ m_connectionTimer = new TQTimer( this );
+ connect( m_connectionTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( connectionTimeout() ) );
//timer hasn't started yet. qtimer will be deleted automatically when 'this' object is deleted
}
@@ -76,12 +76,12 @@ DccTransferRecv::~DccTransferRecv()
cleanUp();
}
-QString DccTransferRecv::getTypeText() const
+TQString DccTransferRecv::getTypeText() const
{
return i18n( "Receive" );
}
-QPixmap DccTransferRecv::getTypeIcon() const
+TQPixmap DccTransferRecv::getTypeIcon() const
{
return KGlobal::iconLoader()->loadIcon( "down", KIcon::Small );
}
@@ -111,20 +111,20 @@ void DccTransferRecv::cleanUp()
}
// just for convenience
-void DccTransferRecv::failed( const QString& errorMessage )
+void DccTransferRecv::failed( const TQString& errorMessage )
{
setStatus( Failed, errorMessage );
cleanUp();
emit done( this );
}
-void DccTransferRecv::setPartnerIp( const QString& ip )
+void DccTransferRecv::setPartnerIp( const TQString& ip )
{
if ( getStatus() == Configuring )
m_partnerIp = ip;
}
-void DccTransferRecv::setPartnerPort( const QString& port )
+void DccTransferRecv::setPartnerPort( const TQString& port )
{
if ( getStatus() == Configuring )
m_partnerPort = port;
@@ -136,7 +136,7 @@ void DccTransferRecv::setFileSize( unsigned long fileSize )
m_fileSize = fileSize;
}
-void DccTransferRecv::setFileName( const QString& fileName )
+void DccTransferRecv::setFileName( const TQString& fileName )
{
if ( getStatus() == Configuring )
m_fileName = fileName;
@@ -148,14 +148,14 @@ void DccTransferRecv::setFileURL( const KURL& url )
m_fileURL = url;
}
-void DccTransferRecv::setReverse( bool reverse, const QString& reverseToken )
+void DccTransferRecv::setReverse( bool reverse, const TQString& reverseToken )
{
if ( getStatus() == Configuring )
{
m_reverse = reverse;
if ( reverse )
{
- m_partnerPort = QString::number( 0 );
+ m_partnerPort = TQString::number( 0 );
m_reverseToken = reverseToken;
}
}
@@ -216,7 +216,7 @@ bool DccTransferRecv::queue()
m_fileURL.addPath( m_partnerNick + '/' );
// Just incase anyone tries to do anything nasty
- QString fileNameSanitized = sanitizeFileName( m_fileName );
+ TQString fileNameSanitized = sanitizeFileName( m_fileName );
// Append partner's name to file name if wanted
if ( Preferences::dccAddPartner() )
@@ -261,7 +261,7 @@ void DccTransferRecv::prepareLocalKio( bool overwrite, bool resume, KIO::fileoff
kdDebug() << "DccTransferRecv::prepareLocalKio()" << endl
<< "DccTransferRecv::prepareLocalKio(): URL: " << m_fileURL << endl
<< "DccTransferRecv::prepareLocalKio(): Overwrite: " << overwrite << endl
- << "DccTransferRecv::prepareLocalKio(): Resume: " << resume << " (Position: " << QString::number( startPosition ) << ")" << endl;
+ << "DccTransferRecv::prepareLocalKio(): Resume: " << resume << " (Position: " << TQString::number( startPosition ) << ")" << endl;
m_resumed = resume;
m_transferringPosition = startPosition;
@@ -285,12 +285,12 @@ void DccTransferRecv::prepareLocalKio( bool overwrite, bool resume, KIO::fileoff
return;
}
- connect( transferJob, SIGNAL( canResume( KIO::Job*, KIO::filesize_t ) ), this, SLOT( slotLocalCanResume( KIO::Job*, KIO::filesize_t ) ) );
- connect( transferJob, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotLocalGotResult( KIO::Job* ) ) );
- connect( transferJob, SIGNAL( dataReq( KIO::Job*, QByteArray& ) ), this, SLOT( slotLocalReady( KIO::Job* ) ) );
+ connect( transferJob, TQT_SIGNAL( canResume( KIO::Job*, KIO::filesize_t ) ), this, TQT_SLOT( slotLocalCanResume( KIO::Job*, KIO::filesize_t ) ) );
+ connect( transferJob, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotLocalGotResult( KIO::Job* ) ) );
+ connect( transferJob, TQT_SIGNAL( dataReq( KIO::Job*, TQByteArray& ) ), this, TQT_SLOT( slotLocalReady( KIO::Job* ) ) );
}
-void DccTransferRecv::askAndPrepareLocalKio( const QString& message, int enabledActions, DccResumeDialog::ReceiveAction defaultAction, KIO::fileoffset_t startPosition )
+void DccTransferRecv::askAndPrepareLocalKio( const TQString& message, int enabledActions, DccResumeDialog::ReceiveAction defaultAction, KIO::fileoffset_t startPosition )
{
switch ( DccResumeDialog::ask( this, message, enabledActions, defaultAction ) )
{
@@ -312,12 +312,12 @@ void DccTransferRecv::askAndPrepareLocalKio( const QString& message, int enabled
bool DccTransferRecv::createDirs( const KURL& dirURL ) const
{
KURL kurl( dirURL );
- QString surl = kurl.url();
+ TQString surl = kurl.url();
//First we split directories until we reach to the top,
//since we need to create directories one by one
- QStringList dirList;
+ TQStringList dirList;
while ( surl != kurl.upURL().url() )
{
dirList.prepend( surl );
@@ -327,7 +327,7 @@ bool DccTransferRecv::createDirs( const KURL& dirURL ) const
//Now we create the directories
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it=dirList.begin() ; it!=dirList.end() ; ++it )
if ( !KIO::NetAccess::exists( *it, true, NULL ) )
if ( !KIO::NetAccess::mkdir( *it, NULL, -1 ) )
@@ -339,7 +339,7 @@ bool DccTransferRecv::createDirs( const KURL& dirURL ) const
void DccTransferRecv::slotLocalCanResume( KIO::Job* job, KIO::filesize_t size )
{
kdDebug() << "DccTransferRecv::slotLocalCanResume() [BEGIN]" << endl
- << "DccTransferRecv::slotLocalCanResume(): size: " << QString::number( size ) << endl;
+ << "DccTransferRecv::slotLocalCanResume(): size: " << TQString::number( size ) << endl;
if ( size != 0 )
{
@@ -419,8 +419,8 @@ void DccTransferRecv::slotLocalReady( KIO::Job* job )
m_writeCacheHandler = new DccTransferRecvWriteCacheHandler( transferJob );
- connect( m_writeCacheHandler, SIGNAL( done() ), this, SLOT( slotLocalWriteDone() ) );
- connect( m_writeCacheHandler, SIGNAL( gotError( const QString& ) ), this, SLOT( slotLocalGotWriteError( const QString& ) ) );
+ connect( m_writeCacheHandler, TQT_SIGNAL( done() ), this, TQT_SLOT( slotLocalWriteDone() ) );
+ connect( m_writeCacheHandler, TQT_SIGNAL( gotError( const TQString& ) ), this, TQT_SLOT( slotLocalGotWriteError( const TQString& ) ) );
if ( !m_resumed )
connectWithSender();
@@ -442,7 +442,7 @@ void DccTransferRecv::connectWithSender()
}
m_ownIp = DccCommon::getOwnIp( server );
- m_ownPort = QString::number( DccCommon::getServerSocketPort( m_serverSocket ) );
+ m_ownPort = TQString::number( DccCommon::getServerSocketPort( m_serverSocket ) );
setStatus( WaitingRemote, i18n( "Waiting for connection" ) );
@@ -488,7 +488,7 @@ void DccTransferRecv::startResume( unsigned long position )
if ( (unsigned long)m_transferringPosition != position )
{
kdDebug() << "DccTransferRecv::startResume(): remote responsed an unexpected position" << endl
- << "DccTransferRecv::startResume(): expected: " << QString::number( m_transferringPosition ) << endl
+ << "DccTransferRecv::startResume(): expected: " << TQString::number( m_transferringPosition ) << endl
<< "DccTransferRecv::startResume(): remote response: " << position << endl;
failed( i18n( "Unexpected response from remote host" ) );
return;
@@ -515,8 +515,8 @@ void DccTransferRecv::connectToSendServer()
m_recvSocket->enableRead( false );
m_recvSocket->enableWrite( false );
- connect( m_recvSocket, SIGNAL( connected( const KResolverEntry& ) ), this, SLOT( startReceiving() ) );
- connect( m_recvSocket, SIGNAL( gotError( int ) ), this, SLOT( connectionFailed( int ) ) );
+ connect( m_recvSocket, TQT_SIGNAL( connected( const KResolverEntry& ) ), this, TQT_SLOT( startReceiving() ) );
+ connect( m_recvSocket, TQT_SIGNAL( gotError( int ) ), this, TQT_SLOT( connectionFailed( int ) ) );
kdDebug() << "DccTransferRecv::connectToServer(): attempting to connect to " << m_partnerIp << ":" << m_partnerPort << endl;
@@ -526,7 +526,7 @@ void DccTransferRecv::connectToSendServer()
bool DccTransferRecv::startListeningForSender()
{
// Set up server socket
- QString failedReason;
+ TQString failedReason;
if ( Preferences::dccSpecificSendPorts() )
m_serverSocket = DccCommon::createServerSocketAndListen( this, &failedReason, Preferences::dccSendPortsFirst(), Preferences::dccSendPortsLast() );
else
@@ -537,8 +537,8 @@ bool DccTransferRecv::startListeningForSender()
return false;
}
- connect( m_serverSocket, SIGNAL( readyAccept() ), this, SLOT( slotServerSocketReadyAccept() ) );
- connect( m_serverSocket, SIGNAL( gotError( int ) ), this, SLOT( slotServerSocketGotError( int ) ) );
+ connect( m_serverSocket, TQT_SIGNAL( readyAccept() ), this, TQT_SLOT( slotServerSocketReadyAccept() ) );
+ connect( m_serverSocket, TQT_SIGNAL( gotError( int ) ), this, TQT_SLOT( slotServerSocketGotError( int ) ) );
return true;
}
@@ -554,7 +554,7 @@ void DccTransferRecv::slotServerSocketReadyAccept()
return;
}
- connect( m_recvSocket, SIGNAL( gotError( int ) ), this, SLOT( connectionFailed( int ) ) );
+ connect( m_recvSocket, TQT_SIGNAL( gotError( int ) ), this, TQT_SLOT( connectionFailed( int ) ) );
// we don't need ServerSocket anymore
m_serverSocket->close();
@@ -573,9 +573,9 @@ void DccTransferRecv::startReceiving()
m_recvSocket->setBlocking( false ); // asynchronous mode
- connect( m_recvSocket, SIGNAL( readyRead() ), this, SLOT( readData() ) );
- connect( m_recvSocket, SIGNAL( readyWrite() ), this, SLOT( sendAck() ) );
- connect( m_recvSocket, SIGNAL( closed() ), this, SLOT( slotSocketClosed() ) );
+ connect( m_recvSocket, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( readData() ) );
+ connect( m_recvSocket, TQT_SIGNAL( readyWrite() ), this, TQT_SLOT( sendAck() ) );
+ connect( m_recvSocket, TQT_SIGNAL( closed() ), this, TQT_SLOT( slotSocketClosed() ) );
setStatus( Transferring );
@@ -625,7 +625,7 @@ void DccTransferRecv::sendAck() // slot
}
else if ( m_transferringPosition > (KIO::fileoffset_t)m_fileSize )
{
- kdDebug() << "DccTransferRecv::sendAck(): the remote host sent larger data than expected: " << QString::number( m_transferringPosition ) << endl;
+ kdDebug() << "DccTransferRecv::sendAck(): the remote host sent larger data than expected: " << TQString::number( m_transferringPosition ) << endl;
failed( i18n( "Transferring error" ) );
}
}
@@ -639,7 +639,7 @@ void DccTransferRecv::slotLocalWriteDone() // <-WriteCacheHandler::done()
}
// <- WriteCacheHandler::gotError()
-void DccTransferRecv::slotLocalGotWriteError( const QString& errorString )
+void DccTransferRecv::slotLocalGotWriteError( const TQString& errorString )
{
kdDebug() << "DccTransferRecv::slotLocalGotWriteError()" << endl;
failed( i18n( "KIO error: %1" ).arg( errorString ) );
@@ -682,9 +682,9 @@ DccTransferRecvWriteCacheHandler::DccTransferRecvWriteCacheHandler( KIO::Transfe
m_writeReady = true;
m_cacheStream = 0;
- connect( this, SIGNAL( dataFinished() ), m_transferJob, SLOT( slotFinished() ) );
- connect( m_transferJob, SIGNAL( dataReq( KIO::Job*, QByteArray& ) ), this, SLOT( slotKIODataReq( KIO::Job*, QByteArray& ) ) );
- connect( m_transferJob, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotKIOResult( KIO::Job* ) ) );
+ connect( this, TQT_SIGNAL( dataFinished() ), m_transferJob, TQT_SLOT( slotFinished() ) );
+ connect( m_transferJob, TQT_SIGNAL( dataReq( KIO::Job*, TQByteArray& ) ), this, TQT_SLOT( slotKIODataReq( KIO::Job*, TQByteArray& ) ) );
+ connect( m_transferJob, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotKIOResult( KIO::Job* ) ) );
m_transferJob->setAsyncDataEnabled( m_writeAsyncMode = true );
}
@@ -704,9 +704,9 @@ void DccTransferRecvWriteCacheHandler::append( char* data, int size )
if ( m_cacheList.isEmpty() || m_cacheList.back().size() + size > maxWritePacketSize )
{
- m_cacheList.append( QByteArray() );
+ m_cacheList.append( TQByteArray() );
delete m_cacheStream;
- m_cacheStream = new QDataStream( m_cacheList.back(), IO_WriteOnly );
+ m_cacheStream = new TQDataStream( m_cacheList.back(), IO_WriteOnly );
}
m_cacheStream->writeRawBytes( data, size );
@@ -755,7 +755,7 @@ void DccTransferRecvWriteCacheHandler::closeNow() // public
m_cacheStream = 0;
}
-void DccTransferRecvWriteCacheHandler::slotKIODataReq( KIO::Job*, QByteArray& data )
+void DccTransferRecvWriteCacheHandler::slotKIODataReq( KIO::Job*, TQByteArray& data )
{
// We are in writeAsyncMode if there is more data to be read in from dcc
if ( m_writeAsyncMode )
@@ -790,7 +790,7 @@ void DccTransferRecvWriteCacheHandler::slotKIOResult( KIO::Job* job )
if ( job->error() )
{
- QString errorString = job->errorString();
+ TQString errorString = job->errorString();
closeNow();
emit gotError( errorString ); // -> DccTransferRecv::slotLocalGotWriteError()
}
diff --git a/konversation/src/dcctransferrecv.h b/konversation/src/dcctransferrecv.h
index 557b61d..b0add72 100644
--- a/konversation/src/dcctransferrecv.h
+++ b/konversation/src/dcctransferrecv.h
@@ -21,11 +21,11 @@
// TODO: remove the dependence
#include "dccresumedialog.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
-class QFile;
-class QTimer;
+class TQFile;
+class TQTimer;
namespace KIO
{
@@ -46,22 +46,22 @@ class DccTransferRecv : public DccTransfer
Q_OBJECT
public:
- DccTransferRecv(QObject* parent);
+ DccTransferRecv(TQObject* parent);
virtual ~DccTransferRecv();
// REQUIRED
- void setPartnerIp( const QString& ip );
+ void setPartnerIp( const TQString& ip );
// REQUIRED
- void setPartnerPort( const QString& port );
+ void setPartnerPort( const TQString& port );
// REQUIRED
void setFileSize( unsigned long fileSize );
// OPTIONAL, if not specified, "unnamed_file"
// TODO: "$sendername-$receiveddate" is better
- void setFileName( const QString& fileName );
+ void setFileName( const TQString& fileName );
// OPTIONAL, if not specified, default folder + the file name
void setFileURL( const KURL& url );
// OPTIONAL
- void setReverse( bool reverse, const QString& reverseToken );
+ void setReverse( bool reverse, const TQString& reverseToken );
public slots:
virtual bool queue();
@@ -85,7 +85,7 @@ class DccTransferRecv : public DccTransfer
void slotLocalGotResult( KIO::Job* job );
void slotLocalReady( KIO::Job* job );
void slotLocalWriteDone();
- void slotLocalGotWriteError( const QString& errorString );
+ void slotLocalGotWriteError( const TQString& errorString );
// Remote DCC
void connectWithSender();
@@ -102,11 +102,11 @@ class DccTransferRecv : public DccTransfer
protected:
void cleanUp();
- void failed(const QString& errorMessage = QString() );
+ void failed(const TQString& errorMessage = TQString() );
// (startPosition == 0) means "don't resume"
void prepareLocalKio( bool overwrite, bool resume, KIO::fileoffset_t startPosition = 0 );
- void askAndPrepareLocalKio( const QString& message, int enabledActions, DccResumeDialog::ReceiveAction defaultAction, KIO::fileoffset_t startPosition = 0 );
+ void askAndPrepareLocalKio( const TQString& message, int enabledActions, DccResumeDialog::ReceiveAction defaultAction, KIO::fileoffset_t startPosition = 0 );
/**
* This calls KIO::NetAccess::mkdir on all the subdirectories of dirURL, to
@@ -138,14 +138,14 @@ class DccTransferRecv : public DccTransfer
DccTransferRecvWriteCacheHandler* m_writeCacheHandler;
bool m_saveToFileExists;
bool m_partialFileExists;
- QTimer* m_connectionTimer;
+ TQTimer* m_connectionTimer;
KNetwork::KServerSocket* m_serverSocket;
KNetwork::KStreamSocket* m_recvSocket;
private:
- virtual QString getTypeText() const;
- virtual QPixmap getTypeIcon() const;
+ virtual TQString getTypeText() const;
+ virtual TQPixmap getTypeIcon() const;
};
class DccTransferRecvWriteCacheHandler : public QObject
@@ -165,11 +165,11 @@ class DccTransferRecvWriteCacheHandler : public QObject
void dataFinished(); // -> m_transferJob->slotFinished()
void done(); // -> DccTransferRecv::writeDone()
// -> DccTransferRecv::slotWriteError()
- void gotError( const QString& errorString );
+ void gotError( const TQString& errorString );
protected slots:
// <- m_transferJob->dataReq()
- void slotKIODataReq( KIO::Job* job, QByteArray& data );
+ void slotKIODataReq( KIO::Job* job, TQByteArray& data );
void slotKIOResult( KIO::Job* job ); // <- m_transferJob->result()
protected:
@@ -177,8 +177,8 @@ class DccTransferRecvWriteCacheHandler : public QObject
bool m_writeAsyncMode;
bool m_writeReady;
- QValueList<QByteArray> m_cacheList;
- QDataStream* m_cacheStream;
+ TQValueList<TQByteArray> m_cacheList;
+ TQDataStream* m_cacheStream;
};
#endif // DCCTRANSFERRECV_H
diff --git a/konversation/src/dcctransfersend.cpp b/konversation/src/dcctransfersend.cpp
index 09fc42c..3663a1d 100644
--- a/konversation/src/dcctransfersend.cpp
+++ b/konversation/src/dcctransfersend.cpp
@@ -30,8 +30,8 @@
#include <sys/ioctl.h>
#include <arpa/inet.h>
-#include <qfile.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <klocale.h>
@@ -47,7 +47,7 @@
using namespace KNetwork;
-DccTransferSend::DccTransferSend(QObject* parent)
+DccTransferSend::DccTransferSend(TQObject* parent)
: DccTransfer( DccTransfer::Send, parent )
{
kdDebug() << "DccTransferSend::DccTransferSend()" << endl;
@@ -55,8 +55,8 @@ DccTransferSend::DccTransferSend(QObject* parent)
m_serverSocket = 0;
m_sendSocket = 0;
- m_connectionTimer = new QTimer( this );
- connect( m_connectionTimer, SIGNAL( timeout() ), this, SLOT( slotConnectionTimeout() ) );
+ m_connectionTimer = new TQTimer( this );
+ connect( m_connectionTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotConnectionTimeout() ) );
// set defualt values
m_reverse = Preferences::dccPassiveSend();
@@ -74,7 +74,7 @@ void DccTransferSend::cleanUp()
finishTransferLogger();
if ( !m_tmpFile.isEmpty() )
KIO::NetAccess::removeTempFile( m_tmpFile );
- m_tmpFile = QString();
+ m_tmpFile = TQString();
m_file.close();
if ( m_sendSocket )
{
@@ -89,7 +89,7 @@ void DccTransferSend::cleanUp()
}
// just for convenience
-void DccTransferSend::failed( const QString& errorMessage )
+void DccTransferSend::failed( const TQString& errorMessage )
{
setStatus( Failed, errorMessage );
cleanUp();
@@ -102,13 +102,13 @@ void DccTransferSend::setFileURL( const KURL& url )
m_fileURL = url;
}
-void DccTransferSend::setFileName( const QString& fileName )
+void DccTransferSend::setFileName( const TQString& fileName )
{
if ( getStatus() == Configuring )
m_fileName = fileName;
}
-void DccTransferSend::setOwnIp( const QString& ownIp )
+void DccTransferSend::setOwnIp( const TQString& ownIp )
{
if ( getStatus() == Configuring )
m_ownIp = ownIp;
@@ -245,7 +245,7 @@ void DccTransferSend::start() // public slot
kdDebug() << "DccTransferSend::start(): normal DCC SEND" << endl;
// Set up server socket
- QString failedReason;
+ TQString failedReason;
if ( Preferences::dccSpecificSendPorts() )
m_serverSocket = DccCommon::createServerSocketAndListen( this, &failedReason, Preferences::dccSendPortsFirst(), Preferences::dccSendPortsLast() );
else
@@ -256,12 +256,12 @@ void DccTransferSend::start() // public slot
return;
}
- connect( m_serverSocket, SIGNAL( readyAccept() ), this, SLOT( acceptClient() ) );
- connect( m_serverSocket, SIGNAL( gotError( int ) ), this, SLOT( slotGotSocketError( int ) ) );
- connect( m_serverSocket, SIGNAL( closed() ), this, SLOT( slotServerSocketClosed() ) );
+ connect( m_serverSocket, TQT_SIGNAL( readyAccept() ), this, TQT_SLOT( acceptClient() ) );
+ connect( m_serverSocket, TQT_SIGNAL( gotError( int ) ), this, TQT_SLOT( slotGotSocketError( int ) ) );
+ connect( m_serverSocket, TQT_SIGNAL( closed() ), this, TQT_SLOT( slotServerSocketClosed() ) );
// Get own port number
- m_ownPort = QString::number( DccCommon::getServerSocketPort( m_serverSocket ) );
+ m_ownPort = TQString::number( DccCommon::getServerSocketPort( m_serverSocket ) );
kdDebug() << "DccTransferSend::start(): own Address=" << m_ownIp << ":" << m_ownPort << endl;
@@ -276,7 +276,7 @@ void DccTransferSend::start() // public slot
int tokenNumber = KonversationApplication::instance()->getDccTransferManager()->generateReverseTokenNumber();
// TODO: should we append a letter "T" to this token?
- m_reverseToken = QString::number( tokenNumber );
+ m_reverseToken = TQString::number( tokenNumber );
kdDebug() << "DccTransferSend::start(): passive DCC key(token): " << m_reverseToken << endl;
@@ -286,7 +286,7 @@ void DccTransferSend::start() // public slot
setStatus( WaitingRemote, i18n( "Waiting remote user's acceptance" ) );
}
-void DccTransferSend::connectToReceiver( const QString& partnerHost, const QString& partnerPort )
+void DccTransferSend::connectToReceiver( const TQString& partnerHost, const TQString& partnerPort )
{
// Reverse DCC
@@ -297,8 +297,8 @@ void DccTransferSend::connectToReceiver( const QString& partnerHost, const QStri
m_sendSocket->setBlocking( false );
- connect( m_sendSocket, SIGNAL( connected( const KResolverEntry& ) ), this, SLOT( startSending() ) );
- connect( m_sendSocket, SIGNAL( gotError( int ) ), this, SLOT( slotConnectionFailed( int ) ) );
+ connect( m_sendSocket, TQT_SIGNAL( connected( const KResolverEntry& ) ), this, TQT_SLOT( startSending() ) );
+ connect( m_sendSocket, TQT_SIGNAL( gotError( int ) ), this, TQT_SLOT( slotConnectionFailed( int ) ) );
setStatus( Connecting );
@@ -343,9 +343,9 @@ void DccTransferSend::acceptClient() // slot
void DccTransferSend::startSending()
{
- connect( m_sendSocket, SIGNAL( readyWrite() ), this, SLOT( writeData() ) );
- connect( m_sendSocket, SIGNAL( readyRead() ), this, SLOT( getAck() ) );
- connect( m_sendSocket, SIGNAL( closed() ), this, SLOT( slotSendSocketClosed() ) );
+ connect( m_sendSocket, TQT_SIGNAL( readyWrite() ), this, TQT_SLOT( writeData() ) );
+ connect( m_sendSocket, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( getAck() ) );
+ connect( m_sendSocket, TQT_SIGNAL( closed() ), this, TQT_SLOT( slotSendSocketClosed() ) );
if ( m_sendSocket->peerAddress().asInet().ipAddress().isV4Mapped() )
m_partnerIp = KNetwork::KIpAddress( m_sendSocket->peerAddress().asInet().ipAddress().IPv4Addr() ).toString();
@@ -462,9 +462,9 @@ void DccTransferSend::slotSendSocketClosed()
}
// protected, static
-QString DccTransferSend::getQFileErrorString( int code )
+TQString DccTransferSend::getQFileErrorString( int code )
{
- QString errorString;
+ TQString errorString;
switch(code)
{
diff --git a/konversation/src/dcctransfersend.h b/konversation/src/dcctransfersend.h
index dfe6ad6..a0a9ec5 100644
--- a/konversation/src/dcctransfersend.h
+++ b/konversation/src/dcctransfersend.h
@@ -19,10 +19,10 @@
#include "dcctransfer.h"
-#include <qfile.h>
+#include <tqfile.h>
-class QTimer;
+class TQTimer;
namespace KNetwork
{
@@ -35,16 +35,16 @@ class DccTransferSend : public DccTransfer
Q_OBJECT
public:
- DccTransferSend(QObject* parent);
+ DccTransferSend(TQObject* parent);
virtual ~DccTransferSend();
// REQUIRED
void setFileURL( const KURL& url );
// OPTIONAL
- void setFileName( const QString& fileName );
+ void setFileName( const TQString& fileName );
// REQUIED
// FIXME: this setting should be an optional one or be removed: make DccTransferSend itself read the configuration
- void setOwnIp( const QString& ownIp );
+ void setOwnIp( const TQString& ownIp );
// OPTIONAL
void setFileSize( KIO::filesize_t fileSize );
// OPTIONAL
@@ -58,7 +58,7 @@ class DccTransferSend : public DccTransfer
virtual void abort();
// invoked when the receiver accepts the offer (Reverse DCC)
- void connectToReceiver( const QString& partnerHost, const QString& partnerPort );
+ void connectToReceiver( const TQString& partnerHost, const TQString& partnerPort );
protected slots:
void acceptClient();
@@ -74,25 +74,25 @@ class DccTransferSend : public DccTransfer
protected:
void cleanUp();
- void failed(const QString& errorMessage = QString() );
+ void failed(const TQString& errorMessage = TQString() );
void startConnectionTimer( int sec );
void stopConnectionTimer();
- QString getQFileErrorString( int code );
+ TQString getQFileErrorString( int code );
- QFile m_file;
+ TQFile m_file;
/*The filename of the temporary file that we downloaded. So if send a file ftp://somewhere/file.txt
* Then this will be downloaded to /tmp.
*/
- QString m_tmpFile;
+ TQString m_tmpFile;
KNetwork::KServerSocket* m_serverSocket;
KNetwork::KStreamSocket* m_sendSocket;
bool m_fastSend;
- QTimer* m_connectionTimer;
+ TQTimer* m_connectionTimer;
};
#endif // DCCTRANSFERSEND_H
diff --git a/konversation/src/decoder.h b/konversation/src/decoder.h
index 578dddb..c951413 100644
--- a/konversation/src/decoder.h
+++ b/konversation/src/decoder.h
@@ -22,10 +22,10 @@
#ifndef KHTMLDECODER_H
#define KHTMLDECODER_H
-#include <qstring.h>
+#include <tqstring.h>
-class QTextCodec;
-class QTextDecoder;
+class TQTextCodec;
+class TQTextDecoder;
class JapaneseCode;
@@ -50,13 +50,13 @@ public:
void setEncoding(const char *encoding, EncodingType type);
const char *encoding() const;
- QString decode(const char *data, int len);
+ TQString decode(const char *data, int len);
bool visuallyOrdered() const { return visualRTL; }
- const QTextCodec *codec() const { return m_codec; }
+ const TQTextCodec *codec() const { return m_codec; }
- QString flush() const;
+ TQString flush() const;
enum AutoDetectLanguage {
@@ -83,23 +83,23 @@ public:
private:
- QCString automaticDetectionForArabic( const unsigned char* str, int size );
- QCString automaticDetectionForBaltic( const unsigned char* str, int size );
- QCString automaticDetectionForCentralEuropean( const unsigned char* str, int size );
- QCString automaticDetectionForCyrillic( const unsigned char* str, int size, AutoDetectLanguage _language );
- QCString automaticDetectionForGreek( const unsigned char* str, int size );
- QCString automaticDetectionForHebrew( const unsigned char* str, int size );
- QCString automaticDetectionForJapanese( const unsigned char* str, int size );
- QCString automaticDetectionForTurkish( const unsigned char* str, int size );
- QCString automaticDetectionForWesternEuropean( const unsigned char* str, int size );
+ TQCString automaticDetectionForArabic( const unsigned char* str, int size );
+ TQCString automaticDetectionForBaltic( const unsigned char* str, int size );
+ TQCString automaticDetectionForCentralEuropean( const unsigned char* str, int size );
+ TQCString automaticDetectionForCyrillic( const unsigned char* str, int size, AutoDetectLanguage _language );
+ TQCString automaticDetectionForGreek( const unsigned char* str, int size );
+ TQCString automaticDetectionForHebrew( const unsigned char* str, int size );
+ TQCString automaticDetectionForJapanese( const unsigned char* str, int size );
+ TQCString automaticDetectionForTurkish( const unsigned char* str, int size );
+ TQCString automaticDetectionForWesternEuropean( const unsigned char* str, int size );
// codec used for decoding. default is Latin1.
- QTextCodec *m_codec;
- QTextDecoder *m_decoder; // only used for utf16
- QCString enc;
+ TQTextCodec *m_codec;
+ TQTextDecoder *m_decoder; // only used for utf16
+ TQCString enc;
EncodingType m_type;
- QCString buffer;
+ TQCString buffer;
bool body;
bool beginning;
diff --git a/konversation/src/editnotifydialog.cpp b/konversation/src/editnotifydialog.cpp
index fe6779c..8874463 100644
--- a/konversation/src/editnotifydialog.cpp
+++ b/konversation/src/editnotifydialog.cpp
@@ -15,9 +15,9 @@
#include "konversationapplication.h"
#include "servergroupsettings.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqwhatsthis.h>
#include <klineedit.h>
#include <kcombobox.h>
@@ -25,46 +25,46 @@
#include <klocale.h>
-EditNotifyDialog::EditNotifyDialog(QWidget* parent,
-const QString& network,
-const QString& nickname):
+EditNotifyDialog::EditNotifyDialog(TQWidget* parent,
+const TQString& network,
+const TQString& nickname):
KDialogBase(parent,"editnotify",true,i18n("Edit Watched Nickname"),
KDialogBase::Ok | KDialogBase::Cancel,
KDialogBase::Ok,true)
{
- QWidget* page=new QWidget(this);
+ TQWidget* page=new TQWidget(this);
setMainWidget(page);
- QHBoxLayout* layout = new QHBoxLayout(page);
+ TQHBoxLayout* layout = new TQHBoxLayout(page);
layout->setSpacing(spacingHint());
- QLabel* networkNameLabel=new QLabel(i18n("&Network name:"),page);
- QString networkNameWT = i18n(
+ TQLabel* networkNameLabel=new TQLabel(i18n("&Network name:"),page);
+ TQString networkNameWT = i18n(
"Pick the server network you will connect to here.");
- QWhatsThis::add(networkNameLabel, networkNameWT);
+ TQWhatsThis::add(networkNameLabel, networkNameWT);
m_networkNameCombo=new KComboBox(page,"notify_network_combo");
- QWhatsThis::add(m_networkNameCombo, networkNameWT);
+ TQWhatsThis::add(m_networkNameCombo, networkNameWT);
networkNameLabel->setBuddy(m_networkNameCombo);
- QLabel* nicknameLabel=new QLabel(i18n("N&ickname:"),page);
- QString nicknameWT = i18n(
+ TQLabel* nicknameLabel=new TQLabel(i18n("N&ickname:"),page);
+ TQString nicknameWT = i18n(
"<qt>The nickname to watch for when connected to a server in the network.</qt>");
- QWhatsThis::add(nicknameLabel, nicknameWT);
+ TQWhatsThis::add(nicknameLabel, nicknameWT);
m_nicknameInput = new KLineEdit(nickname, page);
- QWhatsThis::add(m_nicknameInput, nicknameWT);
+ TQWhatsThis::add(m_nicknameInput, nicknameWT);
nicknameLabel->setBuddy(m_nicknameInput);
// Build a list of unique server network names.
// TODO: The "ServerGroupList type is a misnomer (it is actually networks), which
// should be fixed at some point.
Konversation::ServerGroupList serverNetworks = Preferences::serverGroupList();
- QStringList networkNames;
+ TQStringList networkNames;
for(Konversation::ServerGroupList::iterator it = serverNetworks.begin(); it != serverNetworks.end(); ++it)
{
- QString name = (*it)->name();
+ TQString name = (*it)->name();
if (!networkNames.contains(name))
{
@@ -74,7 +74,7 @@ KDialogBase::Ok,true)
networkNames.sort();
// Add network names to network combobox and select the one corresponding to argument.
- for (QStringList::ConstIterator it = networkNames.begin(); it != networkNames.end(); ++it)
+ for (TQStringList::ConstIterator it = networkNames.begin(); it != networkNames.end(); ++it)
{
m_networkNameCombo->insertItem(*it);
if(*it == network) m_networkNameCombo->setCurrentItem(m_networkNameCombo->count()-1);
diff --git a/konversation/src/editnotifydialog.h b/konversation/src/editnotifydialog.h
index 0070ac9..b96b8a2 100644
--- a/konversation/src/editnotifydialog.h
+++ b/konversation/src/editnotifydialog.h
@@ -33,13 +33,13 @@ class EditNotifyDialog : public KDialogBase
Q_OBJECT
public:
- explicit EditNotifyDialog(QWidget* parent=0,const QString& network=QString(),
- const QString& nickname=QString());
+ explicit EditNotifyDialog(TQWidget* parent=0,const TQString& network=TQString(),
+ const TQString& nickname=TQString());
~EditNotifyDialog();
signals:
- void notifyChanged(const QString& network,
- const QString& nickname);
+ void notifyChanged(const TQString& network,
+ const TQString& nickname);
protected slots:
void slotOk();
diff --git a/konversation/src/emoticon.cpp b/konversation/src/emoticon.cpp
index e193e39..aad7082 100644
--- a/konversation/src/emoticon.cpp
+++ b/konversation/src/emoticon.cpp
@@ -11,10 +11,10 @@
#include "emoticon.h"
-#include <qregexp.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qfontmetrics.h>
+#include <tqregexp.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqfontmetrics.h>
#include <kstaticdeleter.h>
#include <kstandarddirs.h>
@@ -58,7 +58,7 @@ namespace Konversation
}
}
- void EmotIcon::changeTheme(const QString& themeName)
+ void EmotIcon::changeTheme(const TQString& themeName)
{
if(themeName.isEmpty() || themeName == self()->m_themeName)
{
@@ -66,11 +66,11 @@ namespace Konversation
}
#if KDE_IS_VERSION(3,3,91)
- QString filename = KGlobal::dirs()->findResource("emoticons", themeName + "/emoticons.xml");
+ TQString filename = KGlobal::dirs()->findResource("emoticons", themeName + "/emoticons.xml");
self()->m_themeName = themeName;
#else
- QString app = "konversation";
- QString filename = KGlobal::dirs()->findResource("data", app + "/pics/emoticons/" + themeName + "/emoticons.xml");
+ TQString app = "konversation";
+ TQString filename = KGlobal::dirs()->findResource("data", app + "/pics/emoticons/" + themeName + "/emoticons.xml");
if(filename.isEmpty())
{
@@ -85,12 +85,12 @@ namespace Konversation
return;
}
- QFile file(filename);
+ TQFile file(filename);
file.open(IO_ReadOnly);
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent(&file);
- QDomElement docElement = doc.documentElement();
+ TQDomElement docElement = doc.documentElement();
if(docElement.tagName() != "messaging-emoticon-map")
{
@@ -99,12 +99,12 @@ namespace Konversation
self()->m_emotIconMap.clear();
- QDomNode node = docElement.firstChild();
- QDomElement element;
- QDomNode stringNode;
- QDomElement stringElement;
- QString fileAttrib;
- QString regExpStr;
+ TQDomNode node = docElement.firstChild();
+ TQDomElement element;
+ TQDomNode stringNode;
+ TQDomElement stringElement;
+ TQString fileAttrib;
+ TQString regExpStr;
while(!node.isNull())
{
@@ -112,7 +112,7 @@ namespace Konversation
if(!element.isNull() && element.tagName() == "emoticon")
{
- fileAttrib = findIcon(element.attribute("file", QString()));
+ fileAttrib = findIcon(element.attribute("file", TQString()));
regExpStr = "";
stringNode = element.firstChild();
@@ -131,7 +131,7 @@ namespace Konversation
regExpStr += '|';
}
- regExpStr += QRegExp::escape(stringElement.text());
+ regExpStr += TQRegExp::escape(stringElement.text());
}
stringNode = stringNode.nextSibling();
@@ -148,42 +148,42 @@ namespace Konversation
}
}
- QString EmotIcon::filter(const QString& txt, const QFontMetrics& fm)
+ TQString EmotIcon::filter(const TQString& txt, const TQFontMetrics& fm)
{
if(!Preferences::enableEmotIcons())
{
return txt;
}
- QString filteredTxt = txt;
+ TQString filteredTxt = txt;
for(EmotIconMap::iterator it = self()->m_emotIconMap.begin(); it != self()->m_emotIconMap.end(); ++it)
{
- QRegExp regExp(QString("(^|\\s)%1($|\\s)").arg(it.data()));
- filteredTxt.replace(regExp, " <img width=\"" + QString::number(fm.height()) + "\" height=\"" + QString::number(fm.height())
+ TQRegExp regExp(TQString("(^|\\s)%1($|\\s)").arg(it.data()));
+ filteredTxt.replace(regExp, " <img width=\"" + TQString::number(fm.height()) + "\" height=\"" + TQString::number(fm.height())
+ "\" src=\"" + it.key() + "\" alt=\"" + it.data() + "\">&nbsp;");
}
return filteredTxt;
}
- QString EmotIcon::findIcon(const QString& filename)
+ TQString EmotIcon::findIcon(const TQString& filename)
{
//
- // This code was copied from void KopeteEmoticons::addIfPossible( const QString& filename, QStringList emoticons )
+ // This code was copied from void KopeteEmoticons::addIfPossible( const TQString& filename, TQStringList emoticons )
// Copyright (c) 2002 by Stefan Gehn <metz AT gehn.net>
// Copyright (c) 2002 by Olivier Goffart <ogoffart@tiscalinet.be>
//
KStandardDirs *dirs = KGlobal::dirs();
- QString pic;
+ TQString pic;
#if KDE_IS_VERSION(3,3,91)
- QString file = self()->m_themeName + '/' + filename;
+ TQString file = self()->m_themeName + '/' + filename;
const char* resource = "emoticons";
#else
- QString app = self()->m_themeName.section('/', 0, 0);
- QString dir = self()->m_themeName.section('/', 1);
- QString file = app + "/pics/emoticons/" + dir + '/' + filename;
+ TQString app = self()->m_themeName.section('/', 0, 0);
+ TQString dir = self()->m_themeName.section('/', 1);
+ TQString file = app + "/pics/emoticons/" + dir + '/' + filename;
const char* resource = "data";
#endif
diff --git a/konversation/src/emoticon.h b/konversation/src/emoticon.h
index 824a25a..b6f663d 100644
--- a/konversation/src/emoticon.h
+++ b/konversation/src/emoticon.h
@@ -12,16 +12,16 @@
#ifndef KONVERSATIONEMOTICON_H
#define KONVERSATIONEMOTICON_H
-#include <qstring.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqmap.h>
-class QFontMetrics;
+class TQFontMetrics;
namespace Konversation
{
- typedef QMap<QString, QString> EmotIconMap;
+ typedef TQMap<TQString, TQString> EmotIconMap;
class EmotIcon
{
@@ -29,17 +29,17 @@ namespace Konversation
~EmotIcon();
static EmotIcon* self();
- static void changeTheme(const QString& themeName);
- static QString filter(const QString& txt, const QFontMetrics& fm);
+ static void changeTheme(const TQString& themeName);
+ static TQString filter(const TQString& txt, const TQFontMetrics& fm);
protected:
EmotIcon();
static EmotIcon* s_self;
- static QString findIcon(const QString& filename);
+ static TQString findIcon(const TQString& filename);
private:
- QString m_themeName;
+ TQString m_themeName;
EmotIconMap m_emotIconMap;
};
diff --git a/konversation/src/guess_ja.cpp b/konversation/src/guess_ja.cpp
index 4e35217..75d54f6 100644
--- a/konversation/src/guess_ja.cpp
+++ b/konversation/src/guess_ja.cpp
@@ -37,7 +37,7 @@
*/
/*
- * Maybe we should use QTextCodec::heuristicContentMatch()
+ * Maybe we should use TQTextCodec::heuristicContentMatch()
* But it fails detection. It's not useful.
*/
#include "guess_ja.h"
diff --git a/konversation/src/highlight.cpp b/konversation/src/highlight.cpp
index 275c441..419dceb 100644
--- a/konversation/src/highlight.cpp
+++ b/konversation/src/highlight.cpp
@@ -18,11 +18,11 @@
unsigned int Highlight::s_id = 0; // static
-Highlight::Highlight(const QString& itemPattern,
+Highlight::Highlight(const TQString& itemPattern,
bool regExp,
-const QColor& itemColor,
+const TQColor& itemColor,
const KURL& soundURL,
-const QString& autoText)
+const TQString& autoText)
{
m_itemPattern = itemPattern;
m_autoText = autoText;
@@ -35,14 +35,14 @@ const QString& autoText)
}
int Highlight::getID() { return m_itemID; }
-QString Highlight::getPattern() { return m_itemPattern; }
-QString Highlight::getAutoText() { return m_autoText; }
-QColor Highlight::getColor() { return m_itemColor; }
+TQString Highlight::getPattern() { return m_itemPattern; }
+TQString Highlight::getAutoText() { return m_autoText; }
+TQColor Highlight::getColor() { return m_itemColor; }
KURL Highlight::getSoundURL() { return m_soundURL; }
-void Highlight::setPattern(const QString& itemPattern) { m_itemPattern = itemPattern; }
-void Highlight::setAutoText(const QString& autoText) { m_autoText = autoText; }
-void Highlight::setColor(const QColor& itemColor) { m_itemColor = itemColor; }
+void Highlight::setPattern(const TQString& itemPattern) { m_itemPattern = itemPattern; }
+void Highlight::setAutoText(const TQString& autoText) { m_autoText = autoText; }
+void Highlight::setColor(const TQColor& itemColor) { m_itemColor = itemColor; }
void Highlight::setSoundURL(const KURL& url) { m_soundURL = url; }
void Highlight::setRegExp(bool state) { m_regExp=state; }
diff --git a/konversation/src/highlight.h b/konversation/src/highlight.h
index e843023..d267393 100644
--- a/konversation/src/highlight.h
+++ b/konversation/src/highlight.h
@@ -18,8 +18,8 @@
#ifndef HIGHLIGHT_H
#define HIGHLIGHT_H
-#include <qstring.h>
-#include <qcolor.h>
+#include <tqstring.h>
+#include <tqcolor.h>
#include <kurl.h>
@@ -30,23 +30,23 @@
class Highlight
{
public:
- Highlight(const QString& itemPattern,
+ Highlight(const TQString& itemPattern,
bool regExp,
- const QColor& itemColor,
+ const TQColor& itemColor,
const KURL& soundURL,
- const QString& autoText);
+ const TQString& autoText);
- QString getPattern();
- QString getAutoText();
- QColor getColor();
+ TQString getPattern();
+ TQString getAutoText();
+ TQColor getColor();
int getID();
bool getRegExp();
KURL getSoundURL();
- void setPattern(const QString& itemPattern);
- void setColor(const QColor& itemColor);
+ void setPattern(const TQString& itemPattern);
+ void setColor(const TQColor& itemColor);
void setSoundURL(const KURL& url);
- void setAutoText(const QString& autoText);
+ void setAutoText(const TQString& autoText);
void setRegExp(bool state);
protected:
@@ -55,9 +55,9 @@ class Highlight
int m_itemID;
bool m_regExp;
- QString m_itemPattern;
- QString m_autoText;
- QColor m_itemColor;
+ TQString m_itemPattern;
+ TQString m_autoText;
+ TQColor m_itemColor;
KURL m_soundURL;
};
#endif
diff --git a/konversation/src/highlight_preferences.cpp b/konversation/src/highlight_preferences.cpp
index be757e6..4c782a3 100644
--- a/konversation/src/highlight_preferences.cpp
+++ b/konversation/src/highlight_preferences.cpp
@@ -16,11 +16,11 @@
#include "konversationsound.h"
#include "config/preferences.h"
-#include <qdir.h>
-#include <qlabel.h>
-#include <qheader.h>
-#include <qtooltip.h>
-#include <qtoolbutton.h>
+#include <tqdir.h>
+#include <tqlabel.h>
+#include <tqheader.h>
+#include <tqtooltip.h>
+#include <tqtoolbutton.h>
#include <kglobal.h>
#include <kstandarddirs.h>
@@ -35,7 +35,7 @@
#include <kiconloader.h>
-Highlight_Config::Highlight_Config(QWidget* parent, const char* name)
+Highlight_Config::Highlight_Config(TQWidget* parent, const char* name)
: Highlight_ConfigUI(parent,name)
{
// reset flag to defined state (used to block signals when just selecting a new item)
@@ -52,14 +52,14 @@ Highlight_Config::Highlight_Config(QWidget* parent, const char* name)
// This code was copied from KNotifyWidget::openSoundDialog() (knotifydialog.cpp) [it's under LGPL v2]
// find the first "sound"-resource that contains files
- QStringList soundDirs = KGlobal::dirs()->findDirs("data", "konversation/sounds");
+ TQStringList soundDirs = KGlobal::dirs()->findDirs("data", "konversation/sounds");
soundDirs += KGlobal::dirs()->resourceDirs( "sound" );
if ( !soundDirs.isEmpty() ) {
KURL url;
- QDir dir;
- dir.setFilter( QDir::Files | QDir::Readable );
- QStringList::ConstIterator it = soundDirs.begin();
+ TQDir dir;
+ dir.setFilter( TQDir::Files | TQDir::Readable );
+ TQStringList::ConstIterator it = soundDirs.begin();
while ( it != soundDirs.end() ) {
dir = *it;
if ( dir.isReadable() && dir.count() > 2 ) {
@@ -72,23 +72,23 @@ Highlight_Config::Highlight_Config(QWidget* parent, const char* name)
}
// End copy
- connect(highlightListView,SIGNAL (selectionChanged(QListViewItem*)),this,SLOT (highlightSelected(QListViewItem*)) );
- connect(highlightListView,SIGNAL (clicked(QListViewItem*)),this,SLOT (highlightSelected(QListViewItem*)) );
- connect(highlightListView,SIGNAL (spacePressed(QListViewItem*)),this,SLOT (highlightSelected(QListViewItem*)) );
+ connect(highlightListView,TQT_SIGNAL (selectionChanged(TQListViewItem*)),this,TQT_SLOT (highlightSelected(TQListViewItem*)) );
+ connect(highlightListView,TQT_SIGNAL (clicked(TQListViewItem*)),this,TQT_SLOT (highlightSelected(TQListViewItem*)) );
+ connect(highlightListView,TQT_SIGNAL (spacePressed(TQListViewItem*)),this,TQT_SLOT (highlightSelected(TQListViewItem*)) );
- connect(highlightListView,SIGNAL (moved()),this,SIGNAL (modified()) );
+ connect(highlightListView,TQT_SIGNAL (moved()),this,TQT_SIGNAL (modified()) );
- connect(patternInput,SIGNAL (textChanged(const QString&)),this,SLOT (highlightTextChanged(const QString&)) );
- connect(patternButton,SIGNAL (clicked()),this,SLOT(highlightTextEditButtonClicked()));
- connect(patternColor,SIGNAL (changed(const QColor&)),this,SLOT (highlightColorChanged(const QColor&)) );
+ connect(patternInput,TQT_SIGNAL (textChanged(const TQString&)),this,TQT_SLOT (highlightTextChanged(const TQString&)) );
+ connect(patternButton,TQT_SIGNAL (clicked()),this,TQT_SLOT(highlightTextEditButtonClicked()));
+ connect(patternColor,TQT_SIGNAL (changed(const TQColor&)),this,TQT_SLOT (highlightColorChanged(const TQColor&)) );
- connect(soundURL, SIGNAL(textChanged(const QString&)), this, SLOT(soundURLChanged(const QString&)));
- connect(soundPlayBtn, SIGNAL(clicked()), this, SLOT(playSound()));
+ connect(soundURL, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(soundURLChanged(const TQString&)));
+ connect(soundPlayBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(playSound()));
- connect(autoTextInput,SIGNAL (textChanged(const QString&)),this,SLOT (autoTextChanged(const QString&)) );
+ connect(autoTextInput,TQT_SIGNAL (textChanged(const TQString&)),this,TQT_SLOT (autoTextChanged(const TQString&)) );
- connect(newButton,SIGNAL (clicked()),this,SLOT (addHighlight()) );
- connect(removeButton,SIGNAL (clicked()),this,SLOT (removeHighlight()) );
+ connect(newButton,TQT_SIGNAL (clicked()),this,TQT_SLOT (addHighlight()) );
+ connect(removeButton,TQT_SIGNAL (clicked()),this,TQT_SLOT (removeHighlight()) );
updateButtons();
}
@@ -107,7 +107,7 @@ void Highlight_Config::restorePageToDefaults()
void Highlight_Config::loadSettings()
{
- QPtrList<Highlight> highlightList=Preferences::highlightList();
+ TQPtrList<Highlight> highlightList=Preferences::highlightList();
highlightListView->clear();
// fill in the highlight patterns backwards to keep the right sorting order
for(unsigned int i=highlightList.count();i!=0;i--)
@@ -129,7 +129,7 @@ bool Highlight_Config::hasChanged()
// Slots:
-void Highlight_Config::highlightSelected(QListViewItem* item)
+void Highlight_Config::highlightSelected(TQListViewItem* item)
{
// check if there was a widget selected at all
if(item)
@@ -179,15 +179,15 @@ void Highlight_Config::updateButtons()
if(installed)
{
- QToolTip::add(patternButton, i18n("Click to run Regular Expression Editor (KRegExpEditor)"));
+ TQToolTip::add(patternButton, i18n("Click to run Regular Expression Editor (KRegExpEditor)"));
}
else
{
- QToolTip::add(patternButton, i18n("The Regular Expression Editor (KRegExpEditor) is not installed"));
+ TQToolTip::add(patternButton, i18n("The Regular Expression Editor (KRegExpEditor) is not installed"));
}
}
-void Highlight_Config::highlightTextChanged(const QString& newPattern)
+void Highlight_Config::highlightTextChanged(const TQString& newPattern)
{
HighlightViewItem* item=static_cast<HighlightViewItem*>(highlightListView->selectedItem());
@@ -200,8 +200,8 @@ void Highlight_Config::highlightTextChanged(const QString& newPattern)
void Highlight_Config::highlightTextEditButtonClicked()
{
- QDialog *editorDialog =
- KParts::ComponentFactory::createInstanceFromQuery<QDialog>( "KRegExpEditor/KRegExpEditor" );
+ TQDialog *editorDialog =
+ KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor" );
if (editorDialog)
{
// kdeutils was installed, so the dialog was found. Fetch the editor interface.
@@ -210,9 +210,9 @@ void Highlight_Config::highlightTextEditButtonClicked()
Q_ASSERT( reEditor ); // This should not fail!// now use the editor.
reEditor->setRegExp(patternInput->text());
int dlgResult = editorDialog->exec();
- if ( dlgResult == QDialog::Accepted )
+ if ( dlgResult == TQDialog::Accepted )
{
- QString re = reEditor->regExp();
+ TQString re = reEditor->regExp();
patternInput->setText(re);
HighlightViewItem* item=static_cast<HighlightViewItem*>(highlightListView->selectedItem());
if(item) item->setPattern(re);
@@ -221,7 +221,7 @@ void Highlight_Config::highlightTextEditButtonClicked()
}
}
-void Highlight_Config::highlightColorChanged(const QColor& newColor)
+void Highlight_Config::highlightColorChanged(const TQColor& newColor)
{
HighlightViewItem* item=static_cast<HighlightViewItem*>(highlightListView->selectedItem());
@@ -233,7 +233,7 @@ void Highlight_Config::highlightColorChanged(const QColor& newColor)
}
}
-void Highlight_Config::soundURLChanged(const QString& newURL)
+void Highlight_Config::soundURLChanged(const TQString& newURL)
{
HighlightViewItem* item=static_cast<HighlightViewItem*>(highlightListView->selectedItem());
@@ -244,7 +244,7 @@ void Highlight_Config::soundURLChanged(const QString& newURL)
}
}
-void Highlight_Config::autoTextChanged(const QString& newText)
+void Highlight_Config::autoTextChanged(const TQString& newText)
{
HighlightViewItem* item=static_cast<HighlightViewItem*>(highlightListView->selectedItem());
@@ -257,7 +257,7 @@ void Highlight_Config::autoTextChanged(const QString& newText)
void Highlight_Config::addHighlight()
{
- Highlight* newHighlight=new Highlight(i18n("New"),false,QColor("#ff0000"),KURL(),QString());
+ Highlight* newHighlight=new Highlight(i18n("New"),false,TQColor("#ff0000"),KURL(),TQString());
HighlightViewItem* item=new HighlightViewItem(highlightListView,newHighlight);
highlightListView->setSelected(item,true);
@@ -284,9 +284,9 @@ void Highlight_Config::removeHighlight()
updateButtons();
}
-QPtrList<Highlight> Highlight_Config::getHighlightList()
+TQPtrList<Highlight> Highlight_Config::getHighlightList()
{
- QPtrList<Highlight> newList;
+ TQPtrList<Highlight> newList;
HighlightViewItem* item=static_cast<HighlightViewItem*>(highlightListView->firstChild());
while(item)
@@ -298,9 +298,9 @@ QPtrList<Highlight> Highlight_Config::getHighlightList()
return newList;
}
-QStringList Highlight_Config::currentHighlightList()
+TQStringList Highlight_Config::currentHighlightList()
{
- QStringList newList;
+ TQStringList newList;
HighlightViewItem* item=static_cast<HighlightViewItem*>(highlightListView->firstChild());
while(item)
@@ -323,11 +323,11 @@ void Highlight_Config::saveSettings()
KConfig* config = kapp->config();
// Write all highlight entries
- QPtrList<Highlight> hiList=getHighlightList();
+ TQPtrList<Highlight> hiList=getHighlightList();
int i = 0;
for(Highlight* hl = hiList.first(); hl; hl = hiList.next())
{
- config->setGroup(QString("Highlight%1").arg(i));
+ config->setGroup(TQString("Highlight%1").arg(i));
config->writeEntry("Pattern", hl->getPattern());
config->writeEntry("RegExp", hl->getRegExp());
config->writeEntry("Color", hl->getColor());
@@ -339,9 +339,9 @@ void Highlight_Config::saveSettings()
Preferences::setHighlightList(hiList);
// Remove unused entries...
- while(config->hasGroup(QString("Highlight%1").arg(i)))
+ while(config->hasGroup(TQString("Highlight%1").arg(i)))
{
- config->deleteGroup(QString("Highlight%1").arg(i));
+ config->deleteGroup(TQString("Highlight%1").arg(i));
i++;
}
diff --git a/konversation/src/highlight_preferences.h b/konversation/src/highlight_preferences.h
index 997a4c1..d479056 100644
--- a/konversation/src/highlight_preferences.h
+++ b/konversation/src/highlight_preferences.h
@@ -16,7 +16,7 @@
#include "highlight_preferencesui.h"
#include "konvisettingspage.h"
-#include <qobject.h>
+#include <tqobject.h>
class Highlight_Config;
@@ -27,7 +27,7 @@ class Highlight_Config : public Highlight_ConfigUI, public KonviSettingsPage
Q_OBJECT
public:
- explicit Highlight_Config(QWidget *parent = 0, const char *name = 0);
+ explicit Highlight_Config(TQWidget *parent = 0, const char *name = 0);
~Highlight_Config();
public:
@@ -41,22 +41,22 @@ class Highlight_Config : public Highlight_ConfigUI, public KonviSettingsPage
void modified();
protected slots:
- void highlightSelected(QListViewItem* item);
- void highlightTextChanged(const QString& newPattern);
+ void highlightSelected(TQListViewItem* item);
+ void highlightTextChanged(const TQString& newPattern);
void highlightTextEditButtonClicked();
- void highlightColorChanged(const QColor& newColor);
- void soundURLChanged(const QString& newURL);
- void autoTextChanged(const QString& newText);
+ void highlightColorChanged(const TQColor& newColor);
+ void soundURLChanged(const TQString& newURL);
+ void autoTextChanged(const TQString& newText);
void addHighlight();
void removeHighlight();
void playSound();
- QPtrList<Highlight> getHighlightList(); // prefs format
- QStringList currentHighlightList(); // hasChanged() format
+ TQPtrList<Highlight> getHighlightList(); // prefs format
+ TQStringList currentHighlightList(); // hasChanged() format
protected:
void updateButtons();
bool newItemSelected;
- QStringList m_oldHighlightList;
+ TQStringList m_oldHighlightList;
};
#endif
diff --git a/konversation/src/highlightviewitem.cpp b/konversation/src/highlightviewitem.cpp
index 49c9789..f6784a6 100644
--- a/konversation/src/highlightviewitem.cpp
+++ b/konversation/src/highlightviewitem.cpp
@@ -20,7 +20,7 @@
HighlightViewItem::HighlightViewItem(KListView* parent, Highlight* passed_Highlight)
-: QCheckListItem(parent, QString(), QCheckListItem::CheckBox)
+: TQCheckListItem(parent, TQString(), TQCheckListItem::CheckBox)
{
setText(1,passed_Highlight->getPattern());
itemColor = passed_Highlight->getColor();
@@ -35,21 +35,21 @@ HighlightViewItem::~HighlightViewItem()
{
}
-void HighlightViewItem::paintCell(QPainter* p, const QColorGroup &cg, int column, int width, int alignment)
+void HighlightViewItem::paintCell(TQPainter* p, const TQColorGroup &cg, int column, int width, int alignment)
{
// copy all colors from cg and only then change needed colors
itemColorGroup=cg;
- itemColorGroup.setColor(QColorGroup::Text, itemColor);
- QCheckListItem::paintCell(p, itemColorGroup, column, width, alignment);
+ itemColorGroup.setColor(TQColorGroup::Text, itemColor);
+ TQCheckListItem::paintCell(p, itemColorGroup, column, width, alignment);
}
HighlightViewItem* HighlightViewItem::itemBelow()
{
- return (HighlightViewItem*) QCheckListItem::itemBelow();
+ return (HighlightViewItem*) TQCheckListItem::itemBelow();
}
-void HighlightViewItem::setPattern(const QString& newPattern) { setText(1,newPattern); }
-QString HighlightViewItem::getPattern() { return text(1); }
+void HighlightViewItem::setPattern(const TQString& newPattern) { setText(1,newPattern); }
+TQString HighlightViewItem::getPattern() { return text(1); }
void HighlightViewItem::setSoundURL(const KURL& url)
{
@@ -57,7 +57,7 @@ void HighlightViewItem::setSoundURL(const KURL& url)
setText(2, soundURL.prettyURL());
}
-void HighlightViewItem::setAutoText(const QString& newAutoText)
+void HighlightViewItem::setAutoText(const TQString& newAutoText)
{
autoText = newAutoText;
setText(3,newAutoText);
@@ -68,7 +68,7 @@ bool HighlightViewItem::getRegExp()
return isOn();
}
-QString HighlightViewItem::getAutoText()
+TQString HighlightViewItem::getAutoText()
{
return autoText;
}
diff --git a/konversation/src/highlightviewitem.h b/konversation/src/highlightviewitem.h
index 89d4ce0..a443604 100644
--- a/konversation/src/highlightviewitem.h
+++ b/konversation/src/highlightviewitem.h
@@ -18,7 +18,7 @@
#include "highlight.h"
-#include <qlistview.h>
+#include <tqlistview.h>
class KURL;
@@ -30,16 +30,16 @@ class HighlightViewItem : public QCheckListItem
HighlightViewItem(KListView* parent, Highlight* passed_Highlight);
~HighlightViewItem();
- QString getPattern();
- QString getAutoText();
- QColor getColor() { return itemColor; }
+ TQString getPattern();
+ TQString getAutoText();
+ TQColor getColor() { return itemColor; }
int getID() { return itemID; }
bool getRegExp();
KURL getSoundURL() { return soundURL; }
- void setPattern(const QString& newPattern);
- void setAutoText(const QString& newAutoText);
- void setColor(QColor passed_itemColor) { itemColor = passed_itemColor; }
+ void setPattern(const TQString& newPattern);
+ void setAutoText(const TQString& newAutoText);
+ void setColor(TQColor passed_itemColor) { itemColor = passed_itemColor; }
void setID(int passed_itemID) { itemID = passed_itemID; }
void setSoundURL(const KURL& url);
@@ -58,15 +58,15 @@ class HighlightViewItem : public QCheckListItem
HighlightViewItem* itemBelow();
protected:
- QColor itemColor;
- QColorGroup itemColorGroup;
+ TQColor itemColor;
+ TQColorGroup itemColorGroup;
int itemID;
KURL soundURL;
- QString autoText;
+ TQString autoText;
bool m_changed; // true if the checkbox has been changed
void stateChange(bool newState); // reimplemented to store changed value
- void paintCell(QPainter* p, const QColorGroup &cg, int column, int width, int alignment);
+ void paintCell(TQPainter* p, const TQColorGroup &cg, int column, int width, int alignment);
};
#endif
diff --git a/konversation/src/identity.cpp b/konversation/src/identity.cpp
index 01697dd..30fea93 100644
--- a/konversation/src/identity.cpp
+++ b/konversation/src/identity.cpp
@@ -15,7 +15,7 @@
#include "identity.h"
#include "irccharsets.h"
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -98,46 +98,46 @@ void Identity::copy(const Identity& original)
setCodecName(original.getCodecName());
}
-void Identity::setName(const QString& newName) { name=newName; }
-QString Identity::getName() const { return name; }
+void Identity::setName(const TQString& newName) { name=newName; }
+TQString Identity::getName() const { return name; }
-void Identity::setRealName(const QString& name) { realName=name; }
-QString Identity::getRealName() const { return realName; }
-void Identity::setIdent(const QString& newIdent) { ident=newIdent; }
-QString Identity::getIdent() const { return ident; }
+void Identity::setRealName(const TQString& name) { realName=name; }
+TQString Identity::getRealName() const { return realName; }
+void Identity::setIdent(const TQString& newIdent) { ident=newIdent; }
+TQString Identity::getIdent() const { return ident; }
-void Identity::setNickname(uint index,const QString& newName) { nicknameList[index]=newName; }
+void Identity::setNickname(uint index,const TQString& newName) { nicknameList[index]=newName; }
-QString Identity::getNickname(uint index) const
+TQString Identity::getNickname(uint index) const
{
if(index < nicknameList.count())
return nicknameList[index];
else
- return QString();
+ return TQString();
}
-void Identity::setBot(const QString& newBot) { bot=newBot; }
-QString Identity::getBot() const { return bot; }
+void Identity::setBot(const TQString& newBot) { bot=newBot; }
+TQString Identity::getBot() const { return bot; }
-void Identity::setPassword(const QString& newPassword) { password=newPassword; }
-QString Identity::getPassword() const { return password; }
+void Identity::setPassword(const TQString& newPassword) { password=newPassword; }
+TQString Identity::getPassword() const { return password; }
-void Identity::setQuitReason(const QString& reason) { quitReason=reason; }
-QString Identity::getQuitReason() const { return quitReason; }
-void Identity::setPartReason(const QString& reason) { partReason=reason; }
-QString Identity::getPartReason() const { return partReason; }
-void Identity::setKickReason(const QString& reason) { kickReason=reason; }
-QString Identity::getKickReason() const { return kickReason; }
+void Identity::setQuitReason(const TQString& reason) { quitReason=reason; }
+TQString Identity::getQuitReason() const { return quitReason; }
+void Identity::setPartReason(const TQString& reason) { partReason=reason; }
+TQString Identity::getPartReason() const { return partReason; }
+void Identity::setKickReason(const TQString& reason) { kickReason=reason; }
+TQString Identity::getKickReason() const { return kickReason; }
void Identity::setInsertRememberLineOnAway(bool state) { insertRememberLineOnAway = state; }
bool Identity::getInsertRememberLineOnAway() const { return insertRememberLineOnAway; }
void Identity::setShowAwayMessage(bool state) { showAwayMessages=state; }
bool Identity::getShowAwayMessage() const { return showAwayMessages; }
-void Identity::setAwayMessage(const QString& message) { awayMessage=message; }
-QString Identity::getAwayMessage() const { return awayMessage; }
-void Identity::setReturnMessage(const QString& message) { returnMessage=message; }
-QString Identity::getReturnMessage() const { return returnMessage; }
+void Identity::setAwayMessage(const TQString& message) { awayMessage=message; }
+TQString Identity::getAwayMessage() const { return awayMessage; }
+void Identity::setReturnMessage(const TQString& message) { returnMessage=message; }
+TQString Identity::getReturnMessage() const { return returnMessage; }
void Identity::setAutomaticAway(bool automaticAway) { m_automaticAway = automaticAway; }
bool Identity::getAutomaticAway() const { return m_automaticAway; }
@@ -146,26 +146,26 @@ int Identity::getAwayInactivity() const { return m_awayInactivity
void Identity::setAutomaticUnaway(bool automaticUnaway) { m_automaticUnaway = automaticUnaway; }
bool Identity::getAutomaticUnaway() const { return m_automaticUnaway; }
-void Identity::setNicknameList(const QStringList& newList)
+void Identity::setNicknameList(const TQStringList& newList)
{
nicknameList.clear();
nicknameList = newList;
}
-QStringList Identity::getNicknameList() const { return nicknameList; }
+TQStringList Identity::getNicknameList() const { return nicknameList; }
-QString Identity::getShellCommand() const { return m_shellCommand;}
-void Identity::setShellCommand(const QString& command) { m_shellCommand=command;}
+TQString Identity::getShellCommand() const { return m_shellCommand;}
+void Identity::setShellCommand(const TQString& command) { m_shellCommand=command;}
-QTextCodec* Identity::getCodec() const { return m_codec; }
-QString Identity::getCodecName() const { return m_codecName; }
-void Identity::setCodecName(const QString &newCodecName)
+TQTextCodec* Identity::getCodec() const { return m_codec; }
+TQString Identity::getCodecName() const { return m_codecName; }
+void Identity::setCodecName(const TQString &newCodecName)
{
// NOTE: codecName should be based on KCharsets::availableEncodingNames() / descriptiveEncodingNames()
- // We can get a QTextCodec from QString based on them, but can't do the reverse of that.
+ // We can get a TQTextCodec from TQString based on them, but can't do the reverse of that.
// never set an empty or borked codec!
- QString codecName=newCodecName.lower();
+ TQString codecName=newCodecName.lower();
if(!Konversation::IRCCharsets::self()->isValidEncoding(codecName))
codecName=Konversation::IRCCharsets::self()->encodingForLocale();
@@ -173,5 +173,5 @@ void Identity::setCodecName(const QString &newCodecName)
m_codec=Konversation::IRCCharsets::self()->codecForName(codecName);
}
-QString Identity::getAwayNick() const { return awayNick; }
-void Identity::setAwayNick(const QString& n) { awayNick = n; }
+TQString Identity::getAwayNick() const { return awayNick; }
+void Identity::setAwayNick(const TQString& n) { awayNick = n; }
diff --git a/konversation/src/identity.h b/konversation/src/identity.h
index 8fdec49..7f446c5 100644
--- a/konversation/src/identity.h
+++ b/konversation/src/identity.h
@@ -16,10 +16,10 @@
#define IDENTITY_H
#include <ksharedptr.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
-class QTextCodec;
+class TQTextCodec;
class Identity : public KShared
{
@@ -35,41 +35,41 @@ class Identity : public KShared
/// This function copies all of @param original but the id
void copy(const Identity& original);
- void setName(const QString& name); // the name of this identity
- QString getName() const;
+ void setName(const TQString& name); // the name of this identity
+ TQString getName() const;
- void setRealName(const QString& name);
- QString getRealName() const;
- void setIdent(const QString& ident);
- QString getIdent() const;
+ void setRealName(const TQString& name);
+ TQString getRealName() const;
+ void setIdent(const TQString& ident);
+ TQString getIdent() const;
- void setNickname(uint index,const QString& nick);
- QString getNickname(uint index) const;
+ void setNickname(uint index,const TQString& nick);
+ TQString getNickname(uint index) const;
- void setBot(const QString& bot);
- QString getBot() const;
- void setPassword(const QString& password);
- QString getPassword() const;
+ void setBot(const TQString& bot);
+ TQString getBot() const;
+ void setPassword(const TQString& password);
+ TQString getPassword() const;
- void setNicknameList(const QStringList& newList);
- QStringList getNicknameList() const;
+ void setNicknameList(const TQStringList& newList);
+ TQStringList getNicknameList() const;
- void setQuitReason(const QString& reason);
- QString getQuitReason() const;
- void setPartReason(const QString& reason);
- QString getPartReason() const;
- void setKickReason(const QString& reason);
- QString getKickReason() const;
+ void setQuitReason(const TQString& reason);
+ TQString getQuitReason() const;
+ void setPartReason(const TQString& reason);
+ TQString getPartReason() const;
+ void setKickReason(const TQString& reason);
+ TQString getKickReason() const;
void setInsertRememberLineOnAway(bool state);
bool getInsertRememberLineOnAway() const;
void setShowAwayMessage(bool state);
bool getShowAwayMessage() const;
- void setAwayMessage(const QString& message);
- QString getAwayMessage() const;
- void setReturnMessage(const QString& message);
- QString getReturnMessage() const;
+ void setAwayMessage(const TQString& message);
+ TQString getAwayMessage() const;
+ void setReturnMessage(const TQString& message);
+ TQString getReturnMessage() const;
void setAutomaticAway(bool automaticAway);
bool getAutomaticAway() const;
@@ -78,48 +78,48 @@ class Identity : public KShared
void setAutomaticUnaway(bool automaticUnaway);
bool getAutomaticUnaway() const;
- void setShellCommand(const QString &command);
- QString getShellCommand() const;
+ void setShellCommand(const TQString &command);
+ TQString getShellCommand() const;
- void setCodecName(const QString &newCodecName);
- QString getCodecName() const;
- QTextCodec* getCodec() const;
+ void setCodecName(const TQString &newCodecName);
+ TQString getCodecName() const;
+ TQTextCodec* getCodec() const;
- QString getAwayNick() const;
- void setAwayNick(const QString& n);
+ TQString getAwayNick() const;
+ void setAwayNick(const TQString& n);
int id() const { return m_id; }
protected:
- QString name;
+ TQString name;
- QString bot;
- QString password;
+ TQString bot;
+ TQString password;
- QString realName;
- QString ident;
+ TQString realName;
+ TQString ident;
- QStringList nicknameList;
+ TQStringList nicknameList;
- QString partReason;
- QString quitReason;
- QString kickReason;
+ TQString partReason;
+ TQString quitReason;
+ TQString kickReason;
bool insertRememberLineOnAway;
bool showAwayMessages;
- QString awayMessage;
- QString returnMessage;
+ TQString awayMessage;
+ TQString returnMessage;
bool m_automaticAway;
int m_awayInactivity;
bool m_automaticUnaway;
- QString m_codecName;
- QTextCodec* m_codec;
+ TQString m_codecName;
+ TQTextCodec* m_codec;
- QString m_shellCommand;
+ TQString m_shellCommand;
- QString awayNick;
+ TQString awayNick;
private:
int m_id;
@@ -128,6 +128,6 @@ class Identity : public KShared
};
typedef KSharedPtr<Identity> IdentityPtr;
-typedef QValueList<IdentityPtr> IdentityList;
+typedef TQValueList<IdentityPtr> IdentityList;
#endif
diff --git a/konversation/src/identitydialog.cpp b/konversation/src/identitydialog.cpp
index aa054b3..cfa592a 100644
--- a/konversation/src/identitydialog.cpp
+++ b/konversation/src/identitydialog.cpp
@@ -14,18 +14,18 @@
#include "awaymanager.h"
#include "irccharsets.h"
-#include <qframe.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qvaluelist.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qtoolbutton.h>
-#include <qtabwidget.h>
-#include <qlistbox.h>
-#include <qgroupbox.h>
-#include <qpushbutton.h>
-#include <qwhatsthis.h>
+#include <tqframe.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqvaluelist.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
+#include <tqtoolbutton.h>
+#include <tqtabwidget.h>
+#include <tqlistbox.h>
+#include <tqgroupbox.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
#include <kcombobox.h>
#include <klocale.h>
@@ -39,13 +39,13 @@
namespace Konversation
{
- IdentityDialog::IdentityDialog(QWidget *parent, const char *name)
+ IdentityDialog::IdentityDialog(TQWidget *parent, const char *name)
: KDialogBase(Plain, i18n("Identities"), Ok|Cancel, Ok, parent, name)
{
- QFrame* mainWidget = plainPage();
- QGridLayout* mainLayout = new QGridLayout(mainWidget, 1, 2, 0, spacingHint());
+ TQFrame* mainWidget = plainPage();
+ TQGridLayout* mainLayout = new TQGridLayout(mainWidget, 1, 2, 0, spacingHint());
- QLabel* identityLabel = new QLabel(i18n("&Identity:"), mainWidget);
+ TQLabel* identityLabel = new TQLabel(i18n("&Identity:"), mainWidget);
m_identityCBox = new KComboBox(mainWidget, "identity_combo");
m_identityCBox->setEditable(false);
identityLabel->setBuddy(m_identityCBox);
@@ -58,62 +58,62 @@ namespace Konversation
m_identityList.append(new Identity(*(*it)));
}
- QToolButton* newBtn = new QToolButton(mainWidget);
+ TQToolButton* newBtn = new TQToolButton(mainWidget);
newBtn->setIconSet(SmallIconSet("add"));
newBtn->setTextLabel(i18n("Add"));
- connect(newBtn, SIGNAL(clicked()), this, SLOT(newIdentity()));
+ connect(newBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(newIdentity()));
- QToolButton* copyBtn = new QToolButton(mainWidget);
+ TQToolButton* copyBtn = new TQToolButton(mainWidget);
copyBtn->setIconSet(SmallIconSet("editcopy"));
copyBtn->setTextLabel(i18n("Duplicate"));
- connect(copyBtn, SIGNAL(clicked()), this, SLOT(copyIdentity()));
+ connect(copyBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(copyIdentity()));
- m_editBtn = new QToolButton(mainWidget);
+ m_editBtn = new TQToolButton(mainWidget);
m_editBtn->setIconSet(SmallIconSet("edit"));
m_editBtn->setTextLabel(i18n("Rename"));
- connect(m_editBtn, SIGNAL(clicked()), this, SLOT(renameIdentity()));
+ connect(m_editBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(renameIdentity()));
- m_delBtn = new QToolButton(mainWidget);
+ m_delBtn = new TQToolButton(mainWidget);
m_delBtn->setIconSet(SmallIconSet("editdelete"));
m_delBtn->setTextLabel(i18n("Remove"));
- connect(m_delBtn, SIGNAL(clicked()), this, SLOT(deleteIdentity()));
+ connect(m_delBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteIdentity()));
- QTabWidget* tabWidget = new QTabWidget(mainWidget);
- QWidget* generalWidget = new QWidget(tabWidget);
+ TQTabWidget* tabWidget = new TQTabWidget(mainWidget);
+ TQWidget* generalWidget = new TQWidget(tabWidget);
tabWidget->addTab(generalWidget, i18n("General"));
- QGridLayout* generalLayout = new QGridLayout(generalWidget, 1, 2, marginHint(), spacingHint());
+ TQGridLayout* generalLayout = new TQGridLayout(generalWidget, 1, 2, marginHint(), spacingHint());
- QLabel* realNameLabel = new QLabel(i18n("&Real name:"), generalWidget);
+ TQLabel* realNameLabel = new TQLabel(i18n("&Real name:"), generalWidget);
m_realNameEdit = new KLineEdit(generalWidget);
- QWhatsThis::add(m_realNameEdit, i18n("Enter your real name here. IRC is not intended to keep you hidden from your friends or enemies. Keep this in mind if you are tempted to behave maliciously. A fake \"real name\" can be a good way to mask your gender from all the nerds out there, but the PC you use can always be traced so you will never be truly anonymous."));
+ TQWhatsThis::add(m_realNameEdit, i18n("Enter your real name here. IRC is not intended to keep you hidden from your friends or enemies. Keep this in mind if you are tempted to behave maliciously. A fake \"real name\" can be a good way to mask your gender from all the nerds out there, but the PC you use can always be traced so you will never be truly anonymous."));
realNameLabel->setBuddy(m_realNameEdit);
- QGroupBox* nicknameGBox = new QGroupBox(0, Qt::Horizontal, i18n("Nickname"), generalWidget);
+ TQGroupBox* nicknameGBox = new TQGroupBox(0, Qt::Horizontal, i18n("Nickname"), generalWidget);
nicknameGBox->setMargin(marginHint());
- QGridLayout* nicknameLayout = new QGridLayout(nicknameGBox->layout(), 1, 2, spacingHint());
+ TQGridLayout* nicknameLayout = new TQGridLayout(nicknameGBox->layout(), 1, 2, spacingHint());
- m_nicknameLBox = new QListBox(nicknameGBox);
- QWhatsThis::add(m_nicknameLBox, i18n("This is your list of nicknames. A nickname is the name that other users will know you by. You may use any name you desire. The first character must be a letter.\n\nSince nicknames must be unique across an entire IRC network, your desired name may be rejected by the server because someone else is already using that nickname. Enter alternate nicknames for yourself. If your first choice is rejected by the server, Konversation will try the alternate nicknames."));
- m_addNicknameBtn = new QPushButton(i18n("Add..."), nicknameGBox);
- m_changeNicknameBtn = new QPushButton(i18n("Edit..."), nicknameGBox);
+ m_nicknameLBox = new TQListBox(nicknameGBox);
+ TQWhatsThis::add(m_nicknameLBox, i18n("This is your list of nicknames. A nickname is the name that other users will know you by. You may use any name you desire. The first character must be a letter.\n\nSince nicknames must be unique across an entire IRC network, your desired name may be rejected by the server because someone else is already using that nickname. Enter alternate nicknames for yourself. If your first choice is rejected by the server, Konversation will try the alternate nicknames."));
+ m_addNicknameBtn = new TQPushButton(i18n("Add..."), nicknameGBox);
+ m_changeNicknameBtn = new TQPushButton(i18n("Edit..."), nicknameGBox);
m_changeNicknameBtn->setEnabled(false);
- m_removeNicknameBtn = new QPushButton(i18n("Delete"), nicknameGBox);
+ m_removeNicknameBtn = new TQPushButton(i18n("Delete"), nicknameGBox);
m_removeNicknameBtn->setEnabled(false);
- m_upNicknameBtn = new QToolButton(nicknameGBox);
+ m_upNicknameBtn = new TQToolButton(nicknameGBox);
m_upNicknameBtn->setIconSet(SmallIconSet("up"));
m_upNicknameBtn->setAutoRepeat(true);
m_upNicknameBtn->setEnabled(false);
- m_downNicknameBtn = new QToolButton(nicknameGBox);
+ m_downNicknameBtn = new TQToolButton(nicknameGBox);
m_downNicknameBtn->setIconSet(SmallIconSet("down"));
m_downNicknameBtn->setAutoRepeat(true);
m_downNicknameBtn->setEnabled(false);
- connect(m_addNicknameBtn, SIGNAL(clicked()), this, SLOT(addNickname()));
- connect(m_changeNicknameBtn, SIGNAL(clicked()), this, SLOT(editNickname()));
- connect(m_removeNicknameBtn, SIGNAL(clicked()), this, SLOT(deleteNickname()));
- connect(m_nicknameLBox, SIGNAL(selectionChanged()), this, SLOT(updateButtons()));
- connect(m_upNicknameBtn, SIGNAL(clicked()), this, SLOT(moveNicknameUp()));
- connect(m_downNicknameBtn, SIGNAL(clicked()), this, SLOT(moveNicknameDown()));
+ connect(m_addNicknameBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(addNickname()));
+ connect(m_changeNicknameBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(editNickname()));
+ connect(m_removeNicknameBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteNickname()));
+ connect(m_nicknameLBox, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(updateButtons()));
+ connect(m_upNicknameBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(moveNicknameUp()));
+ connect(m_downNicknameBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(moveNicknameDown()));
nicknameLayout->setColStretch(0, 10);
nicknameLayout->setRowStretch(4, 10);
@@ -124,18 +124,18 @@ namespace Konversation
nicknameLayout->addWidget(m_upNicknameBtn, 3, 2);
nicknameLayout->addWidget(m_downNicknameBtn, 3, 3);
- QGroupBox* autoIdentifyGBox = new QGroupBox(0, Qt::Horizontal, i18n("Auto Identify"), generalWidget);
+ TQGroupBox* autoIdentifyGBox = new TQGroupBox(0, Qt::Horizontal, i18n("Auto Identify"), generalWidget);
autoIdentifyGBox->setMargin(marginHint());
- QGridLayout* autoIdentifyLayout = new QGridLayout(autoIdentifyGBox->layout(), 1, 2, spacingHint());
+ TQGridLayout* autoIdentifyLayout = new TQGridLayout(autoIdentifyGBox->layout(), 1, 2, spacingHint());
- QLabel* botLabel=new QLabel(i18n("Ser&vice:"), autoIdentifyGBox);
- QWhatsThis::add(botLabel,i18n("Service name can be <b><i>nickserv</i></b> or a network dependant name like <b><i>nickserv@services.dal.net</i></b>"));
+ TQLabel* botLabel=new TQLabel(i18n("Ser&vice:"), autoIdentifyGBox);
+ TQWhatsThis::add(botLabel,i18n("Service name can be <b><i>nickserv</i></b> or a network dependant name like <b><i>nickserv@services.dal.net</i></b>"));
m_botEdit = new KLineEdit(autoIdentifyGBox);
botLabel->setBuddy(m_botEdit);
- QLabel* passwordLabel = new QLabel(i18n("Pa&ssword:"), autoIdentifyGBox);
+ TQLabel* passwordLabel = new TQLabel(i18n("Pa&ssword:"), autoIdentifyGBox);
m_passwordEdit = new KLineEdit(autoIdentifyGBox);
- m_passwordEdit->setEchoMode(QLineEdit::Password);
+ m_passwordEdit->setEchoMode(TQLineEdit::Password);
passwordLabel->setBuddy(m_passwordEdit);
autoIdentifyLayout->addWidget(botLabel, 0, 0);
@@ -151,69 +151,69 @@ namespace Konversation
row++;
generalLayout->addMultiCellWidget(autoIdentifyGBox, row, row, 0, 1);
- QWidget* awayWidget = new QWidget(tabWidget);
+ TQWidget* awayWidget = new TQWidget(tabWidget);
tabWidget->addTab(awayWidget, i18n("Tab name", "Away"));
- QGridLayout* awayLayout = new QGridLayout(awayWidget, 1, 2, marginHint(), spacingHint());
+ TQGridLayout* awayLayout = new TQGridLayout(awayWidget, 1, 2, marginHint(), spacingHint());
- m_insertRememberLineOnAwayChBox = new QCheckBox(i18n("Mark the last position in chat windows when going away"), awayWidget);
- QWhatsThis::add(m_insertRememberLineOnAwayChBox, i18n("If you check this box, whenever you perform an <b>/away</b> command, a horizontal line will appear in the channel, marking the point where you went away. Other IRC users do not see this horizontal line."));
+ m_insertRememberLineOnAwayChBox = new TQCheckBox(i18n("Mark the last position in chat windows when going away"), awayWidget);
+ TQWhatsThis::add(m_insertRememberLineOnAwayChBox, i18n("If you check this box, whenever you perform an <b>/away</b> command, a horizontal line will appear in the channel, marking the point where you went away. Other IRC users do not see this horizontal line."));
- QLabel* awayNickLabel = new QLabel(i18n("Away nickname:"), awayWidget);
+ TQLabel* awayNickLabel = new TQLabel(i18n("Away nickname:"), awayWidget);
m_awayNickEdit = new KLineEdit(awayWidget);
- QWhatsThis::add(m_awayNickEdit, i18n("Enter a nickname that indicates you are away. Whenever you perform an <b>/away msg</b> command in any channel joined with this Identity, Konversation will automatically change your nickname to the Away nickname. Other users will be able to tell you are away from your computer. Whenever you perform an <b>/away</b> command in any channel in which you are away, Konversation will automatically change your nickname back to the original. If you do not wish to automatically change your nickname when going away, leave blank."));
+ TQWhatsThis::add(m_awayNickEdit, i18n("Enter a nickname that indicates you are away. Whenever you perform an <b>/away msg</b> command in any channel joined with this Identity, Konversation will automatically change your nickname to the Away nickname. Other users will be able to tell you are away from your computer. Whenever you perform an <b>/away</b> command in any channel in which you are away, Konversation will automatically change your nickname back to the original. If you do not wish to automatically change your nickname when going away, leave blank."));
awayNickLabel->setBuddy(m_awayNickEdit);
- m_automaticAwayGBox = new QGroupBox(i18n("Automatic Away"), awayWidget);
+ m_automaticAwayGBox = new TQGroupBox(i18n("Automatic Away"), awayWidget);
m_automaticAwayGBox->setCheckable(true);
m_automaticAwayGBox->setColumnLayout(0, Qt::Horizontal);
m_automaticAwayGBox->setMargin(marginHint());
- QGridLayout* automaticAwayLayout = new QGridLayout(m_automaticAwayGBox->layout(), 1, 2, spacingHint());
+ TQGridLayout* automaticAwayLayout = new TQGridLayout(m_automaticAwayGBox->layout(), 1, 2, spacingHint());
- QWhatsThis::add(m_automaticAwayGBox, i18n("If you check this box, Konversation will automatically set all connections using this Identity away when the screensaver starts or after a period of user inactivity configured below."));
+ TQWhatsThis::add(m_automaticAwayGBox, i18n("If you check this box, Konversation will automatically set all connections using this Identity away when the screensaver starts or after a period of user inactivity configured below."));
- QLabel* autoAwayLabel1 = new QLabel(i18n("Set away after"), m_automaticAwayGBox);
- m_awayInactivitySpin = new QSpinBox(1, 999, 1, m_automaticAwayGBox);
+ TQLabel* autoAwayLabel1 = new TQLabel(i18n("Set away after"), m_automaticAwayGBox);
+ m_awayInactivitySpin = new TQSpinBox(1, 999, 1, m_automaticAwayGBox);
m_awayInactivitySpin->setSuffix(i18n(" minutes"));
- QLabel* autoAwayLabel2 = new QLabel(i18n("of user inactivity"), m_automaticAwayGBox);
+ TQLabel* autoAwayLabel2 = new TQLabel(i18n("of user inactivity"), m_automaticAwayGBox);
autoAwayLabel1->setBuddy(m_awayInactivitySpin);
autoAwayLabel2->setBuddy(m_awayInactivitySpin);
- m_automaticUnawayChBox = new QCheckBox(i18n("Automatically return on activity"), m_automaticAwayGBox);
- QWhatsThis::add(m_automaticUnawayChBox, i18n("If you check this box, Konversation will automatically cancel away for all connections using this Identity when the screensaver stops or new user activity is detected."));
+ m_automaticUnawayChBox = new TQCheckBox(i18n("Automatically return on activity"), m_automaticAwayGBox);
+ TQWhatsThis::add(m_automaticUnawayChBox, i18n("If you check this box, Konversation will automatically cancel away for all connections using this Identity when the screensaver stops or new user activity is detected."));
- connect(m_automaticAwayGBox, SIGNAL(toggled(bool)), autoAwayLabel1, SLOT(setEnabled(bool)));
- connect(m_automaticAwayGBox, SIGNAL(toggled(bool)), autoAwayLabel2, SLOT(setEnabled(bool)));
- connect(m_automaticAwayGBox, SIGNAL(toggled(bool)), m_awayInactivitySpin, SLOT(setEnabled(bool)));
- connect(m_automaticAwayGBox, SIGNAL(toggled(bool)), m_automaticUnawayChBox, SLOT(setEnabled(bool)));
+ connect(m_automaticAwayGBox, TQT_SIGNAL(toggled(bool)), autoAwayLabel1, TQT_SLOT(setEnabled(bool)));
+ connect(m_automaticAwayGBox, TQT_SIGNAL(toggled(bool)), autoAwayLabel2, TQT_SLOT(setEnabled(bool)));
+ connect(m_automaticAwayGBox, TQT_SIGNAL(toggled(bool)), m_awayInactivitySpin, TQT_SLOT(setEnabled(bool)));
+ connect(m_automaticAwayGBox, TQT_SIGNAL(toggled(bool)), m_automaticUnawayChBox, TQT_SLOT(setEnabled(bool)));
row = 0;
automaticAwayLayout->addWidget(autoAwayLabel1, row, 0);
automaticAwayLayout->addWidget(m_awayInactivitySpin, row, 1);
automaticAwayLayout->addWidget(autoAwayLabel2, row, 2);
- QSpacerItem* spacer = new QSpacerItem(0, 0, QSizePolicy::MinimumExpanding, QSizePolicy::Preferred);
+ TQSpacerItem* spacer = new TQSpacerItem(0, 0, TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred);
automaticAwayLayout->addItem(spacer, row, 3);
row++;
automaticAwayLayout->addMultiCellWidget(m_automaticUnawayChBox, row, row, 0, 3);
- m_awayMessageGBox = new QGroupBox(i18n("Away Messages"), awayWidget);
+ m_awayMessageGBox = new TQGroupBox(i18n("Away Messages"), awayWidget);
m_awayMessageGBox->setCheckable(true);
m_awayMessageGBox->setColumnLayout(0, Qt::Horizontal);
m_awayMessageGBox->setMargin(marginHint());
- QGridLayout* messagesLayout = new QGridLayout(m_awayMessageGBox->layout(), 1, 2, spacingHint());
+ TQGridLayout* messagesLayout = new TQGridLayout(m_awayMessageGBox->layout(), 1, 2, spacingHint());
- QWhatsThis::add(m_awayMessageGBox, i18n("If you check this box, Konversation will automatically send the Away message to all channels joined with this Identity. <b>%s</b> is replaced with <b>msg</b>. Whenever you perform an <b>/away</b> command, the Return message will be displayed in all channels joined with this Identity."));
+ TQWhatsThis::add(m_awayMessageGBox, i18n("If you check this box, Konversation will automatically send the Away message to all channels joined with this Identity. <b>%s</b> is replaced with <b>msg</b>. Whenever you perform an <b>/away</b> command, the Return message will be displayed in all channels joined with this Identity."));
- QLabel* awayLabel = new QLabel(i18n("Away &message:"), m_awayMessageGBox);
+ TQLabel* awayLabel = new TQLabel(i18n("Away &message:"), m_awayMessageGBox);
m_awayEdit = new KLineEdit(m_awayMessageGBox);
awayLabel->setBuddy(m_awayEdit);
- QLabel* unAwayLabel = new QLabel(i18n("Re&turn message:"), m_awayMessageGBox);
+ TQLabel* unAwayLabel = new TQLabel(i18n("Re&turn message:"), m_awayMessageGBox);
m_unAwayEdit = new KLineEdit(m_awayMessageGBox);
unAwayLabel->setBuddy(m_unAwayEdit);
- connect(m_awayMessageGBox, SIGNAL(toggled(bool)), awayLabel, SLOT(setEnabled(bool)));
- connect(m_awayMessageGBox, SIGNAL(toggled(bool)), m_awayEdit, SLOT(setEnabled(bool)));
- connect(m_awayMessageGBox, SIGNAL(toggled(bool)), unAwayLabel, SLOT(setEnabled(bool)));
- connect(m_awayMessageGBox, SIGNAL(toggled(bool)), m_unAwayEdit, SLOT(setEnabled(bool)));
+ connect(m_awayMessageGBox, TQT_SIGNAL(toggled(bool)), awayLabel, TQT_SLOT(setEnabled(bool)));
+ connect(m_awayMessageGBox, TQT_SIGNAL(toggled(bool)), m_awayEdit, TQT_SLOT(setEnabled(bool)));
+ connect(m_awayMessageGBox, TQT_SIGNAL(toggled(bool)), unAwayLabel, TQT_SLOT(setEnabled(bool)));
+ connect(m_awayMessageGBox, TQT_SIGNAL(toggled(bool)), m_unAwayEdit, TQT_SLOT(setEnabled(bool)));
row = 0;
messagesLayout->addWidget(awayLabel, row, 0);
@@ -234,41 +234,41 @@ namespace Konversation
row++;
awayLayout->setRowStretch(row, 10);
- QWidget* advancedWidget = new QWidget(tabWidget);
+ TQWidget* advancedWidget = new TQWidget(tabWidget);
tabWidget->addTab(advancedWidget, i18n("Advanced"));
- QGridLayout* advancedLayout = new QGridLayout(advancedWidget, 1, 2, marginHint(), spacingHint());
+ TQGridLayout* advancedLayout = new TQGridLayout(advancedWidget, 1, 2, marginHint(), spacingHint());
- QLabel* commandLabel = new QLabel(i18n("&Pre-shell command:"), advancedWidget);
+ TQLabel* commandLabel = new TQLabel(i18n("&Pre-shell command:"), advancedWidget);
m_sCommandEdit = new KLineEdit(advancedWidget);
- QWhatsThis::add(m_sCommandEdit,i18n("Here you can enter a command to be executed before connection to server starts<br>If you have multiple servers in this identity this command will be executed for each server"));
+ TQWhatsThis::add(m_sCommandEdit,i18n("Here you can enter a command to be executed before connection to server starts<br>If you have multiple servers in this identity this command will be executed for each server"));
commandLabel->setBuddy(m_sCommandEdit);
- QLabel* loginLabel = new QLabel(i18n("I&dent:"), advancedWidget);
+ TQLabel* loginLabel = new TQLabel(i18n("I&dent:"), advancedWidget);
m_loginEdit = new KLineEdit(advancedWidget);
- QWhatsThis::add(m_loginEdit, i18n("When you connect, many servers query your computer for an IDENT response. If you computer is not running an IDENT server, this response is sent by Konversation. No spaces are allowed."));
+ TQWhatsThis::add(m_loginEdit, i18n("When you connect, many servers query your computer for an IDENT response. If you computer is not running an IDENT server, this response is sent by Konversation. No spaces are allowed."));
loginLabel->setBuddy(m_loginEdit);
// encoding combo box
- QLabel* codecLabel = new QLabel(i18n("&Encoding:"), advancedWidget);
+ TQLabel* codecLabel = new TQLabel(i18n("&Encoding:"), advancedWidget);
m_codecCBox = new KComboBox(advancedWidget,"codec_combo_box");
- QWhatsThis::add(m_codecCBox, i18n("This setting affects how characters you type are encoded for sending to the server. It also affects how messages are displayed. When you first open Konversation, it automatically retrieves this setting from the operating system. If you seem to be having trouble seeing other user's messages correctly, try changing this setting."));
+ TQWhatsThis::add(m_codecCBox, i18n("This setting affects how characters you type are encoded for sending to the server. It also affects how messages are displayed. When you first open Konversation, it automatically retrieves this setting from the operating system. If you seem to be having trouble seeing other user's messages correctly, try changing this setting."));
codecLabel->setBuddy(m_codecCBox);
// add encodings to combo box
m_codecCBox->insertStringList(Konversation::IRCCharsets::self()->availableEncodingDescriptiveNames());
- QLabel* quitLabel = new QLabel(i18n("&Quit reason:"), advancedWidget);
+ TQLabel* quitLabel = new TQLabel(i18n("&Quit reason:"), advancedWidget);
m_quitEdit = new KLineEdit(advancedWidget);
- QWhatsThis::add(m_quitEdit, i18n("Whenever you leave a server, this message is shown to others."));
+ TQWhatsThis::add(m_quitEdit, i18n("Whenever you leave a server, this message is shown to others."));
quitLabel->setBuddy(m_quitEdit);
- QLabel* partLabel = new QLabel(i18n("&Part reason:"), advancedWidget);
+ TQLabel* partLabel = new TQLabel(i18n("&Part reason:"), advancedWidget);
m_partEdit = new KLineEdit(advancedWidget);
- QWhatsThis::add(m_partEdit, i18n("Whenever you leave a channel, this message is sent to the channel."));
+ TQWhatsThis::add(m_partEdit, i18n("Whenever you leave a channel, this message is sent to the channel."));
partLabel->setBuddy(m_partEdit);
- QLabel* kickLabel = new QLabel(i18n("&Kick reason:"), advancedWidget);
+ TQLabel* kickLabel = new TQLabel(i18n("&Kick reason:"), advancedWidget);
m_kickEdit = new KLineEdit(advancedWidget);
- QWhatsThis::add(m_kickEdit, i18n("Whenever you are kicked from a channel (usually by an IRC operator), this message is sent to the channel."));
+ TQWhatsThis::add(m_kickEdit, i18n("Whenever you are kicked from a channel (usually by an IRC operator), this message is sent to the channel."));
kickLabel->setBuddy(m_kickEdit);
row = 0;
@@ -307,13 +307,13 @@ namespace Konversation
updateIdentity(0);
// Set up signals / slots for identity page
- connect(m_identityCBox, SIGNAL(activated(int)), this, SLOT(updateIdentity(int)));
+ connect(m_identityCBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateIdentity(int)));
setButtonOK(KGuiItem(i18n("&OK"), "button_ok", i18n("Change identity information")));
setButtonCancel(KGuiItem(i18n("&Cancel"), "button_cancel", i18n("Discards all changes made")));
AwayManager* awayManager = static_cast<KonversationApplication*>(kapp)->getAwayManager();
- connect(this, SIGNAL(identitiesChanged()), awayManager, SLOT(identitiesChanged()));
+ connect(this, TQT_SIGNAL(identitiesChanged()), awayManager, TQT_SLOT(identitiesChanged()));
}
IdentityDialog::~IdentityDialog()
@@ -377,7 +377,7 @@ namespace Konversation
void IdentityDialog::addNickname()
{
bool ok = false;
- QString txt = KInputDialog::getText(i18n("Add Nickname"), i18n("Nickname:"), QString(), &ok, this);
+ TQString txt = KInputDialog::getText(i18n("Add Nickname"), i18n("Nickname:"), TQString(), &ok, this);
if(ok && !txt.isEmpty())
{
@@ -389,7 +389,7 @@ namespace Konversation
void IdentityDialog::editNickname()
{
bool ok = false;
- QString txt = KInputDialog::getText(i18n("Edit Nickname"), i18n("Nickname:"), m_nicknameLBox->currentText(), &ok, this);
+ TQString txt = KInputDialog::getText(i18n("Edit Nickname"), i18n("Nickname:"), m_nicknameLBox->currentText(), &ok, this);
if(ok && !txt.isEmpty())
{
@@ -422,7 +422,7 @@ namespace Konversation
if(current > 0)
{
- QString txt = m_nicknameLBox->text(current);
+ TQString txt = m_nicknameLBox->text(current);
m_nicknameLBox->removeItem(current);
m_nicknameLBox->insertItem(txt, current - 1);
m_nicknameLBox->setCurrentItem(current - 1);
@@ -437,7 +437,7 @@ namespace Konversation
if(current < (m_nicknameLBox->count() - 1))
{
- QString txt = m_nicknameLBox->text(current);
+ TQString txt = m_nicknameLBox->text(current);
m_nicknameLBox->removeItem(current);
m_nicknameLBox->insertItem(txt, current + 1);
m_nicknameLBox->setCurrentItem(current + 1);
@@ -454,7 +454,7 @@ namespace Konversation
}
m_currentIdentity->setRealName(m_realNameEdit->text());
- QStringList nicks;
+ TQStringList nicks;
for(unsigned int i = 0; i < m_nicknameLBox->count(); ++i)
{
@@ -508,7 +508,7 @@ namespace Konversation
void IdentityDialog::newIdentity()
{
bool ok = false;
- QString txt = KInputDialog::getText(i18n("Add Identity"), i18n("Identity name:"), QString(), &ok, this);
+ TQString txt = KInputDialog::getText(i18n("Add Identity"), i18n("Identity name:"), TQString(), &ok, this);
if(ok && !txt.isEmpty())
{
@@ -532,8 +532,8 @@ namespace Konversation
void IdentityDialog::renameIdentity()
{
bool ok = false;
- QString currentTxt = m_identityCBox->currentText();
- QString txt = KInputDialog::getText(i18n("Rename Identity"), i18n("Identity name:"), currentTxt, &ok, this);
+ TQString currentTxt = m_identityCBox->currentText();
+ TQString txt = KInputDialog::getText(i18n("Rename Identity"), i18n("Identity name:"), currentTxt, &ok, this);
if(ok && !txt.isEmpty())
{
@@ -570,7 +570,7 @@ namespace Konversation
++it;
}
- QString warningTxt;
+ TQString warningTxt;
if(found)
{
@@ -596,8 +596,8 @@ namespace Konversation
void IdentityDialog::copyIdentity()
{
bool ok = false;
- QString currentTxt = m_identityCBox->currentText();
- QString txt = KInputDialog::getText(i18n("Duplicate Identity"), i18n("Identity name:"), currentTxt, &ok, this);
+ TQString currentTxt = m_identityCBox->currentText();
+ TQString txt = KInputDialog::getText(i18n("Duplicate Identity"), i18n("Identity name:"), currentTxt, &ok, this);
if(ok && !txt.isEmpty())
{
diff --git a/konversation/src/identitydialog.h b/konversation/src/identitydialog.h
index e58438f..168265a 100644
--- a/konversation/src/identitydialog.h
+++ b/konversation/src/identitydialog.h
@@ -19,11 +19,11 @@
class KComboBox;
class KLineEdit;
-class QCheckBox;
-class QSpinBox;
-class QListBox;
-class QGroupBox;
-class QToolButton;
+class TQCheckBox;
+class TQSpinBox;
+class TQListBox;
+class TQGroupBox;
+class TQToolButton;
namespace Konversation
{
@@ -32,7 +32,7 @@ namespace Konversation
{
Q_OBJECT
public:
- explicit IdentityDialog(QWidget *parent = 0, const char *name = 0);
+ explicit IdentityDialog(TQWidget *parent = 0, const char *name = 0);
~IdentityDialog();
void setCurrentIdentity(int index);
IdentityPtr setCurrentIdentity(IdentityPtr identity);
@@ -77,19 +77,19 @@ namespace Konversation
KLineEdit* m_awayEdit;
KLineEdit* m_unAwayEdit;
KLineEdit* m_awayNickEdit;
- QCheckBox* m_insertRememberLineOnAwayChBox;
- QListBox* m_nicknameLBox;
- QGroupBox* m_awayMessageGBox;
- QGroupBox* m_automaticAwayGBox;
- QSpinBox* m_awayInactivitySpin;
- QCheckBox* m_automaticUnawayChBox;
- QToolButton* m_editBtn;
- QToolButton* m_delBtn;
- QToolButton* m_upNicknameBtn;
- QToolButton* m_downNicknameBtn;
- QPushButton* m_addNicknameBtn;
- QPushButton* m_changeNicknameBtn;
- QPushButton* m_removeNicknameBtn;
+ TQCheckBox* m_insertRememberLineOnAwayChBox;
+ TQListBox* m_nicknameLBox;
+ TQGroupBox* m_awayMessageGBox;
+ TQGroupBox* m_automaticAwayGBox;
+ TQSpinBox* m_awayInactivitySpin;
+ TQCheckBox* m_automaticUnawayChBox;
+ TQToolButton* m_editBtn;
+ TQToolButton* m_delBtn;
+ TQToolButton* m_upNicknameBtn;
+ TQToolButton* m_downNicknameBtn;
+ TQPushButton* m_addNicknameBtn;
+ TQPushButton* m_changeNicknameBtn;
+ TQPushButton* m_removeNicknameBtn;
IdentityList m_identityList;
IdentityPtr m_currentIdentity;
diff --git a/konversation/src/ignore.cpp b/konversation/src/ignore.cpp
index 8ff8304..7f361cd 100644
--- a/konversation/src/ignore.cpp
+++ b/konversation/src/ignore.cpp
@@ -14,7 +14,7 @@
#include "ignore.h"
-Ignore::Ignore(const QString &newName,int newFlags)
+Ignore::Ignore(const TQString &newName,int newFlags)
{
setFlags(newFlags);
setName(newName);
@@ -24,7 +24,7 @@ Ignore::~Ignore()
{
}
-void Ignore::setName(const QString &newName) { name=newName; }
+void Ignore::setName(const TQString &newName) { name=newName; }
void Ignore::setFlags(int newFlags) { flags=newFlags; }
-QString Ignore::getName() { return name; }
+TQString Ignore::getName() { return name; }
int Ignore::getFlags() { return flags; }
diff --git a/konversation/src/ignore.h b/konversation/src/ignore.h
index ec64c9c..d435493 100644
--- a/konversation/src/ignore.h
+++ b/konversation/src/ignore.h
@@ -14,7 +14,7 @@
#ifndef IGNORE_H
#define IGNORE_H
-#include <qstring.h>
+#include <tqstring.h>
class Ignore
@@ -31,16 +31,16 @@ class Ignore
All=31
};
- Ignore(const QString &name,int flags);
+ Ignore(const TQString &name,int flags);
~Ignore();
- void setName(const QString &newName);
+ void setName(const TQString &newName);
void setFlags(int newFlags);
- QString getName();
+ TQString getName();
int getFlags();
protected:
- QString name;
+ TQString name;
int flags;
};
#endif
diff --git a/konversation/src/ignore_preferences.cpp b/konversation/src/ignore_preferences.cpp
index 825cfb7..26a5a0a 100644
--- a/konversation/src/ignore_preferences.cpp
+++ b/konversation/src/ignore_preferences.cpp
@@ -17,35 +17,35 @@
#include <klocale.h>
#include <klistview.h>
-#include <qlistview.h>
-#include <qlineedit.h>
-#include <qheader.h>
+#include <tqlistview.h>
+#include <tqlineedit.h>
+#include <tqheader.h>
#include <kapplication.h>
#include <kconfig.h>
#include <kdebug.h>
#include <kpushbutton.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
-Ignore_Config::Ignore_Config( QWidget* parent, const char* name, WFlags fl )
+Ignore_Config::Ignore_Config( TQWidget* parent, const char* name, WFlags fl )
: Ignore_ConfigUI( parent, name, fl )
{
- connect(newButton,SIGNAL(clicked()),
- this,SLOT(newIgnore()));
- connect(removeButton,SIGNAL(clicked()),
- this,SLOT(removeIgnore()));
- connect(removeAllButton,SIGNAL(clicked()),
- this,SLOT(removeAllIgnore()));
- connect(ignoreListView,SIGNAL(selectionChanged(QListViewItem*)),
- this,SLOT(select(QListViewItem*)));
- connect(chkChannel, SIGNAL(clicked()), this, SLOT(flagCheckboxChanged()));
- connect(chkQuery, SIGNAL(clicked()), this, SLOT(flagCheckboxChanged()));
- connect(chkNotice, SIGNAL(clicked()), this, SLOT(flagCheckboxChanged()));
- connect(chkCTCP, SIGNAL(clicked()), this, SLOT(flagCheckboxChanged()));
- connect(chkDCC, SIGNAL(clicked()), this, SLOT(flagCheckboxChanged()));
- connect(txtPattern, SIGNAL(textChanged(const QString &)), this, SLOT(flagCheckboxChanged()));
-// connect(chkException, SIGNAL(clicked()), this, SLOT(flagCheckboxChanged()));
+ connect(newButton,TQT_SIGNAL(clicked()),
+ this,TQT_SLOT(newIgnore()));
+ connect(removeButton,TQT_SIGNAL(clicked()),
+ this,TQT_SLOT(removeIgnore()));
+ connect(removeAllButton,TQT_SIGNAL(clicked()),
+ this,TQT_SLOT(removeAllIgnore()));
+ connect(ignoreListView,TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this,TQT_SLOT(select(TQListViewItem*)));
+ connect(chkChannel, TQT_SIGNAL(clicked()), this, TQT_SLOT(flagCheckboxChanged()));
+ connect(chkQuery, TQT_SIGNAL(clicked()), this, TQT_SLOT(flagCheckboxChanged()));
+ connect(chkNotice, TQT_SIGNAL(clicked()), this, TQT_SLOT(flagCheckboxChanged()));
+ connect(chkCTCP, TQT_SIGNAL(clicked()), this, TQT_SLOT(flagCheckboxChanged()));
+ connect(chkDCC, TQT_SIGNAL(clicked()), this, TQT_SLOT(flagCheckboxChanged()));
+ connect(txtPattern, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(flagCheckboxChanged()));
+// connect(chkException, TQT_SIGNAL(clicked()), this, TQT_SLOT(flagCheckboxChanged()));
loadSettings();
ignoreListView->header()->setMovingEnabled(false);
@@ -84,9 +84,9 @@ void Ignore_Config::removeIgnore()
emit modified();
}
-QPtrList<Ignore> Ignore_Config::getIgnoreList()
+TQPtrList<Ignore> Ignore_Config::getIgnoreList()
{
- QPtrList<Ignore> newList;
+ TQPtrList<Ignore> newList;
IgnoreListViewItem* item=static_cast<IgnoreListViewItem*>(ignoreListView->firstChild());
while(item)
@@ -99,10 +99,10 @@ QPtrList<Ignore> Ignore_Config::getIgnoreList()
return newList;
}
-// returns the currently visible ignore list as QStringList to make comparing easy
-QStringList Ignore_Config::currentIgnoreList()
+// returns the currently visible ignore list as TQStringList to make comparing easy
+TQStringList Ignore_Config::currentIgnoreList()
{
- QStringList newList;
+ TQStringList newList;
IgnoreListViewItem* item=static_cast<IgnoreListViewItem*>(ignoreListView->firstChild());
while(item)
@@ -137,7 +137,7 @@ void Ignore_Config::saveSettings()
void Ignore_Config::loadSettings()
{
- QPtrList<Ignore> ignoreList=Preferences::ignoreList();
+ TQPtrList<Ignore> ignoreList=Preferences::ignoreList();
// Insert Ignore items backwards to get them sorted properly
Ignore* item=ignoreList.last();
ignoreListView->clear();
@@ -167,7 +167,7 @@ void Ignore_Config::updateEnabledness()
}
-void Ignore_Config::select(QListViewItem* item)
+void Ignore_Config::select(TQListViewItem* item)
{
updateEnabledness();
// FIXME: Cast to IgnoreListViewItem, maybe derive from KListView some day
diff --git a/konversation/src/ignore_preferences.h b/konversation/src/ignore_preferences.h
index 2b90bce..424ba6d 100644
--- a/konversation/src/ignore_preferences.h
+++ b/konversation/src/ignore_preferences.h
@@ -16,7 +16,7 @@
#include "ignore_preferencesui.h"
#include "konvisettingspage.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
class Ignore;
@@ -25,9 +25,9 @@ class Ignore_Config : public Ignore_ConfigUI, public KonviSettingsPage
Q_OBJECT
public:
- explicit Ignore_Config( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ explicit Ignore_Config( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~Ignore_Config();
- QString flagNames;
+ TQString flagNames;
virtual void restorePageToDefaults();
virtual void saveSettings();
@@ -36,10 +36,10 @@ class Ignore_Config : public Ignore_ConfigUI, public KonviSettingsPage
virtual bool hasChanged();
private:
- QStringList m_oldIgnoreList;
+ TQStringList m_oldIgnoreList;
- QStringList currentIgnoreList(); // in hasChanged() format
- QPtrList<Ignore> getIgnoreList(); // in prefs format
+ TQStringList currentIgnoreList(); // in hasChanged() format
+ TQPtrList<Ignore> getIgnoreList(); // in prefs format
void updateEnabledness();
public slots:
@@ -49,7 +49,7 @@ class Ignore_Config : public Ignore_ConfigUI, public KonviSettingsPage
void newIgnore();
void removeIgnore();
void flagCheckboxChanged();
- void select(QListViewItem* item);
+ void select(TQListViewItem* item);
void removeAllIgnore();
signals:
void modified();
diff --git a/konversation/src/ignorelistviewitem.cpp b/konversation/src/ignorelistviewitem.cpp
index c7ba20a..7bae577 100644
--- a/konversation/src/ignorelistviewitem.cpp
+++ b/konversation/src/ignorelistviewitem.cpp
@@ -18,7 +18,7 @@
#include <kdebug.h>
-IgnoreListViewItem::IgnoreListViewItem(QListView* parent,const QString& name,int newFlags):
+IgnoreListViewItem::IgnoreListViewItem(TQListView* parent,const TQString& name,int newFlags):
KListViewItem(parent,name)
{
setFlags(newFlags);
@@ -39,7 +39,7 @@ void IgnoreListViewItem::setFlags(int newFlags)
{
m_flags=newFlags;
- QString flagsStr;
+ TQString flagsStr;
if(m_flags & Ignore::Channel) flagsStr += i18n("Channel") + ' ';
if(m_flags & Ignore::Query) flagsStr += i18n("Query") + ' ';
if(m_flags & Ignore::Notice) flagsStr += i18n("Notice") + ' ';
@@ -51,5 +51,5 @@ void IgnoreListViewItem::setFlags(int newFlags)
IgnoreListViewItem* IgnoreListViewItem::itemBelow()
{
- return (IgnoreListViewItem*) QListViewItem::itemBelow();
+ return (IgnoreListViewItem*) TQListViewItem::itemBelow();
}
diff --git a/konversation/src/ignorelistviewitem.h b/konversation/src/ignorelistviewitem.h
index c99242a..c892c54 100644
--- a/konversation/src/ignorelistviewitem.h
+++ b/konversation/src/ignorelistviewitem.h
@@ -14,7 +14,7 @@
#ifndef IGNORELISTVIEWITEM_H
#define IGNORELISTVIEWITEM_H
-#include <qstring.h>
+#include <tqstring.h>
#include <klistview.h>
@@ -22,13 +22,13 @@
class IgnoreListViewItem : public KListViewItem
{
public:
- IgnoreListViewItem(QListView* parent,const QString& name,int flags);
+ IgnoreListViewItem(TQListView* parent,const TQString& name,int flags);
~IgnoreListViewItem();
void setFlag(int flag,bool active);
bool getFlag(int flag) { return m_flags & flag; };
- QString getName() { return text(0); };
- void setName(QString name) { setText(0, name); };
+ TQString getName() { return text(0); };
+ void setName(TQString name) { setText(0, name); };
int getFlags() { return m_flags; };
IgnoreListViewItem* itemBelow();
diff --git a/konversation/src/images.cpp b/konversation/src/images.cpp
index d97f9c7..9c38bd7 100644
--- a/konversation/src/images.cpp
+++ b/konversation/src/images.cpp
@@ -14,9 +14,9 @@
#include "common.h"
#include "konversationapplication.h"
-#include <qbitmap.h>
-#include <qpainter.h>
-#include <qstringlist.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <kiconloader.h>
@@ -32,18 +32,18 @@ Images::Images()
initializeKimifaceIcons();
m_closeIcon = KGlobal::iconLoader()->loadIcon("fileclose",KIcon::Small);
- m_disabledCloseIcon = KGlobal::iconLoader()->loadIconSet("fileclose",KIcon::Small).pixmap(QIconSet::Small, false);
+ m_disabledCloseIcon = KGlobal::iconLoader()->loadIconSet("fileclose",KIcon::Small).pixmap(TQIconSet::Small, false);
}
Images::~Images()
{
}
-QIconSet Images::getKimproxyAway() const { return kimproxyAway; }
-QIconSet Images::getKimproxyOnline() const { return kimproxyOnline; }
-QIconSet Images::getKimproxyOffline() const { return kimproxyOffline; }
+TQIconSet Images::getKimproxyAway() const { return kimproxyAway; }
+TQIconSet Images::getKimproxyOnline() const { return kimproxyOnline; }
+TQIconSet Images::getKimproxyOffline() const { return kimproxyOffline; }
-QPixmap Images::getNickIcon(NickPrivilege privilege,bool isAway) const
+TQPixmap Images::getNickIcon(NickPrivilege privilege,bool isAway) const
{
return nickIcons[privilege][isAway?1:0];
}
@@ -83,30 +83,30 @@ void Images::initializeKimifaceIcons()
void Images::initializeNickIcons()
{
- QString iconTheme = Preferences::iconTheme();
- QStringList icons = KGlobal::dirs()->findAllResources("data","konversation/themes/"+iconTheme+"/*.png");
+ TQString iconTheme = Preferences::iconTheme();
+ TQStringList icons = KGlobal::dirs()->findAllResources("data","konversation/themes/"+iconTheme+"/*.png");
if( icons.count() < 7 ) // Sanity
icons = KGlobal::dirs()->findAllResources("data","konversation/themes/default/*.png");
icons.sort();
- QStringList::ConstIterator it = icons.begin();
+ TQStringList::ConstIterator it = icons.begin();
/* The list is sorted alphabetically. */
- QPixmap elementAdmin(*it);
+ TQPixmap elementAdmin(*it);
++it;
- QPixmap elementAway(*it);
+ TQPixmap elementAway(*it);
++it;
- QPixmap elementHalfOp(*it);
+ TQPixmap elementHalfOp(*it);
++it;
- QPixmap elementNormal(*it);
+ TQPixmap elementNormal(*it);
++it;
- QPixmap elementOp(*it);
+ TQPixmap elementOp(*it);
++it;
- QPixmap elementOwner(*it);
+ TQPixmap elementOwner(*it);
++it;
- QPixmap elementVoice(*it);
+ TQPixmap elementVoice(*it);
nickIcons[Normal][0] = elementNormal;
nickIcons[Normal][1] = overlayPixmaps( nickIcons[Normal][0], elementAway );
@@ -138,15 +138,15 @@ void Images::initializeNickIcons()
void Images::updateIcons()
{
m_closeIcon = KGlobal::iconLoader()->loadIcon("fileclose",KIcon::Small);
- m_disabledCloseIcon = KGlobal::iconLoader()->loadIconSet("fileclose",KIcon::Small).pixmap(QIconSet::Small, false);
+ m_disabledCloseIcon = KGlobal::iconLoader()->loadIconSet("fileclose",KIcon::Small).pixmap(TQIconSet::Small, false);
}
-QIconSet Images::getLed(QColor col,bool state)
+TQIconSet Images::getLed(TQColor col,bool state)
{
- QColor color;
- QPainter paint;
- QBrush brush;
- QPen pen;
+ TQColor color;
+ TQPainter paint;
+ TQBrush brush;
+ TQPen pen;
if (state==false)
color = col.dark(180);
@@ -156,16 +156,16 @@ QIconSet Images::getLed(QColor col,bool state)
int scale = 3;
int width = 12 * scale;
- QPixmap *tmpMap = 0;
+ TQPixmap *tmpMap = 0;
- tmpMap = new QPixmap(width + 6, width + 6);
- QWidget tmpWidget;
+ tmpMap = new TQPixmap(width + 6, width + 6);
+ TQWidget tmpWidget;
tmpMap->fill(tmpWidget.paletteBackgroundColor());
paint.begin(tmpMap);
// Set the brush to SolidPattern, this fills the entire area
// of the ellipse which is drawn first
- brush.setStyle( QBrush::SolidPattern );
+ brush.setStyle( TQBrush::SolidPattern );
brush.setColor( color );
paint.setBrush( brush );
@@ -205,10 +205,10 @@ QIconSet Images::getLed(QColor col,bool state)
// Draw border
pen.setWidth( scale + 1 );
- color = QColor("#7D7D7D");
+ color = TQColor("#7D7D7D");
pen.setColor( color ); // Set the pen accordingly
paint.setPen( pen ); // Select pen for drawing
- brush.setStyle( QBrush::NoBrush ); // Switch off the brush
+ brush.setStyle( TQBrush::NoBrush ); // Switch off the brush
paint.setBrush( brush ); // This avoids filling of the ellipse
paint.drawEllipse( 2, 2, width, width );
paint.end();
@@ -216,21 +216,21 @@ QIconSet Images::getLed(QColor col,bool state)
tmpMap->setMask(tmpMap->createHeuristicMask(true));
// painting done
- QImage i = tmpMap->convertToImage();
+ TQImage i = tmpMap->convertToImage();
delete tmpMap;
i.setAlphaBuffer(true);
width /= 3;
i = i.smoothScale(width, width);
- QPixmap dest = i;
+ TQPixmap dest = i;
- QIconSet result;
- result.setPixmap(dest,QIconSet::Automatic);
+ TQIconSet result;
+ result.setPixmap(dest,TQIconSet::Automatic);
return dest;
}
-QIconSet Images::getServerLed(bool state)
+TQIconSet Images::getServerLed(bool state)
{
if (state)
return m_serverLedOn;
@@ -238,7 +238,7 @@ QIconSet Images::getServerLed(bool state)
return m_serverLedOff;
}
-QIconSet Images::getSystemLed(bool state)
+TQIconSet Images::getSystemLed(bool state)
{
if (Preferences::tabNotificationsSystemColor()!=m_systemColor)
{
@@ -256,7 +256,7 @@ QIconSet Images::getSystemLed(bool state)
}
}
-QIconSet Images::getMsgsLed(bool state)
+TQIconSet Images::getMsgsLed(bool state)
{
if (Preferences::tabNotificationsMsgsColor()!=m_msgsColor)
{
@@ -274,7 +274,7 @@ QIconSet Images::getMsgsLed(bool state)
}
}
-QIconSet Images::getPrivateLed(bool state)
+TQIconSet Images::getPrivateLed(bool state)
{
if (Preferences::tabNotificationsPrivateColor()!=m_privateColor)
{
@@ -292,7 +292,7 @@ QIconSet Images::getPrivateLed(bool state)
}
}
-QIconSet Images::getEventsLed()
+TQIconSet Images::getEventsLed()
{
if (Preferences::tabNotificationsEventsColor()!=m_eventsColor)
return getLed(Preferences::tabNotificationsEventsColor(),true);
@@ -300,7 +300,7 @@ QIconSet Images::getEventsLed()
return m_eventsLedOn;
}
-QIconSet Images::getNickLed()
+TQIconSet Images::getNickLed()
{
if (Preferences::tabNotificationsNickColor()!=m_nickColor)
return getLed(Preferences::tabNotificationsNickColor(),true);
@@ -308,7 +308,7 @@ QIconSet Images::getNickLed()
return m_nickLedOn;
}
-QIconSet Images::getHighlightsLed()
+TQIconSet Images::getHighlightsLed()
{
if (Preferences::tabNotificationsHighlightsColor()!=m_highlightsColor)
return getLed(Preferences::tabNotificationsHighlightsColor(),true);
diff --git a/konversation/src/images.h b/konversation/src/images.h
index 119c048..c9f49fa 100644
--- a/konversation/src/images.h
+++ b/konversation/src/images.h
@@ -13,9 +13,9 @@
#ifndef IMAGES_H
#define IMAGES_H
-#include <qiconset.h>
-#include <qpixmap.h>
-#include <qobject.h>
+#include <tqiconset.h>
+#include <tqpixmap.h>
+#include <tqobject.h>
/**
@@ -42,24 +42,24 @@ class Images : public QObject
Images();
virtual ~Images();
- QPixmap getCloseIcon() { return m_closeIcon; }
- QPixmap getDisabledCloseIcon() { return m_disabledCloseIcon; }
+ TQPixmap getCloseIcon() { return m_closeIcon; }
+ TQPixmap getDisabledCloseIcon() { return m_disabledCloseIcon; }
- QIconSet getLed(QColor col,bool state = true);
+ TQIconSet getLed(TQColor col,bool state = true);
- QIconSet getServerLed(bool state);
- QIconSet getSystemLed(bool state);
- QIconSet getMsgsLed(bool state);
- QIconSet getPrivateLed(bool state);
- QIconSet getEventsLed();
- QIconSet getNickLed();
- QIconSet getHighlightsLed();
+ TQIconSet getServerLed(bool state);
+ TQIconSet getSystemLed(bool state);
+ TQIconSet getMsgsLed(bool state);
+ TQIconSet getPrivateLed(bool state);
+ TQIconSet getEventsLed();
+ TQIconSet getNickLed();
+ TQIconSet getHighlightsLed();
- QIconSet getKimproxyAway() const;
- QIconSet getKimproxyOnline() const;
- QIconSet getKimproxyOffline() const;
+ TQIconSet getKimproxyAway() const;
+ TQIconSet getKimproxyOnline() const;
+ TQIconSet getKimproxyOffline() const;
- QPixmap getNickIcon(NickPrivilege privilege,bool isAway=false) const;
+ TQPixmap getNickIcon(NickPrivilege privilege,bool isAway=false) const;
void initializeNickIcons();
public slots:
@@ -69,34 +69,34 @@ class Images : public QObject
void initializeLeds();
void initializeKimifaceIcons();
- QPixmap m_closeIcon;
- QPixmap m_disabledCloseIcon;
-
- QIconSet m_serverLedOn;
- QIconSet m_serverLedOff;
- QIconSet m_systemLedOn;
- QIconSet m_systemLedOff;
- QIconSet m_msgsLedOn;
- QIconSet m_msgsLedOff;
- QIconSet m_privateLedOn;
- QIconSet m_privateLedOff;
- QIconSet m_eventsLedOn;
- QIconSet m_nickLedOn;
- QIconSet m_highlightsLedOn;
-
- QColor m_serverColor;
- QColor m_systemColor;
- QColor m_msgsColor;
- QColor m_privateColor;
- QColor m_eventsColor;
- QColor m_nickColor;
- QColor m_highlightsColor;
-
- QIconSet kimproxyAway;
- QIconSet kimproxyOnline;
- QIconSet kimproxyOffline;
+ TQPixmap m_closeIcon;
+ TQPixmap m_disabledCloseIcon;
+
+ TQIconSet m_serverLedOn;
+ TQIconSet m_serverLedOff;
+ TQIconSet m_systemLedOn;
+ TQIconSet m_systemLedOff;
+ TQIconSet m_msgsLedOn;
+ TQIconSet m_msgsLedOff;
+ TQIconSet m_privateLedOn;
+ TQIconSet m_privateLedOff;
+ TQIconSet m_eventsLedOn;
+ TQIconSet m_nickLedOn;
+ TQIconSet m_highlightsLedOn;
+
+ TQColor m_serverColor;
+ TQColor m_systemColor;
+ TQColor m_msgsColor;
+ TQColor m_privateColor;
+ TQColor m_eventsColor;
+ TQColor m_nickColor;
+ TQColor m_highlightsColor;
+
+ TQIconSet kimproxyAway;
+ TQIconSet kimproxyOnline;
+ TQIconSet kimproxyOffline;
// [privilege][away]
- QPixmap nickIcons[_NickPrivilege_COUNT][2];
+ TQPixmap nickIcons[_NickPrivilege_COUNT][2];
};
#endif
diff --git a/konversation/src/inputfilter.cpp b/konversation/src/inputfilter.cpp
index badbe66..1a2f2df 100644
--- a/konversation/src/inputfilter.cpp
+++ b/konversation/src/inputfilter.cpp
@@ -23,10 +23,10 @@
#include "common.h"
#include "notificationhandler.h"
-#include <qdatastream.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
-#include <qregexp.h>
+#include <tqdatastream.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kdeversion.h>
@@ -49,10 +49,10 @@ void InputFilter::setServer(Server* newServer)
server=newServer;
}
-void InputFilter::parseLine(const QString& a_newLine)
+void InputFilter::parseLine(const TQString& a_newLine)
{
- QString trailing;
- QString newLine(a_newLine);
+ TQString trailing;
+ TQString newLine(a_newLine);
// Remove white spaces at the end and beginning
newLine = newLine.stripWhiteSpace();
@@ -69,7 +69,7 @@ void InputFilter::parseLine(const QString& a_newLine)
// Remove all unnecessary white spaces to make parsing easier
newLine = newLine.simplifyWhiteSpace();
- QString prefix;
+ TQString prefix;
// Do we have a prefix?
if(newLine[0] == ':')
@@ -85,16 +85,16 @@ void InputFilter::parseLine(const QString& a_newLine)
// Find end of command
pos = newLine.find(' ');
// Copy command (all lowercase to make parsing easier)
- QString command = newLine.left(pos).lower();
+ TQString command = newLine.left(pos).lower();
// Are there parameters left in the string?
- QStringList parameterList;
+ TQStringList parameterList;
if(pos != -1)
{
// Cut out the command
newLine = newLine.mid(pos + 1);
// The rest of the string will be the parameter list
- parameterList = QStringList::split(" ", newLine);
+ parameterList = TQStringList::split(" ", newLine);
}
Q_ASSERT(server);
@@ -111,18 +111,18 @@ void InputFilter::parseLine(const QString& a_newLine)
}
}
-void InputFilter::parseClientCommand(const QString &prefix, const QString &command, const QStringList &parameterList, const QString &_trailing)
+void InputFilter::parseClientCommand(const TQString &prefix, const TQString &command, const TQStringList &parameterList, const TQString &_trailing)
{
KonversationApplication* konv_app = static_cast<KonversationApplication *>(KApplication::kApplication());
Q_ASSERT(konv_app);
Q_ASSERT(server);
// Extract nickname from prefix
int pos = prefix.find("!");
- QString sourceNick = prefix.left(pos);
- QString sourceHostmask = prefix.mid(pos + 1);
+ TQString sourceNick = prefix.left(pos);
+ TQString sourceHostmask = prefix.mid(pos + 1);
// remember hostmask for this nick, it could have changed
server->addHostmaskToNick(sourceNick,sourceHostmask);
- QString trailing = _trailing;
+ TQString trailing = _trailing;
if(command=="privmsg")
{
@@ -132,13 +132,13 @@ void InputFilter::parseClientCommand(const QString &prefix, const QString &comma
trailing = trailing.mid(1);
}
- if(trailing.at(0)==QChar(0x01))
+ if(trailing.at(0)==TQChar(0x01))
{
// cut out the CTCP command
- QString ctcp = trailing.mid(1,trailing.find(1,1)-1);
+ TQString ctcp = trailing.mid(1,trailing.find(1,1)-1);
- QString ctcpCommand=ctcp.left(ctcp.find(" ")).lower();
- QString ctcpArgument=ctcp.mid(ctcp.find(" ")+1);
+ TQString ctcpCommand=ctcp.left(ctcp.find(" ")).lower();
+ TQString ctcpArgument=ctcp.mid(ctcp.find(" ")+1);
ctcpArgument=static_cast<KonversationApplication*>(kapp)->doAutoreplace(ctcpArgument,false);
// If it was a ctcp action, build an action string
@@ -157,8 +157,8 @@ void InputFilter::parseClientCommand(const QString &prefix, const QString &comma
if(sourceNick != server->getNickname())
{
- if(ctcpArgument.lower().find(QRegExp("(^|[^\\d\\w])"
- + QRegExp::escape(server->loweredNickname())
+ if(ctcpArgument.lower().find(TQRegExp("(^|[^\\d\\w])"
+ + TQRegExp::escape(server->loweredNickname())
+ "([^\\d\\w]|$)")) !=-1 )
{
konv_app->notificationHandler()->nick(channel, sourceNick, ctcpArgument);
@@ -211,7 +211,7 @@ void InputFilter::parseClientCommand(const QString &prefix, const QString &comma
.arg("PING").arg(sourceNick)
);
}
- server->ctcpReply(sourceNick,QString("PING %1").arg(ctcpArgument));
+ server->ctcpReply(sourceNick,TQString("PING %1").arg(ctcpArgument));
}
}
@@ -235,7 +235,7 @@ void InputFilter::parseClientCommand(const QString &prefix, const QString &comma
);
}
- QString reply;
+ TQString reply;
if(Preferences::customVersionReplyEnabled())
{
reply = Preferences::customVersionReply().stripWhiteSpace();
@@ -243,8 +243,8 @@ void InputFilter::parseClientCommand(const QString &prefix, const QString &comma
else
{
// Do not internationalize the below version string
- reply = QString("Konversation %1 (C) 2002-2008 by the Konversation team")
- .arg(QString(KONVI_VERSION));
+ reply = TQString("Konversation %1 (C) 2002-2008 by the Konversation team")
+ .arg(TQString(KONVI_VERSION));
}
server->ctcpReply(sourceNick,"VERSION "+reply);
}
@@ -255,22 +255,22 @@ void InputFilter::parseClientCommand(const QString &prefix, const QString &comma
if(!isIgnore(prefix,Ignore::DCC))
{
// Extract DCC type and argument list
- QString dccType=ctcpArgument.lower().section(' ',0,0);
+ TQString dccType=ctcpArgument.lower().section(' ',0,0);
// Support file names with spaces
- QString dccArguments = ctcpArgument.mid(ctcpArgument.find(" ")+1);
- QStringList dccArgumentList;
+ TQString dccArguments = ctcpArgument.mid(ctcpArgument.find(" ")+1);
+ TQStringList dccArgumentList;
if ((dccArguments.contains('\"') >= 2) && (dccArguments.startsWith("\""))) {
int lastQuotePos = dccArguments.findRev("\"");
if (dccArguments[lastQuotePos+1] == ' ') {
- QString fileName = dccArguments.mid(1, lastQuotePos-1);
+ TQString fileName = dccArguments.mid(1, lastQuotePos-1);
dccArguments = dccArguments.mid(lastQuotePos+2);
dccArgumentList.append(fileName);
}
}
- dccArgumentList += QStringList::split(' ', dccArguments);
+ dccArgumentList += TQStringList::split(' ', dccArguments);
if(dccType=="send")
{
@@ -363,7 +363,7 @@ void InputFilter::parseClientCommand(const QString &prefix, const QString &comma
i18n("Received CTCP-%1 request from %2, sending answer.")
.arg("CLIENTINFO").arg(sourceNick)
);
- server->ctcpReply(sourceNick,QString("CLIENTINFO ACTION CLIENTINFO DCC PING TIME VERSION"));
+ server->ctcpReply(sourceNick,TQString("CLIENTINFO ACTION CLIENTINFO DCC PING TIME VERSION"));
}
else if(ctcpCommand=="time" && !isChan)
{
@@ -371,7 +371,7 @@ void InputFilter::parseClientCommand(const QString &prefix, const QString &comma
i18n("Received CTCP-%1 request from %2, sending answer.")
.arg("TIME").arg(sourceNick)
);
- server->ctcpReply(sourceNick,QString("TIME ")+QDateTime::currentDateTime().toString());
+ server->ctcpReply(sourceNick,TQString("TIME ")+TQDateTime::currentDateTime().toString());
}
// No known CTCP request, give a general message
@@ -421,20 +421,20 @@ void InputFilter::parseClientCommand(const QString &prefix, const QString &comma
else
{
// Was this a CTCP reply?
- if(trailing.at(0)==QChar(0x01))
+ if(trailing.at(0)==TQChar(0x01))
{
// cut 0x01 bytes from trailing string
- QString ctcp(trailing.mid(1,trailing.length()-2));
- QString replyReason(ctcp.section(' ',0,0));
- QString reply(ctcp.section(' ',1));
+ TQString ctcp(trailing.mid(1,trailing.length()-2));
+ TQString replyReason(ctcp.section(' ',0,0));
+ TQString reply(ctcp.section(' ',1));
// pong reply, calculate turnaround time
if(replyReason.lower()=="ping")
{
- int dateArrived=QDateTime::currentDateTime().toTime_t();
+ int dateArrived=TQDateTime::currentDateTime().toTime_t();
int dateSent=reply.toInt();
int time = dateArrived-dateSent;
- QString unit = "seconds";
+ TQString unit = "seconds";
if (time==1)
unit = "second";
@@ -481,7 +481,7 @@ void InputFilter::parseClientCommand(const QString &prefix, const QString &comma
}
else if(command=="join")
{
- QString channelName(trailing);
+ TQString channelName(trailing);
// Sometimes JOIN comes without ":" in front of the channel name
if(channelName.isEmpty())
channelName=parameterList[parameterList.count()-1];
@@ -490,7 +490,7 @@ void InputFilter::parseClientCommand(const QString &prefix, const QString &comma
if(server->isNickname(sourceNick))
{
/*
- QString key;
+ TQString key;
// TODO: Try to remember channel keys for autojoins and manual joins, so
// we can get %k to work
@@ -538,8 +538,8 @@ void InputFilter::parseClientCommand(const QString &prefix, const QString &comma
* is always valid before the final argument."
*/
- QString channel;
- QString reason;
+ TQString channel;
+ TQString reason;
if (parameterList[0].isEmpty())
{
@@ -568,7 +568,7 @@ void InputFilter::parseClientCommand(const QString &prefix, const QString &comma
}
else if(command=="nick")
{
- QString newNick(trailing);
+ TQString newNick(trailing);
// Message may not include ":" in front of the new nickname
if (newNick.isEmpty())
@@ -587,7 +587,7 @@ void InputFilter::parseClientCommand(const QString &prefix, const QString &comma
}
else if(command=="mode") // mode #channel -/+ mmm params
{
- QStringList params=parameterList;
+ TQStringList params=parameterList;
if (!trailing.isEmpty())
params << trailing;
parseModes(sourceNick, params);
@@ -599,7 +599,7 @@ void InputFilter::parseClientCommand(const QString &prefix, const QString &comma
}
else if(command=="invite")
{
- QString channel;
+ TQString channel;
if (parameterList.count() > 1)
channel = parameterList[1];
@@ -618,7 +618,7 @@ void InputFilter::parseClientCommand(const QString &prefix, const QString &comma
}
}
-void InputFilter::parseServerCommand(const QString &prefix, const QString &command, const QStringList &parameterList, const QString &trailing)
+void InputFilter::parseServerCommand(const TQString &prefix, const TQString &command, const TQStringList &parameterList, const TQString &trailing)
{
bool isNumeric;
int numeric = command.toInt(&isNumeric);
@@ -629,7 +629,7 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
{
if(command=="ping")
{
- QString text;
+ TQString text;
text = (!trailing.isEmpty()) ? trailing : parameterList.join(" ");
if(!trailing.isEmpty())
@@ -661,7 +661,7 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
}
else if(command=="mode")
{
- QStringList params=parameterList;
+ TQStringList params=parameterList;
if (!trailing.isEmpty())
params << trailing;
parseModes(prefix, params);
@@ -694,7 +694,7 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
{
if(numeric==RPL_WELCOME)
{
- QString host;
+ TQString host;
if(trailing.contains("@"))
host = trailing.section("@",1);
@@ -732,12 +732,12 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
// refer to http://www.irc.org/tech_docs/005.html for a kind of documentation.
// More on http://www.irc.org/tech_docs/draft-brocklesby-irc-isupport-03.txt
- QStringList::const_iterator it = parameterList.begin();
+ TQStringList::const_iterator it = parameterList.begin();
// don't want the user name
++it;
for (; it != parameterList.end(); ++it )
{
- QString property, value;
+ TQString property, value;
int pos;
if ((pos=(*it).find( '=' )) !=-1)
{
@@ -753,7 +753,7 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
pos = value.find(')',1);
if(pos==-1)
{
- server->setPrefixes(QString(), value);
+ server->setPrefixes(TQString(), value);
// XXX if ) isn't in the string, NOTHING should be there. anyone got a server
if (value.length() || property.length())
server->appendStatusMessage("","XXX Server sent bad PREFIX in RPL_ISUPPORT, please report.");
@@ -781,20 +781,20 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
}
case RPL_UMODEIS:
{
- QString message=QString("%1 %2").arg(i18n("Your personal modes are:")).arg(parameterList.join(" ").section(' ',1) + ' '+trailing);
+ TQString message=TQString("%1 %2").arg(i18n("Your personal modes are:")).arg(parameterList.join(" ").section(' ',1) + ' '+trailing);
server->appendMessageToFrontmost("Info", message);
break;
}
case RPL_CHANNELMODEIS:
{
- const QString modeString=parameterList[2];
+ const TQString modeString=parameterList[2];
// This is the string the user will see
- QString modesAre;
- QString message = i18n("Channel modes: ") + modeString;
+ TQString modesAre;
+ TQString message = i18n("Channel modes: ") + modeString;
for(unsigned int index=0;index<modeString.length();index++)
{
- QString parameter;
+ TQString parameter;
int parameterCount=3;
char mode=modeString[index];
if(mode!='+')
@@ -858,7 +858,7 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
}
case RPL_CHANNELCREATED:
{
- QDateTime when;
+ TQDateTime when;
when.setTime_t(parameterList[2].toUInt());
server->appendCommandMessageToChannel(parameterList[1],i18n("Created"),
i18n("This channel was created on %1.")
@@ -883,11 +883,11 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
}
case RPL_NAMREPLY:
{
- QStringList nickList;
+ TQStringList nickList;
if(!trailing.isEmpty())
{
- nickList = QStringList::split(" ", trailing);
+ nickList = TQStringList::split(" ", trailing);
}
else if(parameterList.count() > 3)
{
@@ -933,7 +933,7 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
}
case RPL_TOPIC:
{
- QString topic = Konversation::removeIrcMarkup(trailing);
+ TQString topic = Konversation::removeIrcMarkup(trailing);
// FIXME: This is an abuse of the automaticRequest system: We're
// using it in an inverted manner, i.e. the automaticRequest is
@@ -954,7 +954,7 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
case RPL_TOPICSETBY:
{
// Inform user who set the topic and when
- QDateTime when;
+ TQDateTime when;
when.setTime_t(parameterList[3].toUInt());
// See FIXME in RPL_TOPIC
@@ -1023,7 +1023,7 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
else // not connected yet, so try to find a nick that's not in use
{
// Get the next nick from the list or ask for a new one
- QString newNick = server->getNextNickname();
+ TQString newNick = server->getNextNickname();
// The user chose to disconnect
if (newNick.isNull())
@@ -1051,7 +1051,7 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
}
else // Find a new nick as in ERR_NICKNAMEINUSE
{
- QString newNick = server->getNextNickname();
+ TQString newNick = server->getNextNickname();
// The user chose to disconnect
if (newNick.isNull())
@@ -1113,15 +1113,15 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
}
case RPL_GLOBALUSERS: // Current global users: 589 Max: 845
{
- QString current(trailing.section(' ',3));
- //QString max(trailing.section(' ',5,5));
+ TQString current(trailing.section(' ',3));
+ //TQString max(trailing.section(' ',5,5));
server->appendStatusMessage(i18n("Users"),i18n("Current users on the network: %1").arg(current));
break;
}
case RPL_LOCALUSERS: // Current local users: 589 Max: 845
{
- QString current(trailing.section(' ',3));
- //QString max(trailing.section(' ',5,5));
+ TQString current(trailing.section(' ',3));
+ //TQString max(trailing.section(' ',5,5));
server->appendStatusMessage(i18n("Users"),i18n("Current users on %1: %2.").arg(prefix).arg(current));
break;
}
@@ -1180,7 +1180,7 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
if(getAutomaticRequest("WHOIS",parameterList[1])==0)
{
// escape html tags
- QString escapedRealName(trailing);
+ TQString escapedRealName(trailing);
escapedRealName.replace("<","&lt;").replace(">","&gt;");
server->appendMessageToFrontmost(i18n("Whois"),
i18n("%1 is %2@%3 (%4)")
@@ -1197,7 +1197,7 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
KNetwork::KResolverResults resolved = KNetwork::KResolver::resolve(parameterList[3],"");
if(resolved.error() == KResolver::NoError && resolved.size() > 0)
{
- QString ip = resolved.first().address().nodeName();
+ TQString ip = resolved.first().address().nodeName();
server->appendMessageToFrontmost(i18n("DNS"),
i18n("Resolved %1 (%2) to address: %3")
.arg(parameterList[1])
@@ -1256,7 +1256,7 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
nickInfo->setAway(bAway);
if(!bAway)
{
- nickInfo->setAwayMessage(QString());
+ nickInfo->setAwayMessage(TQString());
}
}
// Display message only if this was not an automatic request.
@@ -1269,7 +1269,7 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
.arg(parameterList[2])
.arg(parameterList[3])
.arg(trailing.section(" ", 1))
- .arg(bAway?i18n(" (Away)"):QString())
+ .arg(bAway?i18n(" (Away)"):TQString())
, false); // Don't parse as url
}
}
@@ -1279,7 +1279,7 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
{
if(!whoRequestList.isEmpty())
{ // for safety
- QStringList::iterator it = whoRequestList.find(parameterList[1].lower());
+ TQStringList::iterator it = whoRequestList.find(parameterList[1].lower());
if(it != whoRequestList.end())
{
@@ -1317,16 +1317,16 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
}
case RPL_WHOISCHANNELS:
{
- QStringList userChannels,voiceChannels,opChannels,halfopChannels,ownerChannels,adminChannels;
+ TQStringList userChannels,voiceChannels,opChannels,halfopChannels,ownerChannels,adminChannels;
// get a list of all channels the user is in
- QStringList channelList=QStringList::split(' ',trailing);
+ TQStringList channelList=TQStringList::split(' ',trailing);
channelList.sort();
// split up the list in channels where they are operator / user / voice
for(unsigned int index=0; index < channelList.count(); index++)
{
- QString lookChannel=channelList[index];
+ TQString lookChannel=channelList[index];
if(lookChannel.startsWith("*") || lookChannel.startsWith("&"))
{
adminChannels.append(lookChannel.mid(1));
@@ -1424,7 +1424,7 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
// Clear the away state on assumption that if nick is away, this message will be followed
// by a 301 RPL_AWAY message. Not necessary a invalid assumption, but what can we do?
nickInfo->setAway(false);
- nickInfo->setAwayMessage(QString());
+ nickInfo->setAwayMessage(TQString());
}
// Display message only if this was not an automatic request.
if(getAutomaticRequest("WHOIS",parameterList[1])==0)
@@ -1456,7 +1456,7 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
if (trailing.lower().simplifyWhiteSpace().startsWith("is an irc operator"))
server->appendMessageToFrontmost(i18n("Whois"),i18n("%1 is an IRC Operator.").arg(parameterList[1]));
else
- server->appendMessageToFrontmost(i18n("Whois"),QString("%1 %2").arg(parameterList[1]).arg(trailing));
+ server->appendMessageToFrontmost(i18n("Whois"),TQString("%1 %2").arg(parameterList[1]).arg(trailing));
}
break;
}
@@ -1474,10 +1474,10 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
{
if(days)
{
- const QString daysString = i18n("1 day", "%n days", days);
- const QString hoursString = i18n("1 hour", "%n hours", (hours % 24));
- const QString minutesString = i18n("1 minute", "%n minutes", (minutes % 60));
- const QString secondsString = i18n("1 second", "%n seconds", (seconds % 60));
+ const TQString daysString = i18n("1 day", "%n days", days);
+ const TQString hoursString = i18n("1 hour", "%n hours", (hours % 24));
+ const TQString minutesString = i18n("1 minute", "%n minutes", (minutes % 60));
+ const TQString secondsString = i18n("1 second", "%n seconds", (seconds % 60));
server->appendMessageToFrontmost(i18n("Whois"),
i18n("%1 = name of person, %2 = (x days), %3 = (x hours), %4 = (x minutes), %5 = (x seconds)",
@@ -1489,9 +1489,9 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
}
else if(hours)
{
- const QString hoursString = i18n("1 hour", "%n hours", hours);
- const QString minutesString = i18n("1 minute", "%n minutes", (minutes % 60));
- const QString secondsString = i18n("1 second", "%n seconds", (seconds % 60));
+ const TQString hoursString = i18n("1 hour", "%n hours", hours);
+ const TQString minutesString = i18n("1 minute", "%n minutes", (minutes % 60));
+ const TQString secondsString = i18n("1 second", "%n seconds", (seconds % 60));
server->appendMessageToFrontmost(i18n("Whois"),
i18n("%1 = name of person, %2 = (x hours), %3 = (x minutes), %4 = (x seconds)",
"%1 has been idle for %2, %3, and %4.")
@@ -1502,8 +1502,8 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
}
else if(minutes)
{
- const QString minutesString = i18n("1 minute", "%n minutes", minutes);
- const QString secondsString = i18n("1 second", "%n seconds", (seconds % 60));
+ const TQString minutesString = i18n("1 minute", "%n minutes", minutes);
+ const TQString secondsString = i18n("1 second", "%n seconds", (seconds % 60));
server->appendMessageToFrontmost(i18n("Whois"),
i18n("%1 = name of person, %2 = (x minutes), %3 = (x seconds)",
"%1 has been idle for %2 and %3.")
@@ -1523,7 +1523,7 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
if(parameterList.count()==4)
{
- QDateTime when;
+ TQDateTime when;
when.setTime_t(parameterList[3].toUInt());
NickInfo* nickInfo = server->getNickInfo(parameterList[1]);
if(nickInfo)
@@ -1559,13 +1559,13 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
case RPL_USERHOST:
{
// iterate over all nick/masks in reply
- QStringList uhosts=QStringList::split(" ",trailing);
+ TQStringList uhosts=TQStringList::split(" ",trailing);
for(unsigned int index=0;index<uhosts.count();index++)
{
// extract nickname and hostmask from reply
- QString nick(uhosts[index].section('=',0,0));
- QString mask(uhosts[index].section('=',1));
+ TQString nick(uhosts[index].section('=',0,0));
+ TQString mask(uhosts[index].section('=',1));
// get away and IRC operator flags
bool away=(mask[0]=='-');
@@ -1587,9 +1587,9 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
server->appendMessageToFrontmost(i18n("Userhost"),
i18n("%1 = nick, %2 = shows if nick is op, %3 = hostmask, %4 = shows away", "%1%2 is %3%4.")
.arg(nick)
- .arg((ircOp) ? i18n(" (IRC Operator)") : QString())
+ .arg((ircOp) ? i18n(" (IRC Operator)") : TQString())
.arg(mask)
- .arg((away) ? i18n(" (away)") : QString()));
+ .arg((away) ? i18n(" (away)") : TQString()));
}
// was this an automatic request?
@@ -1602,7 +1602,7 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
}
case RPL_LISTSTART: //FIXME This reply is obsolete!!!
{
- if(getAutomaticRequest("LIST",QString())==0)
+ if(getAutomaticRequest("LIST",TQString())==0)
{
server->appendMessageToFrontmost(i18n("List"),i18n("List of channels:"));
}
@@ -1610,9 +1610,9 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
}
case RPL_LIST:
{
- if(getAutomaticRequest("LIST",QString())==0)
+ if(getAutomaticRequest("LIST",TQString())==0)
{
- QString message;
+ TQString message;
message=i18n("%1 (%n user): %2", "%1 (%n users): %2", parameterList[2].toInt());
server->appendMessageToFrontmost(i18n("List"),message.arg(parameterList[1]).arg(trailing));
}
@@ -1626,13 +1626,13 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
case RPL_LISTEND:
{
// was this an automatic request?
- if(getAutomaticRequest("LIST",QString())==0)
+ if(getAutomaticRequest("LIST",TQString())==0)
{
server->appendMessageToFrontmost(i18n("List"),i18n("End of channel list."));
}
else
{
- setAutomaticRequest("LIST",QString(),false);
+ setAutomaticRequest("LIST",TQString(),false);
}
break;
}
@@ -1652,7 +1652,7 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
if (nickInfo)
{
nickInfo->setAway(false);
- nickInfo->setAwayMessage(QString());
+ nickInfo->setAwayMessage(TQString());
}
server->setAway(false);
@@ -1665,7 +1665,7 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
{
server->addBan(parameterList[1], parameterList.join(" ").section(' ', 2, 4));
} else {
- QDateTime when;
+ TQDateTime when;
when.setTime_t(parameterList[4].toUInt());
server->appendMessageToFrontmost(i18n("BanList:%1").arg(parameterList[1]), i18n("BanList message: e.g. *!*@aol.com set by MrGrim on <date>", "%1 set by %2 on %3").arg(parameterList[2]).arg(parameterList[3].section('!', 0, 0)).arg(when.toString(Qt::LocalDate)));
@@ -1760,13 +1760,13 @@ void InputFilter::parseServerCommand(const QString &prefix, const QString &comma
}
}
-void InputFilter::parseModes(const QString &sourceNick, const QStringList &parameterList)
+void InputFilter::parseModes(const TQString &sourceNick, const TQStringList &parameterList)
{
- const QString modestring=parameterList[1];
+ const TQString modestring=parameterList[1];
if (!isAChannel(parameterList[0]))
{
- QString message;
+ TQString message;
if (parameterList[0] == server->getNickname())
{
if (sourceNick == server->getNickname())
@@ -1776,7 +1776,7 @@ void InputFilter::parseModes(const QString &sourceNick, const QStringList &param
}
else
{ //XXX someone might care about the potentially unnecessary plural here
- message = QString("%1 %2 %3").arg(sourceNick).arg(i18n("has changed your personal modes:")).arg(modestring);
+ message = TQString("%1 %2 %3").arg(sourceNick).arg(i18n("has changed your personal modes:")).arg(modestring);
}
}
if (!message.isEmpty())
@@ -1789,13 +1789,13 @@ void InputFilter::parseModes(const QString &sourceNick, const QStringList &param
// List of modes that need a parameter (note exception with -k and -l)
// Mode q is quiet on freenode and acts like b... if this is a channel mode on other
// networks then more logic is needed here. --MrGrim
- QString parameterModes="aAoOvhkbleIq";
- QString message = sourceNick + i18n(" sets mode: ") + modestring;
+ TQString parameterModes="aAoOvhkbleIq";
+ TQString message = sourceNick + i18n(" sets mode: ") + modestring;
for(unsigned int index=0;index<modestring.length();index++)
{
unsigned char mode=modestring[index];
- QString parameter;
+ TQString parameter;
// Check if this is a mode or a +/- qualifier
if(mode=='+' || mode=='-')
@@ -1837,23 +1837,23 @@ void InputFilter::parseModes(const QString &sourceNick, const QStringList &param
// # & + and ! are *often*, but not necessarily, Channel identifiers. + and ! are non-RFC,
// so if a server doesn't offer 005 and supports + and ! channels, I think thats broken behaviour
// on their part - not ours. --Argonel
-bool InputFilter::isAChannel(const QString &check)
+bool InputFilter::isAChannel(const TQString &check)
{
Q_ASSERT(server);
// if we ever see the assert, we need the ternary
- return server? server->isAChannel(check) : QString("#&").contains(check.at(0));
+ return server? server->isAChannel(check) : TQString("#&").contains(check.at(0));
}
-bool InputFilter::isIgnore(const QString &sender, Ignore::Type type)
+bool InputFilter::isIgnore(const TQString &sender, Ignore::Type type)
{
bool doIgnore = false;
- QPtrList<Ignore> list = Preferences::ignoreList();
+ TQPtrList<Ignore> list = Preferences::ignoreList();
for(unsigned int index =0; index<list.count(); index++)
{
Ignore* item = list.at(index);
- QRegExp ignoreItem(QRegExp::escape(item->getName()).replace("\\*", "(.*)"),false);
+ TQRegExp ignoreItem(TQRegExp::escape(item->getName()).replace("\\*", "(.*)"),false);
if (ignoreItem.exactMatch(sender) && (item->getFlags() & type))
doIgnore = true;
if (ignoreItem.exactMatch(sender) && (item->getFlags() & Ignore::Exception))
@@ -1869,7 +1869,7 @@ void InputFilter::reset()
whoRequestList.clear();
}
-void InputFilter::setAutomaticRequest(const QString& command, const QString& name, bool yes)
+void InputFilter::setAutomaticRequest(const TQString& command, const TQString& name, bool yes)
{
automaticRequest[command][name.lower()] += (yes) ? 1 : -1;
if(automaticRequest[command][name.lower()]<0)
@@ -1881,27 +1881,27 @@ void InputFilter::setAutomaticRequest(const QString& command, const QString& nam
}
}
-int InputFilter::getAutomaticRequest(const QString& command, const QString& name)
+int InputFilter::getAutomaticRequest(const TQString& command, const TQString& name)
{
return automaticRequest[command][name.lower()];
}
-void InputFilter::addWhoRequest(const QString& name) { whoRequestList << name.lower(); }
+void InputFilter::addWhoRequest(const TQString& name) { whoRequestList << name.lower(); }
-bool InputFilter::isWhoRequestUnderProcess(const QString& name) { return (whoRequestList.contains(name.lower())>0); }
+bool InputFilter::isWhoRequestUnderProcess(const TQString& name) { return (whoRequestList.contains(name.lower())>0); }
void InputFilter::setLagMeasuring(bool state) { lagMeasuring=state; }
bool InputFilter::getLagMeasuring() { return lagMeasuring; }
-void InputFilter::parsePrivMsg(const QString& prefix,
- const QStringList& parameterList,
- const QString& trailing)
+void InputFilter::parsePrivMsg(const TQString& prefix,
+ const TQStringList& parameterList,
+ const TQString& trailing)
{
int pos = prefix.find("!");
- QString source;
- QString sourceHostmask;
- QString message(trailing);
+ TQString source;
+ TQString sourceHostmask;
+ TQString message(trailing);
if(pos > 0)
{
@@ -1927,8 +1927,8 @@ void InputFilter::parsePrivMsg(const QString& prefix,
if(source != server->getNickname())
{
- QRegExp regexp("(^|[^\\d\\w])" +
- QRegExp::escape(server->loweredNickname()) +
+ TQRegExp regexp("(^|[^\\d\\w])" +
+ TQRegExp::escape(server->loweredNickname()) +
"([^\\d\\w]|$)");
regexp.setCaseSensitive(false);
if(message.find(regexp) !=-1 )
@@ -1960,8 +1960,8 @@ void InputFilter::parsePrivMsg(const QString& prefix,
if(source != server->getNickname() && query)
{
- QRegExp regexp("(^|[^\\d\\w])" +
- QRegExp::escape(server->loweredNickname()) +
+ TQRegExp regexp("(^|[^\\d\\w])" +
+ TQRegExp::escape(server->loweredNickname()) +
"([^\\d\\w]|$)");
regexp.setCaseSensitive(false);
if(message.find(regexp) !=-1 )
diff --git a/konversation/src/inputfilter.h b/konversation/src/inputfilter.h
index 2edb985..ef99b54 100644
--- a/konversation/src/inputfilter.h
+++ b/konversation/src/inputfilter.h
@@ -16,14 +16,14 @@
#include "ignore.h"
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
class Server;
-class QWidget;
+class TQWidget;
class Query;
-class QDateTime;
+class TQDateTime;
class InputFilter : public QObject
{
@@ -34,54 +34,54 @@ class InputFilter : public QObject
~InputFilter();
void setServer(Server* newServer);
- void parseLine(const QString &line);
+ void parseLine(const TQString &line);
void reset(); // reset AutomaticRequest, WhoRequestList
// use this when the client does automatics, like userhost for finding hostmasks
- void setAutomaticRequest(const QString& command, const QString& name, bool yes);
- int getAutomaticRequest(const QString& command, const QString& name);
- void addWhoRequest(const QString& name); // called from Server::send()
+ void setAutomaticRequest(const TQString& command, const TQString& name, bool yes);
+ int getAutomaticRequest(const TQString& command, const TQString& name);
+ void addWhoRequest(const TQString& name); // called from Server::send()
// to avoid duplicate requests
- bool isWhoRequestUnderProcess(const QString& name);
+ bool isWhoRequestUnderProcess(const TQString& name);
void setLagMeasuring(bool yes);
bool getLagMeasuring();
signals:
- void welcome(const QString& ownHost);
- void notifyResponse(const QString &nicksOnline);
+ void welcome(const TQString& ownHost);
+ void notifyResponse(const TQString &nicksOnline);
// will be connected to Server::startReverseDccSendTransfer()
- void startReverseDccSendTransfer(const QString &sourceNick, const QStringList &dccArgument);
+ void startReverseDccSendTransfer(const TQString &sourceNick, const TQStringList &dccArgument);
// will be connected to Server::addDccGet()
- void addDccGet(const QString &sourceNick, const QStringList &dccArgument);
+ void addDccGet(const TQString &sourceNick, const TQStringList &dccArgument);
// will be connected to Server::resumeDccGetTransfer()
- void resumeDccGetTransfer(const QString &sourceNick, const QStringList &dccArgument);
+ void resumeDccGetTransfer(const TQString &sourceNick, const TQStringList &dccArgument);
// will be connected to Server::resumeDccSendTransfer()
- void resumeDccSendTransfer(const QString &sourceNick, const QStringList &dccArgument);
+ void resumeDccSendTransfer(const TQString &sourceNick, const TQStringList &dccArgument);
// will be connected to Server::userhost()
- void userhost(const QString& nick,const QString& hostmask,bool away,bool ircOp);
+ void userhost(const TQString& nick,const TQString& hostmask,bool away,bool ircOp);
// will be connected to Server::setTopicAuthor()
- void topicAuthor(const QString& channel, const QString& author, QDateTime t);
- void endOfWho(const QString& target); // for scheduling auto /WHO
+ void topicAuthor(const TQString& channel, const TQString& author, TQDateTime t);
+ void endOfWho(const TQString& target); // for scheduling auto /WHO
void addChannelListPanel();
- void addToChannelList(const QString& channel,int users,const QString& topic);
- void invitation(const QString& nick,const QString& channel);
+ void addToChannelList(const TQString& channel,int users,const TQString& topic);
+ void invitation(const TQString& nick,const TQString& channel);
- void addDccChat(const QString& myNick,const QString& nick,const QStringList& arguments,bool listen);
+ void addDccChat(const TQString& myNick,const TQString& nick,const TQStringList& arguments,bool listen);
protected:
- void parseClientCommand(const QString &prefix, const QString &command, const QStringList &parameterList, const QString &trailing);
- void parseServerCommand(const QString &prefix, const QString &command, const QStringList &parameterList, const QString &trailing);
- void parseModes(const QString &sourceNick, const QStringList &parameterList);
- void parsePrivMsg(const QString& prefix, const QStringList& parameterList, const QString& trailing);
+ void parseClientCommand(const TQString &prefix, const TQString &command, const TQStringList &parameterList, const TQString &trailing);
+ void parseServerCommand(const TQString &prefix, const TQString &command, const TQStringList &parameterList, const TQString &trailing);
+ void parseModes(const TQString &sourceNick, const TQStringList &parameterList);
+ void parsePrivMsg(const TQString& prefix, const TQStringList& parameterList, const TQString& trailing);
- bool isAChannel(const QString &check);
- bool isIgnore(const QString &pattern, Ignore::Type type);
+ bool isAChannel(const TQString &check);
+ bool isIgnore(const TQString &pattern, Ignore::Type type);
Server* server;
// automaticRequest[command][channel or nick]=count
- QMap< QString, QMap<QString,int> > automaticRequest;
- QStringList whoRequestList;
+ TQMap< TQString, TQMap<TQString,int> > automaticRequest;
+ TQStringList whoRequestList;
int lagMeasuring;
Query* query;
diff --git a/konversation/src/insertchardialog.cpp b/konversation/src/insertchardialog.cpp
index 3b5c080..1d5147b 100644
--- a/konversation/src/insertchardialog.cpp
+++ b/konversation/src/insertchardialog.cpp
@@ -19,7 +19,7 @@
namespace Konversation
{
- InsertCharDialog::InsertCharDialog(const QString& font, QWidget *parent, const char *name)
+ InsertCharDialog::InsertCharDialog(const TQString& font, TQWidget *parent, const char *name)
: KDialogBase(parent, name, false, i18n("Insert Character"),
KDialogBase::Ok | KDialogBase::Close,
KDialogBase::Ok, false)
@@ -30,19 +30,19 @@ namespace Konversation
m_charTable->enableFontCombo(false);
setMainWidget(m_charTable);
- connect(m_charTable, SIGNAL(doubleClicked()), this, SLOT(slotOk()));
+ connect(m_charTable, TQT_SIGNAL(doubleClicked()), this, TQT_SLOT(slotOk()));
}
InsertCharDialog::~InsertCharDialog()
{
}
- void InsertCharDialog::setFont(const QFont &font)
+ void InsertCharDialog::setFont(const TQFont &font)
{
m_charTable->setFont(font.family());
}
- QChar InsertCharDialog::chr()
+ TQChar InsertCharDialog::chr()
{
return m_charTable->chr();
}
diff --git a/konversation/src/insertchardialog.h b/konversation/src/insertchardialog.h
index a2c0001..93a161b 100644
--- a/konversation/src/insertchardialog.h
+++ b/konversation/src/insertchardialog.h
@@ -16,7 +16,7 @@
class KCharSelect;
-class QChar;
+class TQChar;
namespace Konversation
{
@@ -26,17 +26,17 @@ namespace Konversation
Q_OBJECT
public:
- explicit InsertCharDialog(const QString& font = QString(), QWidget *parent = 0, const char *name = 0);
+ explicit InsertCharDialog(const TQString& font = TQString(), TQWidget *parent = 0, const char *name = 0);
~InsertCharDialog();
- void setFont(const QFont &font);
- QChar chr();
+ void setFont(const TQFont &font);
+ TQChar chr();
protected slots:
virtual void slotOk();
signals:
- void insertChar(const QChar&);
+ void insertChar(const TQChar&);
private:
KCharSelect* m_charTable;
diff --git a/konversation/src/irccharsets.cpp b/konversation/src/irccharsets.cpp
index 89fdf4f..cd887b8 100644
--- a/konversation/src/irccharsets.cpp
+++ b/konversation/src/irccharsets.cpp
@@ -10,9 +10,9 @@
#include "irccharsets.h"
-#include <qglobal.h>
-#include <qregexp.h>
-#include <qtextcodec.h>
+#include <tqglobal.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
#include <kcharsets.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -21,7 +21,7 @@
#if QT_VERSION < 0x030300
#include <klocale.h>
#else
-#include <qlocale.h>
+#include <tqlocale.h>
#endif
@@ -38,12 +38,12 @@ namespace Konversation
return s_self;
}
- QStringList IRCCharsets::availableEncodingShortNames()
+ TQStringList IRCCharsets::availableEncodingShortNames()
{
return m_shortNames;
}
- QStringList IRCCharsets::availableEncodingDescriptiveNames()
+ TQStringList IRCCharsets::availableEncodingDescriptiveNames()
{
return m_descriptiveNames;
}
@@ -53,25 +53,25 @@ namespace Konversation
return m_shortNames.count();
}
- QString IRCCharsets::shortNameToDescriptiveName( const QString& shortName )
+ TQString IRCCharsets::shortNameToDescriptiveName( const TQString& shortName )
{
return m_descriptiveNames[ shortNameToIndex( shortName ) ];
}
- QString descriptiveNameToShortName( const QString& descriptiveName )
+ TQString descriptiveNameToShortName( const TQString& descriptiveName )
{
return KGlobal::charsets()->encodingForName( descriptiveName );
}
- QString IRCCharsets::ambiguousNameToShortName( const QString& ambiguousName )
+ TQString IRCCharsets::ambiguousNameToShortName( const TQString& ambiguousName )
{
// simplify ambiguousName
- QString simplifiedAmbiguousName( ambiguousName.lower() );
- simplifiedAmbiguousName.replace( QRegExp( "[^a-z0-9]" ), "" );
+ TQString simplifiedAmbiguousName( ambiguousName.lower() );
+ simplifiedAmbiguousName.replace( TQRegExp( "[^a-z0-9]" ), "" );
// search m_simplifiedShortNames
int index = 0;
- for ( QStringList::iterator it = m_simplifiedShortNames.begin() ; it != m_simplifiedShortNames.end() ; ++it )
+ for ( TQStringList::iterator it = m_simplifiedShortNames.begin() ; it != m_simplifiedShortNames.end() ; ++it )
{
if ( (*it) == simplifiedAmbiguousName )
return m_shortNames[index];
@@ -83,13 +83,13 @@ namespace Konversation
return m_shortNameAliases[ simplifiedAmbiguousName ];
// failed
- return QString();
+ return TQString();
}
- int IRCCharsets::shortNameToIndex( const QString& shortName )
+ int IRCCharsets::shortNameToIndex( const TQString& shortName )
{
int index = 0;
- for ( QStringList::iterator it = m_shortNames.begin() ; it != m_shortNames.end() ; ++it )
+ for ( TQStringList::iterator it = m_shortNames.begin() ; it != m_shortNames.end() ; ++it )
{
if ( (*it) == shortName )
return index;
@@ -98,38 +98,38 @@ namespace Konversation
return -1;
}
- bool IRCCharsets::isValidEncoding( const QString& shortName )
+ bool IRCCharsets::isValidEncoding( const TQString& shortName )
{
return ( m_shortNames.contains( shortName ) > 0 );
}
- QString IRCCharsets::encodingForLocale()
+ TQString IRCCharsets::encodingForLocale()
{
#if QT_VERSION < 0x030300
- QString locale = KLocale::defaultLanguage();
+ TQString locale = KLocale::defaultLanguage();
#else
- QString locale = QLocale::system().name();
+ TQString locale = TQLocale::system().name();
#endif
// Special cases
- // don't add conditions for the languages for which QTextCodec::codecForLocale() returns a correct codec.
+ // don't add conditions for the languages for which TQTextCodec::codecForLocale() returns a correct codec.
if ( locale == "ja_JP" )
return "jis7";
// it's a little hacky..
- for ( QStringList::iterator it = m_shortNames.begin() ; it != m_shortNames.end() ; ++it )
- if ( QTextCodec::codecForName( (*it).ascii() ) == QTextCodec::codecForLocale() )
+ for ( TQStringList::iterator it = m_shortNames.begin() ; it != m_shortNames.end() ; ++it )
+ if ( TQTextCodec::codecForName( (*it).ascii() ) == TQTextCodec::codecForLocale() )
return *it;
return "utf8";
}
- QTextCodec* IRCCharsets::codecForName( const QString& shortName )
+ TQTextCodec* IRCCharsets::codecForName( const TQString& shortName )
{
if(shortName == "iso-2022-jp")
- return QTextCodec::codecForName( "jis7" );
+ return TQTextCodec::codecForName( "jis7" );
else
- return QTextCodec::codecForName( shortName.ascii() );
+ return TQTextCodec::codecForName( shortName.ascii() );
}
IRCCharsets::IRCCharsets()
@@ -142,12 +142,12 @@ namespace Konversation
m_shortNameAliases["latin1"] = "iso-8859-1";
// setup m_shortNames, m_descriptiveNames, m_simplifiedShortNames
- QRegExp reSimplify( "[^a-zA-Z0-9]" );
+ TQRegExp reSimplify( "[^a-zA-Z0-9]" );
m_descriptiveNames = KGlobal::charsets()->descriptiveEncodingNames();
- QStringList::Iterator it = m_descriptiveNames.begin();
+ TQStringList::Iterator it = m_descriptiveNames.begin();
while ( it != m_descriptiveNames.end() )
{
- QString encodingName = KGlobal::charsets()->encodingForName( *it );
+ TQString encodingName = KGlobal::charsets()->encodingForName( *it );
// exclude encodings which are not supported on IRC
if ( encodingName == "iso-10646-ucs-2" ||
encodingName == "ucs2" ||
diff --git a/konversation/src/irccharsets.h b/konversation/src/irccharsets.h
index 1f7facd..c07de11 100644
--- a/konversation/src/irccharsets.h
+++ b/konversation/src/irccharsets.h
@@ -11,8 +11,8 @@
#ifndef KONVERSATION_IRCCHARSETS_H
#define KONVERSATION_IRCCHARSETS_H
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
namespace Konversation
@@ -32,72 +32,72 @@ namespace Konversation
* Encodings which don't work on IRC are excluded. (e.g. utf16)
* @note It's guaranteed that the order of this list is same with that of @ref availableEncodingDescriptiveNames() .
*/
- QStringList availableEncodingShortNames();
+ TQStringList availableEncodingShortNames();
/**
* Lists all available encoding descriptions.
* e.g. "Unicode ( utf8 )", "Western European ( iso 8859-1 )"
* Encodings which don't work on IRC are excluded. (e.g. utf16)
*/
- QStringList availableEncodingDescriptiveNames();
+ TQStringList availableEncodingDescriptiveNames();
int availableEncodingsCount();
- QString shortNameToDescriptiveName( const QString& shortName );
- QString descriptiveNameToShortName( const QString& descriptiveName );
+ TQString shortNameToDescriptiveName( const TQString& shortName );
+ TQString descriptiveNameToShortName( const TQString& descriptiveName );
/**
* Converts the ambiguous encoding name to a short encoding name
* Like : iso8859-9 -> iso 8859-9, iso-8859-9 -> iso 8859-9
- * If the ambiguous name is invalid, returns QString:null.
- * @return a short encoding name or QString::null
+ * If the ambiguous name is invalid, returns TQString:null.
+ * @return a short encoding name or TQString::null
*/
- QString ambiguousNameToShortName( const QString& ambiguousName );
+ TQString ambiguousNameToShortName( const TQString& ambiguousName );
/**
* Returns the encoding index in the short names list or the descriptions list.
* If the encoding name is invalid, returns -1.
* @return an index number of the encoding
*/
- int shortNameToIndex( const QString& shortName );
+ int shortNameToIndex( const TQString& shortName );
/**
* Checks if the encoding name is in the short encoding names.
* @see availableEncodingShortNames()
*/
- bool isValidEncoding( const QString& shortName );
+ bool isValidEncoding( const TQString& shortName );
/**
* Returns the short name of the most suitable encoding for this locale.
* @return a short encoding name
*/
- QString encodingForLocale();
+ TQString encodingForLocale();
- QTextCodec* codecForName( const QString& shortName );
+ TQTextCodec* codecForName( const TQString& shortName );
private:
- QMap<QString,QString> m_shortNameAliases;
+ TQMap<TQString,TQString> m_shortNameAliases;
/**
* short names list
* you can get this list with @ref availableEncodingShortNames()
* e.g. iso 8859-1
*/
- QStringList m_shortNames;
+ TQStringList m_shortNames;
/**
* descriptive names list
* you can get this list with @ref availableEncodingDescriptiveNames();
* e.g. Western European ( iso 8859-1 )
*/
- QStringList m_descriptiveNames;
+ TQStringList m_descriptiveNames;
/**
* simplified short names list (for internal use)
* e.g. iso88591
* used in @ref ambiguousNameToShortName()
*/
- QStringList m_simplifiedShortNames;
+ TQStringList m_simplifiedShortNames;
static IRCCharsets *s_self;
};
diff --git a/konversation/src/irccolorchooser.cpp b/konversation/src/irccolorchooser.cpp
index 3cf6ccf..00fcdb0 100644
--- a/konversation/src/irccolorchooser.cpp
+++ b/konversation/src/irccolorchooser.cpp
@@ -16,14 +16,14 @@
#include "irccolorchooserui.h"
#include "config/preferences.h"
-#include <qlabel.h>
-#include <qpixmap.h>
+#include <tqlabel.h>
+#include <tqpixmap.h>
#include <klocale.h>
#include <kcombobox.h>
-IRCColorChooser::IRCColorChooser(QWidget* parent, const char* name)
+IRCColorChooser::IRCColorChooser(TQWidget* parent, const char* name)
: KDialogBase(parent, name, true, i18n("IRC Color Chooser"), Ok|Cancel, Ok)
{
m_view = new IRCColorChooserUI(this);
@@ -32,21 +32,21 @@ IRCColorChooser::IRCColorChooser(QWidget* parent, const char* name)
initColors(m_view->m_bgColorCBox);
m_view->m_bgColorCBox->insertItem(i18n("None"), 0);
- connect(m_view->m_fgColorCBox, SIGNAL(activated(int)), this, SLOT(updatePreview()));
- connect(m_view->m_bgColorCBox, SIGNAL(activated(int)), this, SLOT(updatePreview()));
+ connect(m_view->m_fgColorCBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updatePreview()));
+ connect(m_view->m_bgColorCBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updatePreview()));
m_view->m_fgColorCBox->setCurrentItem(1);
m_view->m_bgColorCBox->setCurrentItem(0);
updatePreview();
}
-QString IRCColorChooser::color()
+TQString IRCColorChooser::color()
{
- QString s;
- s = "%C" + QString::number(m_view->m_fgColorCBox->currentItem());
+ TQString s;
+ s = "%C" + TQString::number(m_view->m_fgColorCBox->currentItem());
if(m_view->m_bgColorCBox->currentItem() > 0)
{
- s += ',' + QString::number(m_view->m_bgColorCBox->currentItem() - 1);
+ s += ',' + TQString::number(m_view->m_bgColorCBox->currentItem() - 1);
}
return s;
@@ -54,7 +54,7 @@ QString IRCColorChooser::color()
void IRCColorChooser::updatePreview()
{
- QColor bgc;
+ TQColor bgc;
if(m_view->m_bgColorCBox->currentItem() > 0)
{
@@ -71,7 +71,7 @@ void IRCColorChooser::updatePreview()
void IRCColorChooser::initColors(KComboBox* combo)
{
- QPixmap pix(width(), combo->fontMetrics().height() + 4);
+ TQPixmap pix(width(), combo->fontMetrics().height() + 4);
for (int i =0; i < 15; i++)
{
diff --git a/konversation/src/irccolorchooser.h b/konversation/src/irccolorchooser.h
index d1357fa..8d0fc20 100644
--- a/konversation/src/irccolorchooser.h
+++ b/konversation/src/irccolorchooser.h
@@ -26,8 +26,8 @@ class IRCColorChooser : public KDialogBase
{
Q_OBJECT
public:
- explicit IRCColorChooser(QWidget* parent, const char* name = 0);
- QString color();
+ explicit IRCColorChooser(TQWidget* parent, const char* name = 0);
+ TQString color();
protected slots:
void updatePreview();
diff --git a/konversation/src/ircinput.cpp b/konversation/src/ircinput.cpp
index b69c787..628d5d1 100644
--- a/konversation/src/ircinput.cpp
+++ b/konversation/src/ircinput.cpp
@@ -19,13 +19,13 @@
#include "ircview.h"
#include <private/qrichtext_p.h>
-#include <qclipboard.h>
-#include <qregexp.h>
-#include <qdom.h>
-#include <qevent.h>
-#include <qobject.h>
-#include <qwhatsthis.h>
-#include <qpopupmenu.h>
+#include <tqclipboard.h>
+#include <tqregexp.h>
+#include <tqdom.h>
+#include <tqevent.h>
+#include <tqobject.h>
+#include <tqwhatsthis.h>
+#include <tqpopupmenu.h>
#include <kapplication.h>
#include <kmessagebox.h>
@@ -36,7 +36,7 @@
#define RICHTEXT 0
-IRCInput::IRCInput(QWidget* parent) : KTextEdit(parent)
+IRCInput::IRCInput(TQWidget* parent) : KTextEdit(parent)
{
m_lastHeight=document()->height();
@@ -44,24 +44,24 @@ IRCInput::IRCInput(QWidget* parent) : KTextEdit(parent)
//nor in compensating for it if my guess is incorrect. so, cache it.
m_qtBoxPadding=m_lastHeight-fontMetrics().lineSpacing();
- connect(KApplication::kApplication(), SIGNAL(appearanceChanged()), this, SLOT(updateAppearance()));
+ connect(KApplication::kApplication(), TQT_SIGNAL(appearanceChanged()), this, TQT_SLOT(updateAppearance()));
m_multiRow = Preferences::useMultiRowInputBox();
m_useSelection = false;
// connect history signal
- connect(this,SIGNAL (history(bool)) ,this,SLOT (getHistory(bool)) );
+ connect(this,TQT_SIGNAL (history(bool)) ,this,TQT_SLOT (getHistory(bool)) );
// add one empty line to the history (will be overwritten with newest entry)
- historyList.prepend(QString());
+ historyList.prepend(TQString());
// reset history line counter
lineNum=0;
// reset completion mode
setCompletionMode('\0');
completionBox = new KCompletionBox(this);
- connect(completionBox, SIGNAL(activated(const QString&)), this, SLOT(insertCompletion(const QString&)));
+ connect(completionBox, TQT_SIGNAL(activated(const TQString&)), this, TQT_SLOT(insertCompletion(const TQString&)));
// widget may not be resized vertically
- setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Fixed));
+ setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding,TQSizePolicy::Fixed));
//NoWrap coupled with the size policy constrains the line edit to be one row high
setWordWrap(m_multiRow ? WidgetWidth : NoWrap);
@@ -69,29 +69,29 @@ IRCInput::IRCInput(QWidget* parent) : KTextEdit(parent)
setHScrollBarMode(AlwaysOff);
setVScrollBarMode(AlwaysOff);
#if RICHTEXT == 1
- setAutoFormatting(QTextEdit::AutoNone);
+ setAutoFormatting(TQTextEdit::AutoNone);
setTextFormat(RichText);
#else
setTextFormat(PlainText);
#endif
- QWhatsThis::add(this, i18n("<qt>The input line is where you type messages to be sent the channel, query, or server. A message sent to a channel is seen by everyone on the channel, whereas a message in a query is sent only to the person in the query with you.<p>To automatically complete the nickname you began typing, press Tab. If you have not begun typing, the last successfully completed nickname will be used.<p>You can also send special commands:<br><table><tr><th>/me <i>action</i></th><td>shows up as an action in the channel or query. For example: <em>/me sings a song</em> will show up in the channel as 'Nick sings a song'.</td></tr><tr><th>/whois <i>nickname</i></th><td>shows information about this person, including what channels they are in.</td></tr></table><p>For more commands, see the Konversation Handbook.<p>A message cannot contain multiple lines.</qt>"));
+ TQWhatsThis::add(this, i18n("<qt>The input line is where you type messages to be sent the channel, query, or server. A message sent to a channel is seen by everyone on the channel, whereas a message in a query is sent only to the person in the query with you.<p>To automatically complete the nickname you began typing, press Tab. If you have not begun typing, the last successfully completed nickname will be used.<p>You can also send special commands:<br><table><tr><th>/me <i>action</i></th><td>shows up as an action in the channel or query. For example: <em>/me sings a song</em> will show up in the channel as 'Nick sings a song'.</td></tr><tr><th>/whois <i>nickname</i></th><td>shows information about this person, including what channels they are in.</td></tr></table><p>For more commands, see the Konversation Handbook.<p>A message cannot contain multiple lines.</qt>"));
- m_disableSpellCheckTimer = new QTimer(this);
- connect(m_disableSpellCheckTimer, SIGNAL(timeout()), this, SLOT(disableSpellChecking()));
+ m_disableSpellCheckTimer = new TQTimer(this);
+ connect(m_disableSpellCheckTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(disableSpellChecking()));
}
IRCInput::~IRCInput()
{
}
-void IRCInput::showEvent(QShowEvent* /* e */)
+void IRCInput::showEvent(TQShowEvent* /* e */)
{
m_disableSpellCheckTimer->stop();
setCheckSpellingEnabled(Preferences::spellChecking());
}
-void IRCInput::hideEvent(QHideEvent* /* event */)
+void IRCInput::hideEvent(TQHideEvent* /* event */)
{
Preferences::setSpellChecking(checkSpellingEnabled());
@@ -112,7 +112,7 @@ void IRCInput::disableSpellChecking()
{
setCheckSpellingEnabled(false);
}
-void IRCInput::slotSpellCheckDone(const QString& s)
+void IRCInput::slotSpellCheckDone(const TQString& s)
{
// NOTE: kdelibs 3.5's KSpell stupidly adds newlines to its
// buffer at some point for god-knows-what-reason, and for-
@@ -144,7 +144,7 @@ void IRCInput::resizeContents( int w, int h )
}
// widget must be only one line high - luckily QT will enforce this via wrappping policy
-QSize IRCInput::sizeHint() const
+TQSize IRCInput::sizeHint() const
{
constPolish();
@@ -152,39 +152,39 @@ QSize IRCInput::sizeHint() const
int f=2*frameWidth();
int w=12 * (kMax(fontMetrics().lineSpacing(),14) + f + ObscurePadding);
int h=m_lastHeight - m_qtBoxPadding + f + ObscurePadding;
- return QSize(w,h);
+ return TQSize(w,h);
}
-QPopupMenu *IRCInput::createPopupMenu( const QPoint &pos )
+TQPopupMenu *IRCInput::createPopupMenu( const TQPoint &pos )
{
- QPopupMenu *menu=KTextEdit::createPopupMenu(pos);
+ TQPopupMenu *menu=KTextEdit::createPopupMenu(pos);
menu->removeItemAt(menu->count()-1);
menu->removeItemAt(menu->count()-1);
return menu;
}
-QString IRCInput::text() const
+TQString IRCInput::text() const
{
#if RICHTEXT == 1
- QString content=KTextEdit::text();
+ TQString content=KTextEdit::text();
- QDomDocument document;
+ TQDomDocument document;
document.setContent(content,false);
- QDomNodeList nodes=document.elementsByTagName("p");
+ TQDomNodeList nodes=document.elementsByTagName("p");
if(nodes.count())
{
- QDomElement node=nodes.item(0).toElement();
+ TQDomElement node=nodes.item(0).toElement();
return node.text();
}
- return QString();
+ return TQString();
#else
return KTextEdit::text();
#endif
}
-void IRCInput::setText(const QString& text)
+void IRCInput::setText(const TQString& text)
{
// reimplemented to set cursor at the end of the new text
KTextEdit::setText(text);
@@ -193,13 +193,13 @@ void IRCInput::setText(const QString& text)
// FIXME - find a better way to do this. eventfilters introduce nebulous behaviour
//take text events from IRCView and TopicLabel
-bool IRCInput::eventFilter(QObject *object,QEvent *event)
+bool IRCInput::eventFilter(TQObject *object,TQEvent *event)
{
if (object->isA("IRCView") || object->isA("Konversation::TopicLabel"))
{
- if (event->type() == QEvent::KeyPress)
+ if (event->type() == TQEvent::KeyPress)
{
- QKeyEvent* ke = static_cast<QKeyEvent*>(event);
+ TQKeyEvent* ke = static_cast<TQKeyEvent*>(event);
// Allow tab to be handled naturally by the widget.
// Once it runs out of links it goes to the next control.
@@ -219,7 +219,7 @@ bool IRCInput::eventFilter(QObject *object,QEvent *event)
}
// Take care of Tab, Cursor and so on
-void IRCInput::keyPressEvent(QKeyEvent* e)
+void IRCInput::keyPressEvent(TQKeyEvent* e)
{
switch(e->key())
{
@@ -296,7 +296,7 @@ void IRCInput::keyPressEvent(QKeyEvent* e)
KTextEdit::keyPressEvent(e);
}
-void IRCInput::addHistory(const QString& line)
+void IRCInput::addHistory(const TQString& line)
{
// Only add line if it's not the same as the last was
if(historyList[1]!=line)
@@ -304,7 +304,7 @@ void IRCInput::addHistory(const QString& line)
// Replace empty first entry with line
historyList[0]=line;
// Add new empty entry to history
- historyList.prepend(QString());
+ historyList.prepend(TQString());
// Remove oldest line in history, if the list grows beyond MAXHISTORY
if(historyList.count()>MAXHISTORY) historyList.remove(historyList.last());
}
@@ -344,10 +344,10 @@ void IRCInput::getHistory(bool up)
}
/**
- * Work around the fact that while QTextEdit::paste() is virtual, whether we are
+ * Work around the fact that while TQTextEdit::paste() is virtual, whether we are
* pasting from middle button or control-V is PRIVATE and NO ACCESSOR is given.
*/
-void IRCInput::contentsMouseReleaseEvent( QMouseEvent *ev)
+void IRCInput::contentsMouseReleaseEvent( TQMouseEvent *ev)
{
if (ev->button() == Qt::MidButton)
{
@@ -375,7 +375,7 @@ void IRCInput::paste()
setFocus();
// Copy text from the clipboard (paste)
- QString pasteText;
+ TQString pasteText;
if(m_useSelection)
{
pasteText = cb->text( QClipboard::Selection);
@@ -400,11 +400,11 @@ void IRCInput::paste()
while(pasteText.contains("\n\n"))
pasteText.replace("\n\n","\n");
- QRegExp reTopSpace("^ *\n");
+ TQRegExp reTopSpace("^ *\n");
while(pasteText.contains(reTopSpace))
pasteText.remove(reTopSpace);
- QRegExp reBottomSpace("\n *$");
+ TQRegExp reBottomSpace("\n *$");
while(pasteText.contains(reBottomSpace))
pasteText.remove(reBottomSpace);
@@ -463,7 +463,7 @@ void IRCInput::paste()
}
}
-bool IRCInput::checkPaste(QString& text)
+bool IRCInput::checkPaste(TQString& text)
{
int doPaste=KMessageBox::Yes;
@@ -486,7 +486,7 @@ bool IRCInput::checkPaste(QString& text)
if (doPaste==KMessageBox::No)
{
- QString ret(MultilineEdit::edit(this,text));
+ TQString ret(MultilineEdit::edit(this,text));
if (ret.isEmpty())
return false;
text=ret;
@@ -496,13 +496,13 @@ bool IRCInput::checkPaste(QString& text)
return (doPaste==KMessageBox::Yes);
}
-void IRCInput::showCompletionList(const QStringList& nicks)
+void IRCInput::showCompletionList(const TQStringList& nicks)
{
completionBox->setItems(nicks);
completionBox->popup();
}
-void IRCInput::insertCompletion(const QString& nick)
+void IRCInput::insertCompletion(const TQString& nick)
{
int pos; // = cursorPosition();
int oldPos; // = cursorPosition();
@@ -510,7 +510,7 @@ void IRCInput::insertCompletion(const QString& nick)
getCursorPosition(&oldPos,&pos);
oldPos=pos;
- QString line = text();
+ TQString line = text();
while(pos && line[pos-1] != ' ') pos--;
@@ -519,7 +519,7 @@ void IRCInput::insertCompletion(const QString& nick)
// did we find the nick in the middle of the line?
if(pos)
{
- QString addMiddle(Preferences::nickCompleteSuffixMiddle());
+ TQString addMiddle(Preferences::nickCompleteSuffixMiddle());
line.insert(pos, nick + addMiddle);
pos += nick.length() + addMiddle.length();
}
@@ -527,7 +527,7 @@ void IRCInput::insertCompletion(const QString& nick)
else
{
setLastCompletion(nick);
- QString addStart(Preferences::nickCompleteSuffixStart());
+ TQString addStart(Preferences::nickCompleteSuffixStart());
line.insert(pos, nick + addStart);
pos += nick.length() + addStart.length();
}
@@ -536,7 +536,7 @@ void IRCInput::insertCompletion(const QString& nick)
setCursorPosition(0,pos);
}
-void IRCInput::setLastCompletion(const QString& completion)
+void IRCInput::setLastCompletion(const TQString& completion)
{
m_lastCompletion = completion;
}
diff --git a/konversation/src/ircinput.h b/konversation/src/ircinput.h
index 85e42c1..a878d4b 100644
--- a/konversation/src/ircinput.h
+++ b/konversation/src/ircinput.h
@@ -15,77 +15,77 @@
#ifndef IRCINPUT_H
#define IRCINPUT_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <ktextedit.h>
class KCompletionBox;
-class QMouseEvent;
+class TQMouseEvent;
class IRCInput : public KTextEdit
{
Q_OBJECT
public:
- explicit IRCInput(QWidget* parent);
+ explicit IRCInput(TQWidget* parent);
~IRCInput();
void setCompletionMode(char mode);
char getCompletionMode();
void setOldCursorPosition(int pos);
int getOldCursorPosition();
- QString lastCompletion() const { return m_lastCompletion; }
+ TQString lastCompletion() const { return m_lastCompletion; }
- virtual QSize sizeHint() const;
- QString text() const;
+ virtual TQSize sizeHint() const;
+ TQString text() const;
signals:
void nickCompletion();
void endCompletion(); // tell channel that completion phase is over
void history(bool up);
- void textPasted(const QString& text);
+ void textPasted(const TQString& text);
void submit();
void envelopeCommand();
public slots:
void paste();
void paste(bool useSelection);
- void showCompletionList(const QStringList& nicks);
- void setText(const QString& text);
- void setLastCompletion(const QString& completion);
+ void showCompletionList(const TQStringList& nicks);
+ void setText(const TQString& text);
+ void setLastCompletion(const TQString& completion);
virtual void setOverwriteMode(bool) { }
virtual void resizeContents( int w, int h );
virtual void updateAppearance();
protected slots:
void getHistory(bool up);
- void insertCompletion(const QString& nick);
+ void insertCompletion(const TQString& nick);
void disableSpellChecking();
- virtual void slotSpellCheckDone(const QString& s);
+ virtual void slotSpellCheckDone(const TQString& s);
protected:
- bool eventFilter(QObject *object,QEvent *event);
- void addHistory(const QString& text);
- bool checkPaste(QString& text);
- void contentsMouseReleaseEvent(QMouseEvent *);
+ bool eventFilter(TQObject *object,TQEvent *event);
+ void addHistory(const TQString& text);
+ bool checkPaste(TQString& text);
+ void contentsMouseReleaseEvent(TQMouseEvent *);
- virtual void keyPressEvent(QKeyEvent* e);
- virtual QPopupMenu *createPopupMenu( const QPoint& pos );
- virtual void showEvent(QShowEvent* e);
- virtual void hideEvent(QHideEvent* e);
+ virtual void keyPressEvent(TQKeyEvent* e);
+ virtual TQPopupMenu *createPopupMenu( const TQPoint& pos );
+ virtual void showEvent(TQShowEvent* e);
+ virtual void hideEvent(TQHideEvent* e);
- QStringList historyList;
+ TQStringList historyList;
unsigned int lineNum;
unsigned int oldPos;
char completionMode;
KCompletionBox* completionBox;
- QString m_lastCompletion;
+ TQString m_lastCompletion;
bool m_useSelection;
bool m_multiRow;
int m_lastHeight; //essentially corresponds to qtextbrowser::doc->height()
int m_qtBoxPadding; //see comment in constructor
- QTimer* m_disableSpellCheckTimer;
+ TQTimer* m_disableSpellCheckTimer;
};
#endif
diff --git a/konversation/src/ircqueue.cpp b/konversation/src/ircqueue.cpp
index c80ceca..a955d01 100644
--- a/konversation/src/ircqueue.cpp
+++ b/konversation/src/ircqueue.cpp
@@ -9,9 +9,9 @@
Copyright (C) 2008 Eli J. MacKenzie <argonel at gmail.com>
*/
-#include <qdatetime.h>
-#include <qtimer.h>
-#include <qstring.h>
+#include <tqdatetime.h>
+#include <tqtimer.h>
+#include <tqstring.h>
#include "ircqueue.h"
#include "server.h"
@@ -65,12 +65,12 @@ IRCQueue::IRCQueue(Server *server, EmptyingRate& rate, int ind) :
m_bytesSent(0), m_globalBytesSent(0), m_lastWait(0), m_myIndex(ind)
{
//KX << _S(m_rate.m_rate) << _S(m_rate.m_interval) << _S(m_rate.m_type) << endl;
- m_timer=new QTimer(this);
- connect(m_timer, SIGNAL(timeout()), SLOT(sendNow()));
+ m_timer=new TQTimer(this);
+ connect(m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(sendNow()));
if (server)
{
- connect(server, SIGNAL(serverOnline(bool)), SLOT(serverOnline(bool)));
- connect(server, SIGNAL(sentStat(int, int, IRCQueue*)), SLOT(sent(int, int, IRCQueue*)));
+ connect(server, TQT_SIGNAL(serverOnline(bool)), TQT_SLOT(serverOnline(bool)));
+ connect(server, TQT_SIGNAL(sentStat(int, int, IRCQueue*)), TQT_SLOT(sent(int, int, IRCQueue*)));
m_blocked=!(m_server->isConnected());
}
}
@@ -80,15 +80,15 @@ IRCQueue::~IRCQueue()
kdDebug() << "~IRCQueue" << endl;
}
-QString IRCQueue::pop()
+TQString IRCQueue::pop()
{
if (m_pending.isEmpty())
- return QString("");
+ return TQString("");
IRCMessage msg=m_pending.first();
m_pending.pop_front();
m_lastWait=msg.age();
- m_lastSent=QTime::currentTime();
+ m_lastSent=TQTime::currentTime();
return msg.text();
}
@@ -136,7 +136,7 @@ void IRCQueue::sent(int, int e, IRCQueue *wq)
}
}
-void IRCQueue::enqueue(QString line)
+void IRCQueue::enqueue(TQString line)
{
m_pending.append(IRCMessage(line));
if (!m_timer->isActive())
@@ -161,7 +161,7 @@ bool IRCQueue::doSend()
if (p)
{
// int plw = m_lastWait;
- QString s=pop();
+ TQString s=pop();
//if (m_myIndex == 0)
// KX << _S(plw) << _S(m_lastWait) << endl;
m_server->toServer(s, this);
@@ -179,7 +179,7 @@ void IRCQueue::reset()
if (m_server)
m_blocked=!(m_server->isConnected()); //FIXME (maybe) "we can't do this anymore because blocked can't correspond to whether the server is online, instead must correspond to whether the socket has become writable (readyWrite)"
- m_startedAt=m_globalLastSent=m_lastSent=QTime();
+ m_startedAt=m_globalLastSent=m_lastSent=TQTime();
m_pending.clear();
m_linesSent=m_bytesSent=m_globalBytesSent=m_globalLinesSent=0;
}
diff --git a/konversation/src/ircqueue.h b/konversation/src/ircqueue.h
index c80c329..58b90ff 100644
--- a/konversation/src/ircqueue.h
+++ b/konversation/src/ircqueue.h
@@ -26,28 +26,28 @@ class Server;
*/
struct IRCMessage
{
- IRCMessage() : t(QTime::currentTime()) //, codec(QTextCodec::codecForName("utf8"))
- {} ///< this constructor required for QValueList, do not use
+ IRCMessage() : t(TQTime::currentTime()) //, codec(TQTextCodec::codecForName("utf8"))
+ {} ///< this constructor required for TQValueList, do not use
/**
- Make a new IRCMessage with timestamp of QTime::currentTime().
+ Make a new IRCMessage with timestamp of TQTime::currentTime().
- Note the constructor takes a QString, not a const QString& or a QString *. If you want to modify the
+ Note the constructor takes a TQString, not a const TQString& or a TQString *. If you want to modify the
contained text, put it back with setText.
*/
- IRCMessage(QString i) : s(i), t(QTime::currentTime()) //, codec(QTextCodec::codecForName("utf8"))
+ IRCMessage(TQString i) : s(i), t(TQTime::currentTime()) //, codec(TQTextCodec::codecForName("utf8"))
{}
- QString text() { return s; }
+ TQString text() { return s; }
int age() { return t.elapsed(); }
- QTime time() { return t; }
- void setText(QString text) { s=text; }
+ TQTime time() { return t; }
+ void setText(TQString text) { s=text; }
private:
- QString s;
- QTime t;
+ TQString s;
+ TQTime t;
//FIXME wire this up
- //QTextCodec* codec;
+ //TQTextCodec* codec;
//operator const char * () const { return codec->fromUnicode(text()); }
};
@@ -86,7 +86,7 @@ public:
IRCQueue(Server *server, EmptyingRate& rate, int myindex=0);
~IRCQueue();
- void enqueue(QString line);
+ void enqueue(TQString line);
void reset();
EmptyingRate& getRate();// { return &m_rate; }
@@ -112,20 +112,20 @@ public slots:
void serverOnline(bool on); ///< server tells us that the socket is ready
protected:
- QString pop(); ///< pops front, sets statistics
+ TQString pop(); ///< pops front, sets statistics
void adjustTimer(); ///< sets the next timer interval
bool doSend(); ///< pops front and tells the server to send it. returns true if we sent something
EmptyingRate& m_rate;
private:
- QValueList<IRCMessage> m_pending;
- QTimer *m_timer;
+ TQValueList<IRCMessage> m_pending;
+ TQTimer *m_timer;
bool m_blocked;
bool m_online;
Server *m_server;
- QTime m_startedAt;
- QTime m_lastSent, m_globalLastSent;
+ TQTime m_startedAt;
+ TQTime m_lastSent, m_globalLastSent;
int m_linesSent, m_globalLinesSent;
int m_bytesSent, m_globalBytesSent;
int m_lastWait;
diff --git a/konversation/src/ircview.cpp b/konversation/src/ircview.cpp
index 3b4108a..35611f0 100644
--- a/konversation/src/ircview.cpp
+++ b/konversation/src/ircview.cpp
@@ -28,20 +28,20 @@
#include "notificationhandler.h"
#include <private/qrichtext_p.h>
-#include <qstylesheet.h>
-#include <qstringlist.h>
-#include <qregexp.h>
-#include <qtextbrowser.h>
-#include <qclipboard.h>
-#include <qbrush.h>
-#include <qevent.h>
-#include <qdragobject.h>
-#include <qpopupmenu.h>
-#include <qwhatsthis.h>
-#include <qmap.h>
-#include <qcolor.h>
-#include <qscrollbar.h>
-#include <qcursor.h>
+#include <tqstylesheet.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
+#include <tqtextbrowser.h>
+#include <tqclipboard.h>
+#include <tqbrush.h>
+#include <tqevent.h>
+#include <tqdragobject.h>
+#include <tqpopupmenu.h>
+#include <tqwhatsthis.h>
+#include <tqmap.h>
+#include <tqcolor.h>
+#include <tqscrollbar.h>
+#include <tqcursor.h>
#include <dcopref.h>
#include <dcopclient.h>
@@ -68,7 +68,7 @@
#include <kglobal.h>
-IRCView::IRCView(QWidget* parent, Server* newServer) : KTextBrowser(parent)
+IRCView::IRCView(TQWidget* parent, Server* newServer) : KTextBrowser(parent)
{
m_copyUrlMenu = false;
m_resetScrollbar = true;
@@ -88,21 +88,21 @@ IRCView::IRCView(QWidget* parent, Server* newServer) : KTextBrowser(parent)
m_disableEnsureCursorVisible = false;
m_wasPainted = false;
- setAutoFormatting(QTextEdit::AutoNone);
+ setAutoFormatting(TQTextEdit::AutoNone);
setUndoRedoEnabled(0);
setLinkUnderline(false);
setVScrollBarMode(AlwaysOn);
setHScrollBarMode(AlwaysOff);
- setWrapPolicy(QTextEdit::AtWordOrDocumentBoundary);
+ setWrapPolicy(TQTextEdit::AtWordOrDocumentBoundary);
setNotifyClick(true);
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQWidget::ClickFocus);
// set basic style sheet for <p> to make paragraph spacing possible
- QStyleSheet* sheet=new QStyleSheet(this,"ircview_style_sheet");
- new QStyleSheetItem(sheet,"p");
+ TQStyleSheet* sheet=new TQStyleSheet(this,"ircview_style_sheet");
+ new TQStyleSheetItem(sheet,"p");
setStyleSheet(sheet);
- m_popup = new QPopupMenu(this,"ircview_context_menu");
+ m_popup = new TQPopupMenu(this,"ircview_context_menu");
toggleMenuBarSeparator = m_popup->insertSeparator();
m_popup->setItemVisible(toggleMenuBarSeparator, false);
copyUrlMenuSeparator = m_popup->insertSeparator();
@@ -113,7 +113,7 @@ IRCView::IRCView(QWidget* parent, Server* newServer) : KTextBrowser(parent)
setServer(newServer);
- setViewBackground(Preferences::color(Preferences::TextViewBackground),QString());
+ setViewBackground(Preferences::color(Preferences::TextViewBackground),TQString());
if (Preferences::customTextFont())
setFont(Preferences::textFont());
@@ -122,7 +122,7 @@ IRCView::IRCView(QWidget* parent, Server* newServer) : KTextBrowser(parent)
if (Preferences::useParagraphSpacing()) enableParagraphSpacing();
- connect(this, SIGNAL(highlighted(const QString&)), this, SLOT(highlightedSlot(const QString&)));
+ connect(this, TQT_SIGNAL(highlighted(const TQString&)), this, TQT_SLOT(highlightedSlot(const TQString&)));
}
IRCView::~IRCView()
@@ -133,11 +133,11 @@ IRCView::~IRCView()
void IRCView::enableParagraphSpacing()
{
// Set style sheet for <p> to define paragraph spacing.
- QStyleSheet* sheet = styleSheet();
+ TQStyleSheet* sheet = styleSheet();
if (!sheet) return;
- QStyleSheetItem* style = sheet->item("p");
+ TQStyleSheetItem* style = sheet->item("p");
if (!style)
{
@@ -146,14 +146,14 @@ void IRCView::enableParagraphSpacing()
return;
}
- style->setDisplayMode(QStyleSheetItem::DisplayBlock);
- style->setMargin(QStyleSheetItem::MarginVertical, Preferences::paragraphSpacing());
+ style->setDisplayMode(TQStyleSheetItem::DisplayBlock);
+ style->setMargin(TQStyleSheetItem::MarginVertical, Preferences::paragraphSpacing());
style->setSelfNesting(false);
}
-void IRCView::setViewBackground(const QColor& backgroundColor, const QString& pixmapName)
+void IRCView::setViewBackground(const TQColor& backgroundColor, const TQString& pixmapName)
{
- QPixmap backgroundPixmap;
+ TQPixmap backgroundPixmap;
backgroundPixmap.load(pixmapName);
if(backgroundPixmap.isNull())
@@ -162,7 +162,7 @@ void IRCView::setViewBackground(const QColor& backgroundColor, const QString& pi
}
else
{
- QBrush backgroundBrush;
+ TQBrush backgroundBrush;
backgroundBrush.setColor(backgroundColor);
backgroundBrush.setPixmap(backgroundPixmap);
setPaper(backgroundBrush);
@@ -184,26 +184,26 @@ void IRCView::setServer(Server* newServer)
}
-const QString& IRCView::getContextNick() const
+const TQString& IRCView::getContextNick() const
{
return m_currentNick;
}
void IRCView::clearContextNick()
{
- m_currentNick = QString();
+ m_currentNick = TQString();
}
void IRCView::clear()
{
- m_buffer = QString();
+ m_buffer = TQString();
KTextBrowser::setText("");
wipeLineParagraphs();
}
-void IRCView::highlightedSlot(const QString& _link)
+void IRCView::highlightedSlot(const TQString& _link)
{
- QString link = _link;
+ TQString link = _link;
// HACK Replace % with \x03 in the url to keep Qt from doing stupid things
link = link.replace ('\x03', "%");
//Hack to handle the fact that we get a decoded url
@@ -227,7 +227,7 @@ void IRCView::highlightedSlot(const QString& _link)
if (!m_lastStatusText.isEmpty())
{
emit clearStatusBarTempText();
- m_lastStatusText = QString();
+ m_lastStatusText = TQString();
}
} else
{
@@ -274,7 +274,7 @@ void IRCView::highlightedSlot(const QString& _link)
// link.startsWith("##")
m_currentChannel = link.mid(1);
- QString prettyId = m_currentChannel;
+ TQString prettyId = m_currentChannel;
if (prettyId.length()>15)
{
@@ -288,7 +288,7 @@ void IRCView::highlightedSlot(const QString& _link)
}
}
-void IRCView::openLink(const QString& url, bool newTab)
+void IRCView::openLink(const TQString& url, bool newTab)
{
if (!url.isEmpty() && !url.startsWith("#"))
{
@@ -301,9 +301,9 @@ void IRCView::openLink(const QString& url, bool newTab)
{
if(newTab && !url.startsWith("mailto:"))
{
- QCString foundApp, foundObj;
- QByteArray data;
- QDataStream str(data, IO_WriteOnly);
+ TQCString foundApp, foundObj;
+ TQByteArray data;
+ TQDataStream str(data, IO_WriteOnly);
if( KApplication::dcopClient()->findObject("konqueror*", "konqueror-mainwindow*",
"windowCanBeUsedForTab()", data, foundApp, foundObj, false, 3000))
{
@@ -316,10 +316,10 @@ void IRCView::openLink(const QString& url, bool newTab)
}
else
{
- QString cmd = Preferences::webBrowserCmd();
+ TQString cmd = Preferences::webBrowserCmd();
cmd.replace("%u", url);
KProcess *proc = new KProcess;
- QStringList cmdAndArgs = KShell::splitArgs(cmd);
+ TQStringList cmdAndArgs = KShell::splitArgs(cmd);
*proc << cmdAndArgs;
// This code will also work, but starts an extra shell process.
// kdDebug() << "IRCView::urlClickSlot(): cmd = " << cmd << endl;
@@ -332,36 +332,36 @@ void IRCView::openLink(const QString& url, bool newTab)
//FIXME: Don't do channel links in DCC Chats to begin with since they don't have a server.
else if (url.startsWith("##") && m_server && m_server->isConnected())
{
- QString channel(url);
+ TQString channel(url);
channel.replace("##", "#");
m_server->sendJoinCommand(channel);
}
//FIXME: Don't do user links in DCC Chats to begin with since they don't have a server.
else if (url.startsWith("#") && m_server && m_server->isConnected())
{
- QString recipient(url);
+ TQString recipient(url);
recipient.remove("#");
NickInfoPtr nickInfo = m_server->obtainNickInfo(recipient);
m_server->addQuery(nickInfo, true /*we initiated*/);
}
}
-void IRCView::replaceDecoration(QString& line, char decoration, char replacement)
+void IRCView::replaceDecoration(TQString& line, char decoration, char replacement)
{
int pos;
bool decorated = false;
while((pos=line.find(decoration))!=-1)
{
- line.replace(pos,1,(decorated) ? QString("</%1>").arg(replacement) : QString("<%1>").arg(replacement));
+ line.replace(pos,1,(decorated) ? TQString("</%1>").arg(replacement) : TQString("<%1>").arg(replacement));
decorated = !decorated;
}
}
-QString IRCView::filter(const QString& line, const QString& defaultColor, const QString& whoSent,
+TQString IRCView::filter(const TQString& line, const TQString& defaultColor, const TQString& whoSent,
bool doHighlight, bool parseURL, bool self)
{
- QString filteredLine(line);
+ TQString filteredLine(line);
KonversationApplication* konvApp = static_cast<KonversationApplication*>(kapp);
//Since we can't turn off whitespace simplification withouteliminating text wrapping,
@@ -371,7 +371,7 @@ bool doHighlight, bool parseURL, bool self)
if (filteredLine[0]==' ')
filteredLine[0]='\xA0';
- // TODO: Use QStyleSheet::escape() here
+ // TODO: Use TQStyleSheet::escape() here
// Replace all < with &lt;
filteredLine.replace("<","\x0blt;");
// Replace all > with &gt;
@@ -380,10 +380,10 @@ bool doHighlight, bool parseURL, bool self)
#if 0
if(!Preferences::disableExpansion())
{
- QRegExp boldRe("\\*\\*([a-zA-Z0-9]+)\\*\\*");
- QRegExp underRe("\\_\\_([a-zA-Z0-9]+)\\_\\_");
+ TQRegExp boldRe("\\*\\*([a-zA-Z0-9]+)\\*\\*");
+ TQRegExp underRe("\\_\\_([a-zA-Z0-9]+)\\_\\_");
int position = 0;
- QString replacement;
+ TQString replacement;
while( position >= 0)
{
@@ -422,22 +422,22 @@ bool doHighlight, bool parseURL, bool self)
// replace \003 and \017 codes with rich text color codes
// captures 1 2 23 4 4 3 1
- QRegExp colorRegExp("(\003([0-9]|0[0-9]|1[0-5]|)(,([0-9]|0[0-9]|1[0-5])|,|)|\017)");
+ TQRegExp colorRegExp("(\003([0-9]|0[0-9]|1[0-5]|)(,([0-9]|0[0-9]|1[0-5])|,|)|\017)");
int pos;
bool allowColors = Preferences::allowColorCodes();
bool firstColor = true;
- QString colorString;
+ TQString colorString;
while((pos=colorRegExp.search(filteredLine))!=-1)
{
if(!allowColors)
{
- colorString = QString();
+ colorString = TQString();
}
else
{
- colorString = (firstColor) ? QString::null : QString("</font>");
+ colorString = (firstColor) ? TQString::null : TQString("</font>");
// reset colors on \017 to default value
if(colorRegExp.cap(1) == "\017")
@@ -487,7 +487,7 @@ bool doHighlight, bool parseURL, bool self)
filteredLine = Konversation::EmotIcon::filter(filteredLine, fontMetrics());
// Highlight
- QString ownNick;
+ TQString ownNick;
if (m_server)
{
@@ -500,11 +500,11 @@ bool doHighlight, bool parseURL, bool self)
if(doHighlight && (whoSent != ownNick) && !self)
{
- QString highlightColor;
+ TQString highlightColor;
if(Preferences::highlightNick() &&
- filteredLine.lower().find(QRegExp("(^|[^\\d\\w])" +
- QRegExp::escape(ownNick.lower()) +
+ filteredLine.lower().find(TQRegExp("(^|[^\\d\\w])" +
+ TQRegExp::escape(ownNick.lower()) +
"([^\\d\\w]|$)")) != -1)
{
// highlight current nickname
@@ -513,18 +513,18 @@ bool doHighlight, bool parseURL, bool self)
}
else
{
- QPtrList<Highlight> highlightList = Preferences::highlightList();
- QPtrListIterator<Highlight> it(highlightList);
+ TQPtrList<Highlight> highlightList = Preferences::highlightList();
+ TQPtrListIterator<Highlight> it(highlightList);
Highlight* highlight = it.current();
bool patternFound = false;
int index = 0;
- QStringList captures;
+ TQStringList captures;
while(highlight)
{
if(highlight->getRegExp())
{
- QRegExp needleReg=highlight->getPattern();
+ TQRegExp needleReg=highlight->getPattern();
needleReg.setCaseSensitive(false);
// highlight regexp in text
patternFound = ((filteredLine.find(needleReg) != -1) ||
@@ -537,7 +537,7 @@ bool doHighlight, bool parseURL, bool self)
}
else
{
- QString needle=highlight->getPattern();
+ TQString needle=highlight->getPattern();
// highlight patterns in text
patternFound = ((filteredLine.find(needle, 0, false) != -1) ||
// highlight patterns in nickname
@@ -573,9 +573,9 @@ bool doHighlight, bool parseURL, bool self)
// replace %0 - %9 in regex groups
for(unsigned int capture=0;capture<captures.count();capture++)
{
- m_autoTextToSend.replace(QString("%%1").arg(capture),captures[capture]);
+ m_autoTextToSend.replace(TQString("%%1").arg(capture),captures[capture]);
}
- m_autoTextToSend.replace(QRegExp("%[0-9]"),QString());
+ m_autoTextToSend.replace(TQRegExp("%[0-9]"),TQString());
}
}
@@ -597,14 +597,14 @@ bool doHighlight, bool parseURL, bool self)
return filteredLine;
}
-QString IRCView::createNickLine(const QString& nick, bool encapsulateNick, bool privMsg)
+TQString IRCView::createNickLine(const TQString& nick, bool encapsulateNick, bool privMsg)
{
- QString nickLine = "%2";
+ TQString nickLine = "%2";
if(Preferences::useClickableNicks())
{
// HACK:Use space as a placeholder for \ as Qt tries to be clever and does a replace to / in urls in QTextEdit
- nickLine = "<a href=\"#" + QString(nick).replace('\\', " ") + "\">%2</a>";
+ nickLine = "<a href=\"#" + TQString(nick).replace('\\', " ") + "\">%2</a>";
}
if(privMsg)
@@ -617,7 +617,7 @@ QString IRCView::createNickLine(const QString& nick, bool encapsulateNick, bool
if(Preferences::useColoredNicks() && m_server)
{
- QString nickColor;
+ TQString nickColor;
if (nick != m_server->getNickname())
nickColor = Preferences::nickColor(m_server->obtainNickInfo(nick)->getNickColor()).name();
@@ -636,8 +636,8 @@ QString IRCView::createNickLine(const QString& nick, bool encapsulateNick, bool
// have a server.
else if (Preferences::useColoredNicks() && m_chatWin->getType() == ChatWindow::DccChat)
{
- QString ownNick = static_cast<DccChat*>(m_chatWin)->getOwnNick();
- QString nickColor;
+ TQString ownNick = static_cast<DccChat*>(m_chatWin)->getOwnNick();
+ TQString nickColor;
if (nick != ownNick)
{
@@ -667,21 +667,21 @@ QString IRCView::createNickLine(const QString& nick, bool encapsulateNick, bool
return nickLine;
}
-void IRCView::append(const QString& nick,const QString& message)
+void IRCView::append(const TQString& nick,const TQString& message)
{
- QString channelColor = Preferences::color(Preferences::ChannelMessage).name();
+ TQString channelColor = Preferences::color(Preferences::ChannelMessage).name();
if(channelColor == "#000000")
{
channelColor = "#000001"; // HACK Working around QTextBrowser's auto link coloring
}
- QString line;
+ TQString line;
m_tabNotification = Konversation::tnfNormal;
- QString nickLine = createNickLine(nick);
+ TQString nickLine = createNickLine(nick);
- if(basicDirection(message) == QChar::DirR)
+ if(basicDirection(message) == TQChar::DirR)
{
line = RLE;
line += LRE;
@@ -694,7 +694,7 @@ void IRCView::append(const QString& nick,const QString& message)
line = line.arg(timeStamp(), nick, filter(message, channelColor, nick, true));
- emit textToLog(QString("<%1>\t%2").arg(nick).arg(message));
+ emit textToLog(TQString("<%1>\t%2").arg(nick).arg(message));
doAppend(line);
}
@@ -723,8 +723,8 @@ void IRCView::appendRememberLine()
{
removeParagraph(m_rememberLineParagraph);
- QValueList<int> newList;
- QValueList<int>::ConstIterator it;
+ TQValueList<int> newList;
+ TQValueList<int>::ConstIterator it;
for (it = m_markerLineParagraphs.begin(); it != m_markerLineParagraphs.end(); ++it)
{
@@ -761,11 +761,11 @@ void IRCView::insertMarkerLine()
m_markerLineParagraphs.append(paragraphs() - 1);
}
-void IRCView::appendLine(const QString& color)
+void IRCView::appendLine(const TQString& color)
{
- QColor channelColor = Preferences::color(Preferences::ChannelMessage);
+ TQColor channelColor = Preferences::color(Preferences::ChannelMessage);
- QString line = "<p><font style=\"font-size:1pt;\"><br><br><hr color=\""+color+"\" noshade></font></p>\n";
+ TQString line = "<p><font style=\"font-size:1pt;\"><br><br><hr color=\""+color+"\" noshade></font></p>\n";
doAppend(line, true);
}
@@ -779,7 +779,7 @@ void IRCView::clearLines()
{
qHeapSort(m_markerLineParagraphs);
- QValueList<int>::ConstIterator it;
+ TQValueList<int>::ConstIterator it;
int removeCounter = 0;
for (it = m_markerLineParagraphs.begin(); it != m_markerLineParagraphs.end(); ++it)
@@ -811,9 +811,9 @@ void IRCView::updateLineParagraphs(int numRemoved)
if (!m_markerLineParagraphs.isEmpty())
{
- QValueList<int> newMarkerLineParagraphs;
+ TQValueList<int> newMarkerLineParagraphs;
- QValueList<int>::const_iterator it;
+ TQValueList<int>::const_iterator it;
for (it = m_markerLineParagraphs.begin(); it != m_markerLineParagraphs.end(); ++it)
{
@@ -831,39 +831,39 @@ void IRCView::wipeLineParagraphs()
m_rememberLineParagraph = -1;
}
-void IRCView::appendRaw(const QString& message, bool suppressTimestamps, bool self)
+void IRCView::appendRaw(const TQString& message, bool suppressTimestamps, bool self)
{
- QColor channelColor=Preferences::color(Preferences::ChannelMessage);
- QString line;
+ TQColor channelColor=Preferences::color(Preferences::ChannelMessage);
+ TQString line;
m_tabNotification = Konversation::tnfNone;
if(suppressTimestamps)
{
- line = QString("<p><font color=\"" + channelColor.name() + "\">" + message + "</font></p>\n");
+ line = TQString("<p><font color=\"" + channelColor.name() + "\">" + message + "</font></p>\n");
}
else
{
- line = QString("<p>" + timeStamp() + " <font color=\"" + channelColor.name() + "\">" + message + "</font></p>\n");
+ line = TQString("<p>" + timeStamp() + " <font color=\"" + channelColor.name() + "\">" + message + "</font></p>\n");
}
doAppend(line, self);
}
-void IRCView::appendQuery(const QString& nick, const QString& message, bool inChannel)
+void IRCView::appendQuery(const TQString& nick, const TQString& message, bool inChannel)
{
- QString queryColor=Preferences::color(Preferences::QueryMessage).name();
+ TQString queryColor=Preferences::color(Preferences::QueryMessage).name();
if(queryColor == "#000000")
{
queryColor = "#000001"; // HACK Working around QTextBrowser's auto link coloring
}
- QString line;
+ TQString line;
m_tabNotification = Konversation::tnfPrivate;
- QString nickLine = createNickLine(nick, true, inChannel);
+ TQString nickLine = createNickLine(nick, true, inChannel);
- if(basicDirection(message) == QChar::DirR)
+ if(basicDirection(message) == TQChar::DirR)
{
line = RLE;
line += LRE;
@@ -876,12 +876,12 @@ void IRCView::appendQuery(const QString& nick, const QString& message, bool inCh
line = line.arg(timeStamp(), nick, filter(message, queryColor, nick, true));
- emit textToLog(QString("<%1>\t%2").arg(nick).arg(message));
+ emit textToLog(TQString("<%1>\t%2").arg(nick).arg(message));
doAppend(line);
}
-void IRCView::appendChannelAction(const QString& nick,const QString& message)
+void IRCView::appendChannelAction(const TQString& nick,const TQString& message)
{
m_tabNotification = Konversation::tnfNormal;
@@ -889,24 +889,24 @@ void IRCView::appendChannelAction(const QString& nick,const QString& message)
}
-void IRCView::appendQueryAction(const QString& nick,const QString& message)
+void IRCView::appendQueryAction(const TQString& nick,const TQString& message)
{
m_tabNotification = Konversation::tnfPrivate;
appendAction(nick, message);
}
-void IRCView::appendAction(const QString& nick,const QString& message)
+void IRCView::appendAction(const TQString& nick,const TQString& message)
{
- QString actionColor=Preferences::color(Preferences::ActionMessage).name();
+ TQString actionColor=Preferences::color(Preferences::ActionMessage).name();
// HACK Working around QTextBrowser's auto link coloring
if (actionColor == "#000000") actionColor = "#000001";
- QString line;
- QString nickLine = createNickLine(nick, false);
+ TQString line;
+ TQString nickLine = createNickLine(nick, false);
- if (basicDirection(message) == QChar::DirR)
+ if (basicDirection(message) == TQChar::DirR)
{
line = RLE;
line += LRE;
@@ -919,27 +919,27 @@ void IRCView::appendAction(const QString& nick,const QString& message)
line = line.arg(timeStamp(), nick, filter(message, actionColor, nick, true));
- emit textToLog(QString("\t * %1 %2").arg(nick).arg(message));
+ emit textToLog(TQString("\t * %1 %2").arg(nick).arg(message));
doAppend(line);
}
-void IRCView::appendServerMessage(const QString& type, const QString& message, bool parseURL)
+void IRCView::appendServerMessage(const TQString& type, const TQString& message, bool parseURL)
{
- QString serverColor = Preferences::color(Preferences::ServerMessage).name();
+ TQString serverColor = Preferences::color(Preferences::ServerMessage).name();
m_tabNotification = Konversation::tnfControl;
// Fixed width font option for MOTD
- QString fixed;
+ TQString fixed;
if(Preferences::fixedMOTD() && !m_fontDataBase.isFixedPitch(font().family()))
{
if(type == i18n("MOTD"))
fixed=" face=\"" + KGlobalSettings::fixedFont().family() + "\"";
}
- QString line;
+ TQString line;
- if(basicDirection(message) == QChar::DirR)
+ if(basicDirection(message) == TQChar::DirR)
{
line = RLE;
line += LRE;
@@ -955,19 +955,19 @@ void IRCView::appendServerMessage(const QString& type, const QString& message, b
else
line = "<font color=\"" + serverColor + "\">"+line.arg(timeStamp(), type, message)+"</font>";
- emit textToLog(QString("%1\t%2").arg(type).arg(message));
+ emit textToLog(TQString("%1\t%2").arg(type).arg(message));
doAppend(line);
}
-void IRCView::appendCommandMessage(const QString& type,const QString& message, bool important, bool parseURL, bool self)
+void IRCView::appendCommandMessage(const TQString& type,const TQString& message, bool important, bool parseURL, bool self)
{
if (Preferences::hideUnimportantEvents() && !important)
return;
- QString commandColor = Preferences::color(Preferences::CommandMessage).name();
- QString line;
- QString prefix="***";
+ TQString commandColor = Preferences::color(Preferences::CommandMessage).name();
+ TQString line;
+ TQString prefix="***";
m_tabNotification = Konversation::tnfControl;
if(type == i18n("Join"))
@@ -980,9 +980,9 @@ void IRCView::appendCommandMessage(const QString& type,const QString& message, b
prefix="<--";
}
- prefix=QStyleSheet::escape(prefix);
+ prefix=TQStyleSheet::escape(prefix);
- if(basicDirection(message) == QChar::DirR)
+ if(basicDirection(message) == TQChar::DirR)
{
line = RLE;
line += LRE;
@@ -995,17 +995,17 @@ void IRCView::appendCommandMessage(const QString& type,const QString& message, b
line = line.arg(timeStamp(), prefix, filter(message, commandColor, 0, true, parseURL, self));
- emit textToLog(QString("%1\t%2").arg(type).arg(message));
+ emit textToLog(TQString("%1\t%2").arg(type).arg(message));
doAppend(line, self);
}
-void IRCView::appendBacklogMessage(const QString& firstColumn,const QString& rawMessage)
+void IRCView::appendBacklogMessage(const TQString& firstColumn,const TQString& rawMessage)
{
- QString time;
- QString message = rawMessage;
- QString nick = firstColumn;
- QString backlogColor = Preferences::color(Preferences::BacklogMessage).name();
+ TQString time;
+ TQString message = rawMessage;
+ TQString nick = firstColumn;
+ TQString backlogColor = Preferences::color(Preferences::BacklogMessage).name();
m_tabNotification = Konversation::tnfNone;
time = nick.section(' ', 0, 4);
@@ -1020,9 +1020,9 @@ void IRCView::appendBacklogMessage(const QString& firstColumn,const QString& raw
nick.replace("<","&lt;");
nick.replace(">","&gt;");
- QString line;
+ TQString line;
- if(basicDirection(message) == QChar::DirR)
+ if(basicDirection(message) == TQChar::DirR)
{
line = "<p><font color=\"" + backlogColor + "\">%2 %1 %3</font></p>\n";
}
@@ -1049,29 +1049,29 @@ void IRCView::removeSelectedText( int selNum )
}
// ...snip...
- doc->removeSelectedText( selNum, QTextEdit::textCursor() );
+ doc->removeSelectedText( selNum, TQTextEdit::textCursor() );
// ...snip...
}
void IRCView::scrollToBottom()
{
- // QTextEdit::scrollToBottom does sync() too, but we don't want it because its slow
+ // TQTextEdit::scrollToBottom does sync() too, but we don't want it because its slow
setContentsPos( contentsX(), contentsHeight() - visibleHeight() );
}
void IRCView::ensureCursorVisible()
{
if (!m_disableEnsureCursorVisible)
- QTextEdit::ensureCursorVisible();
+ TQTextEdit::ensureCursorVisible();
}
-void IRCView::doAppend(const QString& newLine, bool self)
+void IRCView::doAppend(const TQString& newLine, bool self)
{
if (m_rememberLineDirtyBit) appendRememberLine();
// Add line to buffer
- QString line(newLine);
+ TQString line(newLine);
if (!self && m_chatWin) m_chatWin->activateTabNotification(m_tabNotification);
@@ -1142,28 +1142,28 @@ void IRCView::doAppend(const QString& newLine, bool self)
if (!m_autoTextToSend.isEmpty() && m_server)
{
// replace placeholders in autoText
- QString sendText = m_server->parseWildcards(m_autoTextToSend,m_server->getNickname(),
- QString(), QString(), QString(), QString());
+ TQString sendText = m_server->parseWildcards(m_autoTextToSend,m_server->getNickname(),
+ TQString(), TQString(), TQString(), TQString());
// avoid recursion due to signalling
- m_autoTextToSend = QString();
+ m_autoTextToSend = TQString();
// send signal only now
emit autoText(sendText);
}
else
{
- m_autoTextToSend = QString();
+ m_autoTextToSend = TQString();
}
if (!m_lastStatusText.isEmpty()) emit clearStatusBarTempText();
}
// remember if scrollbar was positioned at the end of the text or not
-void IRCView::hideEvent(QHideEvent* /* event */) {
+void IRCView::hideEvent(TQHideEvent* /* event */) {
m_resetScrollbar = ((contentsHeight()-visibleHeight()) == contentsY());
}
// Workaround to scroll to the end of the TextView when it's shown
-void IRCView::showEvent(QShowEvent* event) {
+void IRCView::showEvent(TQShowEvent* event) {
Q_UNUSED(event);
// did the user scroll the view to the end of the text before hiding?
if (m_resetScrollbar)
@@ -1176,11 +1176,11 @@ void IRCView::showEvent(QShowEvent* event) {
}
}
-void IRCView::paintEvent(QPaintEvent* event)
+void IRCView::paintEvent(TQPaintEvent* event)
{
// HACK: if the widget is being painted for the first time, call
// showEvent() which will reset scrollback position as needed. It seems
- // that at the time this event is triggered, QTextEdit provides more
+ // that at the time this event is triggered, TQTextEdit provides more
// accurate information than when showEvent() is triggered.
if (!m_wasPainted)
{
@@ -1190,7 +1190,7 @@ void IRCView::paintEvent(QPaintEvent* event)
KTextBrowser::paintEvent(event);
}
-void IRCView::contentsMouseReleaseEvent(QMouseEvent *ev)
+void IRCView::contentsMouseReleaseEvent(TQMouseEvent *ev)
{
if (ev->button() == Qt::MidButton)
{
@@ -1206,7 +1206,7 @@ void IRCView::contentsMouseReleaseEvent(QMouseEvent *ev)
}
}
- if (ev->button() == QMouseEvent::LeftButton)
+ if (ev->button() == TQMouseEvent::LeftButton)
{
if (m_mousePressed)
{
@@ -1223,9 +1223,9 @@ void IRCView::contentsMouseReleaseEvent(QMouseEvent *ev)
KTextBrowser::contentsMouseReleaseEvent(ev);
}
-void IRCView::contentsMousePressEvent(QMouseEvent* ev)
+void IRCView::contentsMousePressEvent(TQMouseEvent* ev)
{
- if (ev->button() == QMouseEvent::LeftButton)
+ if (ev->button() == TQMouseEvent::LeftButton)
{
m_urlToDrag = m_highlightedURL;
@@ -1240,9 +1240,9 @@ void IRCView::contentsMousePressEvent(QMouseEvent* ev)
KTextBrowser::contentsMousePressEvent(ev);
}
-void IRCView::contentsMouseMoveEvent(QMouseEvent* ev)
+void IRCView::contentsMouseMoveEvent(TQMouseEvent* ev)
{
- if (m_mousePressed && (m_pressPosition - ev->pos()).manhattanLength() > QApplication::startDragDistance())
+ if (m_mousePressed && (m_pressPosition - ev->pos()).manhattanLength() > TQApplication::startDragDistance())
{
m_mousePressed = false;
removeSelection();
@@ -1251,7 +1251,7 @@ void IRCView::contentsMouseMoveEvent(QMouseEvent* ev)
if (m_server && m_urlToDrag.startsWith("##"))
{
//FIXME consistent IRC URL serialization
- ux = QString("irc://%1:%2/%3").arg(m_server->getServerName()).arg(m_server->getPort()).arg(m_urlToDrag.mid(2));
+ ux = TQString("irc://%1:%2/%3").arg(m_server->getServerName()).arg(m_server->getPort()).arg(m_urlToDrag.mid(2));
}
else if (m_urlToDrag.startsWith("#"))
{
@@ -1266,12 +1266,12 @@ void IRCView::contentsMouseMoveEvent(QMouseEvent* ev)
KTextBrowser::contentsMouseMoveEvent(ev);
}
-void IRCView::contentsContextMenuEvent(QContextMenuEvent* ev)
+void IRCView::contentsContextMenuEvent(TQContextMenuEvent* ev)
{
bool block = contextMenu(ev);
// HACK Replace % with \x03 in the url to keep Qt from doing stupid things
- m_highlightedURL = anchorAt(viewportToContents(mapFromGlobal(QCursor::pos())));
+ m_highlightedURL = anchorAt(viewportToContents(mapFromGlobal(TQCursor::pos())));
m_highlightedURL = m_highlightedURL.replace('\x03', "%");
// Hack to counter the fact that we're given an decoded url
m_highlightedURL = KURL::fromPathOrURL(m_highlightedURL).url();
@@ -1288,7 +1288,7 @@ void IRCView::contentsContextMenuEvent(QContextMenuEvent* ev)
KTextBrowser::contentsContextMenuEvent(ev);
}
-bool IRCView::contextMenu(QContextMenuEvent* ce)
+bool IRCView::contextMenu(TQContextMenuEvent* ce)
{
if (m_server && m_isOnNick && m_nickPopup->isEnabled())
{
@@ -1361,7 +1361,7 @@ bool IRCView::contextMenu(QContextMenuEvent* ce)
case Bookmark:
{
KBookmarkManager* bm = KBookmarkManager::userBookmarksManager();
- KBookmarkGroup bg = bm->addBookmarkDialog(m_urlToCopy, QString());
+ KBookmarkGroup bg = bm->addBookmarkDialog(m_urlToCopy, TQString());
bm->save();
bm->emitChanged(bg);
break;
@@ -1434,12 +1434,12 @@ void IRCView::setupNickPopupMenu()
m_nickPopup->insertItem(i18n("Add to Watched Nicks"), Konversation::AddNotify);
- connect(m_nickPopup, SIGNAL(activated(int)), this, SIGNAL(popupCommand(int)));
- connect(m_modes, SIGNAL(activated(int)), this, SIGNAL(popupCommand(int)));
- connect(m_kickban, SIGNAL(activated(int)), this, SIGNAL(popupCommand(int)));
+ connect(m_nickPopup, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(popupCommand(int)));
+ connect(m_modes, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(popupCommand(int)));
+ connect(m_kickban, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(popupCommand(int)));
}
-void IRCView::updateNickMenuEntries(QPopupMenu* popup, const QString& nickname)
+void IRCView::updateNickMenuEntries(TQPopupMenu* popup, const TQString& nickname)
{
if (popup)
{
@@ -1486,7 +1486,7 @@ void IRCView::setupQueryPopupMenu()
m_nickPopup->insertItem(i18n("Add to Watched Nicks"), Konversation::AddNotify);
- connect(m_nickPopup, SIGNAL(activated(int)), this, SIGNAL(popupCommand(int)));
+ connect(m_nickPopup, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(popupCommand(int)));
}
void IRCView::setupChannelPopupMenu()
@@ -1497,7 +1497,7 @@ void IRCView::setupChannelPopupMenu()
m_channelPopup->insertItem(i18n("Get &user list"),Konversation::Names);
m_channelPopup->insertItem(i18n("Get &topic"),Konversation::Topic);
- connect(m_channelPopup, SIGNAL(activated(int)), this, SIGNAL(popupCommand(int)));
+ connect(m_channelPopup, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(popupCommand(int)));
}
void IRCView::setNickAndChannelContextMenusEnabled(bool enable)
@@ -1551,7 +1551,7 @@ void IRCView::searchAgain()
}
}
-bool IRCView::search(const QString& pattern, bool caseSensitive,
+bool IRCView::search(const TQString& pattern, bool caseSensitive,
bool wholeWords, bool forward, bool fromCursor)
{
m_pattern = pattern;
@@ -1615,7 +1615,7 @@ bool IRCView::searchNext(bool reversed)
}
// other windows can link own menu entries here
-QPopupMenu* IRCView::getPopup() const
+TQPopupMenu* IRCView::getPopup() const
{
return m_popup;
}
@@ -1623,15 +1623,15 @@ QPopupMenu* IRCView::getPopup() const
// for more information about these RTFM
// http://www.unicode.org/reports/tr9/
// http://www.w3.org/TR/unicode-xml/
-QChar IRCView::LRM = (ushort)0x200e; // Right-to-Left Mark
-QChar IRCView::RLM = (ushort)0x200f; // Left-to-Right Mark
-QChar IRCView::LRE = (ushort)0x202a; // Left-to-Right Embedding
-QChar IRCView::RLE = (ushort)0x202b; // Right-to-Left Embedding
-QChar IRCView::RLO = (ushort)0x202e; // Right-to-Left Override
-QChar IRCView::LRO = (ushort)0x202d; // Left-to-Right Override
-QChar IRCView::PDF = (ushort)0x202c; // Previously Defined Format
-
-QChar::Direction IRCView::basicDirection(const QString &string)
+TQChar IRCView::LRM = (ushort)0x200e; // Right-to-Left Mark
+TQChar IRCView::RLM = (ushort)0x200f; // Left-to-Right Mark
+TQChar IRCView::LRE = (ushort)0x202a; // Left-to-Right Embedding
+TQChar IRCView::RLE = (ushort)0x202b; // Right-to-Left Embedding
+TQChar IRCView::RLO = (ushort)0x202e; // Right-to-Left Override
+TQChar IRCView::LRO = (ushort)0x202d; // Left-to-Right Override
+TQChar IRCView::PDF = (ushort)0x202c; // Previously Defined Format
+
+TQChar::Direction IRCView::basicDirection(const TQString &string)
{
// The following code decides between LTR or RTL direction for
// a line based on the amount of each type of characters pre-
@@ -1653,15 +1653,15 @@ QChar::Direction IRCView::basicDirection(const QString &string)
{
switch(string[pos].direction())
{
- case QChar::DirL:
- case QChar::DirLRO:
- case QChar::DirLRE:
+ case TQChar::DirL:
+ case TQChar::DirLRO:
+ case TQChar::DirLRE:
ltr_chars++;
break;
- case QChar::DirR:
- case QChar::DirAL:
- case QChar::DirRLO:
- case QChar::DirRLE:
+ case TQChar::DirR:
+ case TQChar::DirAL:
+ case TQChar::DirRLO:
+ case TQChar::DirRLE:
rtl_chars++;
break;
default:
@@ -1670,47 +1670,47 @@ QChar::Direction IRCView::basicDirection(const QString &string)
}
if (ltr_chars > str_half_len)
- return QChar::DirL;
+ return TQChar::DirL;
else if (rtl_chars > str_half_len)
- return QChar::DirR;
+ return TQChar::DirR;
}
if (rtl_chars > ltr_chars)
- return QChar::DirR;
+ return TQChar::DirR;
else
- return QChar::DirL;
+ return TQChar::DirL;
}
-void IRCView::contentsDragMoveEvent(QDragMoveEvent *e)
+void IRCView::contentsDragMoveEvent(TQDragMoveEvent *e)
{
- if(acceptDrops() && QUriDrag::canDecode(e))
+ if(acceptDrops() && TQUriDrag::canDecode(e))
e->accept();
}
-void IRCView::contentsDropEvent(QDropEvent *e)
+void IRCView::contentsDropEvent(TQDropEvent *e)
{
- QStrList s;
- if(QUriDrag::decode(e,s))
+ TQStrList s;
+ if(TQUriDrag::decode(e,s))
emit filesDropped(s);
}
-QString IRCView::timeStamp()
+TQString IRCView::timeStamp()
{
if(Preferences::timestamping())
{
- QTime time = QTime::currentTime();
- QString timeColor = Preferences::color(Preferences::Time).name();
- QString timeFormat = Preferences::timestampFormat();
- QString timeString;
+ TQTime time = TQTime::currentTime();
+ TQString timeColor = Preferences::color(Preferences::Time).name();
+ TQString timeFormat = Preferences::timestampFormat();
+ TQString timeString;
if(!Preferences::showDate())
{
- timeString = QString("<font color=\"" + timeColor + "\">[%1]</font> ").arg(time.toString(timeFormat));
+ timeString = TQString("<font color=\"" + timeColor + "\">[%1]</font> ").arg(time.toString(timeFormat));
}
else
{
- QDate date = QDate::currentDate();
- timeString = QString("<font color=\"" +
+ TQDate date = TQDate::currentDate();
+ timeString = TQString("<font color=\"" +
timeColor + "\">[%1 %2]</font> ")
.arg(KGlobal::locale()->formatDate(date, true /*short format*/),
time.toString(timeFormat));
@@ -1719,7 +1719,7 @@ QString IRCView::timeStamp()
return timeString;
}
- return QString();
+ return TQString();
}
void IRCView::setChatWin(ChatWindow* chatWin)
@@ -1734,7 +1734,7 @@ void IRCView::setChatWin(ChatWindow* chatWin)
setupChannelPopupMenu();
}
-void IRCView::keyPressEvent(QKeyEvent* e)
+void IRCView::keyPressEvent(TQKeyEvent* e)
{
KKey key(e);
@@ -1754,14 +1754,14 @@ void IRCView::keyPressEvent(QKeyEvent* e)
KTextBrowser::keyPressEvent(e);
}
-void IRCView::resizeEvent(QResizeEvent* e)
+void IRCView::resizeEvent(TQResizeEvent* e)
{
bool doScroll = ( KTextBrowser::verticalScrollBar()->value() == KTextBrowser::verticalScrollBar()->maxValue());
KTextBrowser::resizeEvent(e);
if(doScroll)
{
- QTimer::singleShot(0, this, SLOT(updateScrollBarPos()));
+ TQTimer::singleShot(0, this, TQT_SLOT(updateScrollBarPos()));
}
}
@@ -1771,14 +1771,14 @@ void IRCView::updateScrollBarPos()
repaintContents(false);
}
-void IRCView::saveLinkAs(const QString& url)
+void IRCView::saveLinkAs(const TQString& url)
{
KURL source(url);
- KFileDialog dialog(":SaveLinkAs", QString (), this, "savelinkdia", true);
+ KFileDialog dialog(":SaveLinkAs", TQString (), this, "savelinkdia", true);
dialog.setCaption(i18n("Save Link As"));
dialog.setSelection(source.fileName());
- if(dialog.exec() == QDialog::Rejected)
+ if(dialog.exec() == TQDialog::Rejected)
return;
KURL destination = dialog.selectedURL();
diff --git a/konversation/src/ircview.h b/konversation/src/ircview.h
index 39e3ff0..85b4f74 100644
--- a/konversation/src/ircview.h
+++ b/konversation/src/ircview.h
@@ -16,17 +16,17 @@
#include "common.h"
-#include <qmap.h>
-#include <qfontdatabase.h>
+#include <tqmap.h>
+#include <tqfontdatabase.h>
#include <ktextbrowser.h>
-class QPixmap;
-class QStrList;
-class QDropEvent;
-class QDragEnterEvent;
-class QEvent;
+class TQPixmap;
+class TQStrList;
+class TQDropEvent;
+class TQDragEnterEvent;
+class TQEvent;
class KPopupMenu;
@@ -39,19 +39,19 @@ class IRCView : public KTextBrowser
Q_OBJECT
public:
- IRCView(QWidget* parent,Server* newServer);
+ IRCView(TQWidget* parent,Server* newServer);
~IRCView();
void clear();
- void setViewBackground(const QColor& backgroundColor, const QString& pixmapName);
+ void setViewBackground(const TQColor& backgroundColor, const TQString& pixmapName);
void setServer(Server* server);
// Returns the current nick under context menu.
- const QString& getContextNick() const;
+ const TQString& getContextNick() const;
void enableParagraphSpacing();
- QPopupMenu* getPopup() const;
+ TQPopupMenu* getPopup() const;
enum PopupIDs
{
@@ -64,12 +64,12 @@ class IRCView : public KTextBrowser
void setChatWin(ChatWindow* chatWin);
- bool search(const QString& pattern, bool caseSensitive,
+ bool search(const TQString& pattern, bool caseSensitive,
bool wholeWords, bool forward, bool fromCursor);
bool searchNext(bool reversed = false);
- QColor highlightColor() { return m_highlightColor; }
- QString currentChannel() { return m_currentChannel; }
+ TQColor highlightColor() { return m_highlightColor; }
+ TQString currentChannel() { return m_currentChannel; }
void setNickAndChannelContextMenusEnabled(bool enable);
@@ -79,16 +79,16 @@ class IRCView : public KTextBrowser
signals:
// Notify container of new text and highlight state
void gotFocus(); // So we can set focus to input line
- void textToLog(const QString& text);
+ void textToLog(const TQString& text);
void sendFile();
void extendedPopup(int id);
- void autoText(const QString& text);
+ void autoText(const TQString& text);
void textPasted(bool useSelection);
void popupCommand(int);
- void filesDropped(const QStrList&);
+ void filesDropped(const TQStrList&);
void doSearch();
- void setStatusBarTempText(const QString&);
+ void setStatusBarTempText(const TQString&);
void clearStatusBarTempText();
public slots:
@@ -97,19 +97,19 @@ class IRCView : public KTextBrowser
void insertMarkerLine();
void clearLines();
- void append(const QString& nick, const QString& message);
- void appendRaw(const QString& message, bool suppressTimestamps=false, bool self = false);
- void appendQuery(const QString& nick, const QString& message, bool inChannel = false);
- void appendQueryAction(const QString& nick, const QString& message);
- void appendChannelAction(const QString& nick, const QString& message);
- void appendServerMessage(const QString& type, const QString& message, bool parseURL = true);
- void appendCommandMessage(const QString& command, const QString& message, bool important,
+ void append(const TQString& nick, const TQString& message);
+ void appendRaw(const TQString& message, bool suppressTimestamps=false, bool self = false);
+ void appendQuery(const TQString& nick, const TQString& message, bool inChannel = false);
+ void appendQueryAction(const TQString& nick, const TQString& message);
+ void appendChannelAction(const TQString& nick, const TQString& message);
+ void appendServerMessage(const TQString& type, const TQString& message, bool parseURL = true);
+ void appendCommandMessage(const TQString& command, const TQString& message, bool important,
bool parseURL=true, bool self=false);
- void appendBacklogMessage(const QString& firstColumn, const QString& message);
+ void appendBacklogMessage(const TQString& firstColumn, const TQString& message);
void search();
void searchAgain();
- void setCurrentChannel(const QString& channel) { m_currentChannel = channel; }
+ void setCurrentChannel(const TQString& channel) { m_currentChannel = channel; }
virtual void removeSelectedText(int selNum=0);
@@ -125,50 +125,50 @@ class IRCView : public KTextBrowser
virtual void ensureCursorVisible();
protected slots:
- void highlightedSlot(const QString& link);
- void saveLinkAs(const QString& url);
+ void highlightedSlot(const TQString& link);
+ void saveLinkAs(const TQString& url);
protected:
- void openLink(const QString &url, bool newTab=false);
- QString filter(const QString& line, const QString& defaultColor, const QString& who=NULL,
+ void openLink(const TQString &url, bool newTab=false);
+ TQString filter(const TQString& line, const TQString& defaultColor, const TQString& who=NULL,
bool doHighlight=true, bool parseURL=true, bool self=false);
- void appendAction(const QString& nick, const QString& message);
- void doAppend(const QString& line, bool self=false);
- void replaceDecoration(QString& line,char decoration,char replacement);
- virtual void contentsDragMoveEvent(QDragMoveEvent* e);
- virtual void contentsDropEvent(QDropEvent* e);
- virtual void contentsMouseReleaseEvent(QMouseEvent* ev);
- virtual void contentsMousePressEvent(QMouseEvent* ev);
- virtual void contentsMouseMoveEvent(QMouseEvent* ev);
- virtual void contentsContextMenuEvent(QContextMenuEvent* ev);
+ void appendAction(const TQString& nick, const TQString& message);
+ void doAppend(const TQString& line, bool self=false);
+ void replaceDecoration(TQString& line,char decoration,char replacement);
+ virtual void contentsDragMoveEvent(TQDragMoveEvent* e);
+ virtual void contentsDropEvent(TQDropEvent* e);
+ virtual void contentsMouseReleaseEvent(TQMouseEvent* ev);
+ virtual void contentsMousePressEvent(TQMouseEvent* ev);
+ virtual void contentsMouseMoveEvent(TQMouseEvent* ev);
+ virtual void contentsContextMenuEvent(TQContextMenuEvent* ev);
- virtual void keyPressEvent(QKeyEvent* e);
- virtual void resizeEvent(QResizeEvent* e);
+ virtual void keyPressEvent(TQKeyEvent* e);
+ virtual void resizeEvent(TQResizeEvent* e);
- void hideEvent(QHideEvent* event);
- void showEvent(QShowEvent* event);
- void paintEvent(QPaintEvent* event);
+ void hideEvent(TQHideEvent* event);
+ void showEvent(TQShowEvent* event);
+ void paintEvent(TQPaintEvent* event);
- bool contextMenu(QContextMenuEvent* ce);
+ bool contextMenu(TQContextMenuEvent* ce);
void setupNickPopupMenu();
- void updateNickMenuEntries(QPopupMenu* popup, const QString& nickname);
+ void updateNickMenuEntries(TQPopupMenu* popup, const TQString& nickname);
void setupQueryPopupMenu();
void setupChannelPopupMenu();
- QChar::Direction basicDirection(const QString &string);
+ TQChar::Direction basicDirection(const TQString &string);
- /// Returns a formated timestamp if timestamps are enabled else it returns QString::null
- QString timeStamp();
+ /// Returns a formated timestamp if timestamps are enabled else it returns TQString::null
+ TQString timeStamp();
/// Returns a formated nick string
- QString createNickLine(const QString& nick, bool encapsulateNick = true, bool privMsg = false);
+ TQString createNickLine(const TQString& nick, bool encapsulateNick = true, bool privMsg = false);
// used by search function
int m_findParagraph;
int m_findIndex;
- void appendLine(const QString& color);
+ void appendLine(const TQString& color);
void appendRememberLine();
void updateLineParagraphs(int numRemoved);
@@ -177,21 +177,21 @@ class IRCView : public KTextBrowser
int m_rememberLineParagraph;
bool m_rememberLineDirtyBit;
- QValueList<int> m_markerLineParagraphs;
+ TQValueList<int> m_markerLineParagraphs;
// This is set to what we last sent status text to the statusbar. Empty if we have sent clearStatusBarTempText() string
- QString m_lastStatusText;
+ TQString m_lastStatusText;
// decide if we should place the scrollbar at the bottom on show()
bool m_resetScrollbar;
- QString m_autoTextToSend;
+ TQString m_autoTextToSend;
Konversation::TabNotifyType m_tabNotification;
bool m_copyUrlMenu;
- QString m_urlToCopy;
+ TQString m_urlToCopy;
- QString m_buffer;
+ TQString m_buffer;
Server* m_server;
- QPopupMenu* m_popup;
+ TQPopupMenu* m_popup;
int toggleMenuBarSeparator;
int copyUrlMenuSeparator;
KPopupMenu* m_nickPopup;
@@ -199,36 +199,36 @@ class IRCView : public KTextBrowser
KPopupMenu* m_modes;
KPopupMenu* m_kickban;
- static QChar LRM;
- static QChar RLM;
- static QChar LRE;
- static QChar RLE;
- static QChar RLO;
- static QChar LRO;
- static QChar PDF;
+ static TQChar LRM;
+ static TQChar RLM;
+ static TQChar LRE;
+ static TQChar RLE;
+ static TQChar RLO;
+ static TQChar LRO;
+ static TQChar PDF;
bool m_caseSensitive;
bool m_wholeWords;
bool m_forward;
bool m_fromCursor;
- QString m_pattern;
- QColor m_highlightColor;
+ TQString m_pattern;
+ TQColor m_highlightColor;
uint m_offset;
- QStringList m_colorList;
+ TQStringList m_colorList;
- QString m_highlightedURL; // the URL we're currently hovering on with the mouse
- QString m_currentNick;
- QString m_currentChannel;
+ TQString m_highlightedURL; // the URL we're currently hovering on with the mouse
+ TQString m_currentNick;
+ TQString m_currentChannel;
bool m_isOnNick;
bool m_isOnChannel;
bool m_mousePressed;
- QString m_urlToDrag;
- QPoint m_pressPosition;
+ TQString m_urlToDrag;
+ TQPoint m_pressPosition;
int m_nickPopupId;
int m_channelPopupId;
- QFontDatabase m_fontDataBase;
+ TQFontDatabase m_fontDataBase;
// Provide ability to disable parent ensureCursorVisible() call
bool m_disableEnsureCursorVisible;
diff --git a/konversation/src/ircviewbox.cpp b/konversation/src/ircviewbox.cpp
index 817f7d9..24401dd 100644
--- a/konversation/src/ircviewbox.cpp
+++ b/konversation/src/ircviewbox.cpp
@@ -16,32 +16,32 @@
#include <klocale.h>
#include <kapplication.h>
#include <kiconloader.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
-static QPixmap getIcon(const QString& name)
+static TQPixmap getIcon(const TQString& name)
{
KIconLoader* iconLoader = kapp->iconLoader();
return iconLoader->loadIcon(name, KIcon::Toolbar, 16);
}
-IRCViewBox::IRCViewBox(QWidget* parent, Server* newServer)
-: QVBox(parent)
+IRCViewBox::IRCViewBox(TQWidget* parent, Server* newServer)
+: TQVBox(parent)
{
m_ircView = new IRCView(this, newServer);
m_searchBar = new SearchBar(this);
m_searchBar->hide();
m_matchedOnce = false;
- connect(m_searchBar, SIGNAL(signalSearchChanged(const QString&)),
- this, SLOT(slotSearchChanged(const QString&)));
- connect(m_searchBar, SIGNAL(signalSearchNext()),
- this, SLOT(slotSearchNext()));
- connect(m_searchBar, SIGNAL(signalSearchPrevious()),
- this, SLOT(slotSearchPrevious()));
- connect(m_ircView, SIGNAL(doSearch()),
- SLOT(slotSearch()));
- connect(m_searchBar, SIGNAL(hidden()), m_ircView, SIGNAL(gotFocus()));
+ connect(m_searchBar, TQT_SIGNAL(signalSearchChanged(const TQString&)),
+ this, TQT_SLOT(slotSearchChanged(const TQString&)));
+ connect(m_searchBar, TQT_SIGNAL(signalSearchNext()),
+ this, TQT_SLOT(slotSearchNext()));
+ connect(m_searchBar, TQT_SIGNAL(signalSearchPrevious()),
+ this, TQT_SLOT(slotSearchPrevious()));
+ connect(m_ircView, TQT_SIGNAL(doSearch()),
+ TQT_SLOT(slotSearch()));
+ connect(m_searchBar, TQT_SIGNAL(hidden()), m_ircView, TQT_SIGNAL(gotFocus()));
}
IRCViewBox::~IRCViewBox()
@@ -84,7 +84,7 @@ void IRCViewBox::searchNext(bool reversed)
if (match)
{
m_searchBar->setHasMatch(true);
- m_searchBar->setStatus(QPixmap(), "");
+ m_searchBar->setStatus(TQPixmap(), "");
return;
}
@@ -115,7 +115,7 @@ void IRCViewBox::searchNext(bool reversed)
i18n("Wrapped search"));
}
-void IRCViewBox::slotSearchChanged(const QString& pattern)
+void IRCViewBox::slotSearchChanged(const TQString& pattern)
{
bool match = m_ircView->search(pattern,
m_searchBar->caseSensitive(),
@@ -126,7 +126,7 @@ void IRCViewBox::slotSearchChanged(const QString& pattern)
if (match)
{
m_searchBar->setHasMatch(true);
- m_searchBar->setStatus(QPixmap(), "");
+ m_searchBar->setStatus(TQPixmap(), "");
}
else
{
diff --git a/konversation/src/ircviewbox.h b/konversation/src/ircviewbox.h
index 321e293..e9b12f3 100644
--- a/konversation/src/ircviewbox.h
+++ b/konversation/src/ircviewbox.h
@@ -12,7 +12,7 @@
#ifndef IRCVIEWBOX_H
#define IRCVIEWBOX_H
-#include <qvbox.h>
+#include <tqvbox.h>
class IRCView;
@@ -25,7 +25,7 @@ class IRCViewBox : public QVBox
public:
- IRCViewBox(QWidget* parent, Server* newServer);
+ IRCViewBox(TQWidget* parent, Server* newServer);
~IRCViewBox();
IRCView* ircView() const;
@@ -35,7 +35,7 @@ class IRCViewBox : public QVBox
void slotSearch();
void slotSearchNext();
void slotSearchPrevious();
- void slotSearchChanged(const QString& pattern);
+ void slotSearchChanged(const TQString& pattern);
protected:
void searchNext(bool reversed = false);
diff --git a/konversation/src/joinchanneldialog.cpp b/konversation/src/joinchanneldialog.cpp
index 4799da2..d50eb8c 100644
--- a/konversation/src/joinchanneldialog.cpp
+++ b/konversation/src/joinchanneldialog.cpp
@@ -15,7 +15,7 @@
#include "channel.h"
#include "servergroupsettings.h"
-#include <qlabel.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kcombobox.h>
@@ -25,7 +25,7 @@
namespace Konversation
{
- JoinChannelDialog::JoinChannelDialog(Server* server, QWidget *parent, const char *name)
+ JoinChannelDialog::JoinChannelDialog(Server* server, TQWidget *parent, const char *name)
: KDialogBase(parent, name, true, i18n("Join Channel on %1").arg(server->getDisplayName()), Ok|Cancel, Ok)
{
m_server = server;
@@ -38,8 +38,8 @@ namespace Konversation
{
ChannelList history = server->getServerGroup()->channelHistory();
ChannelList::iterator endIt = history.end();
- const QPtrList<Channel> &channels = server->getChannelList();
- QPtrListIterator<Channel> chanIt(channels);
+ const TQPtrList<Channel> &channels = server->getChannelList();
+ TQPtrListIterator<Channel> chanIt(channels);
Channel* chan = 0;
bool joined = false;
@@ -73,9 +73,9 @@ namespace Konversation
{
}
- QString JoinChannelDialog::channel() const
+ TQString JoinChannelDialog::channel() const
{
- QString channel = m_widget->channelCombo->currentText();
+ TQString channel = m_widget->channelCombo->currentText();
if(!m_server->isAChannel(channel))
{
@@ -85,7 +85,7 @@ namespace Konversation
return channel;
}
- QString JoinChannelDialog::password() const
+ TQString JoinChannelDialog::password() const
{
return m_widget->passwordEdit->text();
}
diff --git a/konversation/src/joinchanneldialog.h b/konversation/src/joinchanneldialog.h
index 7cad840..e997f34 100644
--- a/konversation/src/joinchanneldialog.h
+++ b/konversation/src/joinchanneldialog.h
@@ -26,11 +26,11 @@ namespace Konversation
{
Q_OBJECT
public:
- explicit JoinChannelDialog(Server* server, QWidget *parent = 0, const char *name = 0);
+ explicit JoinChannelDialog(Server* server, TQWidget *parent = 0, const char *name = 0);
~JoinChannelDialog();
- QString channel() const;
- QString password() const;
+ TQString channel() const;
+ TQString password() const;
protected slots:
virtual void slotOk();
diff --git a/konversation/src/konsolepanel.cpp b/konversation/src/konsolepanel.cpp
index 2fe5b99..5238e11 100644
--- a/konversation/src/konsolepanel.cpp
+++ b/konversation/src/konsolepanel.cpp
@@ -18,7 +18,7 @@
#include <klocale.h>
-KonsolePanel::KonsolePanel(QWidget *p) : ChatWindow( p ), k_part (0)
+KonsolePanel::KonsolePanel(TQWidget *p) : ChatWindow( p ), k_part (0)
{
setName(i18n("Konsole"));
setType(ChatWindow::Konsole);
@@ -28,12 +28,12 @@ KonsolePanel::KonsolePanel(QWidget *p) : ChatWindow( p ), k_part (0)
k_part = (KParts::ReadOnlyPart *) fact->create(this);
if (!k_part) return;
- k_part->widget()->setFocusPolicy(QWidget::WheelFocus);
+ k_part->widget()->setFocusPolicy(TQWidget::WheelFocus);
setFocusProxy(k_part->widget());
k_part->widget()->setFocus();
- connect(k_part, SIGNAL(destroyed()), this, SLOT(partDestroyed()));
- connect(k_part, SIGNAL(receivedData(const QString&)), this, SLOT(konsoleChanged(const QString&)));
+ connect(k_part, TQT_SIGNAL(destroyed()), this, TQT_SLOT(partDestroyed()));
+ connect(k_part, TQT_SIGNAL(receivedData(const TQString&)), this, TQT_SLOT(konsoleChanged(const TQString&)));
}
KonsolePanel::~KonsolePanel()
@@ -42,12 +42,12 @@ KonsolePanel::~KonsolePanel()
if ( k_part )
{
// make sure to prevent partDestroyed() signals from being sent
- disconnect(k_part, SIGNAL(destroyed()), this, SLOT(partDestroyed()));
+ disconnect(k_part, TQT_SIGNAL(destroyed()), this, TQT_SLOT(partDestroyed()));
delete k_part;
}
}
-QWidget* KonsolePanel::getWidget()
+TQWidget* KonsolePanel::getWidget()
{
if (k_part)
return k_part->widget();
@@ -67,7 +67,7 @@ void KonsolePanel::partDestroyed()
emit closeView(this);
}
-void KonsolePanel::konsoleChanged(const QString& /* data */)
+void KonsolePanel::konsoleChanged(const TQString& /* data */)
{
activateTabNotification(Konversation::tnfSystem);
}
diff --git a/konversation/src/konsolepanel.h b/konversation/src/konsolepanel.h
index ad9d1c0..3852291 100644
--- a/konversation/src/konsolepanel.h
+++ b/konversation/src/konsolepanel.h
@@ -22,12 +22,12 @@ class KonsolePanel : public ChatWindow
Q_OBJECT
public:
- explicit KonsolePanel(QWidget *p);
+ explicit KonsolePanel(TQWidget *p);
~KonsolePanel();
- virtual void setName(const QString& newName) { ChatWindow::setName(newName); }
+ virtual void setName(const TQString& newName) { ChatWindow::setName(newName); }
- QWidget* getWidget();
+ TQWidget* getWidget();
signals:
void closeView(ChatWindow* view);
@@ -39,7 +39,7 @@ class KonsolePanel : public ChatWindow
virtual void childAdjustFocus();
protected slots:
- void konsoleChanged(const QString& data);
+ void konsoleChanged(const TQString& data);
private:
KParts::ReadOnlyPart *k_part;
diff --git a/konversation/src/konvdcop.cpp b/konversation/src/konvdcop.cpp
index e7abda9..e0054af 100644
--- a/konversation/src/konvdcop.cpp
+++ b/konversation/src/konvdcop.cpp
@@ -26,25 +26,25 @@
#include <klocale.h>
-KonvDCOP::KonvDCOP() : DCOPObject("irc"), QObject(0, "irc")
+KonvDCOP::KonvDCOP() : DCOPObject("irc"), TQObject(0, "irc")
{
connectDCOPSignal("kdesktop", "KScreensaverIface", "KDE_start_screensaver()", "setScreenSaverStarted()", false);
connectDCOPSignal("kdesktop", "KScreensaverIface", "KDE_stop_screensaver()", "setScreenSaverStopped()", false);
}
-void KonvDCOP::raw(const QString& server,const QString& command)
+void KonvDCOP::raw(const TQString& server,const TQString& command)
{
kdDebug() << "KonvDCOP::raw()" << endl;
// send raw IRC protocol data
emit dcopRaw(server,command);
}
-QStringList KonvDCOP::listServers()
+TQStringList KonvDCOP::listServers()
{
KonversationApplication* konvApp = static_cast<KonversationApplication*>(kapp);
- QStringList hosts;
- QPtrList<Server> serverList = konvApp->getConnectionManager()->getServerList();
+ TQStringList hosts;
+ TQPtrList<Server> serverList = konvApp->getConnectionManager()->getServerList();
Server* server;
for (server = serverList.first(); server; server = serverList.next())
@@ -53,12 +53,12 @@ QStringList KonvDCOP::listServers()
return hosts;
}
-QStringList KonvDCOP::listConnectedServers()
+TQStringList KonvDCOP::listConnectedServers()
{
KonversationApplication* konvApp = static_cast<KonversationApplication*>(kapp);
- QStringList connectedHosts;
- QPtrList<Server> serverList = konvApp->getConnectionManager()->getServerList();
+ TQStringList connectedHosts;
+ TQPtrList<Server> serverList = konvApp->getConnectionManager()->getServerList();
Server* server;
for (server = serverList.first(); server; server = serverList.next())
@@ -67,7 +67,7 @@ QStringList KonvDCOP::listConnectedServers()
return connectedHosts;
}
-void KonvDCOP::setAway(const QString& awaymessage)
+void KonvDCOP::setAway(const TQString& awaymessage)
{
static_cast<KonversationApplication*>(kapp)->getAwayManager()->requestAllAway(awaymessage);
}
@@ -87,20 +87,20 @@ void KonvDCOP::setScreenSaverStopped()
static_cast<KonversationApplication*>(kapp)->getAwayManager()->setManagedIdentitiesUnaway();
}
-void KonvDCOP::sayToAll(const QString &message)
+void KonvDCOP::sayToAll(const TQString &message)
{
emit dcopMultiServerRaw("msg " + message);
}
-void KonvDCOP::actionToAll(const QString &message)
+void KonvDCOP::actionToAll(const TQString &message)
{
emit dcopMultiServerRaw("me " + message);
}
-void KonvDCOP::say(const QString& _server,const QString& _target,const QString& _command)
+void KonvDCOP::say(const TQString& _server,const TQString& _target,const TQString& _command)
{
- //Sadly, copy on write doesn't exist with QString::replace
- QString server(_server), target(_target), command(_command);
+ //Sadly, copy on write doesn't exist with TQString::replace
+ TQString server(_server), target(_target), command(_command);
// TODO: this just masks a greater problem - Server::addQuery will return a query for '' --argonel
// TODO: other DCOP calls need argument checking too --argonel
@@ -119,22 +119,22 @@ void KonvDCOP::say(const QString& _server,const QString& _target,const QString&
}
}
-void KonvDCOP::info(const QString& string)
+void KonvDCOP::info(const TQString& string)
{
kdDebug() << "KonvDCOP::info()" << endl;
emit dcopInfo(string);
}
-void KonvDCOP::debug(const QString& string)
+void KonvDCOP::debug(const TQString& string)
{
kdDebug() << "KonvDCOP::debug()" << endl;
- emit dcopInfo(QString("Debug: %1").arg(string));
+ emit dcopInfo(TQString("Debug: %1").arg(string));
}
-void KonvDCOP::error(const QString& string)
+void KonvDCOP::error(const TQString& string)
{
kdDebug() << "KonvDCOP::error()" << endl;
- emit dcopInfo(QString("Error: %1").arg(string));
+ emit dcopInfo(TQString("Error: %1").arg(string));
}
void KonvDCOP::insertMarkerLine()
@@ -142,25 +142,25 @@ void KonvDCOP::insertMarkerLine()
emit dcopInsertMarkerLine();
}
-void KonvDCOP::connectToServer(const QString& address, int port, const QString& channel, const QString& password)
+void KonvDCOP::connectToServer(const TQString& address, int port, const TQString& channel, const TQString& password)
{
- emit connectTo(Konversation::SilentlyReuseConnection, address, QString::number(port), password, "", channel);
+ emit connectTo(Konversation::SilentlyReuseConnection, address, TQString::number(port), password, "", channel);
}
-QString KonvDCOP::getNickname(const QString& serverName)
+TQString KonvDCOP::getNickname(const TQString& serverName)
{
Server* server = KonversationApplication::instance()->getConnectionManager()->getServerByName(serverName);
if (!server)
{
error( i18n( "getNickname: Server %1 is not found." ).arg( serverName ) );
- return QString();
+ return TQString();
}
return server->getNickname();
}
-QString KonvDCOP::getAnyNickname()
+TQString KonvDCOP::getAnyNickname()
{
KonversationApplication* konvApp = static_cast<KonversationApplication*>(kapp);
@@ -168,10 +168,10 @@ QString KonvDCOP::getAnyNickname()
if (server) return server->getNickname();
- return QString();
+ return TQString();
}
-QString KonvDCOP::getChannelEncoding(const QString& server, const QString& channel)
+TQString KonvDCOP::getChannelEncoding(const TQString& server, const TQString& channel)
{
return Preferences::channelEncoding(server,channel);
}
@@ -179,13 +179,13 @@ QString KonvDCOP::getChannelEncoding(const QString& server, const QString& chann
// Identity stuff
KonvIdentDCOP::KonvIdentDCOP()
: DCOPObject("identity"),
-QObject(0, "identity")
+TQObject(0, "identity")
{
}
-QStringList KonvIdentDCOP::listIdentities()
+TQStringList KonvIdentDCOP::listIdentities()
{
- QStringList identities;
+ TQStringList identities;
IdentityList ids = Preferences::identityList();
for(IdentityList::ConstIterator it = ids.begin(); it != ids.end(); ++it)
{
@@ -194,7 +194,7 @@ QStringList KonvIdentDCOP::listIdentities()
return identities;
}
-void KonvIdentDCOP::setrealName(const QString &id_name, const QString& name)
+void KonvIdentDCOP::setrealName(const TQString &id_name, const TQString& name)
{
IdentityList ids = Preferences::identityList();
@@ -209,7 +209,7 @@ void KonvIdentDCOP::setrealName(const QString &id_name, const QString& name)
}
-QString KonvIdentDCOP::getrealName(const QString &id_name)
+TQString KonvIdentDCOP::getrealName(const TQString &id_name)
{
IdentityList ids = Preferences::identityList();
@@ -221,137 +221,137 @@ QString KonvIdentDCOP::getrealName(const QString &id_name)
}
}
- return QString();
+ return TQString();
}
-void KonvIdentDCOP::setIdent(const QString &/*identity*/, const QString& /*ident*/)
+void KonvIdentDCOP::setIdent(const TQString &/*identity*/, const TQString& /*ident*/)
{
//Preferences::identityByName(identity)->.setIdent(;
}
-QString KonvIdentDCOP::getIdent(const QString &identity)
+TQString KonvIdentDCOP::getIdent(const TQString &identity)
{
return Preferences::identityByName(identity)->getIdent();
}
-void KonvIdentDCOP::setNickname(const QString &identity, int index,const QString& nick)
+void KonvIdentDCOP::setNickname(const TQString &identity, int index,const TQString& nick)
{
const Identity *i = Preferences::identityByName(identity);
const_cast<Identity *>(i)->setNickname(index, nick);
static_cast<KonversationApplication *>(kapp)->saveOptions(true);
}
-QString KonvIdentDCOP::getNickname(const QString &identity, int index)
+TQString KonvIdentDCOP::getNickname(const TQString &identity, int index)
{
return Preferences::identityByName(identity)->getNickname(index);
}
-void KonvIdentDCOP::setBot(const QString &identity, const QString& bot)
+void KonvIdentDCOP::setBot(const TQString &identity, const TQString& bot)
{
const Identity *i = Preferences::identityByName(identity);
const_cast<Identity *>(i)->setBot(bot);
static_cast<KonversationApplication *>(kapp)->saveOptions(true);
}
-QString KonvIdentDCOP::getBot(const QString &identity)
+TQString KonvIdentDCOP::getBot(const TQString &identity)
{
return Preferences::identityByName(identity)->getBot();
}
-void KonvIdentDCOP::setPassword(const QString &identity, const QString& password)
+void KonvIdentDCOP::setPassword(const TQString &identity, const TQString& password)
{
const Identity *i = Preferences::identityByName(identity);
const_cast<Identity *>(i)->setPassword(password);
static_cast<KonversationApplication *>(kapp)->saveOptions(true);
}
-QString KonvIdentDCOP::getPassword(const QString &identity)
+TQString KonvIdentDCOP::getPassword(const TQString &identity)
{
return Preferences::identityByName(identity)->getPassword();
}
-void KonvIdentDCOP::setNicknameList(const QString &identity, const QStringList& newList)
+void KonvIdentDCOP::setNicknameList(const TQString &identity, const TQStringList& newList)
{
const Identity *i = Preferences::identityByName(identity);
const_cast<Identity *>(i)->setNicknameList(newList);
static_cast<KonversationApplication *>(kapp)->saveOptions(true);
}
-QStringList KonvIdentDCOP::getNicknameList(const QString &identity)
+TQStringList KonvIdentDCOP::getNicknameList(const TQString &identity)
{
return Preferences::identityByName(identity)->getNicknameList();
}
-void KonvIdentDCOP::setQuitReason(const QString &identity, const QString& reason)
+void KonvIdentDCOP::setQuitReason(const TQString &identity, const TQString& reason)
{
const Identity *i = Preferences::identityByName(identity);
const_cast<Identity *>(i)->setQuitReason(reason);
static_cast<KonversationApplication *>(kapp)->saveOptions(true);
}
-QString KonvIdentDCOP::getQuitReason(const QString &identity)
+TQString KonvIdentDCOP::getQuitReason(const TQString &identity)
{
return Preferences::identityByName(identity)->getQuitReason();
}
-void KonvIdentDCOP::setPartReason(const QString &identity, const QString& reason)
+void KonvIdentDCOP::setPartReason(const TQString &identity, const TQString& reason)
{
const Identity *i = Preferences::identityByName(identity);
const_cast<Identity *>(i)->setPartReason(reason);
static_cast<KonversationApplication *>(kapp)->saveOptions(true);
}
-QString KonvIdentDCOP::getPartReason(const QString &identity)
+TQString KonvIdentDCOP::getPartReason(const TQString &identity)
{
return Preferences::identityByName(identity)->getPartReason();
}
-void KonvIdentDCOP::setKickReason(const QString &identity, const QString& reason)
+void KonvIdentDCOP::setKickReason(const TQString &identity, const TQString& reason)
{
const Identity *i = Preferences::identityByName(identity);
const_cast<Identity *>(i)->setKickReason(reason);
static_cast<KonversationApplication *>(kapp)->saveOptions(true);
}
-QString KonvIdentDCOP::getKickReason(const QString &identity)
+TQString KonvIdentDCOP::getKickReason(const TQString &identity)
{
return Preferences::identityByName(identity)->getKickReason();
}
-void KonvIdentDCOP::setShowAwayMessage(const QString &identity, bool state)
+void KonvIdentDCOP::setShowAwayMessage(const TQString &identity, bool state)
{
const Identity *i = Preferences::identityByName(identity);
const_cast<Identity *>(i)->setShowAwayMessage(state);
static_cast<KonversationApplication *>(kapp)->saveOptions(true);
}
-bool KonvIdentDCOP::getShowAwayMessage(const QString &identity)
+bool KonvIdentDCOP::getShowAwayMessage(const TQString &identity)
{
return Preferences::identityByName(identity)->getShowAwayMessage();
}
-void KonvIdentDCOP::setAwayMessage(const QString &identity, const QString& message)
+void KonvIdentDCOP::setAwayMessage(const TQString &identity, const TQString& message)
{
const Identity *i = Preferences::identityByName(identity);
const_cast<Identity *>(i)->setAwayMessage(message);
static_cast<KonversationApplication *>(kapp)->saveOptions(true);
}
-QString KonvIdentDCOP::getAwayMessage(const QString &identity)
+TQString KonvIdentDCOP::getAwayMessage(const TQString &identity)
{
- const QString f = Preferences::identityByName(identity)->getAwayMessage();
+ const TQString f = Preferences::identityByName(identity)->getAwayMessage();
return f;
}
-void KonvIdentDCOP::setReturnMessage(const QString &identity, const QString& message)
+void KonvIdentDCOP::setReturnMessage(const TQString &identity, const TQString& message)
{
const Identity *i = Preferences::identityByName(identity);
const_cast<Identity *>(i)->setReturnMessage(message);
static_cast<KonversationApplication *>(kapp)->saveOptions(true);
}
-QString KonvIdentDCOP::getReturnMessage(const QString &identity)
+TQString KonvIdentDCOP::getReturnMessage(const TQString &identity)
{
return Preferences::identityByName(identity)->getReturnMessage();
}
diff --git a/konversation/src/konvdcop.h b/konversation/src/konvdcop.h
index 3f513fb..7cb49a5 100644
--- a/konversation/src/konvdcop.h
+++ b/konversation/src/konvdcop.h
@@ -18,93 +18,93 @@
#include "konviface.h"
#include "common.h"
-#include <qobject.h>
+#include <tqobject.h>
#include <dcopobject.h>
-class KonvDCOP : public QObject, virtual public KonvIface
+class KonvDCOP : public TQObject, virtual public KonvIface
{
Q_OBJECT
public:
KonvDCOP();
- QString getNickname (const QString &server);
- QString getAnyNickname ();
- QString getChannelEncoding(const QString& server, const QString& channel);
+ TQString getNickname (const TQString &server);
+ TQString getAnyNickname ();
+ TQString getChannelEncoding(const TQString& server, const TQString& channel);
signals:
- void dcopSay(const QString& server,const QString& target,const QString& command);
- void dcopInfo(const QString& string);
+ void dcopSay(const TQString& server,const TQString& target,const TQString& command);
+ void dcopInfo(const TQString& string);
void dcopInsertMarkerLine();
- void dcopRaw(const QString& server, const QString& command);
- void dcopMultiServerRaw(const QString& command);
+ void dcopRaw(const TQString& server, const TQString& command);
+ void dcopMultiServerRaw(const TQString& command);
void connectTo(Konversation::ConnectionFlag flag,
- const QString& hostName,
- const QString& port = "",
- const QString& password = "",
- const QString& nick = "",
- const QString& channel = "",
+ const TQString& hostName,
+ const TQString& port = "",
+ const TQString& password = "",
+ const TQString& nick = "",
+ const TQString& channel = "",
bool useSSL = false);
public slots:
- void setAway(const QString &awaymessage);
+ void setAway(const TQString &awaymessage);
void setBack();
- void sayToAll(const QString &message);
- void actionToAll(const QString &message);
- void raw(const QString& server,const QString& command);
- void say(const QString& server,const QString& target,const QString& command);
- void info(const QString& string);
- void debug(const QString& string);
- void error(const QString& string);
+ void sayToAll(const TQString &message);
+ void actionToAll(const TQString &message);
+ void raw(const TQString& server,const TQString& command);
+ void say(const TQString& server,const TQString& target,const TQString& command);
+ void info(const TQString& string);
+ void debug(const TQString& string);
+ void error(const TQString& string);
void insertMarkerLine();
- void connectToServer(const QString& adress, int port, const QString& channel, const QString& password);
- QStringList listServers();
- QStringList listConnectedServers();
+ void connectToServer(const TQString& adress, int port, const TQString& channel, const TQString& password);
+ TQStringList listServers();
+ TQStringList listConnectedServers();
void setScreenSaverStarted();
void setScreenSaverStopped();
};
-class KonvIdentDCOP : public QObject, virtual public KonvIdentityIface
+class KonvIdentDCOP : public TQObject, virtual public KonvIdentityIface
{
Q_OBJECT
public:
KonvIdentDCOP();
- void setrealName(const QString &identity, const QString& name);
- QString getrealName(const QString &identity);
- void setIdent(const QString &identity, const QString& ident);
- QString getIdent(const QString &identity);
+ void setrealName(const TQString &identity, const TQString& name);
+ TQString getrealName(const TQString &identity);
+ void setIdent(const TQString &identity, const TQString& ident);
+ TQString getIdent(const TQString &identity);
- void setNickname(const QString &identity, int index,const QString& nick);
- QString getNickname(const QString &identity, int index);
+ void setNickname(const TQString &identity, int index,const TQString& nick);
+ TQString getNickname(const TQString &identity, int index);
- void setBot(const QString &identity, const QString& bot);
- QString getBot(const QString &identity);
- void setPassword(const QString &identity, const QString& password);
- QString getPassword(const QString &identity);
+ void setBot(const TQString &identity, const TQString& bot);
+ TQString getBot(const TQString &identity);
+ void setPassword(const TQString &identity, const TQString& password);
+ TQString getPassword(const TQString &identity);
- void setNicknameList(const QString &identity, const QStringList& newList);
- QStringList getNicknameList(const QString &identity);
+ void setNicknameList(const TQString &identity, const TQStringList& newList);
+ TQStringList getNicknameList(const TQString &identity);
- void setQuitReason(const QString &identity, const QString& reason);
- QString getQuitReason(const QString &identity);
- void setPartReason(const QString &identity, const QString& reason);
- QString getPartReason(const QString &identity);
- void setKickReason(const QString &identity, const QString& reason);
- QString getKickReason(const QString &identity);
+ void setQuitReason(const TQString &identity, const TQString& reason);
+ TQString getQuitReason(const TQString &identity);
+ void setPartReason(const TQString &identity, const TQString& reason);
+ TQString getPartReason(const TQString &identity);
+ void setKickReason(const TQString &identity, const TQString& reason);
+ TQString getKickReason(const TQString &identity);
- void setShowAwayMessage(const QString &identity, bool state);
- bool getShowAwayMessage(const QString &identity);
+ void setShowAwayMessage(const TQString &identity, bool state);
+ bool getShowAwayMessage(const TQString &identity);
- void setAwayMessage(const QString &identity, const QString& message);
- QString getAwayMessage(const QString &identity);
- void setReturnMessage(const QString &identity, const QString& message);
- QString getReturnMessage(const QString &identity);
+ void setAwayMessage(const TQString &identity, const TQString& message);
+ TQString getAwayMessage(const TQString &identity);
+ void setReturnMessage(const TQString &identity, const TQString& message);
+ TQString getReturnMessage(const TQString &identity);
- QStringList listIdentities();
+ TQStringList listIdentities();
};
#endif
diff --git a/konversation/src/konversationapplication.cpp b/konversation/src/konversationapplication.cpp
index fd0afa7..46f7ee2 100644
--- a/konversation/src/konversationapplication.cpp
+++ b/konversation/src/konversationapplication.cpp
@@ -31,9 +31,9 @@
#include "commit.h"
#include "version.h"
-#include <qtextcodec.h>
-#include <qregexp.h>
-#include <qfileinfo.h>
+#include <tqtextcodec.h>
+#include <tqregexp.h>
+#include <tqfileinfo.h>
#include <kdebug.h>
#include <kcmdlineargs.h>
@@ -74,21 +74,21 @@ KonversationApplication::~KonversationApplication()
int KonversationApplication::newInstance()
{
KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
- QCString url;
+ TQCString url;
if (args->count() > 0) url = args->arg(0);
if (!mainWindow)
{
- connect(this, SIGNAL(shutDown()), this, SLOT(prepareShutdown()));
+ connect(this, TQT_SIGNAL(shutDown()), this, TQT_SLOT(prepareShutdown()));
m_connectionManager = new ConnectionManager(this);
m_awayManager = new AwayManager(this);
- connect(m_connectionManager, SIGNAL(identityOnline(int)), m_awayManager, SLOT(identityOnline(int)));
- connect(m_connectionManager, SIGNAL(identityOffline(int)), m_awayManager, SLOT(identityOffline(int)));
- connect(m_connectionManager, SIGNAL(identityOffline(int)), m_awayManager, SLOT(identityOffline(int)));
- connect(m_connectionManager, SIGNAL(connectionChangedAwayState(bool)), m_awayManager, SLOT(updateGlobalAwayAction(bool)));
+ connect(m_connectionManager, TQT_SIGNAL(identityOnline(int)), m_awayManager, TQT_SLOT(identityOnline(int)));
+ connect(m_connectionManager, TQT_SIGNAL(identityOffline(int)), m_awayManager, TQT_SLOT(identityOffline(int)));
+ connect(m_connectionManager, TQT_SIGNAL(identityOffline(int)), m_awayManager, TQT_SLOT(identityOffline(int)));
+ connect(m_connectionManager, TQT_SIGNAL(connectionChangedAwayState(bool)), m_awayManager, TQT_SLOT(updateGlobalAwayAction(bool)));
// an instance of DccTransferManager needs to be created before GUI class instances' creation.
m_dccTransferManager = new DccTransferManager(this);
@@ -107,13 +107,13 @@ int KonversationApplication::newInstance()
// Images object providing LEDs, NickIcons
m_images = new Images();
- connect(this, SIGNAL(iconChanged(int)), m_images, SLOT(updateIcons()));
+ connect(this, TQT_SIGNAL(iconChanged(int)), m_images, TQT_SLOT(updateIcons()));
// Auto-alias scripts. This adds any missing aliases
- QStringList aliasList(Preferences::aliasList());
- QStringList scripts(Preferences::defaultAliasList());
+ TQStringList aliasList(Preferences::aliasList());
+ TQStringList scripts(Preferences::defaultAliasList());
bool changed = false;
- for ( QStringList::ConstIterator it = scripts.begin(); it != scripts.end(); ++it )
+ for ( TQStringList::ConstIterator it = scripts.begin(); it != scripts.end(); ++it )
{
if(!aliasList.contains(*it)) {
changed = true;
@@ -125,15 +125,15 @@ int KonversationApplication::newInstance()
// Setup system codec
// TODO: check if this works now as intended
- // QTextCodec::setCodecForCStrings(QTextCodec::codecForLocale());
+ // TQTextCodec::setCodecForCStrings(TQTextCodec::codecForLocale());
// open main window
mainWindow = new KonversationMainWindow();
setMainWidget(mainWindow);
- connect(mainWindow, SIGNAL(showQuickConnectDialog()), this, SLOT(openQuickConnectDialog()) );
- connect(Preferences::self(), SIGNAL(updateTrayIcon()), mainWindow, SLOT(updateTrayIcon()) );
- connect(osd, SIGNAL(hidden()), mainWindow, SIGNAL(endNotification()));
+ connect(mainWindow, TQT_SIGNAL(showQuickConnectDialog()), this, TQT_SLOT(openQuickConnectDialog()) );
+ connect(Preferences::self(), TQT_SIGNAL(updateTrayIcon()), mainWindow, TQT_SLOT(updateTrayIcon()) );
+ connect(osd, TQT_SIGNAL(hidden()), mainWindow, TQT_SIGNAL(endNotification()));
// take care of user style changes, setting back colors and stuff
// apply GUI settings
@@ -163,7 +163,7 @@ int KonversationApplication::newInstance()
if (openServerList) mainWindow->openServerList();
- connect(this, SIGNAL(serverGroupsChanged(const Konversation::ServerGroupSettings*)), this, SLOT(saveOptions()));
+ connect(this, TQT_SIGNAL(serverGroupsChanged(const Konversation::ServerGroupSettings*)), this, TQT_SLOT(saveOptions()));
// prepare dcop interface
dcopObject = new KonvDCOP;
@@ -172,18 +172,18 @@ int KonversationApplication::newInstance()
if (dcopObject)
{
- connect(dcopObject,SIGNAL (dcopMultiServerRaw(const QString&)),
- this,SLOT (dcopMultiServerRaw(const QString&)) );
- connect(dcopObject,SIGNAL (dcopRaw(const QString&,const QString&)),
- this,SLOT (dcopRaw(const QString&,const QString&)) );
- connect(dcopObject,SIGNAL (dcopSay(const QString&,const QString&,const QString&)),
- this,SLOT (dcopSay(const QString&,const QString&,const QString&)) );
- connect(dcopObject,SIGNAL (dcopInfo(const QString&)),
- this,SLOT (dcopInfo(const QString&)) );
- connect(dcopObject,SIGNAL (dcopInsertMarkerLine()),
- mainWindow,SIGNAL(insertMarkerLine()));
- connect(dcopObject, SIGNAL(connectTo(Konversation::ConnectionFlag, const QString&, const QString&, const QString&, const QString&, const QString&, bool)),
- m_connectionManager, SLOT(connectTo(Konversation::ConnectionFlag, const QString&, const QString&, const QString&, const QString&, const QString&, bool)));
+ connect(dcopObject,TQT_SIGNAL (dcopMultiServerRaw(const TQString&)),
+ this,TQT_SLOT (dcopMultiServerRaw(const TQString&)) );
+ connect(dcopObject,TQT_SIGNAL (dcopRaw(const TQString&,const TQString&)),
+ this,TQT_SLOT (dcopRaw(const TQString&,const TQString&)) );
+ connect(dcopObject,TQT_SIGNAL (dcopSay(const TQString&,const TQString&,const TQString&)),
+ this,TQT_SLOT (dcopSay(const TQString&,const TQString&,const TQString&)) );
+ connect(dcopObject,TQT_SIGNAL (dcopInfo(const TQString&)),
+ this,TQT_SLOT (dcopInfo(const TQString&)) );
+ connect(dcopObject,TQT_SIGNAL (dcopInsertMarkerLine()),
+ mainWindow,TQT_SIGNAL(insertMarkerLine()));
+ connect(dcopObject, TQT_SIGNAL(connectTo(Konversation::ConnectionFlag, const TQString&, const TQString&, const TQString&, const TQString&, const TQString&, bool)),
+ m_connectionManager, TQT_SLOT(connectTo(Konversation::ConnectionFlag, const TQString&, const TQString&, const TQString&, const TQString&, const TQString&, bool)));
}
m_notificationHandler = new Konversation::NotificationHandler(this);
@@ -232,12 +232,12 @@ void KonversationApplication::showQueueTuner(bool p)
getMainWindow()->getViewContainer()->showQueueTuner(p);
}
-void KonversationApplication::dcopMultiServerRaw(const QString &command)
+void KonversationApplication::dcopMultiServerRaw(const TQString &command)
{
sendMultiServerCommand(command.section(' ', 0,0), command.section(' ', 1));
}
-void KonversationApplication::dcopRaw(const QString& connection, const QString &command)
+void KonversationApplication::dcopRaw(const TQString& connection, const TQString &command)
{
Server* server = 0;
@@ -252,7 +252,7 @@ void KonversationApplication::dcopRaw(const QString& connection, const QString &
}
-void KonversationApplication::dcopSay(const QString& connection, const QString& target, const QString& command)
+void KonversationApplication::dcopSay(const TQString& connection, const TQString& target, const TQString& command)
{
Server* server = 0;
@@ -266,7 +266,7 @@ void KonversationApplication::dcopSay(const QString& connection, const QString&
if (server) server->dcopSay(target, command);
}
-void KonversationApplication::dcopInfo(const QString& string)
+void KonversationApplication::dcopInfo(const TQString& string)
{
mainWindow->getViewContainer()->appendToFrontmost(i18n("DCOP"), string, 0);
}
@@ -278,8 +278,8 @@ void KonversationApplication::readOptions()
// read nickname sorting order for channel nick lists
config->setGroup("Sort Nicknames");
- QString sortOrder=config->readEntry("SortOrder");
- QStringList sortOrderList=QStringList::split("",sortOrder);
+ TQString sortOrder=config->readEntry("SortOrder");
+ TQStringList sortOrderList=TQStringList::split("",sortOrder);
sortOrderList.sort();
if (sortOrderList.join("")!="-hopqv")
{
@@ -288,7 +288,7 @@ void KonversationApplication::readOptions()
}
// Identity list
- QStringList identityList=config->groupList().grep(QRegExp("Identity [0-9]+"));
+ TQStringList identityList=config->groupList().grep(TQRegExp("Identity [0-9]+"));
if(!identityList.isEmpty())
{
Preferences::clearIdentityList();
@@ -355,15 +355,15 @@ void KonversationApplication::readOptions()
config->setGroup("Server List");
// Read the new server settings
- QStringList groups = config->groupList().grep(QRegExp("ServerGroup [0-9]+"));
- QMap<int,QStringList> notifyList;
+ TQStringList groups = config->groupList().grep(TQRegExp("ServerGroup [0-9]+"));
+ TQMap<int,TQStringList> notifyList;
if(!groups.isEmpty())
{
Konversation::ServerGroupList serverGroups;
- QStringList::iterator it;
- QStringList tmp1;
- QStringList::iterator it2;
+ TQStringList::iterator it;
+ TQStringList tmp1;
+ TQStringList::iterator it2;
Konversation::ChannelList channelHistory;
Konversation::ServerSettings server;
Konversation::ChannelSettings channel;
@@ -379,7 +379,7 @@ void KonversationApplication::readOptions()
serverGroup->setNotificationsEnabled(config->readBoolEntry("EnableNotifications", true));
serverGroup->setExpanded(config->readBoolEntry("Expanded", false));
- notifyList.insert((*serverGroup).id(),QStringList::split(' ',config->readEntry("NotifyList")));
+ notifyList.insert((*serverGroup).id(),TQStringList::split(' ',config->readEntry("NotifyList")));
tmp1 = config->readListEntry("ServerList");
for(it2 = tmp1.begin(); it2 != tmp1.end(); ++it2)
@@ -443,12 +443,12 @@ void KonversationApplication::readOptions()
if(config->hasGroup("Button List")) Preferences::clearQuickButtonList();
config->setGroup("Button List");
// Read all default buttons
- QStringList buttonList(Preferences::quickButtonList());
+ TQStringList buttonList(Preferences::quickButtonList());
// Read all quick buttons
int index=0;
- while(config->hasKey(QString("Button%1").arg(index)))
+ while(config->hasKey(TQString("Button%1").arg(index)))
{
- buttonList.append(config->readEntry(QString("Button%1").arg(index++)));
+ buttonList.append(config->readEntry(TQString("Button%1").arg(index++)));
} // while
// Put back the changed button list
Preferences::setQuickButtonList(buttonList);
@@ -459,13 +459,13 @@ void KonversationApplication::readOptions()
if(config->hasGroup("Autoreplace List")) Preferences::clearAutoreplaceList();
config->setGroup("Autoreplace List");
// Read all default entries
- QStringList autoreplaceList(Preferences::autoreplaceList());
+ TQStringList autoreplaceList(Preferences::autoreplaceList());
// Read all entries
index=0;
- while(config->hasKey(QString("Autoreplace%1").arg(index)))
+ while(config->hasKey(TQString("Autoreplace%1").arg(index)))
{
// read entry and get length of the string
- QString entry=config->readEntry(QString("Autoreplace%1").arg(index++));
+ TQString entry=config->readEntry(TQString("Autoreplace%1").arg(index++));
unsigned int length=entry.length()-1;
// if there's a "#" in the end, strip it (used to preserve blanks at the end of the replacement text)
// there should always be one, but older versions did not do it, so we check first
@@ -479,13 +479,13 @@ void KonversationApplication::readOptions()
// Highlight List
if(config->hasKey("Highlight")) // Stay compatible with versions < 0.14
{
- QString highlight=config->readEntry("Highlight");
- QStringList hiList=QStringList::split(' ',highlight);
+ TQString highlight=config->readEntry("Highlight");
+ TQStringList hiList=TQStringList::split(' ',highlight);
unsigned int hiIndex;
for(hiIndex=0;hiIndex<hiList.count();hiIndex+=2)
{
- Preferences::addHighlight(hiList[hiIndex],false,'#'+hiList[hiIndex+1],QString(),QString());
+ Preferences::addHighlight(hiList[hiIndex],false,'#'+hiList[hiIndex+1],TQString(),TQString());
}
config->deleteEntry("Highlight");
@@ -494,9 +494,9 @@ void KonversationApplication::readOptions()
{
int i = 0;
- while(config->hasGroup(QString("Highlight%1").arg(i)))
+ while(config->hasGroup(TQString("Highlight%1").arg(i)))
{
- config->setGroup(QString("Highlight%1").arg(i));
+ config->setGroup(TQString("Highlight%1").arg(i));
Preferences::addHighlight(config->readEntry("Pattern"),
config->readBoolEntry("RegExp"),
config->readColorEntry("Color"),
@@ -512,21 +512,21 @@ void KonversationApplication::readOptions()
if(config->hasKey("Ignore0")) Preferences::clearIgnoreList();
// Read all ignores
index=0;
- while(config->hasKey(QString("Ignore%1").arg(index)))
+ while(config->hasKey(TQString("Ignore%1").arg(index)))
{
- Preferences::addIgnore(config->readEntry(QString("Ignore%1").arg(index++)));
+ Preferences::addIgnore(config->readEntry(TQString("Ignore%1").arg(index++)));
}
// Aliases
config->setGroup("Aliases");
- QStringList newList=config->readListEntry("AliasList");
+ TQStringList newList=config->readListEntry("AliasList");
if(!newList.isEmpty()) Preferences::setAliasList(newList);
// Channel Encodings
- QMap<QString,QString> channelEncodingEntries=config->entryMap("Channel Encodings");
- QRegExp re("^(.+) ([^\\s]+)$");
- QStringList channelEncodingEntryKeys=channelEncodingEntries.keys();
- QStringList::iterator itStr=channelEncodingEntryKeys.begin();
+ TQMap<TQString,TQString> channelEncodingEntries=config->entryMap("Channel Encodings");
+ TQRegExp re("^(.+) ([^\\s]+)$");
+ TQStringList channelEncodingEntryKeys=channelEncodingEntries.keys();
+ TQStringList::iterator itStr=channelEncodingEntryKeys.begin();
for(; itStr != channelEncodingEntryKeys.end(); ++itStr)
{
if(re.search(*itStr) > -1)
@@ -549,7 +549,7 @@ void KonversationApplication::saveOptions(bool updateGUI)
// config->setGroup("Sort Nicknames");
// Clean up identity list
- QStringList identities=config->groupList().grep(QRegExp("Identity [0-9]+"));
+ TQStringList identities=config->groupList().grep(TQRegExp("Identity [0-9]+"));
if(identities.count())
{
// remove old identity list from Preferences::file to keep numbering under control
@@ -563,7 +563,7 @@ void KonversationApplication::saveOptions(bool updateGUI)
for(IdentityList::ConstIterator it = identityList.begin(); it != identityList.end(); ++it)
{
IdentityPtr identity = (*it);
- config->setGroup(QString("Identity %1").arg(index));
+ config->setGroup(TQString("Identity %1").arg(index));
config->writeEntry("Name",identity->getName());
config->writeEntry("Ident",identity->getIdent());
@@ -588,10 +588,10 @@ void KonversationApplication::saveOptions(bool updateGUI)
} // endfor
// Remove the old servergroups from the config
- QStringList groups = config->groupList().grep(QRegExp("ServerGroup [0-9]+"));
+ TQStringList groups = config->groupList().grep(TQRegExp("ServerGroup [0-9]+"));
if(groups.count())
{
- QStringList::iterator it;
+ TQStringList::iterator it;
for(it = groups.begin(); it != groups.end(); ++it)
{
config->deleteGroup((*it));
@@ -599,10 +599,10 @@ void KonversationApplication::saveOptions(bool updateGUI)
}
// Remove the old servers from the config
- groups = config->groupList().grep(QRegExp("Server [0-9]+"));
+ groups = config->groupList().grep(TQRegExp("Server [0-9]+"));
if(groups.count())
{
- QStringList::iterator it;
+ TQStringList::iterator it;
for(it = groups.begin(); it != groups.end(); ++it)
{
config->deleteGroup((*it));
@@ -610,10 +610,10 @@ void KonversationApplication::saveOptions(bool updateGUI)
}
// Remove the old channels from the config
- groups = config->groupList().grep(QRegExp("Channel [0-9]+"));
+ groups = config->groupList().grep(TQRegExp("Channel [0-9]+"));
if(groups.count())
{
- QStringList::iterator it;
+ TQStringList::iterator it;
for(it = groups.begin(); it != groups.end(); ++it)
{
config->deleteGroup((*it));
@@ -626,15 +626,15 @@ void KonversationApplication::saveOptions(bool updateGUI)
index = 0;
int index2 = 0;
int index3 = 0;
- int width = QString::number(serverGroupList.count()).length();
- QString groupName;
- QStringList servers;
+ int width = TQString::number(serverGroupList.count()).length();
+ TQString groupName;
+ TQStringList servers;
Konversation::ServerList::iterator it2;
Konversation::ServerList serverlist;
Konversation::ChannelList channelList;
Konversation::ChannelList::iterator it3;
- QStringList channels;
- QStringList channelHistory;
+ TQStringList channels;
+ TQStringList channelHistory;
for(it = serverGroupList.begin(); it != serverGroupList.end(); ++it)
{
@@ -643,7 +643,7 @@ void KonversationApplication::saveOptions(bool updateGUI)
for(it2 = serverlist.begin(); it2 != serverlist.end(); ++it2)
{
- groupName = QString("Server %1").arg(index2);
+ groupName = TQString("Server %1").arg(index2);
servers.append(groupName);
config->setGroup(groupName);
config->writeEntry("Server", (*it2).host());
@@ -658,7 +658,7 @@ void KonversationApplication::saveOptions(bool updateGUI)
for(it3 = channelList.begin(); it3 != channelList.end(); ++it3)
{
- groupName = QString("Channel %1").arg(index3);
+ groupName = TQString("Channel %1").arg(index3);
channels.append(groupName);
config->setGroup(groupName);
config->writeEntry("Name", (*it3).name());
@@ -671,7 +671,7 @@ void KonversationApplication::saveOptions(bool updateGUI)
for(it3 = channelList.begin(); it3 != channelList.end(); ++it3)
{
- groupName = QString("Channel %1").arg(index3);
+ groupName = TQString("Channel %1").arg(index3);
channelHistory.append(groupName);
config->setGroup(groupName);
config->writeEntry("Name", (*it3).name());
@@ -680,7 +680,7 @@ void KonversationApplication::saveOptions(bool updateGUI)
index3++;
}
- config->setGroup(QString("ServerGroup %1").arg(QString::number(index).rightJustify(width,'0')));
+ config->setGroup(TQString("ServerGroup %1").arg(TQString::number(index).rightJustify(width,'0')));
config->writeEntry("Name", (*it)->name());
config->writeEntry("Identity", (*it)->identity()->getName());
config->writeEntry("ServerList", servers);
@@ -699,12 +699,12 @@ void KonversationApplication::saveOptions(bool updateGUI)
// Ignore List
config->deleteGroup("Ignore List");
config->setGroup("Ignore List");
- QPtrList<Ignore> ignoreList=Preferences::ignoreList();
+ TQPtrList<Ignore> ignoreList=Preferences::ignoreList();
Ignore* item=ignoreList.first();
index=0;
while(item)
{
- config->writeEntry(QString("Ignore%1").arg(index),QString("%1,%2").arg(item->getName()).arg(item->getFlags()));
+ config->writeEntry(TQString("Ignore%1").arg(index),TQString("%1,%2").arg(item->getName()).arg(item->getFlags()));
item=ignoreList.next();
index++;
}
@@ -713,21 +713,21 @@ void KonversationApplication::saveOptions(bool updateGUI)
// remove all entries once
config->deleteGroup("Channel Encodings");
config->setGroup("Channel Encodings");
- QValueList<int> encServers=Preferences::channelEncodingsServerGroupIdList();
+ TQValueList<int> encServers=Preferences::channelEncodingsServerGroupIdList();
//i have no idea these would need to be sorted //encServers.sort();
- QValueList<int>::iterator encServer;
+ TQValueList<int>::iterator encServer;
for ( encServer = encServers.begin(); encServer != encServers.end(); ++encServer )
{
Konversation::ServerGroupSettingsPtr sgsp = Preferences::serverGroupById(*encServer);
if ( sgsp ) // sgsp == 0 when the entry is of QuickConnect or something?
{
- QStringList encChannels=Preferences::channelEncodingsChannelList(*encServer);
+ TQStringList encChannels=Preferences::channelEncodingsChannelList(*encServer);
//ditto //encChannels.sort();
- QStringList::iterator encChannel;
+ TQStringList::iterator encChannel;
for ( encChannel = encChannels.begin(); encChannel != encChannels.end(); ++encChannel )
{
- QString enc = Preferences::channelEncoding(*encServer, *encChannel);
- QString key = sgsp->name() + ' ' + (*encChannel);
+ TQString enc = Preferences::channelEncoding(*encServer, *encChannel);
+ TQString key = sgsp->name() + ' ' + (*encChannel);
config->writeEntry(key, enc);
}
}
@@ -740,9 +740,9 @@ void KonversationApplication::saveOptions(bool updateGUI)
}
// FIXME: use KURL maybe?
-void KonversationApplication::storeUrl(const QString& who,const QString& newUrl)
+void KonversationApplication::storeUrl(const TQString& who,const TQString& newUrl)
{
- QString url(newUrl);
+ TQString url(newUrl);
// clean up URL to help KRun() in URL catcher interface
if(url.startsWith("www.")) url="http://"+url;
else if(url.startsWith("ftp.")) url="ftp://"+url;
@@ -755,12 +755,12 @@ void KonversationApplication::storeUrl(const QString& who,const QString& newUrl)
emit catchUrl(who,url);
}
-const QStringList& KonversationApplication::getUrlList()
+const TQStringList& KonversationApplication::getUrlList()
{
return urlList;
}
-void KonversationApplication::deleteUrl(const QString& who,const QString& url)
+void KonversationApplication::deleteUrl(const TQString& who,const TQString& url)
{
urlList.remove(who+' '+url);
}
@@ -773,35 +773,35 @@ void KonversationApplication::clearUrlList()
void KonversationApplication::openQuickConnectDialog()
{
quickConnectDialog = new QuickConnectDialog(mainWindow);
- connect(quickConnectDialog, SIGNAL(connectClicked(Konversation::ConnectionFlag, const QString&, const QString&,
- const QString&, const QString&, const QString&, bool)),
- m_connectionManager, SLOT(connectTo(Konversation::ConnectionFlag, const QString&, const QString&,
- const QString&, const QString&, const QString&, bool)));
+ connect(quickConnectDialog, TQT_SIGNAL(connectClicked(Konversation::ConnectionFlag, const TQString&, const TQString&,
+ const TQString&, const TQString&, const TQString&, bool)),
+ m_connectionManager, TQT_SLOT(connectTo(Konversation::ConnectionFlag, const TQString&, const TQString&,
+ const TQString&, const TQString&, const TQString&, bool)));
quickConnectDialog->show();
}
-void KonversationApplication::sendMultiServerCommand(const QString& command, const QString& parameter)
+void KonversationApplication::sendMultiServerCommand(const TQString& command, const TQString& parameter)
{
- QPtrList<Server> serverList = getConnectionManager()->getServerList();
+ TQPtrList<Server> serverList = getConnectionManager()->getServerList();
for (Server* server = serverList.first(); server; server = serverList.next())
server->executeMultiServerCommand(command, parameter);
}
-void KonversationApplication::splitNick_Server(const QString& nick_server, QString &ircnick, QString &serverOrGroup)
+void KonversationApplication::splitNick_Server(const TQString& nick_server, TQString &ircnick, TQString &serverOrGroup)
{
//kaddresbook uses the utf separator 0xE120, so treat that as a separator as well
- QString nickServer = nick_server;
- nickServer.replace(QChar(0xE120), "@");
+ TQString nickServer = nick_server;
+ nickServer.replace(TQChar(0xE120), "@");
ircnick = nickServer.section("@",0,0);
serverOrGroup = nickServer.section("@",1);
}
-NickInfoPtr KonversationApplication::getNickInfo(const QString &ircnick, const QString &serverOrGroup)
+NickInfoPtr KonversationApplication::getNickInfo(const TQString &ircnick, const TQString &serverOrGroup)
{
- QPtrList<Server> serverList = getConnectionManager()->getServerList();
+ TQPtrList<Server> serverList = getConnectionManager()->getServerList();
NickInfoPtr nickInfo;
- QString lserverOrGroup = serverOrGroup.lower();
+ TQString lserverOrGroup = serverOrGroup.lower();
for(Server* lookServer = serverList.first(); lookServer; lookServer = serverList.next())
{
if(lserverOrGroup.isEmpty()
@@ -816,25 +816,25 @@ NickInfoPtr KonversationApplication::getNickInfo(const QString &ircnick, const Q
}
// auto replace on input/output
-QString KonversationApplication::doAutoreplace(const QString& text,bool output)
+TQString KonversationApplication::doAutoreplace(const TQString& text,bool output)
{
// get autoreplace list
- QStringList autoreplaceList=Preferences::autoreplaceList();
+ TQStringList autoreplaceList=Preferences::autoreplaceList();
// working copy
- QString line=text;
+ TQString line=text;
// loop through the list of replacement patterns
for(unsigned int index=0;index<autoreplaceList.count();index++)
{
// get autoreplace definition
- QString definition=autoreplaceList[index];
+ TQString definition=autoreplaceList[index];
// split definition in parts
- QString regex=definition.section(',',0,0);
- QString direction=definition.section(',',1,1);
- QString pattern=definition.section(',',2,2);
- QString replacement=definition.section(',',3);
+ TQString regex=definition.section(',',0,0);
+ TQString direction=definition.section(',',1,1);
+ TQString pattern=definition.section(',',2,2);
+ TQString replacement=definition.section(',',3);
- QString isDirection=output ? "o" : "i";
+ TQString isDirection=output ? "o" : "i";
// only replace if this pattern is for the specific direction or both directions
if(direction==isDirection || direction=="io")
@@ -843,7 +843,7 @@ QString KonversationApplication::doAutoreplace(const QString& text,bool output)
if(regex=="1")
{
// create regex from pattern
- QRegExp needleReg=pattern;
+ TQRegExp needleReg=pattern;
// set pattern case insensitive
needleReg.setCaseSensitive(true);
int index = 0;
@@ -856,14 +856,14 @@ QString KonversationApplication::doAutoreplace(const QString& text,bool output)
if(index != -1)
{
// remember captured patterns
- QStringList captures = needleReg.capturedTexts();
+ TQStringList captures = needleReg.capturedTexts();
// replace %0 - %9 in regex groups
for(unsigned int capture=0;capture<captures.count();capture++)
{
- replacement.replace(QString("%%1").arg(capture),captures[capture]);
+ replacement.replace(TQString("%%1").arg(capture),captures[capture]);
}
- replacement.replace(QRegExp("%[0-9]"),QString());
+ replacement.replace(TQRegExp("%[0-9]"),TQString());
// replace input with replacement
line.replace(index, captures[0].length(), replacement);
index += replacement.length();
@@ -872,7 +872,7 @@ QString KonversationApplication::doAutoreplace(const QString& text,bool output)
}
else
{
- QRegExp needleReg("\\b" + QRegExp::escape(pattern) + "\\b");
+ TQRegExp needleReg("\\b" + TQRegExp::escape(pattern) + "\\b");
needleReg.setCaseSensitive(false);
line.replace(needleReg,replacement);
}
diff --git a/konversation/src/konversationapplication.h b/konversation/src/konversationapplication.h
index 3464406..72be6fd 100644
--- a/konversation/src/konversationapplication.h
+++ b/konversation/src/konversationapplication.h
@@ -25,7 +25,7 @@
#include <kuniqueapplication.h>
-class QCString;
+class TQCString;
class ConnectionManager;
class AwayManager;
@@ -79,8 +79,8 @@ class KonversationApplication : public KUniqueApplication
void showQueueTuner(bool);
// URL-Catcher
- void storeUrl(const QString& who,const QString& url);
- const QStringList& getUrlList();
+ void storeUrl(const TQString& who,const TQString& url);
+ const TQStringList& getUrlList();
KonversationApplication();
~KonversationApplication();
@@ -98,14 +98,14 @@ class KonversationApplication : public KUniqueApplication
* @param ircnick This is modified to contain the ircnick
* @param serverOrGroup This is modified to contain the servername, servergroup or an empty string.
*/
- static void splitNick_Server(const QString& nick_server, QString &ircnick, QString &serverOrGroup);
+ static void splitNick_Server(const TQString& nick_server, TQString &ircnick, TQString &serverOrGroup);
/** Tries to find a nickinfo for a given ircnick on a given ircserver.
* @param ircnick The case-insensitive ircnick of the person you want to find. e.g. "johnflux"
* @param serverOrGroup The case-insensitive server name (e.g. "irc.kde.org") or server group name (e.g. "freenode"), or null to search all servers
* @return A nickinfo for this user and server if one is found.
*/
- NickInfoPtr getNickInfo(const QString &ircnick, const QString &serverOrGroup);
+ NickInfoPtr getNickInfo(const TQString &ircnick, const TQString &serverOrGroup);
OSDWidget* osd;
@@ -116,13 +116,13 @@ class KonversationApplication : public KUniqueApplication
Konversation::NotificationHandler* notificationHandler() const { return m_notificationHandler; }
// auto replacement for input or output lines
- QString doAutoreplace(const QString& text,bool output);
+ TQString doAutoreplace(const TQString& text,bool output);
int newInstance();
signals:
- void catchUrl(const QString& who,const QString& url);
+ void catchUrl(const TQString& who,const TQString& url);
void serverGroupsChanged(const Konversation::ServerGroupSettings* serverGroup);
@@ -130,7 +130,7 @@ class KonversationApplication : public KUniqueApplication
void readOptions();
void saveOptions(bool updateGUI=true);
- void deleteUrl(const QString& who,const QString& url);
+ void deleteUrl(const TQString& who,const TQString& url);
void clearUrlList();
@@ -139,18 +139,18 @@ class KonversationApplication : public KUniqueApplication
void openQuickConnectDialog();
- void dcopMultiServerRaw(const QString &command);
- void dcopRaw(const QString& connection, const QString &command);
- void dcopSay(const QString& connection, const QString& target, const QString& command);
- void dcopInfo(const QString& string);
- void sendMultiServerCommand(const QString& command, const QString& parameter);
+ void dcopMultiServerRaw(const TQString &command);
+ void dcopRaw(const TQString& connection, const TQString &command);
+ void dcopSay(const TQString& connection, const TQString& target, const TQString& command);
+ void dcopInfo(const TQString& string);
+ void sendMultiServerCommand(const TQString& command, const TQString& parameter);
private:
ConnectionManager* m_connectionManager;
AwayManager* m_awayManager;
DccTransferManager* m_dccTransferManager;
- QStringList urlList;
+ TQStringList urlList;
KonvDCOP* dcopObject;
KonvIdentDCOP* identDCOP;
KonversationMainWindow* mainWindow;
@@ -160,7 +160,7 @@ class KonversationApplication : public KUniqueApplication
Konversation::NotificationHandler* m_notificationHandler;
- QStringList colorList;
+ TQStringList colorList;
};
#endif
diff --git a/konversation/src/konversationmainwindow.cpp b/konversation/src/konversationmainwindow.cpp
index a85c5fd..76d1393 100644
--- a/konversation/src/konversationmainwindow.cpp
+++ b/konversation/src/konversationmainwindow.cpp
@@ -29,10 +29,10 @@
#include "awaymanager.h"
#include "dcctransfermanager.h"
-#include <qnamespace.h>
-#include <qwhatsthis.h>
-#include <qsignalmapper.h>
-#include <qobjectlist.h>
+#include <tqnamespace.h>
+#include <tqwhatsthis.h>
+#include <tqsignalmapper.h>
+#include <tqobjectlist.h>
#include <kaccel.h>
#include <kaccelmanager.h>
@@ -71,102 +71,102 @@ KonversationMainWindow::KonversationMainWindow() : KMainWindow(0,"main_window",
setCentralWidget(m_viewContainer->getWidget());
//used for event compression. See header file for resetHasDirtySettings()
- connect(KonversationApplication::instance(), SIGNAL(appearanceChanged()), this, SLOT(resetHasDirtySettings()));
- connect(KonversationApplication::instance(), SIGNAL(appearanceChanged()), this, SLOT(updateTrayIcon()));
+ connect(KonversationApplication::instance(), TQT_SIGNAL(appearanceChanged()), this, TQT_SLOT(resetHasDirtySettings()));
+ connect(KonversationApplication::instance(), TQT_SIGNAL(appearanceChanged()), this, TQT_SLOT(updateTrayIcon()));
// Set up view container
- connect(KonversationApplication::instance(), SIGNAL(appearanceChanged()), m_viewContainer, SLOT(updateAppearance()));
- connect(KonversationApplication::instance(), SIGNAL(iconChanged(int)), m_viewContainer, SLOT(updateViewIcons()));
- connect(KonversationApplication::instance(), SIGNAL(serverGroupsChanged(const Konversation::ServerGroupSettings*)),
- m_viewContainer, SLOT(updateViews(const Konversation::ServerGroupSettings*)));
- connect(m_viewContainer, SIGNAL(autoJoinToggled(const Konversation::ServerGroupSettings*)),
- KonversationApplication::instance(), SIGNAL(serverGroupsChanged(const Konversation::ServerGroupSettings*)));
- connect(m_viewContainer, SIGNAL(setWindowCaption(const QString&)), this, SLOT(setCaption(const QString&)));
+ connect(KonversationApplication::instance(), TQT_SIGNAL(appearanceChanged()), m_viewContainer, TQT_SLOT(updateAppearance()));
+ connect(KonversationApplication::instance(), TQT_SIGNAL(iconChanged(int)), m_viewContainer, TQT_SLOT(updateViewIcons()));
+ connect(KonversationApplication::instance(), TQT_SIGNAL(serverGroupsChanged(const Konversation::ServerGroupSettings*)),
+ m_viewContainer, TQT_SLOT(updateViews(const Konversation::ServerGroupSettings*)));
+ connect(m_viewContainer, TQT_SIGNAL(autoJoinToggled(const Konversation::ServerGroupSettings*)),
+ KonversationApplication::instance(), TQT_SIGNAL(serverGroupsChanged(const Konversation::ServerGroupSettings*)));
+ connect(m_viewContainer, TQT_SIGNAL(setWindowCaption(const TQString&)), this, TQT_SLOT(setCaption(const TQString&)));
connect(KonversationApplication::instance()->getConnectionManager(),
- SIGNAL(connectionChangedState(Server*, Konversation::ConnectionState)),
- m_viewContainer, SLOT(connectionStateChanged(Server*, Konversation::ConnectionState)));
- connect(this, SIGNAL(triggerRememberLine()), m_viewContainer, SLOT(insertRememberLine()));
- connect(this, SIGNAL(triggerRememberLines(Server*)), m_viewContainer, SLOT(insertRememberLines(Server*)));
- connect(this, SIGNAL(cancelRememberLine()), m_viewContainer, SLOT(cancelRememberLine()));
- connect(this, SIGNAL(insertMarkerLine()), m_viewContainer, SLOT(insertMarkerLine()));
+ TQT_SIGNAL(connectionChangedState(Server*, Konversation::ConnectionState)),
+ m_viewContainer, TQT_SLOT(connectionStateChanged(Server*, Konversation::ConnectionState)));
+ connect(this, TQT_SIGNAL(triggerRememberLine()), m_viewContainer, TQT_SLOT(insertRememberLine()));
+ connect(this, TQT_SIGNAL(triggerRememberLines(Server*)), m_viewContainer, TQT_SLOT(insertRememberLines(Server*)));
+ connect(this, TQT_SIGNAL(cancelRememberLine()), m_viewContainer, TQT_SLOT(cancelRememberLine()));
+ connect(this, TQT_SIGNAL(insertMarkerLine()), m_viewContainer, TQT_SLOT(insertMarkerLine()));
// Set up status bar
m_statusBar = new KonversationStatusBar(this);
- connect(KonversationApplication::instance(), SIGNAL(appearanceChanged()), m_statusBar, SLOT(updateAppearance()));
+ connect(KonversationApplication::instance(), TQT_SIGNAL(appearanceChanged()), m_statusBar, TQT_SLOT(updateAppearance()));
createStandardStatusBarAction();
- connect(actionCollection(), SIGNAL(actionStatusText(const QString&)), m_statusBar, SLOT(setMainLabelTempText(const QString&)));
- connect(actionCollection(), SIGNAL(clearStatusText()), m_statusBar, SLOT(clearMainLabelTempText()));
+ connect(actionCollection(), TQT_SIGNAL(actionStatusText(const TQString&)), m_statusBar, TQT_SLOT(setMainLabelTempText(const TQString&)));
+ connect(actionCollection(), TQT_SIGNAL(clearStatusText()), m_statusBar, TQT_SLOT(clearMainLabelTempText()));
actionCollection()->setHighlightingEnabled(true);
- connect(m_viewContainer, SIGNAL(resetStatusBar()), m_statusBar, SLOT(resetStatusBar()));
- connect(m_viewContainer, SIGNAL(setStatusBarTempText(const QString&)), m_statusBar, SLOT(setMainLabelTempText(const QString&)));
- connect(m_viewContainer, SIGNAL(clearStatusBarTempText()), m_statusBar, SLOT(clearMainLabelTempText()));
- connect(m_viewContainer, SIGNAL(setStatusBarInfoLabel(const QString&)), m_statusBar, SLOT(updateInfoLabel(const QString&)));
- connect(m_viewContainer, SIGNAL(clearStatusBarInfoLabel()), m_statusBar, SLOT(clearInfoLabel()));
- connect(m_viewContainer, SIGNAL(setStatusBarLagLabelShown(bool)), m_statusBar, SLOT(setLagLabelShown(bool)));
- connect(m_viewContainer, SIGNAL(updateStatusBarLagLabel(Server*, int)), m_statusBar, SLOT(updateLagLabel(Server*, int)));
- connect(m_viewContainer, SIGNAL(resetStatusBarLagLabel()), m_statusBar, SLOT(resetLagLabel()));
- connect(m_viewContainer, SIGNAL(setStatusBarLagLabelTooLongLag(Server*, int)), m_statusBar, SLOT(setTooLongLag(Server*, int)));
- connect(m_viewContainer, SIGNAL(updateStatusBarSSLLabel(Server*)), m_statusBar, SLOT(updateSSLLabel(Server*)));
- connect(m_viewContainer, SIGNAL(removeStatusBarSSLLabel()), m_statusBar, SLOT(removeSSLLabel()));
+ connect(m_viewContainer, TQT_SIGNAL(resetStatusBar()), m_statusBar, TQT_SLOT(resetStatusBar()));
+ connect(m_viewContainer, TQT_SIGNAL(setStatusBarTempText(const TQString&)), m_statusBar, TQT_SLOT(setMainLabelTempText(const TQString&)));
+ connect(m_viewContainer, TQT_SIGNAL(clearStatusBarTempText()), m_statusBar, TQT_SLOT(clearMainLabelTempText()));
+ connect(m_viewContainer, TQT_SIGNAL(setStatusBarInfoLabel(const TQString&)), m_statusBar, TQT_SLOT(updateInfoLabel(const TQString&)));
+ connect(m_viewContainer, TQT_SIGNAL(clearStatusBarInfoLabel()), m_statusBar, TQT_SLOT(clearInfoLabel()));
+ connect(m_viewContainer, TQT_SIGNAL(setStatusBarLagLabelShown(bool)), m_statusBar, TQT_SLOT(setLagLabelShown(bool)));
+ connect(m_viewContainer, TQT_SIGNAL(updateStatusBarLagLabel(Server*, int)), m_statusBar, TQT_SLOT(updateLagLabel(Server*, int)));
+ connect(m_viewContainer, TQT_SIGNAL(resetStatusBarLagLabel()), m_statusBar, TQT_SLOT(resetLagLabel()));
+ connect(m_viewContainer, TQT_SIGNAL(setStatusBarLagLabelTooLongLag(Server*, int)), m_statusBar, TQT_SLOT(setTooLongLag(Server*, int)));
+ connect(m_viewContainer, TQT_SIGNAL(updateStatusBarSSLLabel(Server*)), m_statusBar, TQT_SLOT(updateSSLLabel(Server*)));
+ connect(m_viewContainer, TQT_SIGNAL(removeStatusBarSSLLabel()), m_statusBar, TQT_SLOT(removeSSLLabel()));
// Actions
- KStdAction::quit(this,SLOT(quitProgram()),actionCollection());
+ KStdAction::quit(this,TQT_SLOT(quitProgram()),actionCollection());
- hideMenuBarAction = KStdAction::showMenubar(this, SLOT(toggleMenubar()), actionCollection());
+ hideMenuBarAction = KStdAction::showMenubar(this, TQT_SLOT(toggleMenubar()), actionCollection());
setStandardToolBarMenuEnabled(true);
- KStdAction::configureToolbars(this, SLOT(configureToolbar()), actionCollection());
+ KStdAction::configureToolbars(this, TQT_SLOT(configureToolbar()), actionCollection());
- KStdAction::keyBindings(this, SLOT(openKeyBindings()), actionCollection());
- KAction *preferencesAction = KStdAction::preferences(this, SLOT(openPrefsDialog()), actionCollection());
+ KStdAction::keyBindings(this, TQT_SLOT(openKeyBindings()), actionCollection());
+ KAction *preferencesAction = KStdAction::preferences(this, TQT_SLOT(openPrefsDialog()), actionCollection());
#ifdef USE_KNOTIFY // options_configure_notifications
- KAction *configureNotificationsAction = KStdAction::configureNotifications(this,SLOT(openNotifications()), actionCollection());
+ KAction *configureNotificationsAction = KStdAction::configureNotifications(this,TQT_SLOT(openNotifications()), actionCollection());
#endif
KAction* action;
- (new KAction(i18n("&Server List..."), "server", KShortcut("F2"), this, SLOT(openServerList()),
+ (new KAction(i18n("&Server List..."), "server", KShortcut("F2"), this, TQT_SLOT(openServerList()),
actionCollection(), "open_server_list"))->setToolTip(i18n("Manage networks and servers"));
- (new KAction(i18n("Quick &Connect..."), "connect_creating", KShortcut("F7"), this, SLOT(openQuickConnectDialog()),
+ (new KAction(i18n("Quick &Connect..."), "connect_creating", KShortcut("F7"), this, TQT_SLOT(openQuickConnectDialog()),
actionCollection(), "quick_connect_dialog"))->setToolTip(i18n("Type in the address of a new IRC server to connect to"));
- action = new KAction(i18n("&Reconnect"), "connect_creating", 0, m_viewContainer, SLOT(reconnectFrontServer()), actionCollection(), "reconnect_server");
+ action = new KAction(i18n("&Reconnect"), "connect_creating", 0, m_viewContainer, TQT_SLOT(reconnectFrontServer()), actionCollection(), "reconnect_server");
action->setEnabled(false);
action->setToolTip(i18n("Reconnect to the current server."));
- action = new KAction(i18n("&Disconnect"), "connect_no", 0, m_viewContainer, SLOT(disconnectFrontServer()), actionCollection(), "disconnect_server");
+ action = new KAction(i18n("&Disconnect"), "connect_no", 0, m_viewContainer, TQT_SLOT(disconnectFrontServer()), actionCollection(), "disconnect_server");
action->setEnabled(false);
action->setToolTip(i18n("Disconnect from the current server."));
- (new KAction(i18n("&Identities..."), "identity", KShortcut("F8"), this, SLOT(openIdentitiesDialog()),
+ (new KAction(i18n("&Identities..."), "identity", KShortcut("F8"), this, TQT_SLOT(openIdentitiesDialog()),
actionCollection(), "identities_dialog"))->setToolTip(i18n("Manage your nick, away and other identity settings"));
- new KToggleAction(i18n("&Watched Nicks Online"), "kontact_contacts", KShortcut("F4"), m_viewContainer, SLOT(openNicksOnlinePanel()), actionCollection(), "open_nicksonline_window");
- new KToggleAction(i18n("&DCC Status"), "2rightarrow", KShortcut("F9"), m_viewContainer, SLOT(toggleDccPanel()), actionCollection(), "open_dccstatus_window");
- action = new KAction(i18n("&Open Logfile"), "history", KShortcut("Ctrl+O"), m_viewContainer, SLOT(openLogFile()), actionCollection(), "open_logfile");
+ new KToggleAction(i18n("&Watched Nicks Online"), "kontact_contacts", KShortcut("F4"), m_viewContainer, TQT_SLOT(openNicksOnlinePanel()), actionCollection(), "open_nicksonline_window");
+ new KToggleAction(i18n("&DCC Status"), "2rightarrow", KShortcut("F9"), m_viewContainer, TQT_SLOT(toggleDccPanel()), actionCollection(), "open_dccstatus_window");
+ action = new KAction(i18n("&Open Logfile"), "history", KShortcut("Ctrl+O"), m_viewContainer, TQT_SLOT(openLogFile()), actionCollection(), "open_logfile");
action->setEnabled(false);
action->setToolTip(i18n("Open the known history for this channel in a new tab"));
- action = new KAction(i18n("&Channel Settings..."), "edit", m_viewContainer, SLOT(openChannelSettings()), actionCollection(), "channel_settings");
+ action = new KAction(i18n("&Channel Settings..."), "edit", m_viewContainer, TQT_SLOT(openChannelSettings()), actionCollection(), "channel_settings");
action->setEnabled(false);
action->setToolTip(i18n("Open the channel settings dialog for this tab"));
- KToggleAction* channelListAction = new KToggleAction(i18n("Channel &List"), "view_text", KShortcut("F5"), m_viewContainer, SLOT(openChannelList()), actionCollection(), "open_channel_list");
+ KToggleAction* channelListAction = new KToggleAction(i18n("Channel &List"), "view_text", KShortcut("F5"), m_viewContainer, TQT_SLOT(openChannelList()), actionCollection(), "open_channel_list");
channelListAction->setEnabled(false);
channelListAction->setToolTip(i18n("Show a list of all the known channels on this server"));
- action = new KToggleAction(i18n("&URL Catcher"), "enhanced_browsing", KShortcut("F6"), m_viewContainer, SLOT(addUrlCatcher()), actionCollection(), "open_url_catcher");
+ action = new KToggleAction(i18n("&URL Catcher"), "enhanced_browsing", KShortcut("F6"), m_viewContainer, TQT_SLOT(addUrlCatcher()), actionCollection(), "open_url_catcher");
action->setToolTip(i18n("List all URLs that have been mentioned recently in a new tab"));
if (kapp->authorize("shell_access"))
{
- action = new KAction(i18n("New &Konsole"), "openterm", 0, m_viewContainer, SLOT(addKonsolePanel()), actionCollection(), "open_konsole");
+ action = new KAction(i18n("New &Konsole"), "openterm", 0, m_viewContainer, TQT_SLOT(addKonsolePanel()), actionCollection(), "open_konsole");
action->setToolTip(i18n("Open a terminal in a new tab"));
}
@@ -175,47 +175,47 @@ KonversationMainWindow::KonversationMainWindow() : KMainWindow(0,"main_window",
nextShortcut.setSeq(1, KKeySequence("Alt+Right"));
KShortcut prevShortcut = KStdAccel::tabPrev();
prevShortcut.setSeq(1, KKeySequence("Alt+Left"));
- action = new KAction(i18n("&Next Tab"), QApplication::reverseLayout() ? "previous" : "next",
- QApplication::reverseLayout() ? prevShortcut : nextShortcut,
- m_viewContainer, SLOT(showNextView()), actionCollection(), "next_tab");
+ action = new KAction(i18n("&Next Tab"), TQApplication::reverseLayout() ? "previous" : "next",
+ TQApplication::reverseLayout() ? prevShortcut : nextShortcut,
+ m_viewContainer, TQT_SLOT(showNextView()), actionCollection(), "next_tab");
action->setEnabled(false);
- action = new KAction(i18n("&Previous Tab"), QApplication::reverseLayout() ? "next" : "previous",
- QApplication::reverseLayout() ? nextShortcut : prevShortcut,
- m_viewContainer, SLOT(showPreviousView()),actionCollection(),"previous_tab");
+ action = new KAction(i18n("&Previous Tab"), TQApplication::reverseLayout() ? "next" : "previous",
+ TQApplication::reverseLayout() ? nextShortcut : prevShortcut,
+ m_viewContainer, TQT_SLOT(showPreviousView()),actionCollection(),"previous_tab");
action->setEnabled(false);
- action = new KAction(i18n("Close &Tab"),"tab_remove",KShortcut("Ctrl+w"), m_viewContainer, SLOT(closeCurrentView()),actionCollection(),"close_tab");
+ action = new KAction(i18n("Close &Tab"),"tab_remove",KShortcut("Ctrl+w"), m_viewContainer, TQT_SLOT(closeCurrentView()),actionCollection(),"close_tab");
action->setEnabled(false);
- action = new KAction(i18n("Next Active Tab"), 0, KShortcut("Ctrl+Alt+Space"), m_viewContainer, SLOT(showNextActiveView()),
+ action = new KAction(i18n("Next Active Tab"), 0, KShortcut("Ctrl+Alt+Space"), m_viewContainer, TQT_SLOT(showNextActiveView()),
actionCollection(), "next_active_tab");
action->setEnabled(false);
if (Preferences::tabPlacement()==Preferences::Left)
{
action = new KAction(i18n("Move Tab Up"), "1uparrow", KShortcut("Alt+Shift+Left"),
- m_viewContainer, SLOT(moveViewLeft()), actionCollection(), "move_tab_left");
+ m_viewContainer, TQT_SLOT(moveViewLeft()), actionCollection(), "move_tab_left");
action->setEnabled(false);
action->setToolTip("Move this tab");
action = new KAction(i18n("Move Tab Down"), "1downarrow", KShortcut("Alt+Shift+Right"),
- m_viewContainer, SLOT(moveViewRight()), actionCollection(), "move_tab_right");
+ m_viewContainer, TQT_SLOT(moveViewRight()), actionCollection(), "move_tab_right");
action->setEnabled(false);
action->setToolTip("Move this tab");
}
else
{
KAction* action2;
- if (QApplication::reverseLayout())
+ if (TQApplication::reverseLayout())
{
action2 = new KAction(i18n("Move Tab Right"), "1rightarrow", KShortcut("Alt+Shift+Right"),
- m_viewContainer, SLOT(moveViewLeft()), actionCollection(), "move_tab_left");
+ m_viewContainer, TQT_SLOT(moveViewLeft()), actionCollection(), "move_tab_left");
action = new KAction(i18n("Move Tab Left"), "1leftarrow", KShortcut("Alt+Shift+Left"),
- m_viewContainer, SLOT(moveViewRight()), actionCollection(), "move_tab_right");
+ m_viewContainer, TQT_SLOT(moveViewRight()), actionCollection(), "move_tab_right");
}
else
{
action = new KAction(i18n("Move Tab Left"), "1leftarrow", KShortcut("Alt+Shift+Left"),
- m_viewContainer, SLOT(moveViewLeft()), actionCollection(), "move_tab_left");
+ m_viewContainer, TQT_SLOT(moveViewLeft()), actionCollection(), "move_tab_left");
action2 = new KAction(i18n("Move Tab Right"), "1rightarrow", KShortcut("Alt+Shift+Right"),
- m_viewContainer, SLOT(moveViewRight()), actionCollection(), "move_tab_right");
+ m_viewContainer, TQT_SLOT(moveViewRight()), actionCollection(), "move_tab_right");
}
action->setEnabled(false);
@@ -224,81 +224,81 @@ KonversationMainWindow::KonversationMainWindow() : KMainWindow(0,"main_window",
action2->setToolTip("Move this tab");
}
- action = new KAction(i18n("Rejoin Channel"), 0, m_viewContainer, SLOT(rejoinChannel()), actionCollection(), "rejoin_channel");
+ action = new KAction(i18n("Rejoin Channel"), 0, m_viewContainer, TQT_SLOT(rejoinChannel()), actionCollection(), "rejoin_channel");
action->setEnabled(false);
- action = new KToggleAction(i18n("Enable Notifications"), 0, 0, m_viewContainer, SLOT(toggleViewNotifications()), actionCollection(), "tab_notifications");
+ action = new KToggleAction(i18n("Enable Notifications"), 0, 0, m_viewContainer, TQT_SLOT(toggleViewNotifications()), actionCollection(), "tab_notifications");
action->setEnabled(false);
- action = new KToggleAction(i18n("Join on Connect"), 0, 0, m_viewContainer, SLOT(toggleAutoJoin()), actionCollection(), "tab_autojoin");
+ action = new KToggleAction(i18n("Join on Connect"), 0, 0, m_viewContainer, TQT_SLOT(toggleAutoJoin()), actionCollection(), "tab_autojoin");
action->setEnabled(false);
KSelectAction* selectAction = new KSelectAction(i18n("Set Encoding"), "charset", 0, actionCollection(), "tab_encoding");
selectAction->setEditable(false);
- QStringList encodingDescs = Konversation::IRCCharsets::self()->availableEncodingDescriptiveNames();
+ TQStringList encodingDescs = Konversation::IRCCharsets::self()->availableEncodingDescriptiveNames();
encodingDescs.prepend(i18n("Default"));
selectAction->setItems(encodingDescs);
selectAction->setEnabled(false);
- connect(selectAction, SIGNAL(activated(int)), m_viewContainer, SLOT(changeViewCharset(int)));
+ connect(selectAction, TQT_SIGNAL(activated(int)), m_viewContainer, TQT_SLOT(changeViewCharset(int)));
- QSignalMapper* tabSelectionMapper = new QSignalMapper(this);
- connect(tabSelectionMapper, SIGNAL(mapped(int)), m_viewContainer, SLOT(goToView(int)));
+ TQSignalMapper* tabSelectionMapper = new TQSignalMapper(this);
+ connect(tabSelectionMapper, TQT_SIGNAL(mapped(int)), m_viewContainer, TQT_SLOT(goToView(int)));
for (uint i = 1; i <= 10; ++i)
{
- KAction* tabSelectionAction = new KAction(i18n("Go to Tab %1").arg(i), 0, KShortcut(QString("Alt+%1").arg(i%10)),
- tabSelectionMapper, SLOT(map()), actionCollection(), QString("go_to_tab_%1").arg(i).local8Bit());
+ KAction* tabSelectionAction = new KAction(i18n("Go to Tab %1").arg(i), 0, KShortcut(TQString("Alt+%1").arg(i%10)),
+ tabSelectionMapper, TQT_SLOT(map()), actionCollection(), TQString("go_to_tab_%1").arg(i).local8Bit());
tabSelectionMapper->setMapping( tabSelectionAction, i-1);
}
- action = new KAction(i18n("Clear &Marker Lines"), 0, KShortcut("CTRL+SHIFT+R"), m_viewContainer, SLOT(clearViewLines()),actionCollection(),"clear_lines");
+ action = new KAction(i18n("Clear &Marker Lines"), 0, KShortcut("CTRL+SHIFT+R"), m_viewContainer, TQT_SLOT(clearViewLines()),actionCollection(),"clear_lines");
action->setToolTip(i18n("Clear marker lines in the current tab"));
action->setEnabled(false);
- action = new KAction(i18n("&Clear Window"), 0, KShortcut("Ctrl+L"), m_viewContainer, SLOT(clearView()),actionCollection(),"clear_window");
+ action = new KAction(i18n("&Clear Window"), 0, KShortcut("Ctrl+L"), m_viewContainer, TQT_SLOT(clearView()),actionCollection(),"clear_window");
action->setToolTip(i18n("Clear the contents of the current tab"));
action->setEnabled(false);
- action = new KAction(i18n("Clear &All Windows"),0,KShortcut("CTRL+SHIFT+L"), m_viewContainer, SLOT(clearAllViews()),actionCollection(),"clear_tabs");
+ action = new KAction(i18n("Clear &All Windows"),0,KShortcut("CTRL+SHIFT+L"), m_viewContainer, TQT_SLOT(clearAllViews()),actionCollection(),"clear_tabs");
action->setToolTip(i18n("Clear the contents of all open tabs"));
action->setEnabled(false);
KToggleAction* awayAction = new KToggleAction(i18n("Global Away"), KShortcut("Ctrl+Shift+A"), actionCollection(), "toggle_away");
- connect(awayAction, SIGNAL(toggled(bool)), static_cast<KonversationApplication*>(kapp)->getAwayManager(), SLOT(toggleGlobalAway(bool)));
+ connect(awayAction, TQT_SIGNAL(toggled(bool)), static_cast<KonversationApplication*>(kapp)->getAwayManager(), TQT_SLOT(toggleGlobalAway(bool)));
awayAction->setEnabled(false);
- action = new KAction(i18n("&Join Channel..."), "add", KShortcut("Ctrl+J"), m_viewContainer, SLOT(showJoinChannelDialog()), actionCollection(), "join_channel");
+ action = new KAction(i18n("&Join Channel..."), "add", KShortcut("Ctrl+J"), m_viewContainer, TQT_SLOT(showJoinChannelDialog()), actionCollection(), "join_channel");
action->setEnabled(false);
action->setToolTip("Join a new channel on this server");
- action = KStdAction::find(m_viewContainer, SLOT(findText()), actionCollection());
+ action = KStdAction::find(m_viewContainer, TQT_SLOT(findText()), actionCollection());
action->setEnabled(false);
- action = KStdAction::findNext(m_viewContainer, SLOT(findNextText()), actionCollection());
+ action = KStdAction::findNext(m_viewContainer, TQT_SLOT(findNextText()), actionCollection());
action->setEnabled(false);
- action = KStdAction::findPrev(m_viewContainer, SLOT(findPrevText()), actionCollection());
+ action = KStdAction::findPrev(m_viewContainer, TQT_SLOT(findPrevText()), actionCollection());
action->setEnabled(false);
- action = new KAction(i18n("&IRC Color..."), "colorize", CTRL+Key_K, m_viewContainer, SLOT(insertIRCColor()), actionCollection(), "irc_colors");
+ action = new KAction(i18n("&IRC Color..."), "colorize", CTRL+Key_K, m_viewContainer, TQT_SLOT(insertIRCColor()), actionCollection(), "irc_colors");
action->setToolTip(i18n("Set the color of your current IRC message"));
action->setEnabled(false);
- action = new KAction(i18n("&Marker Line"), 0, KShortcut("Ctrl+R") , m_viewContainer, SLOT(insertMarkerLine()), actionCollection(), "insert_marker_line");
+ action = new KAction(i18n("&Marker Line"), 0, KShortcut("Ctrl+R") , m_viewContainer, TQT_SLOT(insertMarkerLine()), actionCollection(), "insert_marker_line");
action->setToolTip(i18n("Insert a horizontal line into the current tab that only you can see"));
action->setEnabled(false);
- action = new KAction(i18n("Special &Character..."), "char", KShortcut("Alt+Shift+C"), m_viewContainer, SLOT(insertCharacter()), actionCollection(), "insert_character");
+ action = new KAction(i18n("Special &Character..."), "char", KShortcut("Alt+Shift+C"), m_viewContainer, TQT_SLOT(insertCharacter()), actionCollection(), "insert_character");
action->setToolTip(i18n("Insert any character into your current IRC message"));
action->setEnabled(false);
- action = new KAction(i18n("Close &All Open Queries"), 0, KShortcut("F11"), m_viewContainer, SLOT(closeQueries()), actionCollection(), "close_queries");
+ action = new KAction(i18n("Close &All Open Queries"), 0, KShortcut("F11"), m_viewContainer, TQT_SLOT(closeQueries()), actionCollection(), "close_queries");
action->setEnabled(false);
KToggleAction* toggleChannelNickListsAction = new KToggleAction(i18n("Hide Nicklist"), 0,
- KShortcut("Ctrl+H"), m_viewContainer, SLOT(toggleChannelNicklists()), actionCollection(), "hide_nicknamelist");
+ KShortcut("Ctrl+H"), m_viewContainer, TQT_SLOT(toggleChannelNicklists()), actionCollection(), "hide_nicknamelist");
if (!Preferences::showNickList())
toggleChannelNickListsAction->setChecked(true);
// set up system tray
m_trayIcon = new Konversation::TrayIcon(this);
- connect(this, SIGNAL(endNotification()), m_trayIcon, SLOT(endNotification()));
- connect(KonversationApplication::instance(), SIGNAL(iconChanged(int)), m_trayIcon, SLOT(updateAppearance()));
- connect(m_trayIcon, SIGNAL(quitSelected()), this, SLOT(quitProgram()));
+ connect(this, TQT_SIGNAL(endNotification()), m_trayIcon, TQT_SLOT(endNotification()));
+ connect(KonversationApplication::instance(), TQT_SIGNAL(iconChanged(int)), m_trayIcon, TQT_SLOT(updateAppearance()));
+ connect(m_trayIcon, TQT_SIGNAL(quitSelected()), this, TQT_SLOT(quitProgram()));
KPopupMenu *trayMenu = m_trayIcon->contextMenu();
#ifdef USE_KNOTIFY
configureNotificationsAction->plug(trayMenu);
@@ -407,7 +407,7 @@ bool KonversationMainWindow::queryClose()
return true;
}
-void KonversationMainWindow::hideEvent(QHideEvent *e)
+void KonversationMainWindow::hideEvent(TQHideEvent *e)
{
emit triggerRememberLine();
@@ -416,28 +416,28 @@ void KonversationMainWindow::hideEvent(QHideEvent *e)
KMainWindow::hideEvent(e);
}
-void KonversationMainWindow::showEvent(QShowEvent *e)
+void KonversationMainWindow::showEvent(TQShowEvent *e)
{
emit cancelRememberLine();
KMainWindow::showEvent(e);
}
-void KonversationMainWindow::leaveEvent(QEvent* e)
+void KonversationMainWindow::leaveEvent(TQEvent* e)
{
m_statusBar->clearMainLabelTempText();
KMainWindow::leaveEvent(e);
}
-bool KonversationMainWindow::event(QEvent* e)
+bool KonversationMainWindow::event(TQEvent* e)
{
- if (e->type() == QEvent::WindowActivate)
+ if (e->type() == TQEvent::WindowActivate)
{
emit endNotification();
emit cancelRememberLine();
}
- else if(e->type() == QEvent::WindowDeactivate)
+ else if(e->type() == TQEvent::WindowDeactivate)
{
m_statusBar->clearMainLabelTempText();
@@ -457,7 +457,7 @@ void KonversationMainWindow::settingsChangedSlot()
// The appearanceChanged signal is connected to resetHasDirtySettings to reset this bool
if (!m_hasDirtySettings)
{
- QTimer::singleShot(0, KonversationApplication::instance(), SIGNAL(appearanceChanged()));
+ TQTimer::singleShot(0, KonversationApplication::instance(), TQT_SIGNAL(appearanceChanged()));
m_hasDirtySettings = true;
}
}
@@ -485,7 +485,7 @@ void KonversationMainWindow::toggleMenubar(bool dontShowWarning)
{
if (!dontShowWarning)
{
- QString accel = hideMenuBarAction->shortcut().toString();
+ TQString accel = hideMenuBarAction->shortcut().toString();
KMessageBox::information(this,
i18n("<qt>This will hide the menu bar completely. You can show it again by typing %1.</qt>").arg(accel),
"Hide menu bar","HideMenuBarWarning");
@@ -500,7 +500,7 @@ int KonversationMainWindow::configureToolbar()
{
saveMainWindowSettings(KGlobal::config());
KEditToolbar dlg(actionCollection(), xmlFile(), true, this);
- connect(&dlg, SIGNAL(newToolbarConfig()), SLOT(saveToolbarConfig()));
+ connect(&dlg, TQT_SIGNAL(newToolbarConfig()), TQT_SLOT(saveToolbarConfig()));
return dlg.exec();
}
@@ -510,7 +510,7 @@ void KonversationMainWindow::saveToolbarConfig()
applyMainWindowSettings(KGlobal::config());
}
-void KonversationMainWindow::focusAndShowErrorMessage(const QString &errorMsg)
+void KonversationMainWindow::focusAndShowErrorMessage(const TQString &errorMsg)
{
show();
KWin::demandAttention(winId());
@@ -528,7 +528,7 @@ void KonversationMainWindow::openPrefsDialog()
m_settingsDialog = new KonviSettingsDialog(this);
//User edited the configuration - update your local copies of the
//configuration data
- connect(m_settingsDialog, SIGNAL(settingsChanged()), this, SLOT(settingsChangedSlot()));
+ connect(m_settingsDialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(settingsChangedSlot()));
}
m_settingsDialog->show();
}
@@ -541,9 +541,9 @@ void KonversationMainWindow::openKeyBindings()
actionCollection()->action("irc_colors")->setText(i18n("Insert &IRC Color..."));
actionCollection()->action("insert_character")->setText(i18n("Insert Special &Character..."));
actionCollection()->action("insert_marker_line")->setText(i18n("Insert &Marker Line"));
- QString openChannelListString = actionCollection()->action("open_channel_list")->text();
+ TQString openChannelListString = actionCollection()->action("open_channel_list")->text();
actionCollection()->action("open_channel_list")->setText(i18n("&Channel List"));
- QString openLogFileString = actionCollection()->action("open_logfile")->text();
+ TQString openLogFileString = actionCollection()->action("open_logfile")->text();
actionCollection()->action("open_logfile")->setText(i18n("&Open Logfile"));
// Open shortcut configuration dialog.
@@ -566,15 +566,15 @@ void KonversationMainWindow::openServerList()
m_serverListDialog = new Konversation::ServerListDialog(this);
KonversationApplication* konvApp = static_cast<KonversationApplication*>(kapp);
- connect(m_serverListDialog, SIGNAL(serverGroupsChanged(const Konversation::ServerGroupSettings*)),
- konvApp, SIGNAL(serverGroupsChanged(const Konversation::ServerGroupSettings*)));
- connect(konvApp, SIGNAL(serverGroupsChanged(const Konversation::ServerGroupSettings*)),
- m_serverListDialog, SLOT(updateServerList()));
- connect(m_serverListDialog, SIGNAL(connectTo(Konversation::ConnectionFlag, int)),
- konvApp->getConnectionManager(), SLOT(connectTo(Konversation::ConnectionFlag, int)));
- connect(m_serverListDialog, SIGNAL(connectTo(Konversation::ConnectionFlag, ConnectionSettings&)),
- konvApp->getConnectionManager(), SLOT(connectTo(Konversation::ConnectionFlag, ConnectionSettings&)));
- connect(konvApp->getConnectionManager(), SIGNAL(closeServerList()), m_serverListDialog, SLOT(slotClose()));
+ connect(m_serverListDialog, TQT_SIGNAL(serverGroupsChanged(const Konversation::ServerGroupSettings*)),
+ konvApp, TQT_SIGNAL(serverGroupsChanged(const Konversation::ServerGroupSettings*)));
+ connect(konvApp, TQT_SIGNAL(serverGroupsChanged(const Konversation::ServerGroupSettings*)),
+ m_serverListDialog, TQT_SLOT(updateServerList()));
+ connect(m_serverListDialog, TQT_SIGNAL(connectTo(Konversation::ConnectionFlag, int)),
+ konvApp->getConnectionManager(), TQT_SLOT(connectTo(Konversation::ConnectionFlag, int)));
+ connect(m_serverListDialog, TQT_SIGNAL(connectTo(Konversation::ConnectionFlag, ConnectionSettings&)),
+ konvApp->getConnectionManager(), TQT_SLOT(connectTo(Konversation::ConnectionFlag, ConnectionSettings&)));
+ connect(konvApp->getConnectionManager(), TQT_SIGNAL(closeServerList()), m_serverListDialog, TQT_SLOT(slotClose()));
}
m_serverListDialog->show();
@@ -627,7 +627,7 @@ void KonversationMainWindow::openNotifications()
#endif
}
-void KonversationMainWindow::notifyAction(const QString& serverName, const QString& nick)
+void KonversationMainWindow::notifyAction(const TQString& serverName, const TQString& nick)
{
KonversationApplication* konvApp = static_cast<KonversationApplication*>(kapp);
Server* server = konvApp->getConnectionManager()->getServerByName(serverName);
@@ -635,18 +635,18 @@ void KonversationMainWindow::notifyAction(const QString& serverName, const QStri
}
// TODO: Let an own class handle notify things
-void KonversationMainWindow::setOnlineList(Server* notifyServer,const QStringList& /*list*/, bool /*changed*/)
+void KonversationMainWindow::setOnlineList(Server* notifyServer,const TQStringList& /*list*/, bool /*changed*/)
{
emit nicksNowOnline(notifyServer);
- // FIXME if (changed && nicksOnlinePanel) newText(nicksOnlinePanel, QString::null, true);
+ // FIXME if (changed && nicksOnlinePanel) newText(nicksOnlinePanel, TQString::null, true);
}
-QString KonversationMainWindow::currentURL(bool passNetwork)
+TQString KonversationMainWindow::currentURL(bool passNetwork)
{
return m_viewContainer->currentViewURL(passNetwork);
}
-QString KonversationMainWindow::currentTitle()
+TQString KonversationMainWindow::currentTitle()
{
return m_viewContainer->currentViewTitle();
}
diff --git a/konversation/src/konversationmainwindow.h b/konversation/src/konversationmainwindow.h
index 5781e9f..82ee0db 100644
--- a/konversation/src/konversationmainwindow.h
+++ b/konversation/src/konversationmainwindow.h
@@ -22,7 +22,7 @@
#include "nickinfo.h"
#include "server.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kmainwindow.h>
#include <kaction.h>
@@ -61,10 +61,10 @@ class KonversationMainWindow : public KMainWindow
* (e.g. the user choses "Chat with X" in kmail) but that person isn't
* recognised, we need to give immediate feedback to the user.
*/
- void focusAndShowErrorMessage(const QString &errorMsg);
+ void focusAndShowErrorMessage(const TQString &errorMsg);
- QString currentURL(bool passNetwork);
- QString currentTitle();
+ TQString currentURL(bool passNetwork);
+ TQString currentTitle();
signals:
void startNotifyTimer(int msec);
@@ -85,7 +85,7 @@ class KonversationMainWindow : public KMainWindow
void openIdentitiesDialog();
IdentityPtr editIdentity(IdentityPtr identity);
- void setOnlineList(Server* notifyServer,const QStringList& list, bool changed);
+ void setOnlineList(Server* notifyServer,const TQStringList& list, bool changed);
protected slots:
/** This is connected to the preferences settingsChanged signal and acts to compress
@@ -94,7 +94,7 @@ class KonversationMainWindow : public KMainWindow
*
* Do not connect to the settingsChanged signal elsewhere. If you want to know when
* the settings have changed, connect to:
- * KonversationApplication::instance(), SIGNAL(appearanceChanged())
+ * KonversationApplication::instance(), TQT_SIGNAL(appearanceChanged())
*/
void settingsChangedSlot();
@@ -116,18 +116,18 @@ class KonversationMainWindow : public KMainWindow
// it seems that moc does not honor #ifs in compile so we create an
// empty slot in our .cpp file rather than #if this slot out
void openNotifications();
- void notifyAction(const QString& serverName,const QString& nick);
+ void notifyAction(const TQString& serverName,const TQString& nick);
void quitProgram();
- void showEvent(QShowEvent* e);
- void hideEvent(QHideEvent* e);
- void leaveEvent(QEvent* e);
+ void showEvent(TQShowEvent* e);
+ void hideEvent(TQHideEvent* e);
+ void leaveEvent(TQEvent* e);
protected:
int confirmQuit();
bool queryClose();
- virtual bool event(QEvent* e);
+ virtual bool event(TQEvent* e);
ViewContainer* m_viewContainer;
KonversationStatusBar* m_statusBar;
diff --git a/konversation/src/konversationsound.cpp b/konversation/src/konversationsound.cpp
index 7eb6466..58764c8 100644
--- a/konversation/src/konversationsound.cpp
+++ b/konversation/src/konversationsound.cpp
@@ -23,8 +23,8 @@
namespace Konversation
{
- Sound::Sound(QObject* parent, const char* name)
- : QObject(parent, name)
+ Sound::Sound(TQObject* parent, const char* name)
+ : TQObject(parent, name)
{}
Sound::~Sound()
@@ -33,7 +33,7 @@ namespace Konversation
void Sound::play(const KURL& url)
{
#ifdef USE_KNOTIFY
- KNotifyClient::userEvent(0,QString(),1,1,url.path());
+ KNotifyClient::userEvent(0,TQString(),1,1,url.path());
#endif
}
}
diff --git a/konversation/src/konversationsound.h b/konversation/src/konversationsound.h
index 145b75b..00d273a 100644
--- a/konversation/src/konversationsound.h
+++ b/konversation/src/konversationsound.h
@@ -14,7 +14,7 @@
#ifndef KONVERSATIONKONVERSATIONSOUND_H
#define KONVERSATIONKONVERSATIONSOUND_H
-#include <qobject.h>
+#include <tqobject.h>
class KURL;
@@ -30,7 +30,7 @@ namespace Konversation
Q_OBJECT
public:
- explicit Sound(QObject *parent = 0, const char *name = 0);
+ explicit Sound(TQObject *parent = 0, const char *name = 0);
~Sound();
public slots:
diff --git a/konversation/src/konversationstatusbar.cpp b/konversation/src/konversationstatusbar.cpp
index db29a06..bdfc9ca 100644
--- a/konversation/src/konversationstatusbar.cpp
+++ b/konversation/src/konversationstatusbar.cpp
@@ -14,9 +14,9 @@
#include "viewcontainer.h"
#include "ssllabel.h"
-#include <qwhatsthis.h>
-#include <qlabel.h>
-#include <qtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
#include <kstatusbar.h>
#include <klocale.h>
@@ -33,31 +33,31 @@ KonversationStatusBar::KonversationStatusBar(KonversationMainWindow* window)
m_mainLabel = new KSqueezedTextLabel(m_window->statusBar(),"mainLabel");
setMainLabelText(i18n("Ready."));
- m_mainLabel->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed));
+ m_mainLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed));
m_mainLabel->setMinimumWidth(0);
// KSqueezedLabel calculates the wrong height. Popular workaround.
int height = m_window->fontMetrics().height()+2;
m_mainLabel->setFixedHeight(height);
- m_infoLabel = new QLabel(m_window->statusBar(), "infoLabel");
+ m_infoLabel = new TQLabel(m_window->statusBar(), "infoLabel");
m_infoLabel->hide();
- QWhatsThis::add(m_infoLabel, i18n("<qt>This shows the number of users in the channel, and the number of those that are operators (ops).<p>A channel operator is a user that has special privileges, such as the ability to kick and ban users, change the channel modes, make other users operators</qt>"));
+ TQWhatsThis::add(m_infoLabel, i18n("<qt>This shows the number of users in the channel, and the number of those that are operators (ops).<p>A channel operator is a user that has special privileges, such as the ability to kick and ban users, change the channel modes, make other users operators</qt>"));
- m_lagLabel = new QLabel(i18n("Lag: Unknown"), m_window->statusBar(), "lagLabel");
+ m_lagLabel = new TQLabel(i18n("Lag: Unknown"), m_window->statusBar(), "lagLabel");
m_lagLabel->hide();
m_sslLabel = new SSLLabel(m_window->statusBar(),"sslLabel");
m_sslLabel->setPixmap(SmallIcon("encrypted"));
m_sslLabel->hide();
- QWhatsThis::add(m_sslLabel, i18n("All communication with the server is encrypted. This makes it harder for someone to listen in on your communications."));
+ TQWhatsThis::add(m_sslLabel, i18n("All communication with the server is encrypted. This makes it harder for someone to listen in on your communications."));
m_window->statusBar()->addWidget(m_mainLabel, 1, false);
m_window->statusBar()->addWidget(m_infoLabel, 0, true);
m_window->statusBar()->addWidget(m_lagLabel, 0, true);
m_window->statusBar()->addWidget(m_sslLabel, 0, true);
- QWhatsThis::add(m_window->statusBar(), i18n("<qt>The status bar shows various messages, including any problems connecting to the server. On the far right the current delay to the server is shown. The delay is the time it takes for messages from you to reach the server, and from the server back to you.</qt>"));
+ TQWhatsThis::add(m_window->statusBar(), i18n("<qt>The status bar shows various messages, including any problems connecting to the server. On the far right the current delay to the server is shown. The delay is the time it takes for messages from you to reach the server, and from the server back to you.</qt>"));
}
KonversationStatusBar::~KonversationStatusBar()
@@ -80,7 +80,7 @@ void KonversationStatusBar::resetStatusBar()
resetLagLabel();
}
-void KonversationStatusBar::setMainLabelText(const QString& text)
+void KonversationStatusBar::setMainLabelText(const TQString& text)
{
m_oldMainLabelText = text;
@@ -89,7 +89,7 @@ void KonversationStatusBar::setMainLabelText(const QString& text)
m_mainLabel->setText(text);
}
-void KonversationStatusBar::setMainLabelTempText(const QString& text)
+void KonversationStatusBar::setMainLabelTempText(const TQString& text)
{
if (!text.isEmpty())
{
@@ -103,7 +103,7 @@ void KonversationStatusBar::setMainLabelTempText(const QString& text)
void KonversationStatusBar::clearMainLabelTempText()
{
// Unset the temp text so the next setMainLabelText won't fail.
- m_tempMainLabelText = QString();
+ m_tempMainLabelText = TQString();
m_mainLabel->setText(m_oldMainLabelText);
}
@@ -116,9 +116,9 @@ void KonversationStatusBar::setInfoLabelShown(bool shown)
m_infoLabel->hide();
}
-void KonversationStatusBar::updateInfoLabel(const QString& text)
+void KonversationStatusBar::updateInfoLabel(const TQString& text)
{
- QString formatted = Konversation::removeIrcMarkup(text);
+ TQString formatted = Konversation::removeIrcMarkup(text);
m_infoLabel->setText(formatted);
if (m_infoLabel->isHidden()) m_infoLabel->show();
@@ -126,7 +126,7 @@ void KonversationStatusBar::updateInfoLabel(const QString& text)
void KonversationStatusBar::clearInfoLabel()
{
- m_infoLabel->setText(QString());
+ m_infoLabel->setText(TQString());
}
void KonversationStatusBar::setLagLabelShown(bool shown)
@@ -143,7 +143,7 @@ void KonversationStatusBar::updateLagLabel(Server* lagServer, int msec)
{
setMainLabelText(i18n("Ready."));
- QString lagString = lagServer->getServerName() + " - ";
+ TQString lagString = lagServer->getServerName() + " - ";
if (msec == -1)
lagString += i18n("Lag: Unknown");
@@ -171,31 +171,31 @@ void KonversationStatusBar::setTooLongLag(Server* lagServer, int msec)
int minutes = seconds/60;
int hours = minutes/60;
int days = hours/24;
- QString lagString;
+ TQString lagString;
if (days)
{
- const QString daysString = i18n("1 day", "%n days", days);
- const QString hoursString = i18n("1 hour", "%n hours", (hours % 24));
- const QString minutesString = i18n("1 minute", "%n minutes", (minutes % 60));
- const QString secondsString = i18n("1 second", "%n seconds", (seconds % 60));
+ const TQString daysString = i18n("1 day", "%n days", days);
+ const TQString hoursString = i18n("1 hour", "%n hours", (hours % 24));
+ const TQString minutesString = i18n("1 minute", "%n minutes", (minutes % 60));
+ const TQString secondsString = i18n("1 second", "%n seconds", (seconds % 60));
lagString = i18n("%1 = name of server, %2 = (x days), %3 = (x hours), %4 = (x minutes), %5 = (x seconds)", "No answer from server %1 for more than %2, %3, %4, and %5.").arg(lagServer->getServerName())
.arg(daysString).arg(hoursString).arg(minutesString).arg(secondsString);
// or longer than an hour
}
else if (hours)
{
- const QString hoursString = i18n("1 hour", "%n hours", hours);
- const QString minutesString = i18n("1 minute", "%n minutes", (minutes % 60));
- const QString secondsString = i18n("1 second", "%n seconds", (seconds % 60));
+ const TQString hoursString = i18n("1 hour", "%n hours", hours);
+ const TQString minutesString = i18n("1 minute", "%n minutes", (minutes % 60));
+ const TQString secondsString = i18n("1 second", "%n seconds", (seconds % 60));
lagString = i18n("%1 = name of server, %2 = (x hours), %3 = (x minutes), %4 = (x seconds)", "No answer from server %1 for more than %2, %3, and %4.").arg(lagServer->getServerName())
.arg(hoursString).arg(minutesString).arg(secondsString);
// or longer than a minute
}
else if (minutes)
{
- const QString minutesString = i18n("1 minute", "%n minutes", minutes);
- const QString secondsString = i18n("1 second", "%n seconds", (seconds % 60));
+ const TQString minutesString = i18n("1 minute", "%n minutes", minutes);
+ const TQString secondsString = i18n("1 second", "%n seconds", (seconds % 60));
lagString = i18n("%1 = name of server, %2 = (x minutes), %3 = (x seconds)", "No answer from server %1 for more than %2 and %3.").arg(lagServer->getServerName())
.arg(minutesString).arg(secondsString);
// or just some seconds
@@ -210,7 +210,7 @@ void KonversationStatusBar::setTooLongLag(Server* lagServer, int msec)
if (lagServer==m_window->getViewContainer()->getFrontServer())
{
- QString lagString = lagServer->getServerName() + " - ";
+ TQString lagString = lagServer->getServerName() + " - ";
lagString.append(i18n("Lag: %1 s").arg(msec/1000));
if (m_lagLabel->isHidden()) m_lagLabel->show();
@@ -224,9 +224,9 @@ void KonversationStatusBar::updateSSLLabel(Server* server)
&& server->getUseSSL() && server->isConnected())
{
disconnect(m_sslLabel,0,0,0);
- connect(m_sslLabel,SIGNAL(clicked()),server,SLOT(showSSLDialog()));
- QToolTip::remove(m_sslLabel);
- QToolTip::add(m_sslLabel,server->getSSLInfo());
+ connect(m_sslLabel,TQT_SIGNAL(clicked()),server,TQT_SLOT(showSSLDialog()));
+ TQToolTip::remove(m_sslLabel);
+ TQToolTip::add(m_sslLabel,server->getSSLInfo());
m_sslLabel->show();
}
else
diff --git a/konversation/src/konversationstatusbar.h b/konversation/src/konversationstatusbar.h
index 931f7d6..fc569a3 100644
--- a/konversation/src/konversationstatusbar.h
+++ b/konversation/src/konversationstatusbar.h
@@ -12,10 +12,10 @@
#ifndef KONVERSATIONSTATUSBAR_H
#define KONVERSATIONSTATUSBAR_H
-#include <qobject.h>
+#include <tqobject.h>
-class QLabel;
+class TQLabel;
class KonversationMainWindow;
class KSqueezedTextLabel;
@@ -35,13 +35,13 @@ class KonversationStatusBar : public QObject
void resetStatusBar();
- void setMainLabelText(const QString& text);
+ void setMainLabelText(const TQString& text);
- void setMainLabelTempText(const QString& text);
+ void setMainLabelTempText(const TQString& text);
void clearMainLabelTempText();
void setInfoLabelShown(bool shown);
- void updateInfoLabel(const QString& text);
+ void updateInfoLabel(const TQString& text);
void clearInfoLabel();
void setLagLabelShown(bool shown);
@@ -56,12 +56,12 @@ class KonversationStatusBar : public QObject
KonversationMainWindow* m_window;
KSqueezedTextLabel* m_mainLabel;
- QLabel* m_infoLabel;
- QLabel* m_lagLabel;
+ TQLabel* m_infoLabel;
+ TQLabel* m_lagLabel;
SSLLabel* m_sslLabel;
- QString m_oldMainLabelText;
- QString m_tempMainLabelText;
+ TQString m_oldMainLabelText;
+ TQString m_tempMainLabelText;
};
#endif
diff --git a/konversation/src/konvibookmarkhandler.cpp b/konversation/src/konvibookmarkhandler.cpp
index 3258cba..5a76682 100644
--- a/konversation/src/konvibookmarkhandler.cpp
+++ b/konversation/src/konvibookmarkhandler.cpp
@@ -21,14 +21,14 @@ Copyright (C) 2002 Carsten Pfeiffer <pfeiffer@kde.org>
#include "connectionmanager.h"
#include "konvibookmarkmenu.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <kpopupmenu.h>
#include <kstandarddirs.h>
KonviBookmarkHandler::KonviBookmarkHandler(KonversationMainWindow* mainWindow)
-: QObject( mainWindow, "KonviBookmarkHandler" ),
+: TQObject( mainWindow, "KonviBookmarkHandler" ),
KBookmarkOwner(),
m_mainWindow(mainWindow)
{
@@ -50,7 +50,7 @@ m_mainWindow(mainWindow)
manager->setUpdate( true );
manager->setShowNSBookmarks( false );
- connect( manager, SIGNAL(changed(const QString &,const QString &)), SLOT(slotBookmarksChanged(const QString &,const QString &)));
+ connect( manager, TQT_SIGNAL(changed(const TQString &,const TQString &)), TQT_SLOT(slotBookmarksChanged(const TQString &,const TQString &)));
m_bookmarkMenu = new KonviBookmarkMenu( manager, this, m_menu, NULL, true );
}
@@ -63,32 +63,32 @@ KonviBookmarkHandler::~KonviBookmarkHandler()
void KonviBookmarkHandler::slotEditBookmarks()
{
KProcess proc;
- proc << QString::fromLatin1("keditbookmarks");
+ proc << TQString::fromLatin1("keditbookmarks");
proc << "--nobrowser";
proc << "--caption" << i18n("Konversation Bookmarks Editor");
proc << m_file;
proc.start(KProcess::DontCare);
}
-void KonviBookmarkHandler::slotBookmarksChanged( const QString &,
-const QString &)
+void KonviBookmarkHandler::slotBookmarksChanged( const TQString &,
+const TQString &)
{
// This is called when someone changes bookmarks in konversation
m_bookmarkMenu->slotBookmarksChanged("");
}
-void KonviBookmarkHandler::openBookmarkURL(const QString& url, const QString& /* title */)
+void KonviBookmarkHandler::openBookmarkURL(const TQString& url, const TQString& /* title */)
{
KonversationApplication* konvApp = static_cast<KonversationApplication*>(kapp);
konvApp->getConnectionManager()->connectTo(Konversation::SilentlyReuseConnection, url);
}
-QString KonviBookmarkHandler::currentURL() const
+TQString KonviBookmarkHandler::currentURL() const
{
return m_mainWindow->currentURL(true);
}
-QString KonviBookmarkHandler::currentTitle() const
+TQString KonviBookmarkHandler::currentTitle() const
{
return m_mainWindow->currentTitle();
}
diff --git a/konversation/src/konvibookmarkhandler.h b/konversation/src/konvibookmarkhandler.h
index 0071195..ae862aa 100644
--- a/konversation/src/konvibookmarkhandler.h
+++ b/konversation/src/konvibookmarkhandler.h
@@ -21,12 +21,12 @@ Copyright (C) 2002 Carsten Pfeiffer <pfeiffer@kde.org>
#include <kbookmarkmanager.h>
-class QString;
+class TQString;
class KPopupMenu;
class KonversationMainWindow;
class KonviBookmarkMenu;
-class KonviBookmarkHandler : public QObject, public KBookmarkOwner
+class KonviBookmarkHandler : public TQObject, public KBookmarkOwner
{
Q_OBJECT
@@ -37,12 +37,12 @@ class KonviBookmarkHandler : public QObject, public KBookmarkOwner
KPopupMenu* popupMenu();
// KBookmarkOwner interface:
- virtual void openBookmarkURL(const QString& url, const QString& title);
- virtual QString currentURL() const;
- virtual QString currentTitle() const;
+ virtual void openBookmarkURL(const TQString& url, const TQString& title);
+ virtual TQString currentURL() const;
+ virtual TQString currentTitle() const;
private slots:
- void slotBookmarksChanged(const QString &, const QString & caller);
+ void slotBookmarksChanged(const TQString &, const TQString & caller);
void slotEditBookmarks();
@@ -50,6 +50,6 @@ class KonviBookmarkHandler : public QObject, public KBookmarkOwner
KonversationMainWindow* m_mainWindow;
KPopupMenu *m_menu;
KonviBookmarkMenu *m_bookmarkMenu;
- QString m_file;
+ TQString m_file;
};
#endif // KONVIBOOKMARKHANDLER_H
diff --git a/konversation/src/konvibookmarkmenu.cpp b/konversation/src/konvibookmarkmenu.cpp
index 4474f6a..f16ee21 100644
--- a/konversation/src/konvibookmarkmenu.cpp
+++ b/konversation/src/konvibookmarkmenu.cpp
@@ -18,7 +18,7 @@ Copyright (C) 2002 Carsten Pfeiffer <pfeiffer@kde.org>
#include "konvibookmarkmenu.h"
#include "konvibookmarkhandler.h"
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kpopupmenu.h>
#include <kaction.h>
@@ -27,19 +27,19 @@ Copyright (C) 2002 Carsten Pfeiffer <pfeiffer@kde.org>
KonviBookmarkMenu::KonviBookmarkMenu( KBookmarkManager* mgr,
KonviBookmarkHandler * _owner, KPopupMenu * _parentMenu,
KActionCollection *collec, bool _isRoot, bool _add,
-const QString & parentAddress )
+const TQString & parentAddress )
: KBookmarkMenu( mgr, _owner, _parentMenu, collec, _isRoot, _add, parentAddress),
m_kOwner(_owner)
{
/*
* First, we disconnect KBookmarkMenu::slotAboutToShow()
* Then, we connect KonviBookmarkMenu::slotAboutToShow().
- * They are named differently because the SLOT() macro thinks we want
+ * They are named differently because the TQT_SLOT() macro thinks we want
* KonviBookmarkMenu::KBookmarkMenu::slotAboutToShow()
* Could this be solved if slotAboutToShow() is virtual in KBookmarMenu?
*/
- disconnect(_parentMenu, SIGNAL(aboutToShow()), this, SLOT(slotAboutToShow()));
- connect(_parentMenu, SIGNAL(aboutToShow()), SLOT(slotAboutToShow2()));
+ disconnect(_parentMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotAboutToShow()));
+ connect(_parentMenu, TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotAboutToShow2()));
}
/*
@@ -64,7 +64,7 @@ void KonviBookmarkMenu::slotAboutToShow2()
void KonviBookmarkMenu::refill()
{
m_lstSubMenus.clear();
- QPtrListIterator<KAction> it( m_actions );
+ TQPtrListIterator<KAction> it( m_actions );
for (; it.current(); ++it )
it.current()->unplug( m_parentMenu );
m_parentMenu->clear();
@@ -92,7 +92,7 @@ void KonviBookmarkMenu::fillBookmarkMenu()
for ( KBookmark bm = parentBookmark.first(); !bm.isNull();
bm = parentBookmark.next(bm) )
{
- QString text = bm.text();
+ TQString text = bm.text();
text.replace( '&', "&&" );
if ( !separatorInserted && m_bIsRoot) // inserted before the first konq bookmark, to avoid the separator if no konq bookmark
{
@@ -110,7 +110,7 @@ void KonviBookmarkMenu::fillBookmarkMenu()
// kdDebug(1203) << "Creating URL bookmark menu item for " << bm.text() << endl;
// create a normal URL item, with ID as a name
KAction * action = new KAction( text, bm.icon(), 0,
- this, SLOT( slotBookmarkSelected() ),
+ this, TQT_SLOT( slotBookmarkSelected() ),
m_actionCollection, bm.url().url().utf8() );
action->setStatusText( bm.url().prettyURL() );
@@ -147,7 +147,7 @@ void KonviBookmarkMenu::slotBookmarkSelected()
{
if ( !m_pOwner ) return; // this view doesn't handle bookmarks...
/* URL */
- m_kOwner->openBookmarkURL( QString::fromUtf8(sender()->name()),
+ m_kOwner->openBookmarkURL( TQString::fromUtf8(sender()->name()),
( (KAction *)sender() )->text() /* Title */ );
}
diff --git a/konversation/src/konvibookmarkmenu.h b/konversation/src/konvibookmarkmenu.h
index f7921c2..d3ccdfe 100644
--- a/konversation/src/konvibookmarkmenu.h
+++ b/konversation/src/konvibookmarkmenu.h
@@ -18,12 +18,12 @@ Copyright (C) 2002 Carsten Pfeiffer <pfeiffer@kde.org>
*/
-#include <qobject.h>
+#include <tqobject.h>
#include <kbookmarkmenu.h>
-class QString;
+class TQString;
class KBookmark;
class KAction;
class KActionMenu;
@@ -43,7 +43,7 @@ class KonviBookmarkMenu : public KBookmarkMenu
KonviBookmarkMenu( KBookmarkManager* mgr,
KonviBookmarkHandler * _owner, KPopupMenu * _parentMenu,
KActionCollection *collec, bool _isRoot,
- bool _add = true, const QString & parentAddress = "");
+ bool _add = true, const TQString & parentAddress = "");
void fillBookmarkMenu();
diff --git a/konversation/src/konviconfigdialog.cpp b/konversation/src/konviconfigdialog.cpp
index 386236d..f3beef5 100644
--- a/konversation/src/konviconfigdialog.cpp
+++ b/konversation/src/konviconfigdialog.cpp
@@ -23,7 +23,7 @@
/*
* KConfigDialog derivative allowing for a multi-level hierarchical TreeList.
* Differences from KConfigDialog:
- * - Use QStringList instead of QString for the item name(s) in addPage and
+ * - Use TQStringList instead of TQString for the item name(s) in addPage and
* addPageInternal, thus calling the respective KDialogBase methods which
* allow specifying a path from which the TreeList hierarchy is constructed.
* - Use 16x16 icons in the TreeList.
@@ -44,12 +44,12 @@
#include <kiconloader.h>
#include <kdebug.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qmap.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqmap.h>
-QAsciiDict<KonviConfigDialog> KonviConfigDialog::openDialogs;
+TQAsciiDict<KonviConfigDialog> KonviConfigDialog::openDialogs;
// This class is here purly so we don't break binary compatibility down the road.
class KonviConfigDialog::KConfigDialogPrivate
@@ -60,10 +60,10 @@ class KonviConfigDialog::KConfigDialogPrivate
bool shown;
KDialogBase::DialogType type;
KConfigDialogManager *manager;
- QMap<QWidget *, KConfigDialogManager *> managerForPage;
+ TQMap<TQWidget *, KConfigDialogManager *> managerForPage;
};
-KonviConfigDialog::KonviConfigDialog( QWidget *parent, const char *name,
+KonviConfigDialog::KonviConfigDialog( TQWidget *parent, const char *name,
KConfigSkeleton *config,
DialogType dialogType,
int dialogButtons,
@@ -79,17 +79,17 @@ KonviConfigDialog::KonviConfigDialog( QWidget *parent, const char *name,
}
else
{
- QCString genericName;
+ TQCString genericName;
genericName.sprintf("SettingsDialog-%p", this);
openDialogs.insert(genericName, this);
setName(genericName);
}
- connect(this, SIGNAL(okClicked()), this, SLOT(updateSettings()));
- connect(this, SIGNAL(applyClicked()), this, SLOT(updateSettings()));
- connect(this, SIGNAL(applyClicked()), this, SLOT(updateButtons()));
- connect(this, SIGNAL(defaultClicked()), this, SLOT(updateWidgetsDefault()));
- connect(this, SIGNAL(defaultClicked()), this, SLOT(updateButtons()));
+ connect(this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(updateSettings()));
+ connect(this, TQT_SIGNAL(applyClicked()), this, TQT_SLOT(updateSettings()));
+ connect(this, TQT_SIGNAL(applyClicked()), this, TQT_SLOT(updateButtons()));
+ connect(this, TQT_SIGNAL(defaultClicked()), this, TQT_SLOT(updateWidgetsDefault()));
+ connect(this, TQT_SIGNAL(defaultClicked()), this, TQT_SLOT(updateButtons()));
d->manager = new KConfigDialogManager(this, config);
setupManagerConnections(d->manager);
@@ -103,10 +103,10 @@ KonviConfigDialog::~KonviConfigDialog()
delete d;
}
-void KonviConfigDialog::addPage(QWidget *page,
- const QStringList &items,
- const QString &pixmapName,
- const QString &header,
+void KonviConfigDialog::addPage(TQWidget *page,
+ const TQStringList &items,
+ const TQString &pixmapName,
+ const TQString &header,
bool manage)
{
addPageInternal(page, items, pixmapName, header);
@@ -114,21 +114,21 @@ void KonviConfigDialog::addPage(QWidget *page,
d->manager->addWidget(page);
}
-void KonviConfigDialog::addPage(QWidget *page,
+void KonviConfigDialog::addPage(TQWidget *page,
KConfigSkeleton *config,
- const QStringList &items,
- const QString &pixmapName,
- const QString &header)
+ const TQStringList &items,
+ const TQString &pixmapName,
+ const TQString &header)
{
addPageInternal(page, items, pixmapName, header);
d->managerForPage[page] = new KConfigDialogManager(page, config);
setupManagerConnections(d->managerForPage[page]);
}
-void KonviConfigDialog::addPageInternal(QWidget *page,
- const QStringList &items,
- const QString &pixmapName,
- const QString &header)
+void KonviConfigDialog::addPageInternal(TQWidget *page,
+ const TQStringList &items,
+ const TQString &pixmapName,
+ const TQString &header)
{
if(d->shown)
{
@@ -141,26 +141,26 @@ void KonviConfigDialog::addPageInternal(QWidget *page,
case IconList:
case Tabbed:
{
- QVBox *frame = addVBoxPage(items, header, SmallIcon(pixmapName, 16));
+ TQVBox *frame = addVBoxPage(items, header, SmallIcon(pixmapName, 16));
frame->setSpacing( 0 );
frame->setMargin( 0 );
- page->reparent(((QWidget*)frame), 0, QPoint());
+ page->reparent(((TQWidget*)frame), 0, TQPoint());
m_lastAddedIndex = pageIndex(frame);
}
break;
case Swallow:
{
- page->reparent(this, 0, QPoint());
+ page->reparent(this, 0, TQPoint());
setMainWidget(page);
}
break;
case Plain:
{
- QFrame *main = plainPage();
- QVBoxLayout *topLayout = new QVBoxLayout( main, 0, 0 );
- page->reparent(((QWidget*)main), 0, QPoint());
+ TQFrame *main = plainPage();
+ TQVBoxLayout *topLayout = new TQVBoxLayout( main, 0, 0 );
+ page->reparent(((TQWidget*)main), 0, TQPoint());
topLayout->addWidget( page );
}
break;
@@ -172,12 +172,12 @@ void KonviConfigDialog::addPageInternal(QWidget *page,
void KonviConfigDialog::setupManagerConnections(KConfigDialogManager *manager)
{
- connect(manager, SIGNAL(settingsChanged()), this, SLOT(settingsChangedSlot()));
- connect(manager, SIGNAL(widgetModified()), this, SLOT(updateButtons()));
+ connect(manager, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(settingsChangedSlot()));
+ connect(manager, TQT_SIGNAL(widgetModified()), this, TQT_SLOT(updateButtons()));
- connect(this, SIGNAL(okClicked()), manager, SLOT(updateSettings()));
- connect(this, SIGNAL(applyClicked()), manager, SLOT(updateSettings()));
- connect(this, SIGNAL(defaultClicked()), manager, SLOT(updateWidgetsDefault()));
+ connect(this, TQT_SIGNAL(okClicked()), manager, TQT_SLOT(updateSettings()));
+ connect(this, TQT_SIGNAL(applyClicked()), manager, TQT_SLOT(updateSettings()));
+ connect(this, TQT_SIGNAL(defaultClicked()), manager, TQT_SLOT(updateWidgetsDefault()));
}
KonviConfigDialog* KonviConfigDialog::exists(const char* name)
@@ -199,7 +199,7 @@ void KonviConfigDialog::updateButtons()
if (only_once) return;
only_once = true;
- QMap<QWidget *, KConfigDialogManager *>::iterator it;
+ TQMap<TQWidget *, KConfigDialogManager *>::iterator it;
bool has_changed = d->manager->hasChanged() || hasChanged();
for (it = d->managerForPage.begin();
@@ -235,7 +235,7 @@ void KonviConfigDialog::settingsChangedSlot()
void KonviConfigDialog::show()
{
- QMap<QWidget *, KConfigDialogManager *>::iterator it;
+ TQMap<TQWidget *, KConfigDialogManager *>::iterator it;
updateWidgets();
d->manager->updateWidgets();
diff --git a/konversation/src/konviconfigdialog.h b/konversation/src/konviconfigdialog.h
index b53262b..75f1d1b 100644
--- a/konversation/src/konviconfigdialog.h
+++ b/konversation/src/konviconfigdialog.h
@@ -23,7 +23,7 @@
/*
* KConfigDialog derivative allowing for a multi-level hierarchical TreeList.
* Differences from KConfigDialog:
- * - Use QStringList instead of QString for the item name(s) in addPage and
+ * - Use TQStringList instead of TQString for the item name(s) in addPage and
* addPageInternal, thus calling the respective KDialogBase methods which
* allow specifying a path from which the TreeList hierarchy is constructed.
* - Use 16x16 icons in the TreeList.
@@ -39,7 +39,7 @@
#ifndef KONVICONFIGDIALOG_H
#define KONVICONFIGDIALOG_H
-#include <qasciidict.h>
+#include <tqasciidict.h>
#include <kdialogbase.h>
@@ -62,7 +62,7 @@ class KonviConfigDialog : public KDialogBase
void sigUpdateWidgets();
public:
- KonviConfigDialog( QWidget *parent, const char *name,
+ KonviConfigDialog( TQWidget *parent, const char *name,
KConfigSkeleton *config,
DialogType dialogType = IconList,
int dialogButtons = Default|Ok|Apply|Cancel|Help,
@@ -71,15 +71,15 @@ class KonviConfigDialog : public KDialogBase
~KonviConfigDialog();
- void addPage( QWidget *page, const QStringList &items,
- const QString &pixmapName,
- const QString &header=QString(),
+ void addPage( TQWidget *page, const TQStringList &items,
+ const TQString &pixmapName,
+ const TQString &header=TQString(),
bool manage=true );
- void addPage( QWidget *page, KConfigSkeleton *config,
- const QStringList &items,
- const QString &pixmapName,
- const QString &header=QString() );
+ void addPage( TQWidget *page, KConfigSkeleton *config,
+ const TQStringList &items,
+ const TQString &pixmapName,
+ const TQString &header=TQString() );
static KonviConfigDialog* exists( const char* name );
@@ -107,13 +107,13 @@ class KonviConfigDialog : public KDialogBase
void settingsChangedSlot();
private:
- void addPageInternal(QWidget *page, const QStringList &items,
- const QString &pixmapName, const QString &header);
+ void addPageInternal(TQWidget *page, const TQStringList &items,
+ const TQString &pixmapName, const TQString &header);
void setupManagerConnections(KConfigDialogManager *manager);
private:
- static QAsciiDict<KonviConfigDialog> openDialogs;
+ static TQAsciiDict<KonviConfigDialog> openDialogs;
class KConfigDialogPrivate;
diff --git a/konversation/src/konviface.h b/konversation/src/konviface.h
index 945bd33..3042ab8 100644
--- a/konversation/src/konviface.h
+++ b/konversation/src/konviface.h
@@ -15,8 +15,8 @@
#include "ignore.h"
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
#include <dcopobject.h>
@@ -26,23 +26,23 @@ class KonvIface : virtual public DCOPObject
K_DCOP
k_dcop:
- virtual void setAway(const QString &awaymessage) = 0;
+ virtual void setAway(const TQString &awaymessage) = 0;
virtual void setBack() = 0;
- virtual void sayToAll(const QString &message) = 0;
- virtual void actionToAll(const QString &message) = 0;
-
- virtual void raw(const QString& server,const QString& command) = 0;
- virtual void say(const QString& server,const QString& target,const QString& command) = 0;
- virtual void info(const QString& string) = 0;
- virtual void debug(const QString& string) = 0;
- virtual void error(const QString& string) = 0;
+ virtual void sayToAll(const TQString &message) = 0;
+ virtual void actionToAll(const TQString &message) = 0;
+
+ virtual void raw(const TQString& server,const TQString& command) = 0;
+ virtual void say(const TQString& server,const TQString& target,const TQString& command) = 0;
+ virtual void info(const TQString& string) = 0;
+ virtual void debug(const TQString& string) = 0;
+ virtual void error(const TQString& string) = 0;
virtual void insertMarkerLine() = 0;
- virtual void connectToServer(const QString& address, int port, const QString& channel, const QString& password) = 0;
- virtual QString getNickname (const QString &serverid) = 0;
- virtual QString getAnyNickname () = 0;
- virtual QStringList listServers() = 0;
- virtual QStringList listConnectedServers() = 0;
- virtual QString getChannelEncoding(const QString& server, const QString& channel) = 0;
+ virtual void connectToServer(const TQString& address, int port, const TQString& channel, const TQString& password) = 0;
+ virtual TQString getNickname (const TQString &serverid) = 0;
+ virtual TQString getAnyNickname () = 0;
+ virtual TQStringList listServers() = 0;
+ virtual TQStringList listConnectedServers() = 0;
+ virtual TQString getChannelEncoding(const TQString& server, const TQString& channel) = 0;
virtual void setScreenSaverStarted() = 0;
virtual void setScreenSaverStopped() = 0;
@@ -53,37 +53,37 @@ class KonvIdentityIface : virtual public DCOPObject
K_DCOP
k_dcop:
- virtual void setrealName(const QString &identity, const QString& name) = 0;
- virtual QString getrealName(const QString &identity) = 0;
- virtual void setIdent(const QString &identity, const QString& ident) = 0;
- virtual QString getIdent(const QString &identity) = 0;
+ virtual void setrealName(const TQString &identity, const TQString& name) = 0;
+ virtual TQString getrealName(const TQString &identity) = 0;
+ virtual void setIdent(const TQString &identity, const TQString& ident) = 0;
+ virtual TQString getIdent(const TQString &identity) = 0;
- virtual void setNickname(const QString &identity, int index,const QString& nick) = 0;
- virtual QString getNickname(const QString &identity, int index) = 0;
+ virtual void setNickname(const TQString &identity, int index,const TQString& nick) = 0;
+ virtual TQString getNickname(const TQString &identity, int index) = 0;
- virtual void setBot(const QString &identity, const QString& bot) = 0;
- virtual QString getBot(const QString &identity) = 0;
- virtual void setPassword(const QString &identity, const QString& password) = 0;
- virtual QString getPassword(const QString &identity) = 0;
+ virtual void setBot(const TQString &identity, const TQString& bot) = 0;
+ virtual TQString getBot(const TQString &identity) = 0;
+ virtual void setPassword(const TQString &identity, const TQString& password) = 0;
+ virtual TQString getPassword(const TQString &identity) = 0;
- virtual void setNicknameList(const QString &identity, const QStringList& newList) = 0;
- virtual QStringList getNicknameList(const QString &identity) = 0;
+ virtual void setNicknameList(const TQString &identity, const TQStringList& newList) = 0;
+ virtual TQStringList getNicknameList(const TQString &identity) = 0;
- virtual void setQuitReason(const QString &identity, const QString& reason) = 0;
- virtual QString getQuitReason(const QString &identity) = 0;
- virtual void setPartReason(const QString &identity, const QString& reason) = 0;
- virtual QString getPartReason(const QString &identity) = 0;
- virtual void setKickReason(const QString &identity, const QString& reason) = 0;
- virtual QString getKickReason(const QString &identity) = 0;
+ virtual void setQuitReason(const TQString &identity, const TQString& reason) = 0;
+ virtual TQString getQuitReason(const TQString &identity) = 0;
+ virtual void setPartReason(const TQString &identity, const TQString& reason) = 0;
+ virtual TQString getPartReason(const TQString &identity) = 0;
+ virtual void setKickReason(const TQString &identity, const TQString& reason) = 0;
+ virtual TQString getKickReason(const TQString &identity) = 0;
- virtual void setShowAwayMessage(const QString &identity, bool state) = 0;
- virtual bool getShowAwayMessage(const QString &identity) = 0;
+ virtual void setShowAwayMessage(const TQString &identity, bool state) = 0;
+ virtual bool getShowAwayMessage(const TQString &identity) = 0;
- virtual void setAwayMessage(const QString &identity, const QString& message) = 0;
- virtual QString getAwayMessage(const QString &identity) = 0;
- virtual void setReturnMessage(const QString &identity, const QString& message) = 0;
- virtual QString getReturnMessage(const QString &identity) = 0;
+ virtual void setAwayMessage(const TQString &identity, const TQString& message) = 0;
+ virtual TQString getAwayMessage(const TQString &identity) = 0;
+ virtual void setReturnMessage(const TQString &identity, const TQString& message) = 0;
+ virtual TQString getReturnMessage(const TQString &identity) = 0;
- virtual QStringList listIdentities() = 0;
+ virtual TQStringList listIdentities() = 0;
};
#endif
diff --git a/konversation/src/konvisettingsdialog.cpp b/konversation/src/konvisettingsdialog.cpp
index 0e00a35..b5ea5ab 100644
--- a/konversation/src/konvisettingsdialog.cpp
+++ b/konversation/src/konvisettingsdialog.cpp
@@ -34,8 +34,8 @@
#include "watchednicknames_preferences.h"
#include "tabnotifications_preferences.h"
-#include <qsplitter.h>
-#include <qcombobox.h>
+#include <tqsplitter.h>
+#include <tqcombobox.h>
#include <klocale.h>
#include <kdebug.h>
@@ -43,13 +43,13 @@
#include <klistview.h>
-KonviSettingsDialog::KonviSettingsDialog( QWidget *parent) :
+KonviSettingsDialog::KonviSettingsDialog( TQWidget *parent) :
KonviConfigDialog( parent, "settings", Preferences::self(), KDialogBase::TreeList)
{
m_modified = false;
setShowIconsInTreeList(true);
- QStringList iconPath;
+ TQStringList iconPath;
iconPath << i18n("Interface");
setFolderIcon( iconPath, SmallIcon("looknfeel") );
@@ -66,7 +66,7 @@ KonviSettingsDialog::KonviSettingsDialog( QWidget *parent) :
iconPath<< i18n("Notifications");
setFolderIcon( iconPath, SmallIcon("playsound") );
- QStringList pagePath;
+ TQStringList pagePath;
//Interface/Chat Window
m_confChatWindowAppearanceWdg = new ChatWindowAppearance_Config( 0, "ChatWindowAppearance" );
@@ -83,7 +83,7 @@ KonviSettingsDialog::KonviSettingsDialog( QWidget *parent) :
pagePath << i18n("Interface") << i18n("Nicklist Themes");
addPage ( m_confThemeWdg, pagePath, "iconthemes", i18n("Nicklist Themes") );
m_indexToPageMapping.insert(lastAddedIndex(), m_confThemeWdg);
- connect(m_confThemeWdg, SIGNAL(modified()), this, SLOT(modifiedSlot()));
+ connect(m_confThemeWdg, TQT_SIGNAL(modified()), this, TQT_SLOT(modifiedSlot()));
//Interface/Colors
m_confColorsAppearanceWdg = new ColorsAppearance_Config( this, "ColorsAppearance" );
@@ -103,7 +103,7 @@ KonviSettingsDialog::KonviSettingsDialog( QWidget *parent) :
pagePath << i18n("Interface") << i18n("Quick Buttons");
addPage ( m_confQuickButtonsWdg, pagePath, "keyboard", i18n("Quick Buttons") );
m_indexToPageMapping.insert(lastAddedIndex(), m_confQuickButtonsWdg);
- connect(m_confQuickButtonsWdg, SIGNAL(modified()), this, SLOT(modifiedSlot()));
+ connect(m_confQuickButtonsWdg, TQT_SIGNAL(modified()), this, TQT_SLOT(modifiedSlot()));
//Interface/Tabs
m_confTabBarWdg = new Tabs_Config( this, "TabBar" );
@@ -134,7 +134,7 @@ KonviSettingsDialog::KonviSettingsDialog( QWidget *parent) :
pagePath.clear();
pagePath << i18n("Behavior") << i18n("Nickname List");
addPage ( m_confNicklistBehaviorWdg, pagePath, "player_playlist", i18n("Nickname List") );
- connect(m_confNicklistBehaviorWdg, SIGNAL(modified()), this, SLOT(modifiedSlot()));
+ connect(m_confNicklistBehaviorWdg, TQT_SIGNAL(modified()), this, TQT_SLOT(modifiedSlot()));
m_indexToPageMapping.insert(lastAddedIndex(), m_confNicklistBehaviorWdg);
//Behaviour/Command Aliases
@@ -143,7 +143,7 @@ KonviSettingsDialog::KonviSettingsDialog( QWidget *parent) :
pagePath << i18n("Behavior") << i18n("Command Aliases");
addPage ( m_confAliasWdg, pagePath, "editcopy", i18n("Command Aliases") );
m_indexToPageMapping.insert(lastAddedIndex(), m_confAliasWdg);
- connect(m_confAliasWdg, SIGNAL(modified()), this, SLOT(modifiedSlot()));
+ connect(m_confAliasWdg, TQT_SIGNAL(modified()), this, TQT_SLOT(modifiedSlot()));
//Behaviour/Auto Replace
m_confAutoreplaceWdg = new Autoreplace_Config( this, "Autoreplace" );
@@ -151,14 +151,14 @@ KonviSettingsDialog::KonviSettingsDialog( QWidget *parent) :
pagePath << i18n("Behavior") << i18n("Auto Replace");
addPage ( m_confAutoreplaceWdg, pagePath, "kview", i18n("Auto Replace") );
m_indexToPageMapping.insert(lastAddedIndex(), m_confAutoreplaceWdg);
- connect(m_confAutoreplaceWdg, SIGNAL(modified()), this, SLOT(modifiedSlot()));
+ connect(m_confAutoreplaceWdg, TQT_SIGNAL(modified()), this, TQT_SLOT(modifiedSlot()));
//Behaviour/Ignore
m_confIgnoreWdg = new Ignore_Config(this, "Ignore");
pagePath.clear();
pagePath << i18n("Behavior") << i18n("Ignore");
addPage ( m_confIgnoreWdg, pagePath, "stop", i18n("Ignore") );
- connect(m_confIgnoreWdg, SIGNAL(modified()), this, SLOT(modifiedSlot()));
+ connect(m_confIgnoreWdg, TQT_SIGNAL(modified()), this, TQT_SLOT(modifiedSlot()));
m_indexToPageMapping.insert(lastAddedIndex(), m_confIgnoreWdg);
//Behaviour/Logging
@@ -183,7 +183,7 @@ KonviSettingsDialog::KonviSettingsDialog( QWidget *parent) :
pagePath.clear();
pagePath << i18n("Notifications") << i18n("Highlight");
addPage ( m_confHighlightWdg, pagePath, "paintbrush", i18n("Highlight") );
- connect(m_confHighlightWdg, SIGNAL(modified()), this, SLOT(modifiedSlot()));
+ connect(m_confHighlightWdg, TQT_SIGNAL(modified()), this, TQT_SLOT(modifiedSlot()));
m_indexToPageMapping.insert(lastAddedIndex(), m_confHighlightWdg);
//Notification/Watched Nicknames
@@ -193,7 +193,7 @@ KonviSettingsDialog::KonviSettingsDialog( QWidget *parent) :
addPage ( m_confWatchedNicknamesWdg, pagePath, "kfind", i18n("Watched Nicknames") );
// remember index so we can open this page later from outside
m_watchedNicknamesIndex=lastAddedIndex();
- connect(m_confWatchedNicknamesWdg, SIGNAL(modified()), this, SLOT(modifiedSlot()));
+ connect(m_confWatchedNicknamesWdg, TQT_SIGNAL(modified()), this, TQT_SLOT(modifiedSlot()));
m_indexToPageMapping.insert(lastAddedIndex(), m_confWatchedNicknamesWdg);
//Notification/On Screen Display
@@ -210,16 +210,16 @@ KonviSettingsDialog::KonviSettingsDialog( QWidget *parent) :
pagePath << i18n("Notifications") << i18n("Warning Dialogs");
addPage ( m_confWarningsWdg, pagePath, "messagebox_warning", i18n("Warning Dialogs") );
m_indexToPageMapping.insert(lastAddedIndex(), m_confWarningsWdg);
- connect(m_confWarningsWdg, SIGNAL(modified()), this, SLOT(modifiedSlot()));
+ connect(m_confWarningsWdg, TQT_SIGNAL(modified()), this, TQT_SLOT(modifiedSlot()));
unfoldTreeList();
}
-void KonviSettingsDialog::showEvent(QShowEvent* e)
+void KonviSettingsDialog::showEvent(TQShowEvent* e)
{
KonviConfigDialog::showEvent(e);
- QSplitter* splitter = ((QSplitter*)child(0, "QSplitter", true));
+ TQSplitter* splitter = ((TQSplitter*)child(0, "TQSplitter", true));
KListView* listView = ((KListView*)child(0, "KListView", true));
if (splitter && listView)
@@ -231,8 +231,8 @@ void KonviSettingsDialog::showEvent(QShowEvent* e)
{
int shiftSplitterBy = content - visible;
resize(width()+shiftSplitterBy, height());
- QValueList<int> oldSizes = splitter->sizes();
- QValueList<int> newSizes;
+ TQValueList<int> oldSizes = splitter->sizes();
+ TQValueList<int> newSizes;
newSizes << oldSizes[0] + shiftSplitterBy << oldSizes[1] - shiftSplitterBy;
splitter->setSizes(newSizes);
}
@@ -245,7 +245,7 @@ void KonviSettingsDialog::modifiedSlot()
// something or went back to the old settings
// kdDebug() << "KonviSettingsDialog::modifiedSlot()" << endl;
m_modified = false;
- QIntDictIterator<KonviSettingsPage> it( m_indexToPageMapping );
+ TQIntDictIterator<KonviSettingsPage> it( m_indexToPageMapping );
for ( ; it.current(); ++it )
{
if ( (*it).hasChanged() )
@@ -264,7 +264,7 @@ KonviSettingsDialog::~KonviSettingsDialog()
void KonviSettingsDialog::updateSettings()
{
- QIntDictIterator<KonviSettingsPage> it( m_indexToPageMapping );
+ TQIntDictIterator<KonviSettingsPage> it( m_indexToPageMapping );
for ( ; it.current(); ++it )
{
// this is for the non KConfigXT parts to update the UI (like quick buttons)
@@ -276,7 +276,7 @@ void KonviSettingsDialog::updateSettings()
void KonviSettingsDialog::updateWidgets()
{
- QIntDictIterator<KonviSettingsPage> it( m_indexToPageMapping );
+ TQIntDictIterator<KonviSettingsPage> it( m_indexToPageMapping );
for ( ; it.current(); ++it )
{
(*it).loadSettings();
@@ -286,7 +286,7 @@ void KonviSettingsDialog::updateWidgets()
void KonviSettingsDialog::updateWidgetsDefault()
{
- QIntDictIterator<KonviSettingsPage> it( m_indexToPageMapping );
+ TQIntDictIterator<KonviSettingsPage> it( m_indexToPageMapping );
for ( ; it.current(); ++it )
{
(*it).restorePageToDefaults();
diff --git a/konversation/src/konvisettingsdialog.h b/konversation/src/konvisettingsdialog.h
index b9b0878..2e9089a 100644
--- a/konversation/src/konvisettingsdialog.h
+++ b/konversation/src/konvisettingsdialog.h
@@ -17,8 +17,8 @@
#include "konvisettingspage.h"
#include <kdialogbase.h>
-#include <qasciidict.h>
-#include <qintdict.h>
+#include <tqasciidict.h>
+#include <tqintdict.h>
class Warnings_Config;
@@ -71,7 +71,7 @@ class KDEUI_EXPORT KonviSettingsDialog : public KonviConfigDialog
bool m_modified;
public:
- explicit KonviSettingsDialog(QWidget *parent);
+ explicit KonviSettingsDialog(TQWidget *parent);
~KonviSettingsDialog();
void openWatchedNicknamesPage();
@@ -85,11 +85,11 @@ class KDEUI_EXPORT KonviSettingsDialog : public KonviConfigDialog
protected:
virtual bool hasChanged();
virtual bool isDefault();
- virtual void showEvent(QShowEvent* e);
+ virtual void showEvent(TQShowEvent* e);
// remember page index
unsigned int m_watchedNicknamesIndex;
- QIntDict<KonviSettingsPage> m_indexToPageMapping;
+ TQIntDict<KonviSettingsPage> m_indexToPageMapping;
};
#endif //KONVISETTINGSDIALOG_H
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())
{
diff --git a/konversation/src/linkaddressbook/addressbook.h b/konversation/src/linkaddressbook/addressbook.h
index 9b906f5..5cc6b42 100644
--- a/konversation/src/linkaddressbook/addressbook.h
+++ b/konversation/src/linkaddressbook/addressbook.h
@@ -19,8 +19,8 @@
#include <kabc/stdaddressbook.h>
#include <kstaticdeleter.h>
-#include <qobject.h>
-#include <qregexp.h>
+#include <tqobject.h>
+#include <tqregexp.h>
#include <config.h>
#include "kimiface.h"
@@ -37,55 +37,55 @@ namespace Konversation
virtual ~Addressbook(); // This needs to be public so it can be deleted by our static pointer
static Addressbook *self();
- QStringList allContactsNicks();
- QStringList allContacts();
- QStringList reachableContacts();
- QStringList onlineContacts();
- QStringList fileTransferContacts();
- bool isPresent( const QString &uid );
- QString displayName( const QString &uid );
- QString presenceString( const QString &uid );
- bool canReceiveFiles( const QString &uid );
- bool canRespond( const QString &uid );
- QString locate( const QString &contactId, const QString &protocol );
+ TQStringList allContactsNicks();
+ TQStringList allContacts();
+ TQStringList reachableContacts();
+ TQStringList onlineContacts();
+ TQStringList fileTransferContacts();
+ bool isPresent( const TQString &uid );
+ TQString displayName( const TQString &uid );
+ TQString presenceString( const TQString &uid );
+ bool canReceiveFiles( const TQString &uid );
+ bool canRespond( const TQString &uid );
+ TQString locate( const TQString &contactId, const TQString &protocol );
// metadata
- QPixmap icon( const QString &uid );
- QString context( const QString &uid );
- virtual int presenceStatus(const QString &uid);
+ TQPixmap icon( const TQString &uid );
+ TQString context( const TQString &uid );
+ virtual int presenceStatus(const TQString &uid);
// App capabilities
- QStringList protocols();
+ TQStringList protocols();
/**
* Message a contact by their metaContactId, aka their uid in KABC.
*/
- void messageContact( const QString &uid, const QString& message );
+ void messageContact( const TQString &uid, const TQString& message );
/**
* Open a chat to a contact, and optionally set some initial text
*/
- void messageNewContact( const QString &contactId, const QString &protocolId );
+ void messageNewContact( const TQString &contactId, const TQString &protocolId );
/**
* Message a contact by their metaContactId, aka their uid in KABC.
*/
- void chatWithContact( const QString &uid );
+ void chatWithContact( const TQString &uid );
/**
* Send the file to the contact
*/
- void sendFile(const QString &uid, const KURL &sourceURL,
- const QString &altFileName = QString(), uint fileSize = 0);
+ void sendFile(const TQString &uid, const KURL &sourceURL,
+ const TQString &altFileName = TQString(), uint fileSize = 0);
/**
* Lets outsiders tell us to emit presenceChanged signal.
*/
- void emitContactPresenceChanged( const QString &uid, int presence);
+ void emitContactPresenceChanged( const TQString &uid, int presence);
/**
* Lets outsiders tell us to emit presenceChanged signal.
*/
- void emitContactPresenceChanged(const QString &uid);
+ void emitContactPresenceChanged(const TQString &uid);
- bool addContact( const QString &contactId, const QString &protocolId );
+ bool addContact( const TQString &contactId, const TQString &protocolId );
protected:
Addressbook();
diff --git a/konversation/src/linkaddressbook/addressbook_base.cpp b/konversation/src/linkaddressbook/addressbook_base.cpp
index b8f7243..2740e12 100644
--- a/konversation/src/linkaddressbook/addressbook_base.cpp
+++ b/konversation/src/linkaddressbook/addressbook_base.cpp
@@ -18,7 +18,7 @@
#include "../konversationmainwindow.h"
#include "../channel.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <klocale.h>
#include <kstringhandler.h>
@@ -42,7 +42,7 @@ namespace Konversation
KABC::AddressBook *AddressbookBase::getAddressBook() { return addressBook; }
- KABC::Addressee AddressbookBase::getKABCAddresseeFromNick(const QString &ircnick, const QString &servername, const QString &servergroup)
+ KABC::Addressee AddressbookBase::getKABCAddresseeFromNick(const TQString &ircnick, const TQString &servername, const TQString &servergroup)
{
KABC::AddressBook::Iterator it;
@@ -53,7 +53,7 @@ namespace Konversation
}
return KABC::Addressee();
}
- KABC::Addressee AddressbookBase::getKABCAddresseeFromNick(const QString &nick_server)
+ KABC::Addressee AddressbookBase::getKABCAddresseeFromNick(const TQString &nick_server)
{
KABC::AddressBook::Iterator it;
@@ -65,21 +65,21 @@ namespace Konversation
return KABC::Addressee();
}
- bool AddressbookBase::hasNick(const KABC::Addressee &addressee, const QString &ircnick, const QString &servername, const QString &servergroup)
+ bool AddressbookBase::hasNick(const KABC::Addressee &addressee, const TQString &ircnick, const TQString &servername, const TQString &servergroup)
{
- QString lnick = ircnick.lower();
- QString lnick_servername;
- QString lnick_servergroup;
+ TQString lnick = ircnick.lower();
+ TQString lnick_servername;
+ TQString lnick_servergroup;
if(!servername.isEmpty())
- lnick_servername = lnick + QChar(0xE120) + servername.lower();
+ lnick_servername = lnick + TQChar(0xE120) + servername.lower();
if(!servergroup.isEmpty())
- lnick_servergroup = lnick + QChar(0xE120) + servergroup.lower();
+ lnick_servergroup = lnick + TQChar(0xE120) + servergroup.lower();
- QString lit;
- QStringList addresses = QStringList::split( QChar( 0xE000 ), addressee.custom("messaging/irc", "All") );
- QStringList::iterator end = addresses.end();
- for ( QStringList::iterator it = addresses.begin(); it != end; ++it )
+ TQString lit;
+ TQStringList addresses = TQStringList::split( TQChar( 0xE000 ), addressee.custom("messaging/irc", "All") );
+ TQStringList::iterator end = addresses.end();
+ for ( TQStringList::iterator it = addresses.begin(); it != end; ++it )
{
lit = (*it).lower();
if(lit == lnick || lit == lnick_servername || lit == lnick_servergroup)
@@ -89,46 +89,46 @@ namespace Konversation
}
- QStringList AddressbookBase::allContactsNicksForServer(const QString &servername, const QString &servergroup)
+ TQStringList AddressbookBase::allContactsNicksForServer(const TQString &servername, const TQString &servergroup)
{
- QStringList contacts;
+ TQStringList contacts;
for( KABC::AddressBook::Iterator it = addressBook->begin(); it != addressBook->end(); ++it )
contacts += getNicks(*it, servername, servergroup);
return contacts;
}
- QStringList AddressbookBase::getNicks(const KABC::Addressee &addressee, const QString &servername, const QString &servergroup)
+ TQStringList AddressbookBase::getNicks(const KABC::Addressee &addressee, const TQString &servername, const TQString &servergroup)
{
- QStringList nicks;
+ TQStringList nicks;
- QString lservername = servername.lower();
- QString lservergroup = servergroup.lower();
+ TQString lservername = servername.lower();
+ TQString lservergroup = servergroup.lower();
- QStringList addresses = QStringList::split( QChar( 0xE000 ), addressee.custom("messaging/irc", "All") );
- QStringList::iterator end = addresses.end();
- for ( QStringList::iterator it = addresses.begin(); it != end; ++it )
+ TQStringList addresses = TQStringList::split( TQChar( 0xE000 ), addressee.custom("messaging/irc", "All") );
+ TQStringList::iterator end = addresses.end();
+ for ( TQStringList::iterator it = addresses.begin(); it != end; ++it )
{
- if(!(*it).contains(QChar( 0xE120)))
+ if(!(*it).contains(TQChar( 0xE120)))
nicks.append(*it);
else
{
- QString it_server = (*it).section(QChar( 0xE120), 0,0).lower();
+ TQString it_server = (*it).section(TQChar( 0xE120), 0,0).lower();
if(it_server == lservername || it_server == lservergroup)
- nicks.append((*it).section(QChar( 0xE120 ), 1,1));
+ nicks.append((*it).section(TQChar( 0xE120 ), 1,1));
}
}
return nicks;
}
- bool AddressbookBase::hasNick(const KABC::Addressee &addressee, const QString &nick_server)
+ bool AddressbookBase::hasNick(const KABC::Addressee &addressee, const TQString &nick_server)
{
- QString lnick_server = nick_server.lower();
- QStringList addresses = QStringList::split( QChar( 0xE000 ), addressee.custom("messaging/irc", "All") );
- QStringList::iterator end = addresses.end();
- for ( QStringList::iterator it = addresses.begin(); it != end; ++it )
+ TQString lnick_server = nick_server.lower();
+ TQStringList addresses = TQStringList::split( TQChar( 0xE000 ), addressee.custom("messaging/irc", "All") );
+ TQStringList::iterator end = addresses.end();
+ for ( TQStringList::iterator it = addresses.begin(); it != end; ++it )
{
- QString it_server = (*it).section(QChar( 0xE120), 0,0).lower();
+ TQString it_server = (*it).section(TQChar( 0xE120), 0,0).lower();
if(it_server ==lnick_server)
return true;
}
@@ -136,7 +136,7 @@ namespace Konversation
}
- QString AddressbookBase::getBestNick(const KABC::Addressee &addressee)
+ TQString AddressbookBase::getBestNick(const KABC::Addressee &addressee)
{
//Look for a nickinfo for this nick, and use that. That way we turn a nick that is online.
NickInfoPtr nickInfo = getNickInfo(addressee);
@@ -144,22 +144,22 @@ namespace Konversation
return nickInfo->getNickname();
//No online nickinfo - not connected to server maybe. just return the first nick.
- QStringList addresses = QStringList::split( QChar( 0xE000 ), addressee.custom("messaging/irc", "All") );
+ TQStringList addresses = TQStringList::split( TQChar( 0xE000 ), addressee.custom("messaging/irc", "All") );
if(!addresses.empty())
return addresses.first();
//No irc nicks- nothing left to try - return null
- return QString();
+ return TQString();
}
NickInfoPtr AddressbookBase::getNickInfo(const KABC::Addressee &addressee)
{
NickInfoPtr lastNickInfo;
- QStringList addresses = QStringList::split( QChar( 0xE000 ), addressee.custom("messaging/irc", "All") );
- QStringList::iterator end = addresses.end();
- for ( QStringList::iterator it = addresses.begin(); it != end; ++it )
+ TQStringList addresses = TQStringList::split( TQChar( 0xE000 ), addressee.custom("messaging/irc", "All") );
+ TQStringList::iterator end = addresses.end();
+ for ( TQStringList::iterator it = addresses.begin(); it != end; ++it )
{
- QString ircnick;
- QString serverOrGroup;
+ TQString ircnick;
+ TQString serverOrGroup;
KonversationApplication::splitNick_Server(*it, ircnick, serverOrGroup);
NickInfoPtr nickInfo =
dynamic_cast<KonversationApplication*>(kapp)->getNickInfo(ircnick, serverOrGroup);
@@ -179,19 +179,19 @@ namespace Konversation
{
return !addressee.custom("messaging/irc", "All").isEmpty();
}
- void AddressbookBase::unassociateNick(KABC::Addressee &addressee, const QString &ircnick, const QString &servername, const QString &servergroup)
+ void AddressbookBase::unassociateNick(KABC::Addressee &addressee, const TQString &ircnick, const TQString &servername, const TQString &servergroup)
{
kdDebug() << "in unassociatenick for '" << ircnick << endl;
if(ircnick.isEmpty()) return;
- QString lnick = ircnick.lower();
- QString lnick_servername;
- QString lnick_servergroup;
+ TQString lnick = ircnick.lower();
+ TQString lnick_servername;
+ TQString lnick_servergroup;
if(!servername.isEmpty())
- lnick_servername = lnick + QChar(0xE120) + servername.lower();
+ lnick_servername = lnick + TQChar(0xE120) + servername.lower();
if(!servergroup.isEmpty())
- lnick_servergroup = lnick + QChar(0xE120) + servergroup.lower();
+ lnick_servergroup = lnick + TQChar(0xE120) + servergroup.lower();
//We should now have lnick = ircnick, and versions with servername and servergroup -
// like johnflux, johnflux@freenode, or johnflux@irc.kde.org except with the unicode
@@ -203,9 +203,9 @@ namespace Konversation
{
kdDebug() << "Ignoring unassociation command for empty addressee for nick " << ircnick << endl;
}
- QString lit;
- QStringList addresses = QStringList::split( QChar( 0xE000 ), addressee.custom("messaging/irc", "All") );
- QStringList::iterator it = addresses.begin();
+ TQString lit;
+ TQStringList addresses = TQStringList::split( TQChar( 0xE000 ), addressee.custom("messaging/irc", "All") );
+ TQStringList::iterator it = addresses.begin();
while(it != addresses.end())
{
lit = (*it).lower();
@@ -224,7 +224,7 @@ namespace Konversation
//if(!getAndCheckTicket())
// return;
- QString new_custom = addresses.join( QChar( 0xE000 ));
+ TQString new_custom = addresses.join( TQChar( 0xE000 ));
if(new_custom.isEmpty())
addressee.removeCustom("messaging/irc", "All");
else
@@ -233,33 +233,33 @@ namespace Konversation
addressBook->insertAddressee(addressee);
//saveTicket();
}
- void AddressbookBase::focusAndShowErrorMessage(const QString &errorMsg)
+ void AddressbookBase::focusAndShowErrorMessage(const TQString &errorMsg)
{
static_cast<KonversationApplication *>(kapp)->getMainWindow()->focusAndShowErrorMessage(errorMsg);
}
/**For a given contact, adds the ircnick if they don't already have it. If you pass an addressBook, the contact is inserted
* if it has changed. */
- void AddressbookBase::associateNick(KABC::Addressee &addressee, const QString &ircnick, const QString &servername, const QString &servergroup)
+ void AddressbookBase::associateNick(KABC::Addressee &addressee, const TQString &ircnick, const TQString &servername, const TQString &servergroup)
{
//It's easiest to just remove it from the list if it's there already
unassociateNick(addressee, ircnick, servername, servergroup);
- QString nick_server = ircnick;
+ TQString nick_server = ircnick;
if(!servergroup.isEmpty())
- nick_server += QChar(0xE120) + servergroup;
+ nick_server += TQChar(0xE120) + servergroup;
else if(!servername.isEmpty())
- nick_server += QChar(0xE120) + servername;
- QStringList addresses = QStringList::split( QChar( 0xE000 ), addressee.custom("messaging/irc", "All") );
+ nick_server += TQChar(0xE120) + servername;
+ TQStringList addresses = TQStringList::split( TQChar( 0xE000 ), addressee.custom("messaging/irc", "All") );
//For sanity reasons, don't let the number of irc nicks go above 10.
//To do this, just remove the irc nick at the end of the list.
if(addresses.count() >= 10)
addresses.pop_back();
addresses.append(nick_server);
- addressee.insertCustom("messaging/irc", "All", addresses.join( QChar( 0xE000 )));
+ addressee.insertCustom("messaging/irc", "All", addresses.join( TQChar( 0xE000 )));
addressBook->insertAddressee(addressee);
}
/** This function associates the nick for a person, then iterates over all the contacts unassociating the nick from everyone else. It saves the addressses that have changed.*/
- bool AddressbookBase::associateNickAndUnassociateFromEveryoneElse(KABC::Addressee &addressee, const QString &ircnick, const QString &servername, const QString &servergroup)
+ bool AddressbookBase::associateNickAndUnassociateFromEveryoneElse(KABC::Addressee &addressee, const TQString &ircnick, const TQString &servername, const TQString &servergroup)
{
for( KABC::AddressBook::Iterator it = addressBook->begin(); it != addressBook->end(); ++it )
if((*it).uid() != addressee.uid())
@@ -375,7 +375,7 @@ namespace Konversation
return !!getNickInfo(addressee);
}
- bool AddressbookBase::editAddressee(const QString &uid)
+ bool AddressbookBase::editAddressee(const TQString &uid)
{
Q_ASSERT(!uid.isEmpty());
//FIXME: This hack can be removed. I fixed the below mentioned bug in kde 3.4 cvs - 2005-01-02
@@ -406,9 +406,9 @@ namespace Konversation
return runEmailProgram(addressee.fullEmail());
}
- bool AddressbookBase::runEmailProgram(const QString &mailtoaddress)
+ bool AddressbookBase::runEmailProgram(const TQString &mailtoaddress)
{
- KRun *proc = new KRun(KURL(QString("mailto:") + KStringHandler::from8Bit(mailtoaddress.ascii())));
+ KRun *proc = new KRun(KURL(TQString("mailto:") + KStringHandler::from8Bit(mailtoaddress.ascii())));
kdDebug() << "Sending email to " << mailtoaddress << endl;
if(proc->hasError())
{
@@ -421,11 +421,11 @@ namespace Konversation
bool AddressbookBase::sendEmail(const ChannelNickList &nickList)
{
if(nickList.isEmpty()) return false;
- QString mailto;
+ TQString mailto;
- QStringList nicksWithoutAddressee;
- QStringList nicksWithoutEmails;
- QStringList nicksWithEmails;
+ TQStringList nicksWithoutAddressee;
+ TQStringList nicksWithoutEmails;
+ TQStringList nicksWithEmails;
for(ChannelNickList::ConstIterator it=nickList.begin();it!=nickList.end();++it)
{
NickInfoPtr nickInfo = (*it)->getNickInfo();
@@ -450,7 +450,7 @@ namespace Konversation
}
if(!nicksWithoutAddressee.isEmpty() || !nicksWithoutEmails.isEmpty())
{
- QString message;
+ TQString message;
if(nicksWithoutEmails.isEmpty())
{
if(nicksWithEmails.isEmpty())
diff --git a/konversation/src/linkaddressbook/addressbook_base.h b/konversation/src/linkaddressbook/addressbook_base.h
index d7db6c8..2fe1d25 100644
--- a/konversation/src/linkaddressbook/addressbook_base.h
+++ b/konversation/src/linkaddressbook/addressbook_base.h
@@ -20,8 +20,8 @@
#include "../channelnick.h"
#include <kstaticdeleter.h>
-#include <qobject.h>
-#include <qregexp.h>
+#include <tqobject.h>
+#include <tqregexp.h>
#include <config.h>
@@ -31,28 +31,28 @@
namespace Konversation
{
- class AddressbookBase : public QObject, public KIMIface
+ class AddressbookBase : public TQObject, public KIMIface
{
Q_OBJECT
public:
virtual ~AddressbookBase(); // This needs to be public so it can be deleted by our static pointer
- KABC::Addressee getKABCAddresseeFromNick(const QString &ircnick, const QString &servername, const QString &servergroup);
- KABC::Addressee getKABCAddresseeFromNick(const QString &nick_server);
- bool hasNick(const KABC::Addressee &addressee, const QString &ircnick, const QString &servername, const QString &servergroup);
- bool hasNick(const KABC::Addressee &addressee, const QString &nick_server);
+ KABC::Addressee getKABCAddresseeFromNick(const TQString &ircnick, const TQString &servername, const TQString &servergroup);
+ KABC::Addressee getKABCAddresseeFromNick(const TQString &nick_server);
+ bool hasNick(const KABC::Addressee &addressee, const TQString &ircnick, const TQString &servername, const TQString &servergroup);
+ bool hasNick(const KABC::Addressee &addressee, const TQString &nick_server);
/** For a given contact, remove the ircnick if they have it. If you
* pass an addressBook, the contact is inserted if it has changed.
*/
- void unassociateNick(KABC::Addressee &addressee, const QString &ircnick, const QString &servername, const QString &servergroup);
- void associateNick(KABC::Addressee &addressee, const QString &ircnick, const QString &servername, const QString &servergroup);
- bool associateNickAndUnassociateFromEveryoneElse(KABC::Addressee &addressee, const QString &ircnick, const QString &servername, const QString &servergroup);
+ void unassociateNick(KABC::Addressee &addressee, const TQString &ircnick, const TQString &servername, const TQString &servergroup);
+ void associateNick(KABC::Addressee &addressee, const TQString &ircnick, const TQString &servername, const TQString &servergroup);
+ bool associateNickAndUnassociateFromEveryoneElse(KABC::Addressee &addressee, const TQString &ircnick, const TQString &servername, const TQString &servergroup);
/** If this user is online, return one of the nicks that they are
* using. Otherwise return the first nick listed.
* If there are multiple matches, it will prefer ones that are not set to away.
- * @return online nick, first nick, or QString::null if they aren't known at all.
+ * @return online nick, first nick, or TQString::null if they aren't known at all.
*/
- QString getBestNick(const KABC::Addressee &addressee);
+ TQString getBestNick(const KABC::Addressee &addressee);
bool hasAnyNicks(const KABC::Addressee &addresse);
int presenceStatusByAddressee(const KABC::Addressee &addressee);
bool isOnline(KABC::Addressee &addressee);
@@ -62,8 +62,8 @@ namespace Konversation
bool saveAddressee(KABC::Addressee &addressee);
bool saveAddressbook();
- QStringList allContactsNicksForServer(const QString &servername, const QString &servergroup);
- QStringList getNicks(const KABC::Addressee &addressee, const QString &servername, const QString &servergroup);
+ TQStringList allContactsNicksForServer(const TQString &servername, const TQString &servergroup);
+ TQStringList getNicks(const KABC::Addressee &addressee, const TQString &servername, const TQString &servergroup);
KABC::AddressBook *getAddressBook();
@@ -78,11 +78,11 @@ namespace Konversation
/**
* Lets outsiders tell us to emit presenceChanged signal.
*/
- virtual void emitContactPresenceChanged(const QString &uid, int presence) = 0;
+ virtual void emitContactPresenceChanged(const TQString &uid, int presence) = 0;
/**
* Lets outsiders tell us to emit presenceChanged signal.
*/
- virtual void emitContactPresenceChanged(const QString &uid) = 0;
+ virtual void emitContactPresenceChanged(const TQString &uid) = 0;
/**
* Run kmail (or whatever the users email client is)
@@ -101,20 +101,20 @@ namespace Konversation
/**
* Run kaddressbook to edit the addressee passed in.
*/
- bool editAddressee(const QString &uid);
+ bool editAddressee(const TQString &uid);
/**
* Run the users email program (e.g. kmail) passing "mailto:" + mailtoaddress.
* Note that mailto: will be prepended for you.
* @param mailtoaddress A comma delimited set of email address topass as "mailto:"
* @return True if there were no problems running the email program. An error will be shown to the user if there was.
*/
- bool runEmailProgram(const QString &mailtoaddress);
+ bool runEmailProgram(const TQString &mailtoaddress);
- /** Just calls KonversationMainWindow::focusAndShowErrorMessage(const QString *errorMsg)
+ /** Just calls KonversationMainWindow::focusAndShowErrorMessage(const TQString *errorMsg)
*
- * @see KonversationMainWindow::focusAndShowErrorMessage(const QString *errorMsg)
+ * @see KonversationMainWindow::focusAndShowErrorMessage(const TQString *errorMsg)
*/
- void focusAndShowErrorMessage(const QString &errorMsg);
+ void focusAndShowErrorMessage(const TQString &errorMsg);
signals:
void addresseesChanged();
diff --git a/konversation/src/linkaddressbook/addresseeitem.cpp b/konversation/src/linkaddressbook/addresseeitem.cpp
index 9c9c6b4..46c3f62 100644
--- a/konversation/src/linkaddressbook/addresseeitem.cpp
+++ b/konversation/src/linkaddressbook/addresseeitem.cpp
@@ -18,16 +18,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include "addresseeitem.h"
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qgroupbox.h>
-#include <qregexp.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqgroupbox.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kdebug.h>
-AddresseeItem::AddresseeItem( QListView *parent, const KABC::Addressee &addressee) :
+AddresseeItem::AddresseeItem( TQListView *parent, const KABC::Addressee &addressee) :
KListViewItem( parent ),
mAddressee( addressee )
{
@@ -38,7 +38,7 @@ mAddressee( addressee )
if(pic.isIntern())
{
//60 pixels seems okay.. kmail uses 60 btw
- QPixmap qpixmap( pic.data().scaleWidth(60) );
+ TQPixmap qpixmap( pic.data().scaleWidth(60) );
setPixmap( Photo,qpixmap );
}
@@ -46,12 +46,12 @@ mAddressee( addressee )
setText( Email, addressee.preferredEmail() );
}
-QString AddresseeItem::key( int column, bool ) const
+TQString AddresseeItem::key( int column, bool ) const
{
if (column == Email)
{
- QString value = text(Email);
- QRegExp emailRe("<\\S*>");
+ TQString value = text(Email);
+ TQRegExp emailRe("<\\S*>");
int match = emailRe.search(value);
if (match > -1)
value = value.mid(match + 1, emailRe.matchedLength() - 2);
diff --git a/konversation/src/linkaddressbook/addresseeitem.h b/konversation/src/linkaddressbook/addresseeitem.h
index 2e2aec3..fd5943b 100644
--- a/konversation/src/linkaddressbook/addresseeitem.h
+++ b/konversation/src/linkaddressbook/addresseeitem.h
@@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#ifndef KABC_ADDRESSEEDIALOG_H
#define KABC_ADDRESSEEDIALOG_H
-#include <qdict.h>
+#include <tqdict.h>
#include <kdialogbase.h>
#include <klineedit.h>
@@ -48,7 +48,7 @@ class AddresseeItem : public KListViewItem
@param parent The parent listview.
@param addressee The associated addressee.
*/
- AddresseeItem( QListView *parent, const KABC::Addressee &addressee );
+ AddresseeItem( TQListView *parent, const KABC::Addressee &addressee );
/**
Returns the addressee.
@@ -56,9 +56,9 @@ class AddresseeItem : public KListViewItem
KABC::Addressee addressee() const { return mAddressee; }
/**
- Method used by QListView to sort the items.
+ Method used by TQListView to sort the items.
*/
- virtual QString key( int column, bool ascending ) const;
+ virtual TQString key( int column, bool ascending ) const;
private:
KABC::Addressee mAddressee;
diff --git a/konversation/src/linkaddressbook/kimiface.h b/konversation/src/linkaddressbook/kimiface.h
index 990f980..99daf2c 100644
--- a/konversation/src/linkaddressbook/kimiface.h
+++ b/konversation/src/linkaddressbook/kimiface.h
@@ -21,9 +21,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#ifndef KIMIFACE_H
#define KIMIFACE_H
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kurl.h>
/**
@@ -43,25 +43,25 @@ class KIMIface : virtual public DCOPObject
* address book.
* @return a list of KABC uids.
*/
- virtual QStringList allContacts() = 0;
+ virtual TQStringList allContacts() = 0;
/**
* Obtain a list of KDE address book entries who are
* currently reachable.
* @return a list of KABC uids who can receive a message, even if online.
*/
- virtual QStringList reachableContacts() = 0;
+ virtual TQStringList reachableContacts() = 0;
/**
* Obtain a list of KDE address book entries who are
* currently online.
* @return a list of KABC uids who are online with unspecified presence.
*/
- virtual QStringList onlineContacts() = 0;
+ virtual TQStringList onlineContacts() = 0;
/**
* Obtain a list of KDE address book entries who may
* receive file transfers.
* @return a list of KABC uids capable of file transfer.
*/
- virtual QStringList fileTransferContacts() = 0;
+ virtual TQStringList fileTransferContacts() = 0;
// individual
/**
@@ -69,38 +69,38 @@ class KIMIface : virtual public DCOPObject
* @param uid the KABC uid you are interested in.
* @return whether one of the chat programs KIMProxy talks to knows of this KABC uid.
*/
- virtual bool isPresent( const QString & uid ) = 0;
+ virtual bool isPresent( const TQString & uid ) = 0;
/**
* Obtain the IM app's idea of the contact's display name
* Useful if KABC lookups may be too slow
* @param uid KABC uid.
* @return The corresponding display name.
*/
- virtual QString displayName( const QString & uid ) = 0;
+ virtual TQString displayName( const TQString & uid ) = 0;
/**
* Obtain the IM presence as a i18ned string for the specified addressee
* @param uid the KABC uid you want the presence for.
* @return the i18ned string describing presence.
*/
- virtual QString presenceString( const QString & uid ) = 0;
+ virtual TQString presenceString( const TQString & uid ) = 0;
/**
* Obtain the IM presence as a number (see KIMIface) for the specified addressee
* @param uid the KABC uid you want the presence for.
* @return a numeric representation of presence - currently one of 0 (Unknown), 1 (Offline), 2 (Connecting), 3 (Away), 4 (Online)
*/
- virtual int presenceStatus( const QString & uid ) = 0;
+ virtual int presenceStatus( const TQString & uid ) = 0;
/**
* Indicate if a given uid can receive files
* @param uid the KABC uid you are interested in.
* @return Whether the specified addressee can receive files.
*/
- virtual bool canReceiveFiles( const QString & uid ) = 0;
+ virtual bool canReceiveFiles( const TQString & uid ) = 0;
/**
* Some media are unidirectional (eg, sending SMS via a web interface).
* @param uid the KABC uid you are interested in.
* @return Whether the specified addressee can respond.
*/
- virtual bool canRespond( const QString & uid ) = 0;
+ virtual bool canRespond( const TQString & uid ) = 0;
/**
* Get the KABC uid corresponding to the supplied IM address
* Protocols should be
@@ -108,26 +108,26 @@ class KIMIface : virtual public DCOPObject
* @param protocol the protocol, eg one of "AIMProtocol", "MSNProtocol", "ICQProtocol",
* @return a KABC uid or null if none found/
*/
- virtual QString locate( const QString & contactId, const QString & protocol ) = 0;
+ virtual TQString locate( const TQString & contactId, const TQString & protocol ) = 0;
// metadata
/**
* Obtain the icon representing IM presence for the specified addressee
* @param uid the KABC uid you want the presence for.
* @return a pixmap representing the uid's presence.
*/
- virtual QPixmap icon( const QString & uid ) = 0;
+ virtual TQPixmap icon( const TQString & uid ) = 0;
/**
* Get the supplied addressee's current context (home, work, or any).
* @param uid the KABC uid you want the context for.
- * @return A QString describing the context, or null if not supported.
+ * @return A TQString describing the context, or null if not supported.
*/
- virtual QString context( const QString & uid ) = 0;
+ virtual TQString context( const TQString & uid ) = 0;
// App capabilities
/**
* Discover what protocols the application supports
* @return the set of protocols that the application supports
*/
- virtual QStringList protocols() = 0;
+ virtual TQStringList protocols() = 0;
// ACTORS
/**
@@ -137,18 +137,18 @@ class KIMIface : virtual public DCOPObject
* @param uid the KABC uid you want to chat with.
* @param message the message to send them.
*/
- virtual void messageContact( const QString &uid, const QString& message ) = 0;
+ virtual void messageContact( const TQString &uid, const TQString& message ) = 0;
/**
* Open a chat to a contact, and optionally set some initial text
*/
- virtual void messageNewContact( const QString &contactId, const QString &protocol ) = 0;
+ virtual void messageNewContact( const TQString &contactId, const TQString &protocol ) = 0;
/**
* Start a chat session with the specified addressee
* @param uid the KABC uid you want to chat with.
*/
- virtual void chatWithContact( const QString &uid ) = 0;
+ virtual void chatWithContact( const TQString &uid ) = 0;
/**
* Send the file to the contact
@@ -157,8 +157,8 @@ class KIMIface : virtual public DCOPObject
* @param altFileName an alternate filename describing the file
* @param fileSize file size in bytes
*/
- virtual void sendFile(const QString &uid, const KURL &sourceURL,
- const QString &altFileName = QString(), uint fileSize = 0) = 0;
+ virtual void sendFile(const TQString &uid, const KURL &sourceURL,
+ const TQString &altFileName = TQString(), uint fileSize = 0) = 0;
// MUTATORS
// Contact list
@@ -168,7 +168,7 @@ class KIMIface : virtual public DCOPObject
* @param protocol 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.
*/
- virtual bool addContact( const QString &contactId, const QString &protocol ) = 0;
+ virtual bool addContact( const TQString &contactId, const TQString &protocol ) = 0;
// SIGNALS
k_dcop_signals:
/**
@@ -177,7 +177,7 @@ class KIMIface : virtual public DCOPObject
* @param appId the dcop application id of the program the signal originates from.
* @param presence the new numeric presence @ref presenceStatus
*/
- void contactPresenceChanged( QString uid, QCString appId, int presence );
+ void contactPresenceChanged( TQString uid, TQCString appId, int presence );
};
#endif
diff --git a/konversation/src/linkaddressbook/linkaddressbookui.cpp b/konversation/src/linkaddressbook/linkaddressbookui.cpp
index 9347075..f766e8b 100644
--- a/konversation/src/linkaddressbook/linkaddressbookui.cpp
+++ b/konversation/src/linkaddressbook/linkaddressbookui.cpp
@@ -26,11 +26,11 @@ Kopete (c) 2002-2004 by the Kopete developers <kopete-devel@kde.org>
#include "linkaddressbookui_base.h"
#include "addresseeitem.h"
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -47,11 +47,11 @@ Kopete (c) 2002-2004 by the Kopete developers <kopete-devel@kde.org>
#include <kabc/stdaddressbook.h>
-LinkAddressbookUI::LinkAddressbookUI( QWidget *parent, const char *name, const QString &ircnick, const QString &servername, const QString &servergroup, const QString &suggested_realname )
+LinkAddressbookUI::LinkAddressbookUI( TQWidget *parent, const char *name, const TQString &ircnick, const TQString &servername, const TQString &servergroup, const TQString &suggested_realname )
: KDialogBase(Plain, i18n("Link IRC Nick to Addressbook Contact"), Ok|Cancel|Help, Ok, parent, name)
{
- QFrame* page = plainPage();
- QGridLayout* pageLayout = new QGridLayout(page, 1, 1, 0, 0);
+ TQFrame* page = plainPage();
+ TQGridLayout* pageLayout = new TQGridLayout(page, 1, 1, 0, 0);
m_mainWidget = new LinkAddressbookUI_Base(page);
pageLayout->addWidget(m_mainWidget, 0, 0);
@@ -60,16 +60,16 @@ LinkAddressbookUI::LinkAddressbookUI( QWidget *parent, const char *name, const Q
m_addressBook = Konversation::Addressbook::self()->getAddressBook();
// Addressee validation connections
- connect( m_mainWidget->addAddresseeButton, SIGNAL( clicked() ), SLOT( slotAddAddresseeClicked() ) );
- connect( m_mainWidget->addresseeListView, SIGNAL( clicked(QListViewItem * ) ),
- SLOT( slotAddresseeListClicked( QListViewItem * ) ) );
- connect( m_mainWidget->addresseeListView, SIGNAL( selectionChanged( QListViewItem * ) ),
- SLOT( slotAddresseeListClicked( QListViewItem * ) ) );
- connect( m_mainWidget->addresseeListView, SIGNAL( spacePressed( QListViewItem * ) ),
- SLOT( slotAddresseeListClicked( QListViewItem * ) ) );
+ connect( m_mainWidget->addAddresseeButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotAddAddresseeClicked() ) );
+ connect( m_mainWidget->addresseeListView, TQT_SIGNAL( clicked(TQListViewItem * ) ),
+ TQT_SLOT( slotAddresseeListClicked( TQListViewItem * ) ) );
+ connect( m_mainWidget->addresseeListView, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ),
+ TQT_SLOT( slotAddresseeListClicked( TQListViewItem * ) ) );
+ connect( m_mainWidget->addresseeListView, TQT_SIGNAL( spacePressed( TQListViewItem * ) ),
+ TQT_SLOT( slotAddresseeListClicked( TQListViewItem * ) ) );
- connect( m_addressBook, SIGNAL( addressBookChanged( AddressBook * ) ), this, SLOT( slotLoadAddressees() ) );
- connect( Konversation::Addressbook::self(), SIGNAL(addresseesChanged()), this, SLOT(slotLoadAddressees()));
+ connect( m_addressBook, TQT_SIGNAL( addressBookChanged( AddressBook * ) ), this, TQT_SLOT( slotLoadAddressees() ) );
+ connect( Konversation::Addressbook::self(), TQT_SIGNAL(addresseesChanged()), this, TQT_SLOT(slotLoadAddressees()));
//We should add a clear KAction here. But we can't really do that with a designer file :\ this sucks
@@ -86,7 +86,7 @@ LinkAddressbookUI::LinkAddressbookUI( QWidget *parent, const char *name, const Q
m_mainWidget->kListViewSearchLine->setListView(m_mainWidget->addresseeListView);
slotLoadAddressees();
- m_mainWidget->addresseeListView->setColumnWidthMode(0, QListView::Manual);
+ m_mainWidget->addresseeListView->setColumnWidthMode(0, TQListView::Manual);
//Photo is 60, and it's nice to have a small gap, imho
m_mainWidget->addresseeListView->setColumnWidth(0, 63);
@@ -101,7 +101,7 @@ void LinkAddressbookUI::slotLoadAddressees()
{
m_mainWidget->addresseeListView->clear();
- QString realname;
+ TQString realname;
int num_contacts_with_nick=0; //There shouldn't be more than 1 contact with this irc nick. Warn the user if there is.
KABC::AddressBook::Iterator it;
@@ -129,7 +129,7 @@ void LinkAddressbookUI::slotAddAddresseeClicked()
{
// Pop up add addressee dialog
if(!Konversation::Addressbook::self()->getAndCheckTicket()) return;
- QString addresseeName = KInputDialog::getText( i18n( "New Address Book Entry" ),
+ TQString addresseeName = KInputDialog::getText( i18n( "New Address Book Entry" ),
i18n( "Name the new entry:" ),
m_suggested_realname, 0, this );
@@ -147,7 +147,7 @@ void LinkAddressbookUI::slotAddAddresseeClicked()
}
}
-void LinkAddressbookUI::slotAddresseeListClicked( QListViewItem *addressee )
+void LinkAddressbookUI::slotAddresseeListClicked( TQListViewItem *addressee )
{
// enable ok if a valid addressee is selected
enableButtonOK(addressee ? addressee->isSelected() : false);
@@ -174,14 +174,14 @@ void LinkAddressbookUI::slotOk()
return;
}
}
- disconnect( m_addressBook, SIGNAL( addressBookChanged( AddressBook * ) ), this, SLOT( slotLoadAddressees() ) );
+ disconnect( m_addressBook, TQT_SIGNAL( addressBookChanged( AddressBook * ) ), this, TQT_SLOT( slotLoadAddressees() ) );
deleteLater();
accept();
}
void LinkAddressbookUI::slotCancel()
{
- disconnect( m_addressBook, SIGNAL( addressBookChanged( AddressBook * ) ), this, SLOT( slotLoadAddressees() ) );
+ disconnect( m_addressBook, TQT_SIGNAL( addressBookChanged( AddressBook * ) ), this, TQT_SLOT( slotLoadAddressees() ) );
deleteLater();
reject();
}
diff --git a/konversation/src/linkaddressbook/linkaddressbookui.h b/konversation/src/linkaddressbook/linkaddressbookui.h
index 87ebd52..d1904e6 100644
--- a/konversation/src/linkaddressbook/linkaddressbookui.h
+++ b/konversation/src/linkaddressbook/linkaddressbookui.h
@@ -24,15 +24,15 @@ Kopete (c) 2002-2004 by the Kopete developers <kopete-devel@kde.org>
#ifndef LINKADDRESSBOOKUI_H
#define LINKADDRESSBOOKUI_H
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include <qmap.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
#include <kdialogbase.h>
#include <kdebug.h>
#include <kabc/addressbook.h>
-class QCheckListItem;
+class TQCheckListItem;
class LinkAddressbookUI_Base;
class LinkAddressbookUI : public KDialogBase
@@ -40,23 +40,23 @@ class LinkAddressbookUI : public KDialogBase
Q_OBJECT
public:
- LinkAddressbookUI( QWidget *parent, const char *name, const QString &ircnick, const QString &servername, const QString &servergroup, const QString &suggested_realname);
+ LinkAddressbookUI( TQWidget *parent, const char *name, const TQString &ircnick, const TQString &servername, const TQString &servergroup, const TQString &suggested_realname);
~LinkAddressbookUI();
private:
KABC::AddressBook* m_addressBook;
- QString m_ircnick;
- QString m_lower_ircnick; //Same as above, but in lower case, for comparisons.
- QString m_servername;
- QString m_servergroup;
- QString m_suggested_realname;
+ TQString m_ircnick;
+ TQString m_lower_ircnick; //Same as above, but in lower case, for comparisons.
+ TQString m_servername;
+ TQString m_servergroup;
+ TQString m_suggested_realname;
LinkAddressbookUI_Base* m_mainWidget;
protected slots:
virtual void slotOk();
virtual void slotCancel();
void slotAddAddresseeClicked();
- void slotAddresseeListClicked( QListViewItem *addressee );
+ void slotAddresseeListClicked( TQListViewItem *addressee );
/**
* Utility function, populates the addressee list
*/
diff --git a/konversation/src/linkaddressbook/nicklisttooltip.cpp b/konversation/src/linkaddressbook/nicklisttooltip.cpp
index c2fcde7..732b32e 100644
--- a/konversation/src/linkaddressbook/nicklisttooltip.cpp
+++ b/konversation/src/linkaddressbook/nicklisttooltip.cpp
@@ -19,15 +19,15 @@
#include "../common.h"
#include <klocale.h>
-#include <qtooltip.h>
-#include <qlistview.h>
+#include <tqtooltip.h>
+#include <tqlistview.h>
class NickListView;
namespace Konversation
{
- KonversationNickListViewToolTip::KonversationNickListViewToolTip(QWidget *parent, NickListView *lv) : QToolTip(parent)
+ KonversationNickListViewToolTip::KonversationNickListViewToolTip(TQWidget *parent, NickListView *lv) : TQToolTip(parent)
{
m_listView = lv;
}
@@ -36,12 +36,12 @@ namespace Konversation
{
}
- void KonversationNickListViewToolTip::maybeTip( const QPoint &pos )
+ void KonversationNickListViewToolTip::maybeTip( const TQPoint &pos )
{
if( !parentWidget() || !m_listView )
return;
- QListViewItem *item = m_listView->itemAt( pos );
+ TQListViewItem *item = m_listView->itemAt( pos );
if( !item )
return;
@@ -51,15 +51,15 @@ namespace Konversation
if(! nick )
return;
- QString toolTip;
- QRect itemRect = m_listView->itemRect( item );
+ TQString toolTip;
+ TQRect itemRect = m_listView->itemRect( item );
uint leftMargin = m_listView->treeStepSize() *
( item->depth() + ( m_listView->rootIsDecorated() ? 1 : 0 ) ) +
m_listView->itemMargin();
uint xAdjust = itemRect.left() + leftMargin;
uint yAdjust = itemRect.top();
- QPoint relativePos( pos.x() - xAdjust, pos.y() - yAdjust );
+ TQPoint relativePos( pos.x() - xAdjust, pos.y() - yAdjust );
toolTip = Konversation::removeIrcMarkup(nick->getChannelNick()->tooltip());
if(!toolTip.isEmpty())
tip(itemRect, toolTip);
diff --git a/konversation/src/linkaddressbook/nicklisttooltip.h b/konversation/src/linkaddressbook/nicklisttooltip.h
index 068850c..f03419d 100644
--- a/konversation/src/linkaddressbook/nicklisttooltip.h
+++ b/konversation/src/linkaddressbook/nicklisttooltip.h
@@ -17,10 +17,10 @@
#include "addressbook.h"
-#include <qtooltip.h>
-#include <qwidget.h>
-#include <qpoint.h>
-#include <qstring.h>
+#include <tqtooltip.h>
+#include <tqwidget.h>
+#include <tqpoint.h>
+#include <tqstring.h>
#include <klocale.h>
@@ -33,10 +33,10 @@ namespace Konversation
class KonversationNickListViewToolTip : public QToolTip
{
public:
- KonversationNickListViewToolTip(QWidget *parent, NickListView *lv);
+ KonversationNickListViewToolTip(TQWidget *parent, NickListView *lv);
virtual ~KonversationNickListViewToolTip();
- void maybeTip( const QPoint &pos );
+ void maybeTip( const TQPoint &pos );
private:
NickListView *m_listView;
diff --git a/konversation/src/linkaddressbook/nicksonlinetooltip.cpp b/konversation/src/linkaddressbook/nicksonlinetooltip.cpp
index b89cab6..9c4df71 100644
--- a/konversation/src/linkaddressbook/nicksonlinetooltip.cpp
+++ b/konversation/src/linkaddressbook/nicksonlinetooltip.cpp
@@ -20,8 +20,8 @@
#include "../nicksonline.h"
#include <klocale.h>
-#include <qtooltip.h>
-#include <qlistview.h>
+#include <tqtooltip.h>
+#include <tqlistview.h>
#include <klistview.h>
@@ -29,7 +29,7 @@ class NickListView;
namespace Konversation
{
- KonversationNicksOnlineToolTip::KonversationNicksOnlineToolTip(QWidget *parent, NicksOnline *nicksOnline) : QToolTip(parent)
+ KonversationNicksOnlineToolTip::KonversationNicksOnlineToolTip(TQWidget *parent, NicksOnline *nicksOnline) : TQToolTip(parent)
{
m_nicksOnline = nicksOnline;
}
@@ -38,27 +38,27 @@ namespace Konversation
{
}
- void KonversationNicksOnlineToolTip::maybeTip( const QPoint &pos )
+ void KonversationNicksOnlineToolTip::maybeTip( const TQPoint &pos )
{
if( !parentWidget() || !m_nicksOnline || !m_nicksOnline->getNickListView() )
return;
KListView *m_listView = m_nicksOnline->getNickListView();
- QListViewItem *item = m_listView->itemAt( pos );
+ TQListViewItem *item = m_listView->itemAt( pos );
if( !item )
return;
NickInfoPtr nickInfo = m_nicksOnline->getNickInfo(item);
if(!nickInfo )
return;
- QString toolTip;
- QRect itemRect = m_listView->itemRect( item );
+ TQString toolTip;
+ TQRect itemRect = m_listView->itemRect( item );
uint leftMargin = m_listView->treeStepSize() *
( item->depth() + ( m_listView->rootIsDecorated() ? 1 : 0 ) ) +
m_listView->itemMargin();
uint xAdjust = itemRect.left() + leftMargin;
uint yAdjust = itemRect.top();
- QPoint relativePos( pos.x() - xAdjust, pos.y() - yAdjust );
+ TQPoint relativePos( pos.x() - xAdjust, pos.y() - yAdjust );
toolTip = nickInfo->tooltip();
if(!toolTip.isEmpty())
tip(itemRect, toolTip);
diff --git a/konversation/src/linkaddressbook/nicksonlinetooltip.h b/konversation/src/linkaddressbook/nicksonlinetooltip.h
index 79f0888..a94baa5 100644
--- a/konversation/src/linkaddressbook/nicksonlinetooltip.h
+++ b/konversation/src/linkaddressbook/nicksonlinetooltip.h
@@ -17,10 +17,10 @@
#include "addressbook.h"
-#include <qtooltip.h>
-#include <qwidget.h>
-#include <qpoint.h>
-#include <qstring.h>
+#include <tqtooltip.h>
+#include <tqwidget.h>
+#include <tqpoint.h>
+#include <tqstring.h>
#include <klocale.h>
@@ -33,10 +33,10 @@ namespace Konversation
class KonversationNicksOnlineToolTip : public QToolTip
{
public:
- KonversationNicksOnlineToolTip(QWidget *parent, NicksOnline *nicksOnline);
+ KonversationNicksOnlineToolTip(TQWidget *parent, NicksOnline *nicksOnline);
virtual ~KonversationNicksOnlineToolTip();
- void maybeTip( const QPoint &pos );
+ void maybeTip( const TQPoint &pos );
private:
NicksOnline *m_nicksOnline;
diff --git a/konversation/src/logfilereader.cpp b/konversation/src/logfilereader.cpp
index 22357f4..e62c43a 100644
--- a/konversation/src/logfilereader.cpp
+++ b/konversation/src/logfilereader.cpp
@@ -17,16 +17,16 @@
#include "ircview.h"
#include "ircviewbox.h"
-#include <qlayout.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdockarea.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qregexp.h>
-#include <qspinbox.h>
-#include <qstylesheet.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdockarea.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqregexp.h>
+#include <tqspinbox.h>
+#include <tqstylesheet.h>
+#include <tqwhatsthis.h>
#include <kdialog.h>
#include <ktoolbar.h>
@@ -37,37 +37,37 @@
#include <kio/jobclasses.h>
-LogfileReader::LogfileReader(QWidget* parent, const QString& log) : ChatWindow(parent)
+LogfileReader::LogfileReader(TQWidget* parent, const TQString& log) : ChatWindow(parent)
{
setType(ChatWindow::LogFileReader);
fileName = log;
- QDockArea* toolBarDock = new QDockArea(Qt::Horizontal,QDockArea::Normal,this,"logfile_toolbar_dock");
+ TQDockArea* toolBarDock = new TQDockArea(Qt::Horizontal,TQDockArea::Normal,this,"logfile_toolbar_dock");
toolBar = new KToolBar(toolBarDock,"logfile_toolbar",true,true);
- toolBar->insertButton("filesaveas",0,SIGNAL(clicked()),this,SLOT(saveLog()),true,i18n("Save As..."));
+ toolBar->insertButton("filesaveas",0,TQT_SIGNAL(clicked()),this,TQT_SLOT(saveLog()),true,i18n("Save As..."));
- new QLabel(i18n("Show last:"),toolBar,"logfile_size_label");
- sizeSpin = new QSpinBox(10,1000,10,toolBar,"logfile_size_spinbox");
- QWhatsThis::add(sizeSpin, i18n("Use this box to set the maximum size of the log file. This setting does not take effect until you restart Konversation. Each log file may have a separate setting."));
+ new TQLabel(i18n("Show last:"),toolBar,"logfile_size_label");
+ sizeSpin = new TQSpinBox(10,1000,10,toolBar,"logfile_size_spinbox");
+ TQWhatsThis::add(sizeSpin, i18n("Use this box to set the maximum size of the log file. This setting does not take effect until you restart Konversation. Each log file may have a separate setting."));
sizeSpin->setValue(Preferences::logfileBufferSize());
sizeSpin->setSuffix(i18n(" KB"));
sizeSpin->installEventFilter(this);
- toolBar->insertButton("reload",0,SIGNAL(clicked()),this,SLOT(updateView()),true,i18n("Reload"));
- toolBar->insertButton("editdelete",0,SIGNAL(clicked()),this,SLOT(clearLog()),true,i18n("Clear Logfile"));
+ toolBar->insertButton("reload",0,TQT_SIGNAL(clicked()),this,TQT_SLOT(updateView()),true,i18n("Reload"));
+ toolBar->insertButton("editdelete",0,TQT_SIGNAL(clicked()),this,TQT_SLOT(clearLog()),true,i18n("Clear Logfile"));
IRCViewBox* ircBox = new IRCViewBox(this, 0);
setTextView(ircBox->ircView());
- QWhatsThis::add(getTextView(), i18n("The messages in the log file are displayed here. The oldest messages are at the top and the most recent are at the bottom."));
+ TQWhatsThis::add(getTextView(), i18n("The messages in the log file are displayed here. The oldest messages are at the top and the most recent are at the bottom."));
updateView();
resize(Preferences::logfileReaderSize());
- ircBox->ircView()->setFocusPolicy(QWidget::StrongFocus);
- setFocusPolicy(QWidget::StrongFocus);
+ ircBox->ircView()->setFocusPolicy(TQWidget::StrongFocus);
+ setFocusPolicy(TQWidget::StrongFocus);
setFocusProxy(ircBox->ircView());
- connect(getTextView(), SIGNAL(gotFocus()), getTextView(), SLOT(setFocus()));
+ connect(getTextView(), TQT_SIGNAL(gotFocus()), getTextView(), TQT_SLOT(setFocus()));
}
LogfileReader::~LogfileReader()
@@ -78,11 +78,11 @@ LogfileReader::~LogfileReader()
delete toolBar;
}
-bool LogfileReader::eventFilter(QObject* /* watched */, QEvent* e)
+bool LogfileReader::eventFilter(TQObject* /* watched */, TQEvent* e)
{
- if (e->type() == QEvent::KeyPress)
+ if (e->type() == TQEvent::KeyPress)
{
- QKeyEvent* ke = static_cast<QKeyEvent*>(e);
+ TQKeyEvent* ke = static_cast<TQKeyEvent*>(e);
if (ke->key() == Qt::Key_Return || ke->key() == Qt::Key_Enter)
{
@@ -103,23 +103,23 @@ void LogfileReader::updateView()
unsigned long pos=sizeSpin->value()*1024;
getTextView()->clear();
- QFile file(fileName);
+ TQFile file(fileName);
if(file.open(IO_ReadOnly))
{
- QTextStream stream(&file);
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream(&file);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
// Set file pointer to <pos> bytes from the end
if(stream.device()->size()>pos)
stream.device()->at(stream.device()->size()-pos);
// Skip first line, since it may be incomplete
stream.readLine();
- QString str;
+ TQString str;
while(!stream.eof())
{
- str = QStyleSheet::escape(stream.readLine());
+ str = TQStyleSheet::escape(stream.readLine());
getTextView()->appendRaw(str, true);
}
@@ -136,7 +136,7 @@ void LogfileReader::clearLog()
KStdGuiItem::del(),
"ClearLogfileQuestion")==KMessageBox::Continue)
{
- QFile::remove(fileName);
+ TQFile::remove(fileName);
updateView();
}
}
@@ -148,8 +148,8 @@ void LogfileReader::saveLog()
i18n("Save Logfile"),
"SaveLogfileNote");
- QString destination=KFileDialog::getSaveFileName(fileName,
- QString(),
+ TQString destination=KFileDialog::getSaveFileName(fileName,
+ TQString(),
this,
i18n("Choose Destination Folder"));
if(!destination.isEmpty())
@@ -159,7 +159,7 @@ void LogfileReader::saveLog()
KURL(destination),
true);
- connect(job,SIGNAL(result(KIO::Job*)),this,SLOT(copyResult(KIO::Job*)));
+ connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(copyResult(KIO::Job*)));
}
}
diff --git a/konversation/src/logfilereader.h b/konversation/src/logfilereader.h
index 0327c74..6f91e73 100644
--- a/konversation/src/logfilereader.h
+++ b/konversation/src/logfilereader.h
@@ -21,20 +21,20 @@
class KToolBar;
-class QSpinBox;
+class TQSpinBox;
class LogfileReader : public ChatWindow
{
Q_OBJECT
public:
- LogfileReader(QWidget* parent, const QString& log);
+ LogfileReader(TQWidget* parent, const TQString& log);
~LogfileReader();
virtual bool closeYourself() { closeLog(); return true; }
virtual bool searchView();
- virtual bool eventFilter(QObject* watched, QEvent* e);
+ virtual bool eventFilter(TQObject* watched, TQEvent* e);
protected slots:
@@ -53,7 +53,7 @@ class LogfileReader : public ChatWindow
virtual void childAdjustFocus();
KToolBar* toolBar;
- QSpinBox* sizeSpin;
- QString fileName;
+ TQSpinBox* sizeSpin;
+ TQString fileName;
};
#endif
diff --git a/konversation/src/modebutton.cpp b/konversation/src/modebutton.cpp
index 445db55..b01661b 100644
--- a/konversation/src/modebutton.cpp
+++ b/konversation/src/modebutton.cpp
@@ -14,13 +14,13 @@
#include "modebutton.h"
-ModeButton::ModeButton(const QString& label,QWidget* parent,int newId) :
-QPushButton::QPushButton(label,parent)
+ModeButton::ModeButton(const TQString& label,TQWidget* parent,int newId) :
+TQPushButton::TQPushButton(label,parent)
{
id=newId;
on=false;
setToggleButton(true);
- connect(this,SIGNAL (clicked()),this,SLOT (wasClicked()) );
+ connect(this,TQT_SIGNAL (clicked()),this,TQT_SLOT (wasClicked()) );
}
ModeButton::~ModeButton()
@@ -30,7 +30,7 @@ ModeButton::~ModeButton()
void ModeButton::setOn(bool state)
{
on=state;
- QPushButton::setOn(state);
+ TQPushButton::setOn(state);
}
void ModeButton::wasClicked()
diff --git a/konversation/src/modebutton.h b/konversation/src/modebutton.h
index e8895d6..d3ae6ed 100644
--- a/konversation/src/modebutton.h
+++ b/konversation/src/modebutton.h
@@ -14,7 +14,7 @@
#ifndef MODEBUTTON_H
#define MODEBUTTON_H
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
class ModeButton : public QPushButton
@@ -22,7 +22,7 @@ class ModeButton : public QPushButton
Q_OBJECT
public:
- ModeButton(const QString& label,QWidget* parent,int id);
+ ModeButton(const TQString& label,TQWidget* parent,int id);
~ModeButton();
void setOn(bool state);
diff --git a/konversation/src/multilineedit.cpp b/konversation/src/multilineedit.cpp
index 19e1eef..b4af548 100644
--- a/konversation/src/multilineedit.cpp
+++ b/konversation/src/multilineedit.cpp
@@ -13,23 +13,23 @@
#include "multilinetextedit.h"
#include "konversationapplication.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
-QString MultilineEdit::returnText; // static
+TQString MultilineEdit::returnText; // static
-MultilineEdit::MultilineEdit(QWidget* parent, const QString& text) :
+MultilineEdit::MultilineEdit(TQWidget* parent, const TQString& text) :
KDialogBase(parent,"multiline_edit_dialog",true,i18n("Edit Multiline Paste"),
KDialogBase::User1 | KDialogBase::Ok | KDialogBase::Cancel,KDialogBase::Ok,true,
KGuiItem(i18n("Add &Quotation Indicators")))
{
// Create the top level widget
- QWidget* page=new QWidget(this);
+ TQWidget* page=new TQWidget(this);
setMainWidget(page);
// Add the layout to the widget
- QVBoxLayout* dialogLayout=new QVBoxLayout(page);
+ TQVBoxLayout* dialogLayout=new TQVBoxLayout(page);
dialogLayout->setSpacing(spacingHint());
// add the text editor
textEditor=new MultilineTextEdit(page,"multiline_text_editor");
@@ -50,7 +50,7 @@ MultilineEdit::~MultilineEdit()
void MultilineEdit::slotCancel()
{
- returnText=QString();
+ returnText=TQString();
KDialogBase::slotCancel();
}
@@ -62,13 +62,13 @@ void MultilineEdit::slotOk()
void MultilineEdit::slotUser1()
{
- QStringList lines=QStringList::split("\n",textEditor->text(),true);
- for( QStringList::iterator it=lines.begin() ; it!=lines.end() ; ++it )
+ TQStringList lines=TQStringList::split("\n",textEditor->text(),true);
+ for( TQStringList::iterator it=lines.begin() ; it!=lines.end() ; ++it )
(*it) = "> " + (*it);
textEditor->setText(lines.join("\n"));
}
-QString MultilineEdit::edit(QWidget* parent, const QString& text)
+TQString MultilineEdit::edit(TQWidget* parent, const TQString& text)
{
MultilineEdit dlg(parent,text);
dlg.exec();
diff --git a/konversation/src/multilineedit.h b/konversation/src/multilineedit.h
index db86cc0..40b28fd 100644
--- a/konversation/src/multilineedit.h
+++ b/konversation/src/multilineedit.h
@@ -15,7 +15,7 @@
#include <kdialogbase.h>
-class QWidget;
+class TQWidget;
class MultilineTextEdit;
class MultilineEdit : public KDialogBase
@@ -23,10 +23,10 @@ class MultilineEdit : public KDialogBase
Q_OBJECT
public:
- MultilineEdit(QWidget* parent, const QString& text);
+ MultilineEdit(TQWidget* parent, const TQString& text);
~MultilineEdit();
- static QString edit(QWidget* parent, const QString& text);
+ static TQString edit(TQWidget* parent, const TQString& text);
protected slots:
void slotOk();
@@ -35,6 +35,6 @@ class MultilineEdit : public KDialogBase
protected:
MultilineTextEdit* textEditor;
- static QString returnText;
+ static TQString returnText;
};
#endif
diff --git a/konversation/src/multilinetextedit.cpp b/konversation/src/multilinetextedit.cpp
index d5f7869..be42a1f 100644
--- a/konversation/src/multilinetextedit.cpp
+++ b/konversation/src/multilinetextedit.cpp
@@ -11,27 +11,27 @@
#include "multilinetextedit.h"
-#include <qpainter.h>
-#include <qregexp.h>
+#include <tqpainter.h>
+#include <tqregexp.h>
#include <kdebug.h>
-MultilineTextEdit::MultilineTextEdit(QWidget* parent,const char* name) : QTextEdit(parent,name)
+MultilineTextEdit::MultilineTextEdit(TQWidget* parent,const char* name) : TQTextEdit(parent,name)
{
// make sure, our whitespace highlighting gets called whenever needed
- connect(this,SIGNAL(textChanged()),this,SLOT(drawWhitespaces()));
- connect(this,SIGNAL(cursorPositionChanged(int,int)),this,SLOT(cursorChanged(int,int)));
+ connect(this,TQT_SIGNAL(textChanged()),this,TQT_SLOT(drawWhitespaces()));
+ connect(this,TQT_SIGNAL(cursorPositionChanged(int,int)),this,TQT_SLOT(cursorChanged(int,int)));
}
MultilineTextEdit::~MultilineTextEdit()
{
}
-void MultilineTextEdit::drawContents(QPainter* p,int clipx,int clipy,int clipw,int cliph)
+void MultilineTextEdit::drawContents(TQPainter* p,int clipx,int clipy,int clipw,int cliph)
{
// redraw text
- QTextEdit::drawContents(p,clipx,clipy,clipw,cliph);
+ TQTextEdit::drawContents(p,clipx,clipy,clipw,cliph);
// overlay whitespace markup
drawWhitespaces();
}
@@ -39,29 +39,29 @@ void MultilineTextEdit::drawContents(QPainter* p,int clipx,int clipy,int clipw,i
void MultilineTextEdit::drawWhitespaces()
{
// prepare a rectangle to store the width of the whitespace found
- QRect space;
+ TQRect space;
// get the painter for the text area
- QPainter pa(viewport());
+ TQPainter pa(viewport());
// get a sane color
- QColor col=colorGroup().link();
+ TQColor col=colorGroup().link();
// and a brush of the same color
- QBrush fillBrush(col);
+ TQBrush fillBrush(col);
// use it for line drawing
pa.setPen(col);
// and for filling
pa.setBrush(fillBrush);
// prepare the carriage return coordinates array
- QPointArray cr(4);
+ TQPointArray cr(4);
// and the tabulator arrow coordinate array
- QPointArray tab(7);
+ TQPointArray tab(7);
// whitespace expression
- QRegExp regex("\\s");
+ TQRegExp regex("\\s");
// line buffer
- QString line;
+ TQString line;
int x,y,pos,paragraph;
// start looking in every paragraph
@@ -119,14 +119,14 @@ void MultilineTextEdit::cursorChanged(int /* p */ ,int /* i */)
// code below from kbabel and adapted by me (Eisfuchs). Thanks, Guys!
-QRect MultilineTextEdit::mapToView(int para,int index)
+TQRect MultilineTextEdit::mapToView(int para,int index)
{
if( para < 0 || para > paragraphs() ||
index < 0 || index > paragraphLength(para) )
- return QRect(); //invalid rectangle
+ return TQRect(); //invalid rectangle
- const QFontMetrics& fm = fontMetrics();
- const QString& paratext = text(para);
+ const TQFontMetrics& fm = fontMetrics();
+ const TQString& paratext = text(para);
// Find index of the first character on the same line as parameter
// 'index' using binary search. Very fast, even for long texts.
@@ -155,18 +155,18 @@ QRect MultilineTextEdit::mapToView(int para,int index)
int linewidth = fm.size(ExpandTabs, paratext.mid( linestart, index-linestart )).width();
int linewidth2 = fm.size(ExpandTabs, paratext.mid( linestart, index-linestart+1 )).width();
- // FIXME as soon as it's possible to ask real margins from QTextEdit:
+ // FIXME as soon as it's possible to ask real margins from TQTextEdit:
const int left_margin = 4;
// const int top_margin = 4;
- QPainter painter( viewport());
- const QRect& linerect = paragraphRect(para);
+ TQPainter painter( viewport());
+ const TQRect& linerect = paragraphRect(para);
- return QRect(
- contentsToViewport( QPoint(
+ return TQRect(
+ contentsToViewport( TQPoint(
left_margin + linerect.left() + linewidth ,
/*top_margin + */linerect.top() + indexline * fm.lineSpacing() + fm.leading())),
- QSize(
+ TQSize(
linewidth2-linewidth,
fm.lineSpacing()
));
diff --git a/konversation/src/multilinetextedit.h b/konversation/src/multilinetextedit.h
index e0f71aa..2c61da9 100644
--- a/konversation/src/multilinetextedit.h
+++ b/konversation/src/multilinetextedit.h
@@ -12,18 +12,18 @@
#ifndef MULTILINETEXTEDIT_H
#define MULTILINETEXTEDIT_H
-#include <qtextedit.h>
+#include <tqtextedit.h>
-class QPaintEvent;
-class QWheelEvent;
+class TQPaintEvent;
+class TQWheelEvent;
class MultilineTextEdit : public QTextEdit
{
Q_OBJECT
public:
- explicit MultilineTextEdit(QWidget* parent=0,const char* name=0);
+ explicit MultilineTextEdit(TQWidget* parent=0,const char* name=0);
~MultilineTextEdit();
protected slots:
@@ -32,10 +32,10 @@ class MultilineTextEdit : public QTextEdit
protected:
// reimplemented
- virtual void drawContents(QPainter* p,int clipx,int clipy,int clipw,int cliph);
+ virtual void drawContents(TQPainter* p,int clipx,int clipy,int clipw,int cliph);
// the stuff below is copied from kbabel. Thanks, guys!
- QRect mapToView(int paragraph,int index);
+ TQRect mapToView(int paragraph,int index);
};
#endif
diff --git a/konversation/src/nick.cpp b/konversation/src/nick.cpp
index 1ea7ffc..4a14ff6 100644
--- a/konversation/src/nick.cpp
+++ b/konversation/src/nick.cpp
@@ -14,7 +14,7 @@
#include "nick.h"
#include "addressbook.h"
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <kdebug.h>
#include <klistview.h>
@@ -26,8 +26,8 @@
Nick::Nick(KListView *listView,
const ChannelNickPtr& channelnick)
- : QObject (),
- KListViewItem (listView, listView->lastItem(), QString::null,
+ : TQObject (),
+ KListViewItem (listView, listView->lastItem(), TQString::null,
channelnick->getNickname(), channelnick->getHostmask())
{
m_channelnickptr = channelnick;
@@ -40,9 +40,9 @@ const ChannelNickPtr& channelnick)
refresh();
- connect(this, SIGNAL(refreshed()), listView, SLOT(startResortTimer()));
- connect(getChannelNick(), SIGNAL(channelNickChanged()), SLOT(refresh()));
- connect(getChannelNick()->getNickInfo(), SIGNAL(nickInfoChanged()), SLOT(refresh()));
+ connect(this, TQT_SIGNAL(refreshed()), listView, TQT_SLOT(startResortTimer()));
+ connect(getChannelNick(), TQT_SIGNAL(channelNickChanged()), TQT_SLOT(refresh()));
+ connect(getChannelNick()->getNickInfo(), TQT_SIGNAL(nickInfoChanged()), TQT_SLOT(refresh()));
}
Nick::~Nick()
@@ -68,7 +68,7 @@ void Nick::refresh()
flags=1;
Images* images = KonversationApplication::instance()->images();
- QPixmap icon;
+ TQPixmap icon;
if ( getChannelNick()->isOwner() )
{
@@ -112,11 +112,11 @@ void Nick::refresh()
if(pic.isIntern())
{
- QPixmap qpixmap(pic.data().scaleHeight(m_height));
+ TQPixmap qpixmap(pic.data().scaleHeight(m_height));
setPixmap(1,qpixmap);
}
- QString newtext1 = calculateLabel1();
+ TQString newtext1 = calculateLabel1();
if(newtext1 != text(1))
{
setText(1, newtext1);
@@ -133,7 +133,7 @@ void Nick::refresh()
}
}
-QString Nick::calculateLabel1()
+TQString Nick::calculateLabel1()
{
NickInfoPtr nickinfo = getChannelNick()->getNickInfo();
KABC::Addressee addressee = nickinfo->getAddressee();
@@ -150,12 +150,12 @@ QString Nick::calculateLabel1()
return nickinfo->getNickname();
}
-QString Nick::calculateLabel2()
+TQString Nick::calculateLabel2()
{
return getChannelNick()->getNickInfo()->getHostmask();
}
-int Nick::compare(QListViewItem* item,int col,bool ascending) const
+int Nick::compare(TQListViewItem* item,int col,bool ascending) const
{
Nick* otherItem = static_cast<Nick*>(item);
@@ -198,8 +198,8 @@ int Nick::compare(QListViewItem* item,int col,bool ascending) const
}
}
- QString thisKey;
- QString otherKey;
+ TQString thisKey;
+ TQString otherKey;
if(col > 1) //the reason we need this: enabling hostnames adds another column
{
@@ -231,14 +231,14 @@ int Nick::compare(QListViewItem* item,int col,bool ascending) const
return thisKey.compare(otherKey);
}
-void Nick::paintCell(QPainter * p, const QColorGroup & cg, int column, int width, int align )
+void Nick::paintCell(TQPainter * p, const TQColorGroup & cg, int column, int width, int align )
{
- QColorGroup cg2 = cg;
+ TQColorGroup cg2 = cg;
NickInfo* nickInfo = getChannelNick()->getNickInfo();
if(nickInfo->isAway())
{
- cg2.setColor(QColorGroup::Text, kapp->palette(listView()).disabled().text());
+ cg2.setColor(TQColorGroup::Text, kapp->palette(listView()).disabled().text());
}
KListViewItem::paintCell(p,cg2,column,width,align);
@@ -247,7 +247,7 @@ void Nick::paintCell(QPainter * p, const QColorGroup & cg, int column, int width
int Nick::getSortingValue() const
{
int flags;
- QString sortingOrder = Preferences::sortOrder();
+ TQString sortingOrder = Preferences::sortOrder();
if(getChannelNick()->isOwner()) flags=sortingOrder.find('q');
else if(getChannelNick()->isAdmin()) flags=sortingOrder.find('p');
diff --git a/konversation/src/nick.h b/konversation/src/nick.h
index 1a5ae59..066aa4d 100644
--- a/konversation/src/nick.h
+++ b/konversation/src/nick.h
@@ -15,12 +15,12 @@
#ifndef NICK_H
#define NICK_H
-#include <qobject.h>
+#include <tqobject.h>
#include <klistview.h>
#include "channelnick.h"
-class Nick : public QObject, public KListViewItem
+class Nick : public TQObject, public KListViewItem
{
Q_OBJECT
public:
@@ -31,8 +31,8 @@ class Nick : public QObject, public KListViewItem
ChannelNickPtr getChannelNick() const;
int getSortingValue() const;
- virtual void paintCell(QPainter * p, const QColorGroup & cg, int column, int width, int align);
- virtual int compare(QListViewItem* item,int col,bool ascending) const;
+ virtual void paintCell(TQPainter * p, const TQColorGroup & cg, int column, int width, int align);
+ virtual int compare(TQListViewItem* item,int col,bool ascending) const;
public slots:
void refresh();
@@ -41,13 +41,13 @@ class Nick : public QObject, public KListViewItem
void refreshed();
protected:
- QString calculateLabel1();
- QString calculateLabel2();
+ TQString calculateLabel1();
+ TQString calculateLabel2();
protected:
ChannelNickPtr m_channelnickptr;
- QString label;
+ TQString label;
int m_height;
int m_flags;
bool m_away;
diff --git a/konversation/src/nickinfo.cpp b/konversation/src/nickinfo.cpp
index 72853aa..efc218e 100644
--- a/konversation/src/nickinfo.cpp
+++ b/konversation/src/nickinfo.cpp
@@ -26,12 +26,12 @@
#include "viewcontainer.h"
#include "server.h"
-#include <qtooltip.h>
+#include <tqtooltip.h>
#include <klocale.h>
-NickInfo::NickInfo(const QString& nick, Server* server): KShared()
+NickInfo::NickInfo(const TQString& nick, Server* server): KShared()
{
m_addressee=Konversation::Addressbook::self()->getKABCAddresseeFromNick(nick, server->getServerName(), server->getDisplayName());
m_nickname = nick;
@@ -45,11 +45,11 @@ NickInfo::NickInfo(const QString& nick, Server* server): KShared()
if(!m_addressee.isEmpty())
Konversation::Addressbook::self()->emitContactPresenceChanged(m_addressee.uid(), 4);
- connect( Konversation::Addressbook::self()->getAddressBook(), SIGNAL( addressBookChanged( AddressBook * ) ), this, SLOT( refreshAddressee() ) );
- connect( Konversation::Addressbook::self(), SIGNAL(addresseesChanged()), this, SLOT(refreshAddressee()));
+ connect( Konversation::Addressbook::self()->getAddressBook(), TQT_SIGNAL( addressBookChanged( AddressBook * ) ), this, TQT_SLOT( refreshAddressee() ) );
+ connect( Konversation::Addressbook::self(), TQT_SIGNAL(addresseesChanged()), this, TQT_SLOT(refreshAddressee()));
- m_changedTimer = new QTimer( this);
- connect(m_changedTimer, SIGNAL( timeout()), SLOT(emitNickInfoChanged()));
+ m_changedTimer = new TQTimer( this);
+ connect(m_changedTimer, TQT_SIGNAL( timeout()), TQT_SLOT(emitNickInfoChanged()));
// reset nick color
m_nickColor = 0;
@@ -62,19 +62,19 @@ NickInfo::~NickInfo()
}
// Get properties of NickInfo object.
-QString NickInfo::getNickname() const { return m_nickname; }
-QString NickInfo::loweredNickname() const { return m_loweredNickname; }
-QString NickInfo::getHostmask() const { return m_hostmask; }
+TQString NickInfo::getNickname() const { return m_nickname; }
+TQString NickInfo::loweredNickname() const { return m_loweredNickname; }
+TQString NickInfo::getHostmask() const { return m_hostmask; }
bool NickInfo::isAway() const { return m_away; }
-QString NickInfo::getAwayMessage() const { return m_awayMessage; }
-QString NickInfo::getIdentdInfo() const { return m_identdInfo; }
-QString NickInfo::getVersionInfo() const { return m_versionInfo; }
+TQString NickInfo::getAwayMessage() const { return m_awayMessage; }
+TQString NickInfo::getIdentdInfo() const { return m_identdInfo; }
+TQString NickInfo::getVersionInfo() const { return m_versionInfo; }
bool NickInfo::isNotified() const { return m_notified; }
-QString NickInfo::getRealName() const { return m_realName; }
-QString NickInfo::getNetServer() const { return m_netServer; }
-QString NickInfo::getNetServerInfo() const { return m_netServerInfo; }
-QDateTime NickInfo::getOnlineSince() const { return m_onlineSince; }
+TQString NickInfo::getRealName() const { return m_realName; }
+TQString NickInfo::getNetServer() const { return m_netServer; }
+TQString NickInfo::getNetServerInfo() const { return m_netServerInfo; }
+TQDateTime NickInfo::getOnlineSince() const { return m_onlineSince; }
uint NickInfo::getNickColor()
{
@@ -96,10 +96,10 @@ uint NickInfo::getNickColor()
bool NickInfo::isIdentified() const { return m_identified; }
-QString NickInfo::getPrettyOnlineSince() const
+TQString NickInfo::getPrettyOnlineSince() const
{
- QString prettyOnlineSince;
- int daysto = m_onlineSince.date().daysTo( QDate::currentDate());
+ TQString prettyOnlineSince;
+ int daysto = m_onlineSince.date().daysTo( TQDate::currentDate());
if(daysto == 0) prettyOnlineSince = i18n("Today");
else if(daysto == 1) prettyOnlineSince = i18n("Yesterday");
else prettyOnlineSince = m_onlineSince.toString("ddd d MMMM yyyy");
@@ -113,7 +113,7 @@ QString NickInfo::getPrettyOnlineSince() const
Server* NickInfo::getServer() const { return m_owningServer; }
// Set properties of NickInfo object.
-void NickInfo::setNickname(const QString& newNickname)
+void NickInfo::setNickname(const TQString& newNickname)
{
Q_ASSERT(!newNickname.isEmpty());
if(newNickname == m_nickname) return;
@@ -137,7 +137,7 @@ void NickInfo::setNickname(const QString& newNickname)
m_nickname = newNickname;
m_loweredNickname = newNickname.lower();
- QString realname = m_addressee.realName();
+ TQString realname = m_addressee.realName();
startNickInfoChangedTimer();
}
@@ -153,7 +153,7 @@ void NickInfo::startNickInfoChangedTimer()
m_changedTimer->start(3000, true /*single shot*/);
}
-void NickInfo::setHostmask(const QString& newMask)
+void NickInfo::setHostmask(const TQString& newMask)
{
if (newMask.isEmpty() || newMask == m_hostmask) return;
m_hostmask = newMask;
@@ -178,7 +178,7 @@ void NickInfo::setIdentified(bool identified)
startNickInfoChangedTimer();
}
-void NickInfo::setAwayMessage(const QString& newMessage)
+void NickInfo::setAwayMessage(const TQString& newMessage)
{
if(m_awayMessage == newMessage) return;
m_awayMessage = newMessage;
@@ -186,14 +186,14 @@ void NickInfo::setAwayMessage(const QString& newMessage)
startNickInfoChangedTimer();
}
-void NickInfo::setIdentdInfo(const QString& newIdentdInfo)
+void NickInfo::setIdentdInfo(const TQString& newIdentdInfo)
{
if(m_identdInfo == newIdentdInfo) return;
m_identdInfo = newIdentdInfo;
startNickInfoChangedTimer();
}
-void NickInfo::setVersionInfo(const QString& newVersionInfo)
+void NickInfo::setVersionInfo(const TQString& newVersionInfo)
{
if(m_versionInfo == newVersionInfo) return;
m_versionInfo = newVersionInfo;
@@ -208,28 +208,28 @@ void NickInfo::setNotified(bool state)
startNickInfoChangedTimer();
}
-void NickInfo::setRealName(const QString& newRealName)
+void NickInfo::setRealName(const TQString& newRealName)
{
if (newRealName.isEmpty() || m_realName == newRealName) return;
m_realName = newRealName;
startNickInfoChangedTimer();
}
-void NickInfo::setNetServer(const QString& newNetServer)
+void NickInfo::setNetServer(const TQString& newNetServer)
{
if (newNetServer.isEmpty() || m_netServer == newNetServer) return;
m_netServer = newNetServer;
startNickInfoChangedTimer();
}
-void NickInfo::setNetServerInfo(const QString& newNetServerInfo)
+void NickInfo::setNetServerInfo(const TQString& newNetServerInfo)
{
if (newNetServerInfo.isEmpty() || newNetServerInfo == m_netServerInfo) return;
m_netServerInfo = newNetServerInfo;
startNickInfoChangedTimer();
}
-void NickInfo::setOnlineSince(const QDateTime& datetime)
+void NickInfo::setOnlineSince(const TQDateTime& datetime)
{
if (datetime.isNull() || datetime == m_onlineSince) return;
m_onlineSince = datetime;
@@ -256,11 +256,11 @@ void NickInfo::refreshAddressee()
Konversation::Addressbook::self()->emitContactPresenceChanged(m_addressee.uid());
}
-QString NickInfo::tooltip() const
+TQString NickInfo::tooltip() const
{
- QString strTooltip;
- QTextStream tooltip( &strTooltip, IO_WriteOnly );
+ TQString strTooltip;
+ TQTextStream tooltip( &strTooltip, IO_WriteOnly );
tooltip << "<qt>";
tooltip << "<table cellspacing=\"0\" cellpadding=\"0\">";
@@ -269,7 +269,7 @@ QString NickInfo::tooltip() const
return strTooltip;
}
-QString NickInfo::getBestAddresseeName()
+TQString NickInfo::getBestAddresseeName()
{
if(!m_addressee.formattedName().isEmpty())
{
@@ -290,7 +290,7 @@ QString NickInfo::getBestAddresseeName()
}
-void NickInfo::tooltipTableData(QTextStream &tooltip) const
+void NickInfo::tooltipTableData(TQTextStream &tooltip) const
{
tooltip << "<tr><td colspan=\"2\" valign=\"top\">";
@@ -300,7 +300,7 @@ void NickInfo::tooltipTableData(QTextStream &tooltip) const
bool isimage=false;
if(photo.isIntern())
{
- QMimeSourceFactory::defaultFactory()->setImage( "photo", photo.data() );
+ TQMimeSourceFactory::defaultFactory()->setImage( "photo", photo.data() );
tooltip << "<img src=\"photo\">";
dirty=true;
isimage=true;
@@ -316,7 +316,7 @@ void NickInfo::tooltipTableData(QTextStream &tooltip) const
}
if(logo.isIntern())
{
- QMimeSourceFactory::defaultFactory()->setImage( "logo", logo.data() );
+ TQMimeSourceFactory::defaultFactory()->setImage( "logo", logo.data() );
tooltip << "<img src=\"logo\">";
dirty=true;
isimage=true;
@@ -343,7 +343,7 @@ void NickInfo::tooltipTableData(QTextStream &tooltip) const
}
else if(!getRealName().isEmpty() && getRealName().lower() != loweredNickname())
{
- QString escapedRealName( getRealName() );
+ TQString escapedRealName( getRealName() );
escapedRealName.replace("<","&lt;").replace(">","&gt;");
tooltip << escapedRealName;
dirty = true;
diff --git a/konversation/src/nickinfo.h b/konversation/src/nickinfo.h
index f6e9a9b..e62bb08 100644
--- a/konversation/src/nickinfo.h
+++ b/konversation/src/nickinfo.h
@@ -15,15 +15,15 @@
#ifndef NICKINFO_H
#define NICKINFO_H
-#include <qstringlist.h>
-#include <qdatetime.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
#include <ksharedptr.h>
#include <kabc/addressbook.h>
class Server;
-class QTimer;
+class TQTimer;
/**
The NickInfo object is a data container for information about a single nickname.
@@ -33,31 +33,31 @@ class QTimer;
Offline (but watched or in addressbook) nicks are stored in the Server object.
*/
-class NickInfo : public QObject, public KShared
+class NickInfo : public TQObject, public KShared
{
Q_OBJECT
public:
- NickInfo(const QString& nick, Server* server);
+ NickInfo(const TQString& nick, Server* server);
~NickInfo();
// Get properties of NickInfo object.
- QString getNickname() const;
- QString loweredNickname() const;
- QString getHostmask() const;
+ TQString getNickname() const;
+ TQString loweredNickname() const;
+ TQString getHostmask() const;
/** Currently return whether the user has set themselves to away with /away.
* May be changed in the future to parse the nick string and see if it contains
* "|away" or "|afk" or something.
*/
bool isAway() const;
- QString getAwayMessage() const;
- QString getIdentdInfo() const;
- QString getVersionInfo() const;
+ TQString getAwayMessage() const;
+ TQString getIdentdInfo() const;
+ TQString getVersionInfo() const;
bool isNotified() const;
- QString getRealName() const;
- QString getNetServer() const;
- QString getNetServerInfo() const;
- QDateTime getOnlineSince() const;
+ TQString getRealName() const;
+ TQString getNetServer() const;
+ TQString getNetServerInfo() const;
+ TQDateTime getOnlineSince() const;
uint getNickColor();
/** Whether this user is identified with nickserv.
* Found only by doing /whois nick
@@ -67,7 +67,7 @@ class NickInfo : public QObject, public KShared
* It will return null if a /whois hasn't been issued yet for this nickinfo
* @return a date-string in the form of "Today, 4:23pm", "Yesterday, 12:32pm" or "Mon 3 Mar 2004, 8:02am"
*/
- QString getPrettyOnlineSince() const;
+ TQString getPrettyOnlineSince() const;
/// Return the Server object that owns this NickInfo object.
Server* getServer() const;
@@ -75,25 +75,25 @@ class NickInfo : public QObject, public KShared
KABC::Addressee getAddressee() const;
/** Set properties of NickInfo object. */
- void setNickname(const QString& newNickname);
+ void setNickname(const TQString& newNickname);
/** Set properties of NickInfo object. Ignores the request is newmask is empty.*/
- void setHostmask(const QString& newMask);
+ void setHostmask(const TQString& newMask);
/** Set properties of NickInfo object. */
void setAway(bool state);
/** Set properties of NickInfo object. */
- void setAwayMessage(const QString& newMessage);
+ void setAwayMessage(const TQString& newMessage);
/** Set properties of NickInfo object. */
- void setIdentdInfo(const QString& newIdentdInfo);
+ void setIdentdInfo(const TQString& newIdentdInfo);
/** Set properties of NickInfo object. */
- void setVersionInfo(const QString& newVersionInfo);
+ void setVersionInfo(const TQString& newVersionInfo);
/** Set properties of NickInfo object. */
void setNotified(bool state);
/** Set properties of NickInfo object. */
- void setRealName(const QString& newRealName);
+ void setRealName(const TQString& newRealName);
/** Set properties of NickInfo object. */
- void setNetServer(const QString& newNetServer);
+ void setNetServer(const TQString& newNetServer);
/** Set properties of NickInfo object. */
- void setNetServerInfo(const QString& newNetServerInfo);
+ void setNetServerInfo(const TQString& newNetServerInfo);
/** Whether this user is identified with nickserv.
* Found only by doing /whois nick
*/
@@ -103,21 +103,21 @@ class NickInfo : public QObject, public KShared
* This function also calculates and sets prettyOnlineSince
* @see getPrettyOnlineSince()
*/
- void setOnlineSince(const QDateTime& datetime);
+ void setOnlineSince(const TQDateTime& datetime);
/** Returns html describing this nickInfo - useful for tooltips when hovering over this nick.
*/
- QString tooltip() const;
+ TQString tooltip() const;
/** Returns just the <tr><td>.. data for a tooltip.
* Used so that channelNick->tooltip() can call this, then append on its own information.
*/
- void tooltipTableData(QTextStream &tooltip) const;
+ void tooltipTableData(TQTextStream &tooltip) const;
/** Returns a full name for this contact. Tries to use the name out of addressbook.
* If that is empty, uses the real name from whois. If that fails, use nickname.
*
* @return A string to show the user for the name of this contact
*/
- QString getBestAddresseeName();
+ TQString getBestAddresseeName();
/** Open this contact up in a "edit addresee association" window
*/
@@ -137,26 +137,26 @@ class NickInfo : public QObject, public KShared
* Used to consolidate changed signals.
*/
void startNickInfoChangedTimer();
- QString m_nickname;
- QString m_loweredNickname;
+ TQString m_nickname;
+ TQString m_loweredNickname;
Server* m_owningServer;
- QString m_hostmask;
+ TQString m_hostmask;
bool m_away;
- QString m_awayMessage;
- QString m_identdInfo;
- QString m_versionInfo;
+ TQString m_awayMessage;
+ TQString m_identdInfo;
+ TQString m_versionInfo;
bool m_notified;
- QString m_realName;
+ TQString m_realName;
/** The server they are connected to. */
- QString m_netServer;
- QString m_netServerInfo;
- QDateTime m_onlineSince;
+ TQString m_netServer;
+ TQString m_netServerInfo;
+ TQDateTime m_onlineSince;
KABC::Addressee m_addressee;
/** Whether this user is identified with nickserv.
* Found only by doing /whois nick
*/
bool m_identified;
- QTimer *m_changedTimer;
+ TQTimer *m_changedTimer;
/* True if "foo is online" message is printed */
bool m_printedOnline;
/* The color index for lookup on Preferences::NickColor(index).name()
@@ -179,7 +179,7 @@ class NickInfo : public QObject, public KShared
typedef KSharedPtr<NickInfo> NickInfoPtr;
/** A NickInfoMap is a list of NickInfo objects, indexed and sorted by lowercase nickname.
*/
-typedef QMap<QString,NickInfoPtr> NickInfoMap;
+typedef TQMap<TQString,NickInfoPtr> NickInfoMap;
-typedef QValueList<NickInfoPtr> NickInfoList;
+typedef TQValueList<NickInfoPtr> NickInfoList;
#endif
diff --git a/konversation/src/nicklistbehavior_preferences.cpp b/konversation/src/nicklistbehavior_preferences.cpp
index 8bb3bde..ad66c18 100644
--- a/konversation/src/nicklistbehavior_preferences.cpp
+++ b/konversation/src/nicklistbehavior_preferences.cpp
@@ -15,13 +15,13 @@
#include "valuelistviewitem.h"
#include "config/preferences.h"
-#include <qheader.h>
+#include <tqheader.h>
#include <kapplication.h>
#include <klocale.h>
-NicklistBehavior_Config::NicklistBehavior_Config(QWidget *parent, const char *name)
+NicklistBehavior_Config::NicklistBehavior_Config(TQWidget *parent, const char *name)
: NicklistBehavior_ConfigUI(parent, name)
{
// get page widget and populate listview
@@ -31,7 +31,7 @@ NicklistBehavior_Config::NicklistBehavior_Config(QWidget *parent, const char *na
sortOrder->setSorting(-1,false);
sortOrder->header()->setMovingEnabled(false);
- connect(sortOrder,SIGNAL (moved()),this,SIGNAL (modified()) );
+ connect(sortOrder,TQT_SIGNAL (moved()),this,TQT_SIGNAL (modified()) );
}
NicklistBehavior_Config::~NicklistBehavior_Config()
@@ -50,7 +50,7 @@ void NicklistBehavior_Config::loadSettings()
m_oldSortingOrder=currentSortingOrder();
}
-void NicklistBehavior_Config::setNickList(const QString &sortingOrder)
+void NicklistBehavior_Config::setNickList(const TQString &sortingOrder)
{
sortOrder->clear();
// loop through the sorting order string, insert the matching descriptions in reverse order
@@ -58,7 +58,7 @@ void NicklistBehavior_Config::setNickList(const QString &sortingOrder)
for(unsigned int index=sortingOrder.length();index!=0;index--)
{
// get next mode char
- QChar mode=sortingOrder[index-1];
+ TQChar mode=sortingOrder[index-1];
// find appropriate description
if(mode=='-') new KListViewItem(sortOrder,mode,i18n("Normal Users"));
if(mode=='v') new KListViewItem(sortOrder,mode,i18n("Voice (+v)"));
@@ -69,12 +69,12 @@ void NicklistBehavior_Config::setNickList(const QString &sortingOrder)
}
}
-QString NicklistBehavior_Config::currentSortingOrder()
+TQString NicklistBehavior_Config::currentSortingOrder()
{
// get the uppermost entry of the sorting list
- QListViewItem* item=sortOrder->firstChild();
+ TQListViewItem* item=sortOrder->firstChild();
// prepare the new sorting order string
- QString currentSortingOrder;
+ TQString currentSortingOrder;
// iterate through all items of the listview
while(item)
{
@@ -91,7 +91,7 @@ QString NicklistBehavior_Config::currentSortingOrder()
void NicklistBehavior_Config::saveSettings()
{
// get the current sorting order
- QString newSortingOrder=currentSortingOrder();
+ TQString newSortingOrder=currentSortingOrder();
// update sorting order on in-memory preferences
Preferences::setSortOrder(newSortingOrder);
diff --git a/konversation/src/nicklistbehavior_preferences.h b/konversation/src/nicklistbehavior_preferences.h
index 5eda68d..a9e7588 100644
--- a/konversation/src/nicklistbehavior_preferences.h
+++ b/konversation/src/nicklistbehavior_preferences.h
@@ -16,7 +16,7 @@
#include "konvisettingspage.h"
#include "nicklistbehavior_preferencesui.h"
-#include <qobject.h>
+#include <tqobject.h>
class NicklistBehavior_Config : public NicklistBehavior_ConfigUI, public KonviSettingsPage
@@ -24,7 +24,7 @@ class NicklistBehavior_Config : public NicklistBehavior_ConfigUI, public KonviSe
Q_OBJECT
public:
- explicit NicklistBehavior_Config(QWidget *parent = 0, const char *name = 0);
+ explicit NicklistBehavior_Config(TQWidget *parent = 0, const char *name = 0);
~NicklistBehavior_Config();
virtual void saveSettings();
@@ -34,10 +34,10 @@ class NicklistBehavior_Config : public NicklistBehavior_ConfigUI, public KonviSe
virtual bool hasChanged();
private:
- void setNickList(const QString &sortingOrder);
- QString currentSortingOrder();
+ void setNickList(const TQString &sortingOrder);
+ TQString currentSortingOrder();
- QString m_oldSortingOrder;
+ TQString m_oldSortingOrder;
signals:
void modified();
diff --git a/konversation/src/nicklistview.cpp b/konversation/src/nicklistview.cpp
index e6e2bf2..26e6bdd 100644
--- a/konversation/src/nicklistview.cpp
+++ b/konversation/src/nicklistview.cpp
@@ -20,14 +20,14 @@
#include <kpopupmenu.h>
#include <klocale.h>
#include <kdebug.h>
-#include <qtooltip.h>
-#include <qtimer.h>
+#include <tqtooltip.h>
+#include <tqtimer.h>
#include <kiconloader.h>
-#include <qwhatsthis.h>
-#include <qdragobject.h>
+#include <tqwhatsthis.h>
+#include <tqdragobject.h>
-NickListView::NickListView(QWidget* parent, Channel *chan) :
+NickListView::NickListView(TQWidget* parent, Channel *chan) :
KListView(parent)
{
KListView::setSorting(-1);
@@ -104,10 +104,10 @@ KListView(parent)
popup->insertItem(i18n("Add to Watched Nicks"), Konversation::AddNotify);
- connect (popup, SIGNAL(activated(int)), this, SIGNAL(popupCommand(int)));
- connect (modes, SIGNAL(activated(int)), this, SIGNAL(popupCommand(int)));
- connect (kickban, SIGNAL(activated(int)), this, SIGNAL(popupCommand(int)));
- connect (addressbook, SIGNAL(activated(int)), this, SIGNAL(popupCommand(int)));
+ connect (popup, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(popupCommand(int)));
+ connect (modes, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(popupCommand(int)));
+ connect (kickban, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(popupCommand(int)));
+ connect (addressbook, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(popupCommand(int)));
}
else
@@ -119,12 +119,12 @@ KListView(parent)
setShadeSortColumn(false);
#endif
- // We have our own tooltips, don't use the default QListView ones
+ // We have our own tooltips, don't use the default TQListView ones
setShowToolTips(false);
m_tooltip = new Konversation::KonversationNickListViewToolTip(viewport(), this);
- m_resortTimer = new QTimer(this);
- connect(m_resortTimer, SIGNAL(timeout()), SLOT(resort()));
+ m_resortTimer = new TQTimer(this);
+ connect(m_resortTimer, TQT_SIGNAL(timeout()), TQT_SLOT(resort()));
}
NickListView::~NickListView()
@@ -139,19 +139,19 @@ void NickListView::setWhatsThis()
if(images->getNickIcon( Images::Normal, false).isNull())
{
- QWhatsThis::add(this, i18n("<qt>This shows all the people in the channel. The nick for each person is shown.<br>Usually an icon is shown showing the status of each person, but you do not seem to have any icon theme installed. See the Konversation settings - <i>Configure Konversation</i> under the <i>Settings</i> menu. Then view the page for <i>Themes</i> under <i>Appearence</i>.</qt>"));
+ TQWhatsThis::add(this, i18n("<qt>This shows all the people in the channel. The nick for each person is shown.<br>Usually an icon is shown showing the status of each person, but you do not seem to have any icon theme installed. See the Konversation settings - <i>Configure Konversation</i> under the <i>Settings</i> menu. Then view the page for <i>Themes</i> under <i>Appearence</i>.</qt>"));
}
else
{
- QMimeSourceFactory::defaultFactory()->setImage( "admin", images->getNickIcon( Images::Admin, false ).convertToImage() );
- QMimeSourceFactory::defaultFactory()->setImage( "owner", images->getNickIcon( Images::Owner, false ).convertToImage());
- QMimeSourceFactory::defaultFactory()->setImage( "op", images->getNickIcon( Images::Op, false ).convertToImage() );
- QMimeSourceFactory::defaultFactory()->setImage( "halfop", images->getNickIcon( Images::HalfOp, false ).convertToImage() );
- QMimeSourceFactory::defaultFactory()->setImage( "voice", images->getNickIcon( Images::Voice, false ).convertToImage() );
- QMimeSourceFactory::defaultFactory()->setImage( "normal", images->getNickIcon( Images::Normal, false ).convertToImage() );
- QMimeSourceFactory::defaultFactory()->setImage( "normalaway", images->getNickIcon( Images::Normal, true).convertToImage() );
-
- QWhatsThis::add(this, i18n("<qt>This shows all the people in the channel. The nick for each person is shown, with a picture showing their status.<p>"
+ TQMimeSourceFactory::defaultFactory()->setImage( "admin", images->getNickIcon( Images::Admin, false ).convertToImage() );
+ TQMimeSourceFactory::defaultFactory()->setImage( "owner", images->getNickIcon( Images::Owner, false ).convertToImage());
+ TQMimeSourceFactory::defaultFactory()->setImage( "op", images->getNickIcon( Images::Op, false ).convertToImage() );
+ TQMimeSourceFactory::defaultFactory()->setImage( "halfop", images->getNickIcon( Images::HalfOp, false ).convertToImage() );
+ TQMimeSourceFactory::defaultFactory()->setImage( "voice", images->getNickIcon( Images::Voice, false ).convertToImage() );
+ TQMimeSourceFactory::defaultFactory()->setImage( "normal", images->getNickIcon( Images::Normal, false ).convertToImage() );
+ TQMimeSourceFactory::defaultFactory()->setImage( "normalaway", images->getNickIcon( Images::Normal, true).convertToImage() );
+
+ TQWhatsThis::add(this, i18n("<qt>This shows all the people in the channel. The nick for each person is shown, with a picture showing their status.<p>"
"<table>"
"<tr><th><img src=\"admin\"></th><td>This person has administrator privileges.</td></tr>"
@@ -172,7 +172,7 @@ void NickListView::setWhatsThis()
void NickListView::refresh()
{
- QListViewItemIterator it(this);
+ TQListViewItemIterator it(this);
while (it.current())
{
@@ -196,7 +196,7 @@ void NickListView::resort()
KListView::setSorting(-1);
}
-void NickListView::contextMenuEvent(QContextMenuEvent* ce)
+void NickListView::contextMenuEvent(TQContextMenuEvent* ce)
{
ce->accept();
@@ -308,17 +308,17 @@ void NickListView::setSorting(int column, bool ascending)
m_ascending = ascending;
}
-bool NickListView::acceptDrag (QDropEvent* event) const
+bool NickListView::acceptDrag (TQDropEvent* event) const
{
if (event->provides("text/uri-list"))
{
if (event->source())
{
- QStrList uris;
+ TQStrList uris;
- if (QUriDrag::decode(event,uris))
+ if (TQUriDrag::decode(event,uris))
{
- QString first = uris.first();
+ TQString first = uris.first();
if (first.startsWith("irc://") || channel->getNickList().containsNick(first))
return false;
diff --git a/konversation/src/nicklistview.h b/konversation/src/nicklistview.h
index ac6ac80..5b745b4 100644
--- a/konversation/src/nicklistview.h
+++ b/konversation/src/nicklistview.h
@@ -23,16 +23,16 @@
#include <klistview.h>
-class QPopupMenu;
-class QContextMenuEvent;
-class QTimer;
+class TQPopupMenu;
+class TQContextMenuEvent;
+class TQTimer;
class NickListView : public KListView
{
Q_OBJECT
public:
- NickListView(QWidget* parent, Channel *chan);
+ NickListView(TQWidget* parent, Channel *chan);
~NickListView();
/** Call when the icons have been changed.
@@ -59,17 +59,17 @@ class NickListView : public KListView
void popupCommand(int id);
protected:
- void contextMenuEvent(QContextMenuEvent* ce);
- virtual bool acceptDrag (QDropEvent* event) const;
+ void contextMenuEvent(TQContextMenuEvent* ce);
+ virtual bool acceptDrag (TQDropEvent* event) const;
void insertAssociationSubMenu();
void updateActions();
Konversation::KonversationNickListViewToolTip *m_tooltip;
- QPopupMenu* popup;
- QPopupMenu* modes;
- QPopupMenu* kickban;
- QPopupMenu* addressbook;
+ TQPopupMenu* popup;
+ TQPopupMenu* modes;
+ TQPopupMenu* kickban;
+ TQPopupMenu* addressbook;
Channel *channel;
- QTimer *m_resortTimer;
+ TQTimer *m_resortTimer;
int m_column;
bool m_ascending;
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);
diff --git a/konversation/src/nicksonline.h b/konversation/src/nicksonline.h
index 6243b78..9dcf7f0 100644
--- a/konversation/src/nicksonline.h
+++ b/konversation/src/nicksonline.h
@@ -20,14 +20,14 @@
#include "chatwindow.h"
#include "linkaddressbook/nicksonlinetooltip.h"
-#include <qvbox.h>
-#include <qiconset.h>
-#include <qpair.h>
+#include <tqvbox.h>
+#include <tqiconset.h>
+#include <tqpair.h>
class KListView;
-class QPushButton;
-class QPopupMenu;
+class TQPushButton;
+class TQPopupMenu;
class ChatWindow;
@@ -60,12 +60,12 @@ class NicksOnline : public ChatWindow
nsHasAddress = 2 // Nick has an associated addressbook entry.
};
- explicit NicksOnline(QWidget* parent);
+ explicit NicksOnline(TQWidget* parent);
~NicksOnline();
// These are here for the benefit of NicksOnlineTooltip.
KListView* getNickListView();
- NickInfoPtr getNickInfo(const QListViewItem* item);
+ NickInfoPtr getNickInfo(const TQListViewItem* item);
virtual bool canBeFrontView() { return true; }
@@ -77,7 +77,7 @@ class NicksOnline : public ChatWindow
/**
* Emitted whenever user double-clicks a nick in the Nicks Online tab.
*/
- void doubleClicked(const QString& server,const QString& nick);
+ void doubleClicked(const TQString& server,const TQString& nick);
void showView(ChatWindow* view);
@@ -94,7 +94,7 @@ class NicksOnline : public ChatWindow
* 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 processDoubleClick(QListViewItem* item);
+ void processDoubleClick(TQListViewItem* item);
/**
* Timer used to refresh display.
*/
@@ -118,7 +118,7 @@ class NicksOnline : public ChatWindow
/**
* Received when right-clicking an item in the NickListView.
*/
- void slotNickListView_RightButtonClicked(QListViewItem* item, const QPoint& pt);
+ void slotNickListView_RightButtonClicked(TQListViewItem* item, const TQPoint& pt);
/**
* Received from server when a NickInfo changes its information.
*/
@@ -136,24 +136,24 @@ class NicksOnline : public ChatWindow
/**
* 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* findItemChild(const QListViewItem* parent, const QString& name, NicksOnlineItem::NickListViewColumn type);
+ TQListViewItem* findItemChild(const TQListViewItem* parent, const TQString& name, NicksOnlineItem::NickListViewColumn type);
/**
* 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* findItemType(const QListViewItem* parent, NicksOnlineItem::NickListViewColumn type);
+ TQListViewItem* findItemType(const TQListViewItem* parent, NicksOnlineItem::NickListViewColumn type);
/**
- * 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* findNetworkRoot(const QString& name);
+ TQListViewItem* findNetworkRoot(const TQString& name);
/**
* Refresh the nicklistview for all servers.
*/
@@ -162,7 +162,7 @@ class NicksOnline : public ChatWindow
* Refreshes the information for the given item in the list.
* @param item Pointer to listview item.
*/
- void refreshItem(QListViewItem* item);
+ void refreshItem(TQListViewItem* item);
/**
* Return a string containing formatted additional information about a nick.
* @param nickInfo A pointer to NickInfo structure for the nick.
@@ -171,31 +171,31 @@ class NicksOnline : public ChatWindow
* @return needWhois True if a WHOIS needs to be performed on the nick
* to get additional information.
*/
- QString getNickAdditionalInfo(NickInfoPtr nickInfo, KABC::Addressee addressee,
+ TQString getNickAdditionalInfo(NickInfoPtr nickInfo, KABC::Addressee addressee,
bool& needWhois);
/**
* Invokes the KAddressBook contact editor for the specified contact id.
* @param uid Id of the contact.
* @return False if unable to invoke the Contact editor.
*/
- bool editAddressee(const QString &uid);
+ bool editAddressee(const TQString &uid);
/**
* Returns the server name and nickname of the specified nicklistview item.
* @param item The nicklistview 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 getItemServerAndNick(const QListViewItem* item, QString& serverName, QString& nickname);
+ bool getItemServerAndNick(const TQListViewItem* item, TQString& serverName, TQString& nickname);
/**
* Given a server name and nickname, returns the item in the Nick List View displaying
* the nick.
* @param serverName Name of server.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* getServerAndNickItem(const QString& serverName, const QString& nickname);
+ TQListViewItem* getServerAndNickItem(const TQString& serverName, const TQString& nickname);
/**
* Perform an addressbook command (edit contact, create new contact,
* change/delete association.)
@@ -214,7 +214,7 @@ class NicksOnline : public ChatWindow
* @return Addressbook state.
* 0 = not a nick, 1 = nick has no addressbook association, 2 = nick has association
*/
- int getNickAddressbookState(QListViewItem* item);
+ int getNickAddressbookState(TQListViewItem* item);
/**
* Sets the enabled/disabled state and labels of the addressbook buttons
* based on the given nick addressbook state.
@@ -229,31 +229,31 @@ class NicksOnline : public ChatWindow
* @param nickname Nick name.
* @return NickInfo if nick is online in any server, otherwise 0.
*/
- NickInfoPtr getOnlineNickInfo(QString& networkName, QString& nickname);
+ NickInfoPtr getOnlineNickInfo(TQString& networkName, TQString& nickname);
/**
* Requests a WHOIS for a specified server network and nickname.
* The request is sent to the first server found in the network.
* @param groupName Server group name.
* @param nickname Nick name.
*/
- void requestWhois(QString& networkName, QString& nickname);
+ void requestWhois(TQString& networkName, TQString& nickname);
// The main display of networks, nicks, and channels.
KListView* m_nickListView;
// Buttons on screen.
- QPushButton* m_editContactButton;
- QPushButton* m_changeAssociationButton;
- QPushButton* m_deleteAssociationButton;
+ TQPushButton* m_editContactButton;
+ TQPushButton* m_changeAssociationButton;
+ TQPushButton* m_deleteAssociationButton;
// Context menu when right-clicking a nick.
- QPopupMenu* m_popupMenu;
+ TQPopupMenu* m_popupMenu;
// Helper to display tooltip information for nicks.
Konversation::KonversationNicksOnlineToolTip *m_tooltip;
// A string containing the identifier for the "Offline" listview item
- QString c_offline;
+ TQString c_offline;
// Timer for refreshing display and generating WHOISes.
- QTimer* m_timer;
+ TQTimer* m_timer;
// Addressbook icon.
- QIconSet m_kabcIconSet;
+ TQIconSet m_kabcIconSet;
/* Set to False every 8 seconds so that we generate a WHOIS on watch nicks that
lack information.*/
bool m_whoisRequested;
diff --git a/konversation/src/nicksonlineitem.cpp b/konversation/src/nicksonlineitem.cpp
index cd8cd1d..1ad2824 100644
--- a/konversation/src/nicksonlineitem.cpp
+++ b/konversation/src/nicksonlineitem.cpp
@@ -12,13 +12,13 @@
#include "nicksonlineitem.h"
-NicksOnlineItem::NicksOnlineItem(int type, QListView* parent, const QString& name, const QString& col2) :
+NicksOnlineItem::NicksOnlineItem(int type, TQListView* parent, const TQString& name, const TQString& col2) :
KListViewItem(parent, name, col2)
{
m_type=type;
}
-NicksOnlineItem::NicksOnlineItem(int type, QListViewItem* parent, const QString& name, const QString& col2) :
+NicksOnlineItem::NicksOnlineItem(int type, TQListViewItem* parent, const TQString& name, const TQString& col2) :
KListViewItem(parent, name, col2)
{
m_type=type;
@@ -26,12 +26,12 @@ NicksOnlineItem::NicksOnlineItem(int type, QListViewItem* parent, const QString&
/**
* Reimplemented to make sure, "Offline" items always get sorted to the bottom of the list
- * @param i Pointer to the QListViewItem to compare with.
+ * @param i Pointer to the TQListViewItem to compare with.
* @param col The column to compare
* @param ascending Specify sorting direction
* @return -1 if this item's value is smaller than i, 0 if they are equal, 1 if it's greater
*/
-int NicksOnlineItem::compare(QListViewItem* i,int col,bool ascending) const
+int NicksOnlineItem::compare(TQListViewItem* i,int col,bool ascending) const
{
// if we are the Offline item, make sure we get sorted at the end of the list
if(m_type==OfflineItem) return ascending ? 1 : -1;
diff --git a/konversation/src/nicksonlineitem.h b/konversation/src/nicksonlineitem.h
index 5711e60..e7e911d 100644
--- a/konversation/src/nicksonlineitem.h
+++ b/konversation/src/nicksonlineitem.h
@@ -27,23 +27,23 @@ class NicksOnlineItem : public KListViewItem
};
NicksOnlineItem(int type,
- QListView* parent,
- const QString& name,
- const QString& col2 = QString());
+ TQListView* parent,
+ const TQString& name,
+ const TQString& col2 = TQString());
NicksOnlineItem(int type,
- QListViewItem* parent,
- const QString& name,
- const QString& col2 = QString());
+ TQListViewItem* parent,
+ const TQString& name,
+ const TQString& col2 = TQString());
/**
* Reimplemented to make sure, "Offline" items always get sorted to the bottom of the list
- * @param i Pointer to the QListViewItem to compare with.
+ * @param i Pointer to the TQListViewItem to compare with.
* @param col The column to compare
* @param ascending Specify sorting direction
* @return -1 if this item's value is smaller than i, 0 if they are equal, 1 if it's greater
*/
- virtual int compare(QListViewItem* i,int col,bool ascending) const;
+ virtual int compare(TQListViewItem* i,int col,bool ascending) const;
/**
* Returns the type of the item.
diff --git a/konversation/src/notificationhandler.cpp b/konversation/src/notificationhandler.cpp
index f8477e9..7b615e0 100644
--- a/konversation/src/notificationhandler.cpp
+++ b/konversation/src/notificationhandler.cpp
@@ -19,7 +19,7 @@
#include "trayicon.h"
#include "server.h"
-#include <qstylesheet.h>
+#include <tqstylesheet.h>
#include <knotifyclient.h>
#include <kstringhandler.h>
@@ -30,7 +30,7 @@ namespace Konversation
{
NotificationHandler::NotificationHandler(KonversationApplication* parent, const char* name)
- : QObject(parent, name)
+ : TQObject(parent, name)
{
m_mainWindow = parent->getMainWindow();
}
@@ -39,7 +39,7 @@ namespace Konversation
{
}
- void NotificationHandler::message(ChatWindow* chatWin, const QString& fromNick, const QString& message)
+ void NotificationHandler::message(ChatWindow* chatWin, const TQString& fromNick, const TQString& message)
{
if (!chatWin || !chatWin->notificationsEnabled())
return;
@@ -47,10 +47,10 @@ namespace Konversation
if (Preferences::disableNotifyWhileAway() && chatWin->getServer() && chatWin->getServer()->isAway())
return;
- QString cleanedMessage = QStyleSheet::escape(Konversation::removeIrcMarkup(message));
- QString cutup = addLineBreaks(cleanedMessage);
+ TQString cleanedMessage = TQStyleSheet::escape(Konversation::removeIrcMarkup(message));
+ TQString cutup = addLineBreaks(cleanedMessage);
- KNotifyClient::event(m_mainWindow->winId(), "message", QString("<qt>&lt;%1&gt; %2</qt>").arg(fromNick).arg(cutup));
+ KNotifyClient::event(m_mainWindow->winId(), "message", TQString("<qt>&lt;%1&gt; %2</qt>").arg(fromNick).arg(cutup));
if(!Preferences::trayNotifyOnlyOwnNick())
{
@@ -65,7 +65,7 @@ namespace Konversation
}
}
- void NotificationHandler::nick(ChatWindow* chatWin, const QString& fromNick, const QString& message)
+ void NotificationHandler::nick(ChatWindow* chatWin, const TQString& fromNick, const TQString& message)
{
if (!chatWin || !chatWin->notificationsEnabled())
return;
@@ -73,10 +73,10 @@ namespace Konversation
if (Preferences::disableNotifyWhileAway() && chatWin->getServer() && chatWin->getServer()->isAway())
return;
- QString cleanedMessage = QStyleSheet::escape(Konversation::removeIrcMarkup(message));
- QString cutup = addLineBreaks(cleanedMessage);
+ TQString cleanedMessage = TQStyleSheet::escape(Konversation::removeIrcMarkup(message));
+ TQString cutup = addLineBreaks(cleanedMessage);
- KNotifyClient::event(m_mainWindow->winId(), "nick", QString("<qt>&lt;%1&gt; %2</qt>").arg(fromNick).arg(cutup));
+ KNotifyClient::event(m_mainWindow->winId(), "nick", TQString("<qt>&lt;%1&gt; %2</qt>").arg(fromNick).arg(cutup));
startTrayNotification(chatWin);
@@ -91,7 +91,7 @@ namespace Konversation
}
void NotificationHandler::queryMessage(ChatWindow* chatWin,
- const QString& fromNick, const QString& message)
+ const TQString& fromNick, const TQString& message)
{
if (!chatWin || !chatWin->notificationsEnabled())
return;
@@ -99,10 +99,10 @@ namespace Konversation
if (Preferences::disableNotifyWhileAway() && chatWin->getServer() && chatWin->getServer()->isAway())
return;
- QString cleanedMessage = QStyleSheet::escape(Konversation::removeIrcMarkup(message));
- QString cutup = addLineBreaks(cleanedMessage);
+ TQString cleanedMessage = TQStyleSheet::escape(Konversation::removeIrcMarkup(message));
+ TQString cutup = addLineBreaks(cleanedMessage);
- KNotifyClient::event(m_mainWindow->winId(), "queryMessage", QString("<qt>&lt;%1&gt; %2</qt>").arg(fromNick).arg(cutup));
+ KNotifyClient::event(m_mainWindow->winId(), "queryMessage", TQString("<qt>&lt;%1&gt; %2</qt>").arg(fromNick).arg(cutup));
startTrayNotification(chatWin);
@@ -127,7 +127,7 @@ namespace Konversation
m_mainWindow->systemTrayIcon()->startNotification();
}
- void NotificationHandler::join(ChatWindow* chatWin, const QString& nick)
+ void NotificationHandler::join(ChatWindow* chatWin, const TQString& nick)
{
if (!chatWin || !chatWin->notificationsEnabled())
return;
@@ -146,7 +146,7 @@ namespace Konversation
}
}
- void NotificationHandler::part(ChatWindow* chatWin, const QString& nick)
+ void NotificationHandler::part(ChatWindow* chatWin, const TQString& nick)
{
if (!chatWin || !chatWin->notificationsEnabled())
return;
@@ -165,7 +165,7 @@ namespace Konversation
}
}
- void NotificationHandler::quit(ChatWindow* chatWin, const QString& nick)
+ void NotificationHandler::quit(ChatWindow* chatWin, const TQString& nick)
{
if (!chatWin || !chatWin->notificationsEnabled())
return;
@@ -176,7 +176,7 @@ namespace Konversation
KNotifyClient::event(m_mainWindow->winId(), "part", i18n("%1 quit %2").arg(nick, chatWin->getServer()->getServerName()));
}
- void NotificationHandler::nickChange(ChatWindow* chatWin, const QString& oldNick, const QString& newNick)
+ void NotificationHandler::nickChange(ChatWindow* chatWin, const TQString& oldNick, const TQString& newNick)
{
if (!chatWin || !chatWin->notificationsEnabled())
return;
@@ -187,7 +187,7 @@ namespace Konversation
KNotifyClient::event(m_mainWindow->winId(), "nickchange", i18n("%1 changed nickname to %2").arg(oldNick, newNick));
}
- void NotificationHandler::dccIncoming(ChatWindow* chatWin, const QString& fromNick)
+ void NotificationHandler::dccIncoming(ChatWindow* chatWin, const TQString& fromNick)
{
if (!chatWin || !chatWin->notificationsEnabled())
return;
@@ -198,7 +198,7 @@ namespace Konversation
KNotifyClient::event(m_mainWindow->winId(), "dcc_incoming", i18n("%1 wants to send a file to you").arg(fromNick));
}
- void NotificationHandler::mode(ChatWindow* chatWin, const QString& /*nick*/)
+ void NotificationHandler::mode(ChatWindow* chatWin, const TQString& /*nick*/)
{
if (!chatWin || !chatWin->notificationsEnabled())
return;
@@ -209,7 +209,7 @@ namespace Konversation
KNotifyClient::event(m_mainWindow->winId(), "mode");
}
- void NotificationHandler::query(ChatWindow* chatWin, const QString& fromNick)
+ void NotificationHandler::query(ChatWindow* chatWin, const TQString& fromNick)
{
if (!chatWin || !chatWin->notificationsEnabled())
return;
@@ -223,7 +223,7 @@ namespace Konversation
i18n("%1 has started a conversation (query) with you.").arg(fromNick));
}
- void NotificationHandler::nickOnline(ChatWindow* chatWin, const QString& nick)
+ void NotificationHandler::nickOnline(ChatWindow* chatWin, const TQString& nick)
{
if (!chatWin || !chatWin->notificationsEnabled())
return;
@@ -235,7 +235,7 @@ namespace Konversation
i18n("%1 is online (%2).").arg(nick).arg(chatWin->getServer()->getServerName()));
}
- void NotificationHandler::nickOffline(ChatWindow* chatWin, const QString& nick)
+ void NotificationHandler::nickOffline(ChatWindow* chatWin, const TQString& nick)
{
if (!chatWin || !chatWin->notificationsEnabled())
return;
@@ -247,7 +247,7 @@ namespace Konversation
i18n("%1 went offline (%2).").arg(nick).arg(chatWin->getServer()->getServerName()));
}
- void NotificationHandler::kick(ChatWindow* chatWin, const QString& channel,const QString& nick)
+ void NotificationHandler::kick(ChatWindow* chatWin, const TQString& channel,const TQString& nick)
{
if (!chatWin || !chatWin->notificationsEnabled())
return;
@@ -259,7 +259,7 @@ namespace Konversation
i18n("You are kicked by %1 from %2").arg(nick).arg(channel));
}
- void NotificationHandler::dccChat(ChatWindow* chatWin, const QString& nick)
+ void NotificationHandler::dccChat(ChatWindow* chatWin, const TQString& nick)
{
if (!chatWin || !chatWin->notificationsEnabled())
return;
@@ -271,7 +271,7 @@ namespace Konversation
i18n("%1 started a dcc chat with you").arg(nick));
}
- void NotificationHandler::highlight(ChatWindow* chatWin, const QString& fromNick, const QString& message)
+ void NotificationHandler::highlight(ChatWindow* chatWin, const TQString& fromNick, const TQString& message)
{
if (!chatWin || !chatWin->notificationsEnabled())
return;
@@ -295,7 +295,7 @@ namespace Konversation
}
}
- void NotificationHandler::connectionFailure(ChatWindow* chatWin, const QString& server)
+ void NotificationHandler::connectionFailure(ChatWindow* chatWin, const TQString& server)
{
if (!chatWin || !chatWin->notificationsEnabled())
return;
@@ -304,7 +304,7 @@ namespace Konversation
i18n("Failed to connect to %1").arg(server));
}
- void NotificationHandler::channelJoin(ChatWindow* chatWin, const QString& channel)
+ void NotificationHandler::channelJoin(ChatWindow* chatWin, const TQString& channel)
{
if (!chatWin || !chatWin->notificationsEnabled())
return;
@@ -315,9 +315,9 @@ namespace Konversation
KNotifyClient::event(m_mainWindow->winId(), "channelJoin", i18n("You have joined %1.").arg(channel));
}
- QString NotificationHandler::addLineBreaks(const QString& string)
+ TQString NotificationHandler::addLineBreaks(const TQString& string)
{
- QString cutup = string;
+ TQString cutup = string;
int offset = 0;
for(uint i = 0; i < string.length(); i += 50)
diff --git a/konversation/src/notificationhandler.h b/konversation/src/notificationhandler.h
index 1f7319c..9b5c216 100644
--- a/konversation/src/notificationhandler.h
+++ b/konversation/src/notificationhandler.h
@@ -12,7 +12,7 @@
#ifndef KONVERSATIONNOTIFICATIONHANDLER_H
#define KONVERSATIONNOTIFICATIONHANDLER_H
-#include <qobject.h>
+#include <tqobject.h>
class ChatWindow;
@@ -31,27 +31,27 @@ namespace Konversation
~NotificationHandler();
public slots:
- void message(ChatWindow* chatWin, const QString& fromNick, const QString& message);
- void nick(ChatWindow* chatWin, const QString& fromNick, const QString& message);
- void join(ChatWindow* chatWin, const QString& nick);
- void part(ChatWindow* chatWin, const QString& nick);
- void quit(ChatWindow* chatWin, const QString& nick);
- void nickChange(ChatWindow* chatWin, const QString& oldNick, const QString& newNick);
- void dccIncoming(ChatWindow* chatWin, const QString& fromNick);
- void mode(ChatWindow* chatWin, const QString& nick);
- void query(ChatWindow* chatWin, const QString& fromNick);
- void queryMessage(ChatWindow* chatWin, const QString& fromNick, const QString& message);
- void nickOnline(ChatWindow* chatWin, const QString& nick);
- void nickOffline(ChatWindow* chatWin, const QString& nick);
- void kick(ChatWindow* chatWin, const QString& channel,const QString& nick);
- void dccChat(ChatWindow* chatWin, const QString& nick);
- void highlight(ChatWindow* chatWin, const QString& fromNick, const QString& message);
- void connectionFailure(ChatWindow* chatWin, const QString& server);
- void channelJoin(ChatWindow* chatWin, const QString& channel);
+ void message(ChatWindow* chatWin, const TQString& fromNick, const TQString& message);
+ void nick(ChatWindow* chatWin, const TQString& fromNick, const TQString& message);
+ void join(ChatWindow* chatWin, const TQString& nick);
+ void part(ChatWindow* chatWin, const TQString& nick);
+ void quit(ChatWindow* chatWin, const TQString& nick);
+ void nickChange(ChatWindow* chatWin, const TQString& oldNick, const TQString& newNick);
+ void dccIncoming(ChatWindow* chatWin, const TQString& fromNick);
+ void mode(ChatWindow* chatWin, const TQString& nick);
+ void query(ChatWindow* chatWin, const TQString& fromNick);
+ void queryMessage(ChatWindow* chatWin, const TQString& fromNick, const TQString& message);
+ void nickOnline(ChatWindow* chatWin, const TQString& nick);
+ void nickOffline(ChatWindow* chatWin, const TQString& nick);
+ void kick(ChatWindow* chatWin, const TQString& channel,const TQString& nick);
+ void dccChat(ChatWindow* chatWin, const TQString& nick);
+ void highlight(ChatWindow* chatWin, const TQString& fromNick, const TQString& message);
+ void connectionFailure(ChatWindow* chatWin, const TQString& server);
+ void channelJoin(ChatWindow* chatWin, const TQString& channel);
protected:
void startTrayNotification(ChatWindow* chatWin);
- QString addLineBreaks(const QString& string);
+ TQString addLineBreaks(const TQString& string);
private:
KonversationMainWindow* m_mainWindow;
diff --git a/konversation/src/osd.cpp b/konversation/src/osd.cpp
index ce173ab..96ee353 100644
--- a/konversation/src/osd.cpp
+++ b/konversation/src/osd.cpp
@@ -6,7 +6,7 @@ the Free Software Foundation; either version 2 of the License, or
*/
/*
- Provides an interface to a plain QWidget, which is independent of KDE (bypassed to X11)
+ Provides an interface to a plain TQWidget, which is independent of KDE (bypassed to X11)
begin: Fre Sep 26 2003
Copyright (C) 2003 Christian Muehlhaeuser <chris@chris.de>
Copyright (C) 2004 Michael Goettsche <michael.goettsche@kdemail.net>
@@ -16,10 +16,10 @@ the Free Software Foundation; either version 2 of the License, or
#include "konversationapplication.h"
#include "common.h"
-#include <qapplication.h>
-#include <qbitmap.h>
-#include <qpainter.h>
-#include <qregexp.h>
+#include <tqapplication.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
+#include <tqregexp.h>
#include <dcopclient.h>
#include <kapplication.h>
@@ -29,8 +29,8 @@ the Free Software Foundation; either version 2 of the License, or
#include <X11/Xlib.h> //reposition()
-OSDWidget::OSDWidget( const QString &appName, QWidget *parent, const char *name )
-: QWidget( parent, name, WNoAutoErase | WStyle_Customize | WX11BypassWM | WStyle_StaysOnTop | WStyle_Tool )
+OSDWidget::OSDWidget( const TQString &appName, TQWidget *parent, const char *name )
+: TQWidget( parent, name, WNoAutoErase | WStyle_Customize | WX11BypassWM | WStyle_StaysOnTop | WStyle_Tool )
, m_appName( appName )
, m_duration( 5000 )
, m_shadow( true )
@@ -43,30 +43,30 @@ OSDWidget::OSDWidget( const QString &appName, QWidget *parent, const char *name
setBackgroundMode( NoBackground );
unsetColors();
- connect( &timer, SIGNAL( timeout() ), SLOT( hide() ) );
- connect( &timerMin, SIGNAL( timeout() ), SLOT( minReached() ) );
+ connect( &timer, TQT_SIGNAL( timeout() ), TQT_SLOT( hide() ) );
+ connect( &timerMin, TQT_SIGNAL( timeout() ), TQT_SLOT( minReached() ) );
}
-void OSDWidget::renderOSDText( const QString &txt )
+void OSDWidget::renderOSDText( const TQString &txt )
{
// Escaped text
- QString text = Konversation::removeIrcMarkup(txt);
+ TQString text = Konversation::removeIrcMarkup(txt);
- static QBitmap mask;
+ static TQBitmap mask;
//This is various spacings and margins, based on the font to look "just right"
const uint METRIC = fontMetrics().width( 'x' );
// Set a sensible maximum size, don't cover the whole desktop or cross the screen
- QSize max = QApplication::desktop()->screen( m_screen )->size() - QSize( MARGIN*2 + METRIC*2, 100 );
- QFont titleFont( "Arial", 12, QFont::Bold );
- QFontMetrics titleFm( titleFont );
+ TQSize max = TQApplication::desktop()->screen( m_screen )->size() - TQSize( MARGIN*2 + METRIC*2, 100 );
+ TQFont titleFont( "Arial", 12, TQFont::Bold );
+ TQFontMetrics titleFm( titleFont );
// The title cannnot be taller than one line
// AlignAuto = align Arabic to the right, etc.
- QRect titleRect = titleFm.boundingRect( 0, 0, max.width() - METRIC, titleFm.height(), AlignAuto, m_appName );
+ TQRect titleRect = titleFm.boundingRect( 0, 0, max.width() - METRIC, titleFm.height(), AlignAuto, m_appName );
// The osd cannot be larger than the screen
- QRect textRect = fontMetrics().boundingRect( 0, 0, max.width(), max.height(), AlignAuto | WordBreak, text );
+ TQRect textRect = fontMetrics().boundingRect( 0, 0, max.width(), max.height(), AlignAuto | WordBreak, text );
if ( textRect.width() < titleRect.width() )
textRect.setWidth( titleRect.width() );
@@ -78,8 +78,8 @@ void OSDWidget::renderOSDText( const QString &txt )
mask.resize( textRect.size() );
// Start painting!
- QPainter bufferPainter( &osdBuffer );
- QPainter maskPainter( &mask );
+ TQPainter bufferPainter( &osdBuffer );
+ TQPainter maskPainter( &mask );
// Draw backing rectangle
const uint xround = (METRIC * 200) / textRect.width();
@@ -124,16 +124,16 @@ void OSDWidget::renderOSDText( const QString &txt )
}
// slot
-void OSDWidget::showOSD( const QString &text, bool preemptive )
+void OSDWidget::showOSD( const TQString &text, bool preemptive )
{
if ( isEnabled() && !text.isEmpty() )
{
- QString plaintext = text.copy();
- plaintext.replace(QRegExp("</?(?:font|a|b|i)\\b[^>]*>"), QString(""));
- plaintext.replace(QString("&lt;"), QString("<"));
- plaintext.replace(QString("&gt;"), QString(">"));
- plaintext.replace(QString("&amp;"), QString("&"));
+ TQString plaintext = text.copy();
+ plaintext.replace(TQRegExp("</?(?:font|a|b|i)\\b[^>]*>"), TQString(""));
+ plaintext.replace(TQString("&lt;"), TQString("<"));
+ plaintext.replace(TQString("&gt;"), TQString(">"));
+ plaintext.replace(TQString("&amp;"), TQString("&"));
if ( preemptive || !timerMin.isActive() )
{
@@ -167,9 +167,9 @@ void OSDWidget::setDuration( int ms )
if( !m_duration ) timer.stop();
}
-void OSDWidget::setFont( QFont newFont )
+void OSDWidget::setFont( TQFont newFont )
{
- QWidget::setFont( newFont );
+ TQWidget::setFont( newFont );
refresh();
}
@@ -179,13 +179,13 @@ void OSDWidget::setShadow( bool shadow )
refresh();
}
-void OSDWidget::setTextColor( const QColor &newColor )
+void OSDWidget::setTextColor( const TQColor &newColor )
{
setPaletteForegroundColor( newColor );
refresh();
}
-void OSDWidget::setBackgroundColor( const QColor &newColor )
+void OSDWidget::setBackgroundColor( const TQColor &newColor )
{
setPaletteBackgroundColor( newColor );
refresh();
@@ -201,7 +201,7 @@ void OSDWidget::unsetColors()
void OSDWidget::setOffset( int /*x*/, int y )
{
- //m_offset = QPoint( x, y );
+ //m_offset = TQPoint( x, y );
m_y = y;
reposition();
}
@@ -214,25 +214,25 @@ void OSDWidget::setAlignment( Alignment a )
void OSDWidget::setScreen( uint screen )
{
- const uint n = QApplication::desktop()->numScreens();
+ const uint n = TQApplication::desktop()->numScreens();
m_screen = (screen >= n) ? n-1 : (int)screen;
reposition();
}
-bool OSDWidget::event( QEvent *e )
+bool OSDWidget::event( TQEvent *e )
{
switch( e->type() )
{
- case QEvent::Paint:
+ case TQEvent::Paint:
bitBlt( this, 0, 0, &osdBuffer );
return true;
default:
- return QWidget::event( e );
+ return TQWidget::event( e );
}
}
-void OSDWidget::mousePressEvent( QMouseEvent* )
+void OSDWidget::mousePressEvent( TQMouseEvent* )
{
hide();
emit hidden();
@@ -249,7 +249,7 @@ void OSDWidget::show()
if ( m_dirty ) renderOSDText( m_currentText );
- QWidget::show();
+ TQWidget::show();
if ( m_duration ) //duration 0 -> stay forever
{
@@ -268,12 +268,12 @@ void OSDWidget::refresh()
else m_dirty = true; //ensure we are re-rendered before we are shown
}
-void OSDWidget::reposition( QSize newSize )
+void OSDWidget::reposition( TQSize newSize )
{
if( !newSize.isValid() ) newSize = size();
- QPoint newPos( MARGIN, m_y );
- const QRect screen = QApplication::desktop()->screenGeometry( m_screen );
+ TQPoint newPos( MARGIN, m_y );
+ const TQRect screen = TQApplication::desktop()->screenGeometry( m_screen );
//TODO m_y is the middle of the OSD, and don't exceed screen margins
@@ -314,7 +314,7 @@ void OSDWidget::reposition( QSize newSize )
#include <kcursor.h> //previewWidget
#include <klocale.h>
-OSDPreviewWidget::OSDPreviewWidget( const QString &appName, QWidget *parent, const char *name )
+OSDPreviewWidget::OSDPreviewWidget( const TQString &appName, TQWidget *parent, const char *name )
: OSDWidget( appName, parent, name )
, m_dragging( false )
{
@@ -322,7 +322,7 @@ OSDPreviewWidget::OSDPreviewWidget( const QString &appName, QWidget *parent, con
m_duration = 0;
}
-void OSDPreviewWidget::mousePressEvent( QMouseEvent *event )
+void OSDPreviewWidget::mousePressEvent( TQMouseEvent *event )
{
m_dragOffset = event->pos();
@@ -333,7 +333,7 @@ void OSDPreviewWidget::mousePressEvent( QMouseEvent *event )
}
}
-void OSDPreviewWidget::mouseReleaseEvent( QMouseEvent * /*event*/ )
+void OSDPreviewWidget::mouseReleaseEvent( TQMouseEvent * /*event*/ )
{
if ( m_dragging )
{
@@ -341,30 +341,30 @@ void OSDPreviewWidget::mouseReleaseEvent( QMouseEvent * /*event*/ )
releaseMouse();
// compute current Position && offset
- QDesktopWidget *desktop = QApplication::desktop();
+ TQDesktopWidget *desktop = TQApplication::desktop();
int currentScreen = desktop->screenNumber( pos() );
if ( currentScreen != -1 )
{
// set new data
m_screen = currentScreen;
- m_y = QWidget::y();
+ m_y = TQWidget::y();
emit positionChanged();
}
}
}
-void OSDPreviewWidget::mouseMoveEvent( QMouseEvent *e )
+void OSDPreviewWidget::mouseMoveEvent( TQMouseEvent *e )
{
if ( m_dragging && this == mouseGrabber() )
{
- const QRect screen = QApplication::desktop()->screenGeometry( m_screen );
+ const TQRect screen = TQApplication::desktop()->screenGeometry( m_screen );
const uint hcenter = screen.width() / 2;
const uint eGlobalPosX = e->globalPos().x() - screen.left();
const uint snapZone = screen.width() / 8;
- QPoint destination = e->globalPos() - m_dragOffset - screen.topLeft();
+ TQPoint destination = e->globalPos() - m_dragOffset - screen.topLeft();
int maxY = screen.height() - height() - MARGIN;
if( destination.y() < MARGIN ) destination.ry() = MARGIN;
if( destination.y() > maxY ) destination.ry() = maxY;
@@ -416,8 +416,8 @@ OSDWidget::KDesktopLockStatus OSDWidget::isKDesktopLockRunning()
return DCOPError;
}
- QByteArray data,returnValue;
- QCString returnType;
+ TQByteArray data,returnValue;
+ TQCString returnType;
if (!dcopptr->call("kdesktop","KScreensaverIface","isBlanked()",
data,returnType,returnValue,true))
@@ -430,7 +430,7 @@ OSDWidget::KDesktopLockStatus OSDWidget::isKDesktopLockRunning()
if (returnType == "bool")
{
bool b;
- QDataStream reply(returnValue,IO_ReadOnly);
+ TQDataStream reply(returnValue,IO_ReadOnly);
reply >> b;
return (b ? Locked : NotLocked);
}
diff --git a/konversation/src/osd.h b/konversation/src/osd.h
index 997162b..8d62641 100644
--- a/konversation/src/osd.h
+++ b/konversation/src/osd.h
@@ -6,7 +6,7 @@
*/
/*
- Provides an interface to a plain QWidget, which is independent of KDE (bypassed to X11)
+ Provides an interface to a plain TQWidget, which is independent of KDE (bypassed to X11)
begin: Fre Sep 26 2003
Copyright (C) 2003 Christian Muehlhaeuser <chris@chris.de>
Copyright (C) 2004 Michael Goettsche <michael.goettsche@kdemail.net>
@@ -15,15 +15,15 @@
#ifndef OSD_H
#define OSD_H
-#include <qpixmap.h> //stack allocated
-#include <qtimer.h> //stack allocated
-#include <qwidget.h> //baseclass
+#include <tqpixmap.h> //stack allocated
+#include <tqtimer.h> //stack allocated
+#include <tqwidget.h> //baseclass
-class QFont;
-class QString;
-class QStringList;
-class QTimer;
+class TQFont;
+class TQString;
+class TQStringList;
+class TQTimer;
class MetaBundle;
class OSDWidget : public QWidget
@@ -33,16 +33,16 @@ class OSDWidget : public QWidget
public:
enum Alignment { Left, Middle, Center, Right };
- explicit OSDWidget(const QString &appName, QWidget *parent = 0, const char *name = "osd");
+ explicit OSDWidget(const TQString &appName, TQWidget *parent = 0, const char *name = "osd");
void setDuration(int ms);
- void setFont(QFont newfont);
+ void setFont(TQFont newfont);
void setShadow(bool shadow);
- void setTextColor(const QColor &newcolor);
- void setBackgroundColor(const QColor &newColor);
+ void setTextColor(const TQColor &newcolor);
+ void setBackgroundColor(const TQColor &newColor);
void setOffset( int x, int y );
void setAlignment(Alignment);
void setScreen(uint screen);
- void setText(const QString &text) { m_currentText = text; refresh(); }
+ void setText(const TQString &text) { m_currentText = text; refresh(); }
void unsetColors();
@@ -55,7 +55,7 @@ class OSDWidget : public QWidget
public slots:
//TODO rename show, scrap removeOSD, just use hide() <- easier to learn
- void showOSD(const QString&, bool preemptive=false );
+ void showOSD(const TQString&, bool preemptive=false );
void removeOSD() //inlined as is convenience function
{
hide();
@@ -66,14 +66,14 @@ class OSDWidget : public QWidget
protected:
/* render text into osdBuffer */
- void renderOSDText(const QString &text);
- void mousePressEvent( QMouseEvent* );
- bool event(QEvent*);
+ void renderOSDText(const TQString &text);
+ void mousePressEvent( TQMouseEvent* );
+ bool event(TQEvent*);
void show();
/* call to reposition a new OSD text or when position attributes change */
- void reposition( QSize newSize = QSize() );
+ void reposition( TQSize newSize = TQSize() );
/* called after most set*() calls to update the OSD */
void refresh();
@@ -83,13 +83,13 @@ class OSDWidget : public QWidget
static const int MARGIN = 15;
- QString m_appName;
+ TQString m_appName;
int m_duration;
- QTimer timer;
- QTimer timerMin;
- QPixmap osdBuffer;
- QStringList textBuffer;
- QString m_currentText;
+ TQTimer timer;
+ TQTimer timerMin;
+ TQPixmap osdBuffer;
+ TQStringList textBuffer;
+ TQString m_currentText;
bool m_shadow;
Alignment m_alignment;
@@ -105,20 +105,20 @@ class OSDPreviewWidget : public OSDWidget
Q_OBJECT
public:
- explicit OSDPreviewWidget( const QString &appName, QWidget *parent = 0, const char *name = "osdpreview" );
+ explicit OSDPreviewWidget( const TQString &appName, TQWidget *parent = 0, const char *name = "osdpreview" );
- static QPoint m_previewOffset;
+ static TQPoint m_previewOffset;
signals:
void positionChanged();
protected:
- void mousePressEvent( QMouseEvent * );
- void mouseReleaseEvent( QMouseEvent * );
- void mouseMoveEvent( QMouseEvent * );
+ void mousePressEvent( TQMouseEvent * );
+ void mouseReleaseEvent( TQMouseEvent * );
+ void mouseMoveEvent( TQMouseEvent * );
private:
bool m_dragging;
- QPoint m_dragOffset;
+ TQPoint m_dragOffset;
};
#endif /*OSD_H*/
diff --git a/konversation/src/osd_preferences.cpp b/konversation/src/osd_preferences.cpp
index 49f223d..61e8115 100644
--- a/konversation/src/osd_preferences.cpp
+++ b/konversation/src/osd_preferences.cpp
@@ -18,25 +18,25 @@
#include "osd.h"
#include "konversationapplication.h"
-#include <qgroupbox.h>
-#include <qspinbox.h>
+#include <tqgroupbox.h>
+#include <tqspinbox.h>
#include <kcombobox.h>
#include <kcolorbutton.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kfontrequester.h>
#include <kconfigdialog.h>
-OSD_Config::OSD_Config( QWidget* parent, const char* name, WFlags fl )
+OSD_Config::OSD_Config( TQWidget* parent, const char* name, WFlags fl )
: OSD_ConfigUI( parent, name, fl )
{
bool enableScreenChooser = false;
- QRect screenRect;
+ TQRect screenRect;
- for(int i = 0; i < QApplication::desktop()->numScreens(); ++i) {
- kcfg_OSDScreen->insertItem(QString::number(i));
- screenRect = QApplication::desktop()->screenGeometry(i);
+ for(int i = 0; i < TQApplication::desktop()->numScreens(); ++i) {
+ kcfg_OSDScreen->insertItem(TQString::number(i));
+ screenRect = TQApplication::desktop()->screenGeometry(i);
//Check if we're using xinerama or not
if(screenRect.left() != 0 || screenRect.top() != 0) {
@@ -47,9 +47,9 @@ OSD_Config::OSD_Config( QWidget* parent, const char* name, WFlags fl )
kcfg_OSDScreen->setEnabled(enableScreenChooser);
m_pOSDPreview = new OSDPreviewWidget("Konversation");
- connect(m_pOSDPreview, SIGNAL(positionChanged()), this, SLOT(slotPositionChanged()));
+ connect(m_pOSDPreview, TQT_SIGNAL(positionChanged()), this, TQT_SLOT(slotPositionChanged()));
- connect( kcfg_OSDFont, SIGNAL(fontSelected(const QFont&)), this, SLOT(slotUpdateFont(const QFont&)));
+ connect( kcfg_OSDFont, TQT_SIGNAL(fontSelected(const TQFont&)), this, TQT_SLOT(slotUpdateFont(const TQFont&)));
slotOSDEnabledChanged(kcfg_UseOSD->isChecked());
slotCustomColorsChanged(kcfg_OSDUseCustomColors->isChecked());
@@ -62,12 +62,12 @@ OSD_Config::OSD_Config( QWidget* parent, const char* name, WFlags fl )
kcfg_OSDAlignment->hide();
//Connect config page entries to control the OSDPreview
- connect ( kcfg_UseOSD, SIGNAL( toggled( bool ) ), this, SLOT( slotOSDEnabledChanged(bool) ) );
- connect ( kcfg_OSDUseCustomColors, SIGNAL(toggled(bool)), this, SLOT(slotCustomColorsChanged(bool)));
- connect ( kcfg_OSDTextColor, SIGNAL(changed(const QColor&)), this, SLOT(slotTextColorChanged(const QColor&)));
- connect ( kcfg_OSDBackgroundColor, SIGNAL(changed(const QColor&)), this, SLOT(slotBackgroundColorChanged(const QColor&)));
- connect ( kcfg_OSDScreen, SIGNAL(activated(int)), this, SLOT(slotScreenChanged(int)));
- connect ( kcfg_OSDDrawShadow, SIGNAL(toggled(bool)), this, SLOT(slotDrawShadowChanged(bool)));
+ connect ( kcfg_UseOSD, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotOSDEnabledChanged(bool) ) );
+ connect ( kcfg_OSDUseCustomColors, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotCustomColorsChanged(bool)));
+ connect ( kcfg_OSDTextColor, TQT_SIGNAL(changed(const TQColor&)), this, TQT_SLOT(slotTextColorChanged(const TQColor&)));
+ connect ( kcfg_OSDBackgroundColor, TQT_SIGNAL(changed(const TQColor&)), this, TQT_SLOT(slotBackgroundColorChanged(const TQColor&)));
+ connect ( kcfg_OSDScreen, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotScreenChanged(int)));
+ connect ( kcfg_OSDDrawShadow, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotDrawShadowChanged(bool)));
}
OSD_Config::~OSD_Config()
@@ -113,7 +113,7 @@ void OSD_Config::saveSettings()
}
-void OSD_Config::showEvent(QShowEvent*)
+void OSD_Config::showEvent(TQShowEvent*)
{
//Update the preview
m_pOSDPreview->setAlignment((OSDWidget::Alignment)( kcfg_OSDAlignment->value() ) );
@@ -122,7 +122,7 @@ void OSD_Config::showEvent(QShowEvent*)
m_pOSDPreview->setShown(kcfg_UseOSD->isChecked());
}
-void OSD_Config::hideEvent(QHideEvent*)
+void OSD_Config::hideEvent(TQHideEvent*)
{
m_pOSDPreview->setShown(false);
}
@@ -159,13 +159,13 @@ void OSD_Config::slotCustomColorsChanged(bool on)
else
m_pOSDPreview->unsetColors();
}
-void OSD_Config::slotTextColorChanged(const QColor& color)
+void OSD_Config::slotTextColorChanged(const TQColor& color)
{
if(kcfg_OSDUseCustomColors->isChecked())
m_pOSDPreview->setTextColor(color);
}
-void OSD_Config::slotBackgroundColorChanged(const QColor& color)
+void OSD_Config::slotBackgroundColorChanged(const TQColor& color)
{
if(kcfg_OSDUseCustomColors->isChecked())
m_pOSDPreview->setBackgroundColor(color);
@@ -181,7 +181,7 @@ void OSD_Config::slotDrawShadowChanged(bool on)
m_pOSDPreview->setShadow(on);
}
-void OSD_Config::slotUpdateFont(const QFont& font)
+void OSD_Config::slotUpdateFont(const TQFont& font)
{
m_pOSDPreview->setFont(font);
}
diff --git a/konversation/src/osd_preferences.h b/konversation/src/osd_preferences.h
index fe7c38e..14616e4 100644
--- a/konversation/src/osd_preferences.h
+++ b/konversation/src/osd_preferences.h
@@ -27,7 +27,7 @@ class OSD_Config : public OSD_ConfigUI, public KonviSettingsPage
Q_OBJECT
public:
- explicit OSD_Config( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ explicit OSD_Config( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~OSD_Config();
virtual void restorePageToDefaults();
@@ -39,16 +39,16 @@ class OSD_Config : public OSD_ConfigUI, public KonviSettingsPage
protected slots:
void slotOSDEnabledChanged(bool on);
void slotCustomColorsChanged(bool on);
- void slotTextColorChanged(const QColor& color);
- void slotBackgroundColorChanged(const QColor& color);
+ void slotTextColorChanged(const TQColor& color);
+ void slotBackgroundColorChanged(const TQColor& color);
void slotScreenChanged(int index);
void slotDrawShadowChanged(bool on);
- void slotUpdateFont(const QFont& font);
+ void slotUpdateFont(const TQFont& font);
void slotPositionChanged();
protected:
- void showEvent(QShowEvent* event);
- void hideEvent(QHideEvent* event);
+ void showEvent(TQShowEvent* event);
+ void hideEvent(TQHideEvent* event);
private:
OSDPreviewWidget* m_pOSDPreview;
diff --git a/konversation/src/outputfilter.cpp b/konversation/src/outputfilter.cpp
index 40823e2..1a291a5 100644
--- a/konversation/src/outputfilter.cpp
+++ b/konversation/src/outputfilter.cpp
@@ -23,13 +23,13 @@
#include "linkaddressbook/addressbook.h"
#include "query.h"
-#include <qstringlist.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
-#include <qmap.h>
-#include <qvaluelist.h>
-#include <qtextcodec.h>
+#include <tqstringlist.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
+#include <tqmap.h>
+#include <tqvaluelist.h>
+#include <tqtextcodec.h>
#include <klocale.h>
#include <kdebug.h>
@@ -46,7 +46,7 @@
namespace Konversation
{
OutputFilter::OutputFilter(Server* server)
- : QObject(server)
+ : TQObject(server)
{
m_server = server;
}
@@ -56,24 +56,24 @@ namespace Konversation
}
// replace all aliases in the string and return true if anything got replaced at all
- bool OutputFilter::replaceAliases(QString& line)
+ bool OutputFilter::replaceAliases(TQString& line)
{
- QStringList aliasList=Preferences::aliasList();
- QString cc(Preferences::commandChar());
+ TQStringList aliasList=Preferences::aliasList();
+ TQString cc(Preferences::commandChar());
// check if the line starts with a defined alias
for(unsigned int index=0;index<aliasList.count();index++)
{
// cut alias pattern from definition
- QString aliasPattern(aliasList[index].section(' ',0,0));
+ TQString aliasPattern(aliasList[index].section(' ',0,0));
// cut first word from command line, so we do not wrongly find an alias
// that starts with the same letters, like /m would override /me
- QString lineStart=line.section(' ',0,0);
+ TQString lineStart=line.section(' ',0,0);
// pattern found?
// TODO: cc may be a regexp character here ... we should escape it then
if (lineStart==cc+aliasPattern)
{
- QString aliasReplace;
+ TQString aliasReplace;
// cut alias replacement from definition
if ( aliasList[index].contains("%p") )
@@ -97,19 +97,19 @@ namespace Konversation
return false;
}
- QStringList OutputFilter::splitForEncoding(const QString& inputLine, uint max)
+ TQStringList OutputFilter::splitForEncoding(const TQString& inputLine, uint max)
{
uint sublen = 0; //The encoded length since the last split
int charLength = 0; //the length of this char
int lastBreakPoint = 0;
//FIXME should we run this through the encoder first, checking with "canEncode"?
- QString text = inputLine; // the text we'll send, currently in Unicode
- QStringList finals; // The strings we're going to output
+ TQString text = inputLine; // the text we'll send, currently in Unicode
+ TQStringList finals; // The strings we're going to output
- QString channelCodecName=Preferences::channelEncoding(m_server->getDisplayName(), destination);
+ TQString channelCodecName=Preferences::channelEncoding(m_server->getDisplayName(), destination);
//Get the codec we're supposed to use. This must not fail. (not verified)
- QTextCodec* codec;
+ TQTextCodec* codec;
// I copied this bit straight out of Server::send
if (channelCodecName.isEmpty())
@@ -126,8 +126,8 @@ namespace Konversation
while(text.length() > max)
{
- // The most important bit - turn the current char into a QCString so we can measure it
- QCString ch = codec->fromUnicode(QString(text[index]));
+ // The most important bit - turn the current char into a TQCString so we can measure it
+ TQCString ch = codec->fromUnicode(TQString(text[index]));
charLength = ch.length();
// If adding this char puts us over the limit:
@@ -165,14 +165,14 @@ namespace Konversation
return finals;
}
- OutputFilterResult OutputFilter::parse(const QString& myNick,const QString& originalLine,const QString& name)
+ OutputFilterResult OutputFilter::parse(const TQString& myNick,const TQString& originalLine,const TQString& name)
{
setCommandChar();
OutputFilterResult result;
destination=name;
- QString inputLine(originalLine);
+ TQString inputLine(originalLine);
if(inputLine.isEmpty() || inputLine == "\n")
return result;
@@ -180,7 +180,7 @@ namespace Konversation
//Protect against nickserv auth being sent as a message on the off chance
// someone didn't notice leading spaces
{
- QString testNickServ( inputLine.stripWhiteSpace() );
+ TQString testNickServ( inputLine.stripWhiteSpace() );
if(testNickServ.startsWith(commandChar+"nickserv", false)
|| testNickServ.startsWith(commandChar+"ns", false))
{
@@ -198,13 +198,13 @@ namespace Konversation
inputLine.replace("%I","\x09"); // replace %I with italics char
inputLine.replace("%O","\x0f"); // replace %O with reset to default char
inputLine.replace("%S","\x13"); // replace %S with strikethru char
- // inputLine.replace(QRegExp("%?"),"\x15");
+ // inputLine.replace(TQRegExp("%?"),"\x15");
inputLine.replace("%R","\x16"); // replace %R with reverse char
inputLine.replace("%U","\x1f"); // replace %U with underline char
inputLine.replace("%\x01","%"); // restore double %% as single %
}
- QString line=inputLine.lower();
+ TQString line=inputLine.lower();
// Convert double command chars at the beginning to single ones
if(line.startsWith(commandChar+commandChar) && !destination.isEmpty())
@@ -215,8 +215,8 @@ namespace Konversation
// Server command?
else if(line.startsWith(commandChar))
{
- QString command = inputLine.section(' ', 0, 0).mid(1).lower();
- QString parameter = inputLine.section(' ', 1);
+ TQString command = inputLine.section(' ', 0, 0).mid(1).lower();
+ TQString parameter = inputLine.section(' ', 1);
if (command !="topic")
parameter = parameter.stripWhiteSpace();
@@ -294,12 +294,12 @@ namespace Konversation
{
BYPASS_COMMAND_PARSING:
- QStringList outputList=splitForEncoding(inputLine, m_server->getPreLength("PRIVMSG", destination));
+ TQStringList outputList=splitForEncoding(inputLine, m_server->getPreLength("PRIVMSG", destination));
if (outputList.count() > 1)
{
- result.output=QString();
+ result.output=TQString();
result.outputList=outputList;
- for ( QStringList::Iterator it = outputList.begin(); it != outputList.end(); ++it )
+ for ( TQStringList::Iterator it = outputList.begin(); it != outputList.end(); ++it )
{
result.toServerList += "PRIVMSG " + destination + " :" + *it;
}
@@ -324,7 +324,7 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::parseShowTuner(const QString &parameter)
+ OutputFilterResult OutputFilter::parseShowTuner(const TQString &parameter)
{
KonversationApplication *konvApp = static_cast<KonversationApplication*>(KApplication::kApplication());
OutputFilterResult result;
@@ -339,37 +339,37 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::parseOp(const QString &parameter)
+ OutputFilterResult OutputFilter::parseOp(const TQString &parameter)
{
return changeMode(parameter,'o','+');
}
- OutputFilterResult OutputFilter::parseDeop(const QString &ownNick, const QString &parameter)
+ OutputFilterResult OutputFilter::parseDeop(const TQString &ownNick, const TQString &parameter)
{
return changeMode(addNickToEmptyNickList(ownNick,parameter),'o','-');
}
- OutputFilterResult OutputFilter::parseHop(const QString &parameter)
+ OutputFilterResult OutputFilter::parseHop(const TQString &parameter)
{
return changeMode(parameter, 'h', '+');
}
- OutputFilterResult OutputFilter::parseDehop(const QString &ownNick, const QString &parameter)
+ OutputFilterResult OutputFilter::parseDehop(const TQString &ownNick, const TQString &parameter)
{
return changeMode(addNickToEmptyNickList(ownNick,parameter), 'h', '-');
}
- OutputFilterResult OutputFilter::parseVoice(const QString &parameter)
+ OutputFilterResult OutputFilter::parseVoice(const TQString &parameter)
{
return changeMode(parameter,'v','+');
}
- OutputFilterResult OutputFilter::parseUnvoice(const QString &ownNick, const QString &parameter)
+ OutputFilterResult OutputFilter::parseUnvoice(const TQString &ownNick, const TQString &parameter)
{
return changeMode(addNickToEmptyNickList(ownNick,parameter),'v','-');
}
- OutputFilterResult OutputFilter::parseJoin(QString& channelName)
+ OutputFilterResult OutputFilter::parseJoin(TQString& channelName)
{
OutputFilterResult result;
@@ -402,14 +402,14 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::parseKick(const QString &parameter)
+ OutputFilterResult OutputFilter::parseKick(const TQString &parameter)
{
OutputFilterResult result;
if(isAChannel(destination))
{
// get nick to kick
- QString victim = parameter.left(parameter.find(" "));
+ TQString victim = parameter.left(parameter.find(" "));
if(victim.isEmpty())
{
@@ -418,7 +418,7 @@ namespace Konversation
else
{
// get kick reason (if any)
- QString reason = parameter.mid(victim.length() + 1);
+ TQString reason = parameter.mid(victim.length() + 1);
// if no reason given, take default reason
if(reason.isEmpty())
@@ -437,7 +437,7 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::parsePart(const QString &parameter)
+ OutputFilterResult OutputFilter::parsePart(const TQString &parameter)
{
OutputFilterResult result;
@@ -460,9 +460,9 @@ namespace Konversation
if(isAChannel(parameter))
{
// get channel name
- QString channel = parameter.left(parameter.find(" "));
+ TQString channel = parameter.left(parameter.find(" "));
// get part reason (if any)
- QString reason = parameter.mid(channel.length() + 1);
+ TQString reason = parameter.mid(channel.length() + 1);
// if no reason given, take default reason
if(reason.isEmpty())
@@ -489,7 +489,7 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::parseTopic(const QString &parameter)
+ OutputFilterResult OutputFilter::parseTopic(const TQString &parameter)
{
OutputFilterResult result;
@@ -512,9 +512,9 @@ namespace Konversation
if(isAChannel(parameter))
{
// get channel name
- QString channel=parameter.left(parameter.find(" "));
+ TQString channel=parameter.left(parameter.find(" "));
// get topic (if any)
- QString topic=parameter.mid(channel.length()+1);
+ TQString topic=parameter.mid(channel.length()+1);
// if no topic given, retrieve topic
if(topic.isEmpty())
{
@@ -525,7 +525,7 @@ namespace Konversation
{
result.toServer = "TOPIC " + channel + " :";
//If we get passed a ^A as a topic its a sign we should clear the topic.
- //Used to be a \n, but those get smashed by QStringList::split and readded later
+ //Used to be a \n, but those get smashed by TQStringList::split and readded later
//Now is not the time to fight with that. FIXME
//If anyone out there *can* actually set the topic to a single ^A, now they have to
//specify it twice to get one.
@@ -553,7 +553,7 @@ namespace Konversation
return result;
}
- void OutputFilter::parseAway(QString& reason)
+ void OutputFilter::parseAway(TQString& reason)
{
if (reason.isEmpty() && m_server->isAway())
m_server->requestUnaway();
@@ -566,7 +566,7 @@ namespace Konversation
m_server->requestUnaway();
}
- OutputFilterResult OutputFilter::parseNames(const QString &parameter)
+ OutputFilterResult OutputFilter::parseNames(const TQString &parameter)
{
OutputFilterResult result;
result.toServer = "NAMES ";
@@ -574,14 +574,14 @@ namespace Konversation
{
return error(i18n("%1NAMES with no target may disconnect you from the server. Specify '*' if you really want this.").arg(commandChar));
}
- else if (parameter != QChar('*'))
+ else if (parameter != TQChar('*'))
{
result.toServer.append(parameter);
}
return result;
}
- OutputFilterResult OutputFilter::parseClose(QString parm)
+ OutputFilterResult OutputFilter::parseClose(TQString parm)
{
if (parm.isEmpty())
parm=destination;
@@ -597,7 +597,7 @@ namespace Konversation
return OutputFilterResult();
}
- OutputFilterResult OutputFilter::parseQuit(const QString &reason)
+ OutputFilterResult OutputFilter::parseQuit(const TQString &reason)
{
OutputFilterResult result;
@@ -611,11 +611,11 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::parseNotice(const QString &parameter)
+ OutputFilterResult OutputFilter::parseNotice(const TQString &parameter)
{
OutputFilterResult result;
- QString recipient = parameter.left(parameter.find(" "));
- QString message = parameter.mid(recipient.length()+1);
+ TQString recipient = parameter.left(parameter.find(" "));
+ TQString message = parameter.mid(recipient.length()+1);
if(parameter.isEmpty() || message.isEmpty())
{
@@ -632,7 +632,7 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::parseMe(const QString &parameter, const QString &destination)
+ OutputFilterResult OutputFilter::parseMe(const TQString &parameter, const TQString &destination)
{
OutputFilterResult result;
@@ -650,12 +650,12 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::parseMsg(const QString &myNick, const QString &parameter, bool isQuery)
+ OutputFilterResult OutputFilter::parseMsg(const TQString &myNick, const TQString &parameter, bool isQuery)
{
OutputFilterResult result;
- QString recipient = parameter.section(" ", 0, 0, QString::SectionSkipEmpty);
- QString message = parameter.section(" ", 1);
- QString output;
+ TQString recipient = parameter.section(" ", 0, 0, TQString::SectionSkipEmpty);
+ TQString message = parameter.section(" ", 1);
+ TQString output;
if (recipient.isEmpty())
{
@@ -681,7 +681,7 @@ namespace Konversation
else if (message.startsWith(commandChar+"me"))
{
result.toServer = "PRIVMSG " + recipient + " :" + '\x01' + "ACTION " + message.mid(4) + '\x01';
- output = QString("* %1 %2").arg(myNick).arg(message.mid(4));
+ output = TQString("* %1 %2").arg(myNick).arg(message.mid(4));
}
else
{
@@ -728,11 +728,11 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::parseSMsg(const QString &parameter)
+ OutputFilterResult OutputFilter::parseSMsg(const TQString &parameter)
{
OutputFilterResult result;
- QString recipient = parameter.left(parameter.find(" "));
- QString message = parameter.mid(recipient.length() + 1);
+ TQString recipient = parameter.left(parameter.find(" "));
+ TQString message = parameter.mid(recipient.length() + 1);
if(message.startsWith(commandChar + "me"))
{
@@ -746,24 +746,24 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::parseCtcp(const QString &parameter)
+ OutputFilterResult OutputFilter::parseCtcp(const TQString &parameter)
{
OutputFilterResult result;
// who is the recipient?
- QString recipient = parameter.section(' ', 0, 0);
+ TQString recipient = parameter.section(' ', 0, 0);
// what is the first word of the ctcp?
- QString request = parameter.section(' ', 1, 1, QString::SectionSkipEmpty).upper();
+ TQString request = parameter.section(' ', 1, 1, TQString::SectionSkipEmpty).upper();
// what is the complete ctcp command?
- QString message = parameter.section(' ', 2, 0xffffff, QString::SectionSkipEmpty);
+ TQString message = parameter.section(' ', 2, 0xffffff, TQString::SectionSkipEmpty);
- QString out = request;
+ TQString out = request;
if (!message.isEmpty())
out+= ' ' + message;
if (request == "PING")
{
- unsigned int time_t = QDateTime::currentDateTime().toTime_t();
- result.toServer = QString("PRIVMSG %1 :\x01PING %2\x01").arg(recipient).arg(time_t);
+ unsigned int time_t = TQDateTime::currentDateTime().toTime_t();
+ result.toServer = TQString("PRIVMSG %1 :\x01PING %2\x01").arg(recipient).arg(time_t);
result.output = i18n("Sending CTCP-%1 request to %2.").arg("PING").arg(recipient);
}
else
@@ -777,13 +777,13 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::changeMode(const QString &parameter,char mode,char giveTake)
+ OutputFilterResult OutputFilter::changeMode(const TQString &parameter,char mode,char giveTake)
{
OutputFilterResult result;
// TODO: Make sure this works with +l <limit> and +k <password> also!
- QString token;
- QString tmpToken;
- QStringList nickList = QStringList::split(' ', parameter);
+ TQString token;
+ TQString tmpToken;
+ TQStringList nickList = TQStringList::split(' ', parameter);
if(nickList.count())
{
@@ -804,10 +804,10 @@ namespace Konversation
if(token.length())
{
unsigned int modeCount = nickList.count();
- QString modes;
+ TQString modes;
modes.fill(mode, modeCount);
- token += QString(" ") + QChar(giveTake) + modes;
+ token += TQString(" ") + TQChar(giveTake) + modes;
tmpToken = token;
for(unsigned int index = 0; index < modeCount; index++)
@@ -830,7 +830,7 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::parseDcc(const QString &parameter)
+ OutputFilterResult OutputFilter::parseDcc(const TQString &parameter)
{
OutputFilterResult result;
@@ -841,10 +841,10 @@ namespace Konversation
}
else
{
- QString tmpParameter = parameter;
- QStringList parameterList = QStringList::split(' ', tmpParameter.replace("\\ ", "%20"));
+ TQString tmpParameter = parameter;
+ TQStringList parameterList = TQStringList::split(' ', tmpParameter.replace("\\ ", "%20"));
- QString dccType = parameterList[0].lower();
+ TQString dccType = parameterList[0].lower();
if(dccType=="close")
{
@@ -868,7 +868,7 @@ namespace Konversation
//We could easily check if the remote file exists, but then we might
//end up asking for creditionals twice, so settle for only checking locally
- if(!fileURL.isLocalFile() || QFile::exists( fileURL.path() ))
+ if(!fileURL.isLocalFile() || TQFile::exists( fileURL.path() ))
{
emit openDccSend(parameterList[1],fileURL);
}
@@ -903,16 +903,16 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::sendRequest(const QString &recipient,const QString &fileName,const QString &address,const QString &port,unsigned long size)
+ OutputFilterResult OutputFilter::sendRequest(const TQString &recipient,const TQString &fileName,const TQString &address,const TQString &port,unsigned long size)
{
OutputFilterResult result;
- QString niftyFileName(fileName);
- /*QFile file(fileName);
- QFileInfo info(file);*/
+ TQString niftyFileName(fileName);
+ /*TQFile file(fileName);
+ TQFileInfo info(file);*/
result.toServer = "PRIVMSG " + recipient + " :" + '\x01' + "DCC SEND "
+ fileName
- + ' ' + address + ' ' + port + ' ' + QString::number(size) + '\x01';
+ + ' ' + address + ' ' + port + ' ' + TQString::number(size) + '\x01';
// Dirty hack to avoid printing ""name with spaces.ext"" instead of "name with spaces.ext"
if ((fileName.startsWith("\"")) && (fileName.endsWith("\"")))
@@ -921,14 +921,14 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::passiveSendRequest(const QString& recipient,const QString &fileName,const QString &address,unsigned long size,const QString &token)
+ OutputFilterResult OutputFilter::passiveSendRequest(const TQString& recipient,const TQString &fileName,const TQString &address,unsigned long size,const TQString &token)
{
OutputFilterResult result;
- QString niftyFileName(fileName);
+ TQString niftyFileName(fileName);
result.toServer = "PRIVMSG " + recipient + " :" + '\x01' + "DCC SEND "
+ fileName
- + ' ' + address + " 0 " + QString::number(size) + ' ' + token + '\x01';
+ + ' ' + address + " 0 " + TQString::number(size) + ' ' + token + '\x01';
// Dirty hack to avoid printing ""name with spaces.ext"" instead of "name with spaces.ext"
if ((fileName.startsWith("\"")) && (fileName.endsWith("\"")))
@@ -938,13 +938,13 @@ namespace Konversation
}
// Accepting Resume Request
- OutputFilterResult OutputFilter::acceptResumeRequest(const QString &recipient,const QString &fileName,const QString &port,int startAt)
+ OutputFilterResult OutputFilter::acceptResumeRequest(const TQString &recipient,const TQString &fileName,const TQString &port,int startAt)
{
- QString niftyFileName(fileName);
+ TQString niftyFileName(fileName);
OutputFilterResult result;
result.toServer = "PRIVMSG " + recipient + " :" + '\x01' + "DCC ACCEPT " + fileName + ' ' + port
- + ' ' + QString::number(startAt) + '\x01';
+ + ' ' + TQString::number(startAt) + '\x01';
// Dirty hack to avoid printing ""name with spaces.ext"" instead of "name with spaces.ext"
if ((fileName.startsWith("\"")) && (fileName.endsWith("\"")))
@@ -953,15 +953,15 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::resumeRequest(const QString &sender,const QString &fileName,const QString &port,KIO::filesize_t startAt)
+ OutputFilterResult OutputFilter::resumeRequest(const TQString &sender,const TQString &fileName,const TQString &port,KIO::filesize_t startAt)
{
- QString niftyFileName(fileName);
+ TQString niftyFileName(fileName);
OutputFilterResult result;
- /*QString newFileName(fileName);
+ /*TQString newFileName(fileName);
newFileName.replace(" ", "_");*/
result.toServer = "PRIVMSG " + sender + " :" + '\x01' + "DCC RESUME " + fileName + ' ' + port + ' '
- + QString::number(startAt) + '\x01';
+ + TQString::number(startAt) + '\x01';
// Dirty hack to avoid printing ""name with spaces.ext"" instead of "name with spaces.ext"
if ((fileName.startsWith("\"")) && (fileName.endsWith("\"")))
@@ -970,15 +970,15 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::acceptPassiveSendRequest(const QString& recipient,const QString &fileName,const QString &address,const QString &port,unsigned long size,const QString &token)
+ OutputFilterResult OutputFilter::acceptPassiveSendRequest(const TQString& recipient,const TQString &fileName,const TQString &address,const TQString &port,unsigned long size,const TQString &token)
{
OutputFilterResult result;
- QString niftyFileName(fileName);
+ TQString niftyFileName(fileName);
// "DCC SEND" to receive a file sounds weird, but it's ok.
result.toServer = "PRIVMSG " + recipient + " :" + '\x01' + "DCC SEND "
+ fileName
- + ' ' + address + ' ' + port + ' ' + QString::number(size) + ' ' + token + '\x01';
+ + ' ' + address + ' ' + port + ' ' + TQString::number(size) + ' ' + token + '\x01';
// Dirty hack to avoid printing ""name with spaces.ext"" instead of "name with spaces.ext"
if ((fileName.startsWith("\"")) && (fileName.endsWith("\"")))
@@ -987,7 +987,7 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::parseInvite(const QString &parameter)
+ OutputFilterResult OutputFilter::parseInvite(const TQString &parameter)
{
OutputFilterResult result;
@@ -997,8 +997,8 @@ namespace Konversation
}
else
{
- QString nick = parameter.section(' ', 0, 0, QString::SectionSkipEmpty);
- QString channel = parameter.section(' ', 1, 1, QString::SectionSkipEmpty);
+ TQString nick = parameter.section(' ', 0, 0, TQString::SectionSkipEmpty);
+ TQString channel = parameter.section(' ', 1, 1, TQString::SectionSkipEmpty);
if(channel.isEmpty())
{
@@ -1028,7 +1028,7 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::parseExec(const QString& parameter)
+ OutputFilterResult OutputFilter::parseExec(const TQString& parameter)
{
OutputFilterResult result;
@@ -1038,7 +1038,7 @@ namespace Konversation
}
else
{
- QStringList parameterList = QStringList::split(' ', parameter);
+ TQStringList parameterList = TQStringList::split(' ', parameter);
if(parameterList[0].find("../") == -1)
{
@@ -1053,7 +1053,7 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::parseRaw(const QString& parameter)
+ OutputFilterResult OutputFilter::parseRaw(const TQString& parameter)
{
OutputFilterResult result;
@@ -1073,11 +1073,11 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::parseNotify(const QString& parameter)
+ OutputFilterResult OutputFilter::parseNotify(const TQString& parameter)
{
OutputFilterResult result;
- QString groupName = m_server->getDisplayName();
+ TQString groupName = m_server->getDisplayName();
int serverGroupId = -1;
@@ -1086,7 +1086,7 @@ namespace Konversation
if (!parameter.isEmpty() && serverGroupId != -1)
{
- QStringList list = QStringList::split(' ', parameter);
+ TQStringList list = TQStringList::split(' ', parameter);
for(unsigned int index = 0; index < list.count(); index++)
{
@@ -1103,7 +1103,7 @@ namespace Konversation
}
// show (new) notify list to user
- QString list = Preferences::notifyStringByGroupName(groupName) + ' ' + Konversation::Addressbook::self()->allContactsNicksForServer(m_server->getServerName(), m_server->getDisplayName()).join(" ");
+ TQString list = Preferences::notifyStringByGroupName(groupName) + ' ' + Konversation::Addressbook::self()->allContactsNicksForServer(m_server->getServerName(), m_server->getDisplayName()).join(" ");
result.typeString = i18n("Notify");
@@ -1116,15 +1116,15 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::parseOper(const QString& myNick,const QString& parameter)
+ OutputFilterResult OutputFilter::parseOper(const TQString& myNick,const TQString& parameter)
{
OutputFilterResult result;
- QStringList parameterList = QStringList::split(' ', parameter);
+ TQStringList parameterList = TQStringList::split(' ', parameter);
if(parameter.isEmpty() || parameterList.count() == 1)
{
- QString nick((parameterList.count() == 1) ? parameterList[0] : myNick);
- QString password;
+ TQString nick((parameterList.count() == 1) ? parameterList[0] : myNick);
+ TQString password;
bool keep = false;
int ret = KIO::PasswordDialog::getNameAndPassword
@@ -1150,7 +1150,7 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::parseBan(const QString& parameter, bool kick)
+ OutputFilterResult OutputFilter::parseBan(const TQString& parameter, bool kick)
{
OutputFilterResult result;
// assume incorrect syntax first
@@ -1158,11 +1158,11 @@ namespace Konversation
if(!parameter.isEmpty())
{
- QStringList parameterList=QStringList::split(' ',parameter);
- QString channel;
- QString option;
+ TQStringList parameterList=TQStringList::split(' ',parameter);
+ TQString channel;
+ TQString option;
// check for option
- QString lowerParameter = parameterList[0].lower();
+ TQString lowerParameter = parameterList[0].lower();
bool host = (lowerParameter == "-host");
bool domain = (lowerParameter == "-domain");
bool uhost = (lowerParameter == "-userhost");
@@ -1203,14 +1203,14 @@ namespace Konversation
{
if (kick)
{
- QString victim = parameterList[0];
+ TQString victim = parameterList[0];
parameterList.pop_front();
- QString reason = parameterList.join(" ");
+ TQString reason = parameterList.join(" ");
result.toServer = "KICK " + channel + ' ' + victim + " :" + reason;
- emit banUsers(QStringList(victim),channel,option);
+ emit banUsers(TQStringList(victim),channel,option);
}
else
{
@@ -1235,14 +1235,14 @@ namespace Konversation
}
// finally set the ban
- OutputFilterResult OutputFilter::execBan(const QString& mask,const QString& channel)
+ OutputFilterResult OutputFilter::execBan(const TQString& mask,const TQString& channel)
{
OutputFilterResult result;
result.toServer = "MODE " + channel + " +b " + mask;
return result;
}
- OutputFilterResult OutputFilter::parseUnban(const QString& parameter)
+ OutputFilterResult OutputFilter::parseUnban(const TQString& parameter)
{
OutputFilterResult result;
// assume incorrect syntax first
@@ -1250,9 +1250,9 @@ namespace Konversation
if(!parameter.isEmpty())
{
- QStringList parameterList = QStringList::split(' ', parameter);
- QString channel;
- QString mask;
+ TQStringList parameterList = TQStringList::split(' ', parameter);
+ TQString channel;
+ TQString mask;
// if the user specified a channel
if(isAChannel(parameterList[0]))
@@ -1289,14 +1289,14 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::execUnban(const QString& mask,const QString& channel)
+ OutputFilterResult OutputFilter::execUnban(const TQString& mask,const TQString& channel)
{
OutputFilterResult result;
result.toServer = "MODE " + channel + " -b " + mask;
return result;
}
- OutputFilterResult OutputFilter::parseIgnore(const QString& parameter)
+ OutputFilterResult OutputFilter::parseIgnore(const TQString& parameter)
{
OutputFilterResult result;
// assume incorrect syntax first
@@ -1305,7 +1305,7 @@ namespace Konversation
// did the user give parameters at all?
if(!parameter.isEmpty())
{
- QStringList parameterList = QStringList::split(' ', parameter);
+ TQStringList parameterList = TQStringList::split(' ', parameter);
// if nothing else said, only ignore channels and queries
int value = Ignore::Channel | Ignore::Query;
@@ -1328,7 +1328,7 @@ namespace Konversation
parameterList[index] += "!*";
}
- Preferences::addIgnore(parameterList[index] + ',' + QString::number(value));
+ Preferences::addIgnore(parameterList[index] + ',' + TQString::number(value));
}
result.output = i18n("Added %1 to your ignore list.").arg(parameterList.join(", "));
@@ -1348,7 +1348,7 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::parseUnignore(const QString& parameter)
+ OutputFilterResult OutputFilter::parseUnignore(const TQString& parameter)
{
OutputFilterResult result;
@@ -1358,19 +1358,19 @@ namespace Konversation
}
else
{
- QString unignore = parameter.simplifyWhiteSpace();
- QStringList unignoreList = QStringList::split(' ',unignore);
+ TQString unignore = parameter.simplifyWhiteSpace();
+ TQStringList unignoreList = TQStringList::split(' ',unignore);
- QStringList succeeded;
- QStringList failed;
+ TQStringList succeeded;
+ TQStringList failed;
// Iterate over potential unignores
- for (QStringList::Iterator it = unignoreList.begin(); it != unignoreList.end(); ++it)
+ for (TQStringList::Iterator it = unignoreList.begin(); it != unignoreList.end(); ++it)
{
// If pattern looks incomplete, try to complete it
if (!(*it).contains('!'))
{
- QString fixedPattern = (*it);
+ TQString fixedPattern = (*it);
fixedPattern += "!*";
bool success = false;
@@ -1423,7 +1423,7 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::parseQuote(const QString& parameter)
+ OutputFilterResult OutputFilter::parseQuote(const TQString& parameter)
{
OutputFilterResult result;
@@ -1439,7 +1439,7 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::parseSay(const QString& parameter)
+ OutputFilterResult OutputFilter::parseSay(const TQString& parameter)
{
OutputFilterResult result;
@@ -1467,14 +1467,14 @@ namespace Konversation
// # & + and ! are *often*, but not necessarily, channel identifiers. + and ! are non-RFC, so if a server doesn't offer 005 and
// supports + and ! channels, I think thats broken behaviour on their part - not ours.
- bool OutputFilter::isAChannel(const QString &check)
+ bool OutputFilter::isAChannel(const TQString &check)
{
Q_ASSERT(m_server);
// XXX if we ever see the assert, we need the ternary
- return m_server? m_server->isAChannel(check) : QString("#&").contains(check.at(0));
+ return m_server? m_server->isAChannel(check) : TQString("#&").contains(check.at(0));
}
- OutputFilterResult OutputFilter::usage(const QString& string)
+ OutputFilterResult OutputFilter::usage(const TQString& string)
{
OutputFilterResult result;
result.typeString = i18n("Usage");
@@ -1483,7 +1483,7 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::info(const QString& string)
+ OutputFilterResult OutputFilter::info(const TQString& string)
{
OutputFilterResult result;
result.typeString = i18n("Info");
@@ -1492,7 +1492,7 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::error(const QString& string)
+ OutputFilterResult OutputFilter::error(const TQString& string)
{
OutputFilterResult result;
result.typeString = i18n("Error");
@@ -1501,7 +1501,7 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::parseAme(const QString& parameter)
+ OutputFilterResult OutputFilter::parseAme(const TQString& parameter)
{
OutputFilterResult result;
@@ -1514,7 +1514,7 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::parseAmsg(const QString& parameter)
+ OutputFilterResult OutputFilter::parseAmsg(const TQString& parameter)
{
OutputFilterResult result;
@@ -1527,22 +1527,22 @@ namespace Konversation
return result;
}
- void OutputFilter::parseServer(const QString& parameter)
+ void OutputFilter::parseServer(const TQString& parameter)
{
if (parameter.isEmpty() && !m_server->isConnected() && !m_server->isConnecting())
emit reconnectServer();
else
{
- QStringList splitted = QStringList::split(" ", parameter);
- QString host = splitted[0];
- QString port = "6667";
- QString password;
+ TQStringList splitted = TQStringList::split(" ", parameter);
+ TQString host = splitted[0];
+ TQString port = "6667";
+ TQString password;
if (splitted.count() == 3)
emit connectTo(Konversation::CreateNewConnection, splitted[0], splitted[1], splitted[2]);
else if (splitted.count() == 2)
{
- if (splitted[0].contains(QRegExp(":[0-9]+$")))
+ if (splitted[0].contains(TQRegExp(":[0-9]+$")))
emit connectTo(Konversation::CreateNewConnection, splitted[0], "", splitted[1]);
else
emit connectTo(Konversation::CreateNewConnection, splitted[0], splitted[1]);
@@ -1552,7 +1552,7 @@ namespace Konversation
}
}
- OutputFilterResult OutputFilter::parseOmsg(const QString& parameter)
+ OutputFilterResult OutputFilter::parseOmsg(const TQString& parameter)
{
OutputFilterResult result;
@@ -1568,7 +1568,7 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::parseOnotice(const QString& parameter)
+ OutputFilterResult OutputFilter::parseOnotice(const TQString& parameter)
{
OutputFilterResult result;
@@ -1587,7 +1587,7 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::parseCharset(const QString& charset)
+ OutputFilterResult OutputFilter::parseCharset(const TQString& charset)
{
OutputFilterResult result;
@@ -1598,7 +1598,7 @@ namespace Konversation
return result;
}
- QString shortName = Konversation::IRCCharsets::self()->ambiguousNameToShortName(charset);
+ TQString shortName = Konversation::IRCCharsets::self()->ambiguousNameToShortName(charset);
if(!shortName.isEmpty())
{
@@ -1614,10 +1614,10 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::parseSetKey(const QString& parameter)
+ OutputFilterResult OutputFilter::parseSetKey(const TQString& parameter)
{
- QStringList parms = QStringList::split(" ", parameter);
+ TQStringList parms = TQStringList::split(" ", parameter);
if (parms.count() == (0 >> parms.count() > 2))
return usage(i18n("Usage: %1setkey [<nick|channel>] <key> sets the encryption key for nick or channel. %2setkey <key> when in a channel or query tab to set the key for it.").arg(commandChar).arg(commandChar) );
@@ -1634,9 +1634,9 @@ namespace Konversation
return info(i18n("The key for %1 has been set.").arg(parms[0]));
}
- OutputFilterResult OutputFilter::parseDelKey(const QString& prametr)
+ OutputFilterResult OutputFilter::parseDelKey(const TQString& prametr)
{
- QString parameter(prametr.isEmpty()?destination:prametr);
+ TQString parameter(prametr.isEmpty()?destination:prametr);
if(parameter.isEmpty() || parameter.contains(' '))
return usage(i18n("Usage: %1delkey <nick> or <channel> deletes the encryption key for nick or channel").arg(commandChar));
@@ -1651,11 +1651,11 @@ namespace Konversation
return info(i18n("The key for %1 has been deleted.").arg(parameter));
}
- OutputFilterResult OutputFilter::parseShowKey(const QString& prametr)
+ OutputFilterResult OutputFilter::parseShowKey(const TQString& prametr)
{
- QString parameter(prametr.isEmpty()?destination:prametr);
- QString key(m_server->getKeyForRecipient(parameter));
- QWidget *mw=KonversationApplication::instance()->getMainWindow();
+ TQString parameter(prametr.isEmpty()?destination:prametr);
+ TQString key(m_server->getKeyForRecipient(parameter));
+ TQWidget *mw=KonversationApplication::instance()->getMainWindow();
if (!key.isEmpty())
KMessageBox::information(mw, i18n("The key for %1 is \"%2\".").arg(parameter).arg(key), i18n("Blowfish"));
else
@@ -1664,7 +1664,7 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::parseList(const QString& parameter)
+ OutputFilterResult OutputFilter::parseList(const TQString& parameter)
{
OutputFilterResult result;
@@ -1673,7 +1673,7 @@ namespace Konversation
return result;
}
- OutputFilterResult OutputFilter::parseDNS(const QString& parameter)
+ OutputFilterResult OutputFilter::parseDNS(const TQString& parameter)
{
OutputFilterResult result;
@@ -1683,8 +1683,8 @@ namespace Konversation
}
else
{
- QStringList splitted = QStringList::split(" ", parameter);
- QString target = splitted[0];
+ TQStringList splitted = TQStringList::split(" ", parameter);
+ TQString target = splitted[0];
KIpAddress address(target);
@@ -1696,8 +1696,8 @@ namespace Konversation
// coping with it.
#if KDE_IS_VERSION(3,5,1)
KNetwork:: KInetSocketAddress socketAddress(address,0);
- QString resolvedTarget;
- QString serv; // We don't need this, but KReverseResolver::resolve does.
+ TQString resolvedTarget;
+ TQString serv; // We don't need this, but KReverseResolver::resolve does.
if (KNetwork::KReverseResolver::resolve(socketAddress,resolvedTarget,serv))
{
@@ -1722,7 +1722,7 @@ namespace Konversation
KNetwork::KResolverResults resolved = KNetwork::KResolver::resolve(target,"");
if(resolved.error() == KResolver::NoError && resolved.size() > 0)
{
- QString resolvedTarget = resolved.first().address().nodeName();
+ TQString resolvedTarget = resolved.first().address().nodeName();
result.typeString = i18n("DNS");
result.output = i18n("Resolved %1 to: %2").arg(target).arg(resolvedTarget);
result.type = Program;
@@ -1744,10 +1744,10 @@ namespace Konversation
}
- QString OutputFilter::addNickToEmptyNickList(const QString& nick, const QString& parameter)
+ TQString OutputFilter::addNickToEmptyNickList(const TQString& nick, const TQString& parameter)
{
- QStringList nickList = QStringList::split(' ', parameter);
- QString newNickList;
+ TQStringList nickList = TQStringList::split(' ', parameter);
+ TQString newNickList;
if (nickList.count() == 0)
{
@@ -1767,7 +1767,7 @@ namespace Konversation
return newNickList;
}
- OutputFilterResult OutputFilter::parseKill(const QString& parameter)
+ OutputFilterResult OutputFilter::parseKill(const TQString& parameter)
{
OutputFilterResult result;
@@ -1777,7 +1777,7 @@ namespace Konversation
}
else
{
- QString victim = parameter.section(' ', 0, 0);
+ TQString victim = parameter.section(' ', 0, 0);
result.toServer = "KILL " + victim + " :" + parameter.mid(victim.length() + 1);
}
diff --git a/konversation/src/outputfilter.h b/konversation/src/outputfilter.h
index 2ad1a72..4ff1518 100644
--- a/konversation/src/outputfilter.h
+++ b/konversation/src/outputfilter.h
@@ -19,8 +19,8 @@
#include "identity.h"
#include "common.h"
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <kurl.h>
#include <kio/global.h>
@@ -41,11 +41,11 @@ namespace Konversation
struct OutputFilterResult
{
- QString output;
- QStringList outputList;
- QString toServer;
- QStringList toServerList;
- QString typeString;
+ TQString output;
+ TQStringList outputList;
+ TQString toServer;
+ TQStringList toServerList;
+ TQString typeString;
MessageType type;
};
@@ -57,46 +57,46 @@ namespace Konversation
explicit OutputFilter(Server* server);
~OutputFilter();
- QStringList splitForEncoding(const QString& inputLine, uint max);
- OutputFilterResult parse(const QString& myNick,const QString& line,const QString& name);
+ TQStringList splitForEncoding(const TQString& inputLine, uint max);
+ OutputFilterResult parse(const TQString& myNick,const TQString& line,const TQString& name);
// dcc send
- OutputFilterResult sendRequest(const QString &recipient,const QString &fileName,const QString &address,const QString &port,unsigned long size);
- OutputFilterResult passiveSendRequest(const QString& recipient,const QString &fileName,const QString &address,unsigned long size,const QString &token);
- OutputFilterResult acceptResumeRequest(const QString &recipient,const QString &fileName,const QString &port,int startAt);
+ OutputFilterResult sendRequest(const TQString &recipient,const TQString &fileName,const TQString &address,const TQString &port,unsigned long size);
+ OutputFilterResult passiveSendRequest(const TQString& recipient,const TQString &fileName,const TQString &address,unsigned long size,const TQString &token);
+ OutputFilterResult acceptResumeRequest(const TQString &recipient,const TQString &fileName,const TQString &port,int startAt);
// dcc recv
- OutputFilterResult resumeRequest(const QString &sender,const QString &fileName,const QString &port,KIO::filesize_t startAt);
- OutputFilterResult acceptPassiveSendRequest(const QString& recipient,const QString &fileName,const QString &address,const QString &port,unsigned long size,const QString &token);
+ OutputFilterResult resumeRequest(const TQString &sender,const TQString &fileName,const TQString &port,KIO::filesize_t startAt);
+ OutputFilterResult acceptPassiveSendRequest(const TQString& recipient,const TQString &fileName,const TQString &address,const TQString &port,unsigned long size,const TQString &token);
- bool replaceAliases(QString& line);
+ bool replaceAliases(TQString& line);
signals:
- void openDccSend(const QString &recipient, KURL kurl);
+ void openDccSend(const TQString &recipient, KURL kurl);
void requestDccSend(); // Choose Recipient and File from requester
// Choose File from requester
- void requestDccSend(const QString& recipient);
- void openDccChat(const QString& nick);
+ void requestDccSend(const TQString& recipient);
+ void openDccChat(const TQString& nick);
void addDccPanel();
void closeDccPanel();
void openRawLog(bool show);
void closeRawLog();
void openKonsolePanel();
- void openChannelList(const QString& parameter, bool getList);
- void sendToAllChannels(const QString& text);
- void launchScript(const QString& target, const QString& parameter);
- void banUsers(const QStringList& userList,const QString& channel,const QString& option);
- void unbanUsers(const QString& mask,const QString& channel);
- void multiServerCommand(const QString& command, const QString& parameter);
+ void openChannelList(const TQString& parameter, bool getList);
+ void sendToAllChannels(const TQString& text);
+ void launchScript(const TQString& target, const TQString& parameter);
+ void banUsers(const TQStringList& userList,const TQString& channel,const TQString& option);
+ void unbanUsers(const TQString& mask,const TQString& channel);
+ void multiServerCommand(const TQString& command, const TQString& parameter);
void reconnectServer();
void disconnectServer();
void connectTo(Konversation::ConnectionFlag flag,
- const QString& hostName,
- const QString& port = "",
- const QString& password = "",
- const QString& nick = "",
- const QString& channel = "",
+ const TQString& hostName,
+ const TQString& port = "",
+ const TQString& password = "",
+ const TQString& nick = "",
+ const TQString& channel = "",
bool useSSL = false
);
@@ -106,75 +106,75 @@ namespace Konversation
public slots:
void setCommandChar();
- OutputFilterResult execBan(const QString& mask,const QString& channels);
- OutputFilterResult execUnban(const QString& mask,const QString& channels);
+ OutputFilterResult execBan(const TQString& mask,const TQString& channels);
+ OutputFilterResult execUnban(const TQString& mask,const TQString& channels);
protected:
- OutputFilterResult parseMsg(const QString& myNick,const QString& parameter, bool focusQueryWindow);
- OutputFilterResult parseSMsg(const QString& parameter);
- OutputFilterResult parseMe(const QString &parameter, const QString &destination);
- OutputFilterResult parseDescribe(const QString& parameter);
- OutputFilterResult parseNotice(const QString& parameter);
- OutputFilterResult parseJoin(QString& parameter);
- OutputFilterResult parsePart(const QString& parameter);
- OutputFilterResult parseQuit(const QString& parameter);
- OutputFilterResult parseClose(QString parameter);
- OutputFilterResult parseKick(const QString& parameter);
- OutputFilterResult parseKickBan(const QString& parameter);
- OutputFilterResult parseBan(const QString& parameter, bool kick = false);
- OutputFilterResult parseUnban(const QString& parameter);
- OutputFilterResult parseNames(const QString& parameter);
- OutputFilterResult parseList(const QString& parameter);
- OutputFilterResult parseOp(const QString& parameter);
- OutputFilterResult parseDeop(const QString& ownNick, const QString& parameter);
- OutputFilterResult parseHop(const QString& parameter);
- OutputFilterResult parseDehop(const QString& ownNick, const QString& parameter);
- OutputFilterResult parseVoice(const QString& parameter);
- OutputFilterResult parseUnvoice(const QString& ownNick, const QString& parameter);
- OutputFilterResult parseTopic(const QString& parameter);
- void parseAway(QString& parameter);
+ OutputFilterResult parseMsg(const TQString& myNick,const TQString& parameter, bool focusQueryWindow);
+ OutputFilterResult parseSMsg(const TQString& parameter);
+ OutputFilterResult parseMe(const TQString &parameter, const TQString &destination);
+ OutputFilterResult parseDescribe(const TQString& parameter);
+ OutputFilterResult parseNotice(const TQString& parameter);
+ OutputFilterResult parseJoin(TQString& parameter);
+ OutputFilterResult parsePart(const TQString& parameter);
+ OutputFilterResult parseQuit(const TQString& parameter);
+ OutputFilterResult parseClose(TQString parameter);
+ OutputFilterResult parseKick(const TQString& parameter);
+ OutputFilterResult parseKickBan(const TQString& parameter);
+ OutputFilterResult parseBan(const TQString& parameter, bool kick = false);
+ OutputFilterResult parseUnban(const TQString& parameter);
+ OutputFilterResult parseNames(const TQString& parameter);
+ OutputFilterResult parseList(const TQString& parameter);
+ OutputFilterResult parseOp(const TQString& parameter);
+ OutputFilterResult parseDeop(const TQString& ownNick, const TQString& parameter);
+ OutputFilterResult parseHop(const TQString& parameter);
+ OutputFilterResult parseDehop(const TQString& ownNick, const TQString& parameter);
+ OutputFilterResult parseVoice(const TQString& parameter);
+ OutputFilterResult parseUnvoice(const TQString& ownNick, const TQString& parameter);
+ OutputFilterResult parseTopic(const TQString& parameter);
+ void parseAway(TQString& parameter);
void parseBack();
- OutputFilterResult parseCtcp(const QString& parameter);
- OutputFilterResult parsePing(const QString& parameter);
- OutputFilterResult parseVersion(const QString& parameter);
- void parseServer(const QString& parameter);
+ OutputFilterResult parseCtcp(const TQString& parameter);
+ OutputFilterResult parsePing(const TQString& parameter);
+ OutputFilterResult parseVersion(const TQString& parameter);
+ void parseServer(const TQString& parameter);
void parseReconnect();
- OutputFilterResult parseConnect(const QString& parameter);
- OutputFilterResult parseInvite(const QString& parameter);
- OutputFilterResult parseExec(const QString& parameter);
- OutputFilterResult parseNotify(const QString& parameter);
- OutputFilterResult parseOper(const QString& myNick,const QString& parameter);
- OutputFilterResult parseDcc(const QString& parameter);
- OutputFilterResult parseRaw(const QString& parameter);
- OutputFilterResult parseIgnore(const QString& parameter);
- OutputFilterResult parseUnignore(const QString& parameter);
- OutputFilterResult parseQuote(const QString& parameter);
- OutputFilterResult parseSay(const QString& parameter);
+ OutputFilterResult parseConnect(const TQString& parameter);
+ OutputFilterResult parseInvite(const TQString& parameter);
+ OutputFilterResult parseExec(const TQString& parameter);
+ OutputFilterResult parseNotify(const TQString& parameter);
+ OutputFilterResult parseOper(const TQString& myNick,const TQString& parameter);
+ OutputFilterResult parseDcc(const TQString& parameter);
+ OutputFilterResult parseRaw(const TQString& parameter);
+ OutputFilterResult parseIgnore(const TQString& parameter);
+ OutputFilterResult parseUnignore(const TQString& parameter);
+ OutputFilterResult parseQuote(const TQString& parameter);
+ OutputFilterResult parseSay(const TQString& parameter);
void parseKonsole();
- OutputFilterResult parseAme(const QString& parameter);
- OutputFilterResult parseAmsg(const QString& parameter);
- OutputFilterResult parseOmsg(const QString& parameter);
- OutputFilterResult parseOnotice(const QString& parameter);
- OutputFilterResult parseCharset(const QString& charset);
+ OutputFilterResult parseAme(const TQString& parameter);
+ OutputFilterResult parseAmsg(const TQString& parameter);
+ OutputFilterResult parseOmsg(const TQString& parameter);
+ OutputFilterResult parseOnotice(const TQString& parameter);
+ OutputFilterResult parseCharset(const TQString& charset);
void parseCycle();
- OutputFilterResult parseSetKey(const QString& parameter);
- OutputFilterResult parseDelKey(const QString& parameter);
- OutputFilterResult parseShowKey(const QString& parameter);
- OutputFilterResult parseDNS(const QString& parameter);
- OutputFilterResult parseKill(const QString& parameter);
- OutputFilterResult parseShowTuner(const QString &p);
+ OutputFilterResult parseSetKey(const TQString& parameter);
+ OutputFilterResult parseDelKey(const TQString& parameter);
+ OutputFilterResult parseShowKey(const TQString& parameter);
+ OutputFilterResult parseDNS(const TQString& parameter);
+ OutputFilterResult parseKill(const TQString& parameter);
+ OutputFilterResult parseShowTuner(const TQString &p);
- OutputFilterResult changeMode(const QString& parameter,char mode,char giveTake);
- bool isAChannel(const QString& check);
- OutputFilterResult usage(const QString& check);
- OutputFilterResult info(const QString& check);
- OutputFilterResult error(const QString& check);
+ OutputFilterResult changeMode(const TQString& parameter,char mode,char giveTake);
+ bool isAChannel(const TQString& check);
+ OutputFilterResult usage(const TQString& check);
+ OutputFilterResult info(const TQString& check);
+ OutputFilterResult error(const TQString& check);
- QString addNickToEmptyNickList(const QString& nick, const QString& parameter);
+ TQString addNickToEmptyNickList(const TQString& nick, const TQString& parameter);
private:
- QString destination;
- QString commandChar;
+ TQString destination;
+ TQString commandChar;
Server* m_server;
};
diff --git a/konversation/src/query.cpp b/konversation/src/query.cpp
index e87fbe4..9801de2 100644
--- a/konversation/src/query.cpp
+++ b/konversation/src/query.cpp
@@ -22,15 +22,15 @@
#include "common.h"
#include "topiclabel.h"
-#include <qhbox.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qtextcodec.h>
-#include <qtooltip.h>
-#include <qtextstream.h>
-#include <qwhatsthis.h>
-#include <qsplitter.h>
+#include <tqhbox.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqtextcodec.h>
+#include <tqtooltip.h>
+#include <tqtextstream.h>
+#include <tqwhatsthis.h>
+#include <tqsplitter.h>
#include <klocale.h>
#include <kstandarddirs.h>
@@ -41,7 +41,7 @@
#include <kpopupmenu.h>
-Query::Query(QWidget* parent, QString _name) : ChatWindow(parent)
+Query::Query(TQWidget* parent, TQString _name) : ChatWindow(parent)
{
name=_name; // need the name a little bit earlier for setServer
// don't setName here! It will break logfiles!
@@ -50,34 +50,34 @@ Query::Query(QWidget* parent, QString _name) : ChatWindow(parent)
setChannelEncodingSupported(true);
- m_headerSplitter = new QSplitter(Qt::Vertical, this);
+ m_headerSplitter = new TQSplitter(Qt::Vertical, this);
m_initialShow = true;
awayChanged=false;
awayState=false;
- QHBox *box = new QHBox(m_headerSplitter);
- addresseeimage = new QLabel(box, "query_image");
- addresseeimage->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ TQHBox *box = new TQHBox(m_headerSplitter);
+ addresseeimage = new TQLabel(box, "query_image");
+ addresseeimage->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
addresseeimage->hide();
- addresseelogoimage = new QLabel(box, "query_logo_image");
- addresseelogoimage->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ addresseelogoimage = new TQLabel(box, "query_logo_image");
+ addresseelogoimage->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
addresseelogoimage->hide();
queryHostmask=new Konversation::TopicLabel(box, "query_hostmask");
- QString whatsthis = i18n("<qt>Some details of the person you are talking to in this query is shown in this bar. The full name and hostmask is shown, along with any image or logo this person has associated with them in the KDE Addressbook.<p>See the <i>Konversation Handbook</i> for information on associating a nick with a contact in the Addressbook, and for an explanation of what the hostmask is.</qt>");
- QWhatsThis::add(addresseeimage, whatsthis);
- QWhatsThis::add(addresseelogoimage, whatsthis);
- QWhatsThis::add(queryHostmask, whatsthis);
+ TQString whatsthis = i18n("<qt>Some details of the person you are talking to in this query is shown in this bar. The full name and hostmask is shown, along with any image or logo this person has associated with them in the KDE Addressbook.<p>See the <i>Konversation Handbook</i> for information on associating a nick with a contact in the Addressbook, and for an explanation of what the hostmask is.</qt>");
+ TQWhatsThis::add(addresseeimage, whatsthis);
+ TQWhatsThis::add(addresseelogoimage, whatsthis);
+ TQWhatsThis::add(queryHostmask, whatsthis);
IRCViewBox* ircBox = new IRCViewBox(m_headerSplitter,0);
setTextView(ircBox->ircView()); // Server will be set later in setServer();
textView->setAcceptDrops(true);
- connect(textView,SIGNAL(filesDropped(const QStrList&)),this,SLOT(filesDropped(const QStrList&)));
- connect(textView,SIGNAL(popupCommand(int)),this,SLOT(popup(int)));
+ connect(textView,TQT_SIGNAL(filesDropped(const TQStrList&)),this,TQT_SLOT(filesDropped(const TQStrList&)));
+ connect(textView,TQT_SIGNAL(popupCommand(int)),this,TQT_SLOT(popup(int)));
// link "Whois", "Ignore" ... menu items into ircview popup
- QPopupMenu* popup=textView->getPopup();
+ TQPopupMenu* popup=textView->getPopup();
popup->insertSeparator();
popup->insertItem(i18n("&Whois"),Konversation::Whois);
popup->insertItem(i18n("&Version"),Konversation::Version);
@@ -95,12 +95,12 @@ Query::Query(QWidget* parent, QString _name) : ChatWindow(parent)
popup->insertItem(i18n("Add to Watched Nicks"), Konversation::AddNotify);
// This box holds the input line
- QHBox* inputBox=new QHBox(this, "input_log_box");
+ TQHBox* inputBox=new TQHBox(this, "input_log_box");
inputBox->setSpacing(spacing());
- awayLabel=new QLabel(i18n("(away)"),inputBox);
+ awayLabel=new TQLabel(i18n("(away)"),inputBox);
awayLabel->hide();
- blowfishLabel = new QLabel(inputBox);
+ blowfishLabel = new TQLabel(inputBox);
blowfishLabel->hide();
blowfishLabel->setPixmap(KGlobal::iconLoader()->loadIcon("encrypted", KIcon::Toolbar));
queryInput=new IRCInput(inputBox);
@@ -109,15 +109,15 @@ Query::Query(QWidget* parent, QString _name) : ChatWindow(parent)
queryInput->installEventFilter(this);
// connect the signals and slots
- connect(queryInput,SIGNAL (submit()),this,SLOT (queryTextEntered()) );
- connect(queryInput,SIGNAL (envelopeCommand()),this,SLOT (queryPassthroughCommand()) );
- connect(queryInput,SIGNAL (textPasted(const QString&)),this,SLOT (textPasted(const QString&)) );
- connect(getTextView(), SIGNAL(textPasted(bool)), queryInput, SLOT(paste(bool)));
- connect(getTextView(),SIGNAL (gotFocus()),queryInput,SLOT (setFocus()) );
+ connect(queryInput,TQT_SIGNAL (submit()),this,TQT_SLOT (queryTextEntered()) );
+ connect(queryInput,TQT_SIGNAL (envelopeCommand()),this,TQT_SLOT (queryPassthroughCommand()) );
+ connect(queryInput,TQT_SIGNAL (textPasted(const TQString&)),this,TQT_SLOT (textPasted(const TQString&)) );
+ connect(getTextView(), TQT_SIGNAL(textPasted(bool)), queryInput, TQT_SLOT(paste(bool)));
+ connect(getTextView(),TQT_SIGNAL (gotFocus()),queryInput,TQT_SLOT (setFocus()) );
- connect(textView,SIGNAL (sendFile()),this,SLOT (sendFileMenu()) );
- connect(textView,SIGNAL (extendedPopup(int)),this,SLOT (popup(int)) );
- connect(textView,SIGNAL (autoText(const QString&)),this,SLOT (sendQueryText(const QString&)) );
+ connect(textView,TQT_SIGNAL (sendFile()),this,TQT_SLOT (sendFileMenu()) );
+ connect(textView,TQT_SIGNAL (extendedPopup(int)),this,TQT_SLOT (popup(int)) );
+ connect(textView,TQT_SIGNAL (autoText(const TQString&)),this,TQT_SLOT (sendQueryText(const TQString&)) );
updateAppearance();
@@ -131,8 +131,8 @@ Query::~Query()
void Query::setServer(Server* newServer)
{
if (m_server != newServer)
- connect(newServer, SIGNAL(connectionStateChanged(Server*, Konversation::ConnectionState)),
- SLOT(connectionStateChanged(Server*, Konversation::ConnectionState)));
+ connect(newServer, TQT_SIGNAL(connectionStateChanged(Server*, Konversation::ConnectionState)),
+ TQT_SLOT(connectionStateChanged(Server*, Konversation::ConnectionState)));
ChatWindow::setServer(newServer);
@@ -159,7 +159,7 @@ void Query::connectionStateChanged(Server* server, Konversation::ConnectionState
}
}
-void Query::setName(const QString& newName)
+void Query::setName(const TQString& newName)
{
//if(ChatWindow::getName() == newName) return; // no change, so return
@@ -169,7 +169,7 @@ void Query::setName(const QString& newName)
// This will prevent Nick-Changers to create more than one log file,
if (logName.isEmpty())
{
- QString logName = (Preferences::lowerLog()) ? getName().lower() : getName() ;
+ TQString logName = (Preferences::lowerLog()) ? getName().lower() : getName() ;
if(Preferences::addHostnameToLog())
{
@@ -191,7 +191,7 @@ void Query::setEncryptedOutput(bool e)
void Query::queryTextEntered()
{
- QString line=queryInput->text();
+ TQString line=queryInput->text();
queryInput->setText("");
if(line.lower()==Preferences::commandChar()+"clear")
{
@@ -209,8 +209,8 @@ void Query::queryTextEntered()
void Query::queryPassthroughCommand()
{
- QString commandChar = Preferences::commandChar();
- QString line = queryInput->text();
+ TQString commandChar = Preferences::commandChar();
+ TQString line = queryInput->text();
queryInput->setText("");
@@ -225,21 +225,21 @@ void Query::queryPassthroughCommand()
}
}
-void Query::sendQueryText(const QString& sendLine)
+void Query::sendQueryText(const TQString& sendLine)
{
// create a work copy
- QString outputAll(sendLine);
+ TQString outputAll(sendLine);
// replace aliases and wildcards
if(m_server->getOutputFilter()->replaceAliases(outputAll))
{
- outputAll = m_server->parseWildcards(outputAll, m_server->getNickname(), getName(), QString(), QString(), QString());
+ outputAll = m_server->parseWildcards(outputAll, m_server->getNickname(), getName(), TQString(), TQString(), TQString());
}
// Send all strings, one after another
- QStringList outList=QStringList::split('\n',outputAll);
+ TQStringList outList=TQStringList::split('\n',outputAll);
for(unsigned int index=0;index<outList.count();index++)
{
- QString output(outList[index]);
+ TQString output(outList[index]);
// encoding stuff is done in Server()
Konversation::OutputFilterResult result = m_server->getOutputFilter()->parse(m_server->getNickname(), output, getName());
@@ -255,7 +255,7 @@ void Query::sendQueryText(const QString& sendLine)
else if (result.outputList.count())
{
Q_ASSERT(result.type==Konversation::Message);
- for ( QStringList::Iterator it = result.outputList.begin(); it != result.outputList.end(); ++it )
+ for ( TQStringList::Iterator it = result.outputList.begin(); it != result.outputList.end(); ++it )
{
append(m_server->getNickname(), *it);
}
@@ -274,8 +274,8 @@ void Query::sendQueryText(const QString& sendLine)
void Query::updateAppearance()
{
- QColor fg;
- QColor bg;
+ TQColor fg;
+ TQColor bg;
if(Preferences::inputFieldsBackgroundColor())
{
@@ -302,7 +302,7 @@ void Query::updateAppearance()
else
{
getTextView()->setViewBackground(Preferences::color(Preferences::TextViewBackground),
- QString());
+ TQString());
}
if (Preferences::customTextFont())
@@ -319,15 +319,15 @@ void Query::updateAppearance()
ChatWindow::updateAppearance();
}
-void Query::textPasted(const QString& text)
+void Query::textPasted(const TQString& text)
{
if(m_server)
{
- QStringList multiline=QStringList::split('\n',text);
+ TQStringList multiline=TQStringList::split('\n',text);
for(unsigned int index=0;index<multiline.count();index++)
{
- QString line=multiline[index];
- QString cChar(Preferences::commandChar());
+ TQString line=multiline[index];
+ TQString cChar(Preferences::commandChar());
// make sure that lines starting with command char get escaped
if(line.startsWith(cChar)) line=cChar+line;
sendQueryText(line);
@@ -353,8 +353,8 @@ void Query::indicateAway(bool show)
}
}
-// fix QTs broken behavior on hidden QListView pages
-void Query::showEvent(QShowEvent*)
+// fix QTs broken behavior on hidden TQListView pages
+void Query::showEvent(TQShowEvent*)
{
if(awayChanged)
{
@@ -364,7 +364,7 @@ void Query::showEvent(QShowEvent*)
if(m_initialShow) {
m_initialShow = false;
- QValueList<int> sizes;
+ TQValueList<int> sizes;
sizes << queryHostmask->sizeHint().height() << (height() - queryHostmask->sizeHint().height());
m_headerSplitter->setSizes(sizes);
}
@@ -373,7 +373,7 @@ void Query::showEvent(QShowEvent*)
void Query::popup(int id)
{
// get the nickname to the context menu popup
- QString name = textView->getContextNick();
+ TQString name = textView->getContextNick();
// if there was none (right click into the text view) assume query partner
if (name.isEmpty()) name = getName();
@@ -398,14 +398,14 @@ void Query::popup(int id)
"CloseQueryAfterIgnore");
if (rc == KMessageBox::Yes && m_server)
- QTimer::singleShot(0, this, SLOT(closeWithoutAsking()));
+ TQTimer::singleShot(0, this, TQT_SLOT(closeWithoutAsking()));
}
break;
}
case Konversation::UnignoreNick:
{
- QString question = i18n("Do you want to stop ignoring %1?").arg(name);
+ TQString question = i18n("Do you want to stop ignoring %1?").arg(name);
if (KMessageBox::warningContinueCancel(this, question, i18n("Unignore"), i18n("Unignore"), "UnignoreNick") ==
KMessageBox::Continue)
@@ -468,12 +468,12 @@ void Query::childAdjustFocus()
void Query::setNickInfo(const NickInfoPtr & nickInfo)
{
if(m_nickInfo)
- disconnect(m_nickInfo, SIGNAL(nickInfoChanged()), this, SLOT(nickInfoChanged()));
+ disconnect(m_nickInfo, TQT_SIGNAL(nickInfoChanged()), this, TQT_SLOT(nickInfoChanged()));
m_nickInfo = nickInfo;
Q_ASSERT(m_nickInfo); if(!m_nickInfo) return;
setName(m_nickInfo->getNickname());
- connect(m_nickInfo, SIGNAL(nickInfoChanged()), this, SLOT(nickInfoChanged()));
+ connect(m_nickInfo, TQT_SIGNAL(nickInfoChanged()), this, TQT_SLOT(nickInfoChanged()));
nickInfoChanged();
}
@@ -482,7 +482,7 @@ void Query::nickInfoChanged()
if(m_nickInfo)
{
setName(m_nickInfo->getNickname());
- QString text = m_nickInfo->getBestAddresseeName();
+ TQString text = m_nickInfo->getBestAddresseeName();
if(!m_nickInfo->getHostmask().isEmpty() && !text.isEmpty())
text += " - ";
text += m_nickInfo->getHostmask();
@@ -493,7 +493,7 @@ void Query::nickInfoChanged()
KABC::Picture pic = m_nickInfo->getAddressee().photo();
if(pic.isIntern())
{
- QPixmap qpixmap(pic.data().scaleHeight(queryHostmask->height()));
+ TQPixmap qpixmap(pic.data().scaleHeight(queryHostmask->height()));
if(!qpixmap.isNull())
{
addresseeimage->setPixmap(qpixmap);
@@ -511,7 +511,7 @@ void Query::nickInfoChanged()
KABC::Picture logo = m_nickInfo->getAddressee().logo();
if(logo.isIntern())
{
- QPixmap qpixmap(logo.data().scaleHeight(queryHostmask->height()));
+ TQPixmap qpixmap(logo.data().scaleHeight(queryHostmask->height()));
if(!qpixmap.isNull())
{
addresseelogoimage->setPixmap(qpixmap);
@@ -527,8 +527,8 @@ void Query::nickInfoChanged()
addresseelogoimage->hide();
}
- QString strTooltip;
- QTextStream tooltip( &strTooltip, IO_WriteOnly );
+ TQString strTooltip;
+ TQTextStream tooltip( &strTooltip, IO_WriteOnly );
tooltip << "<qt>";
@@ -537,9 +537,9 @@ void Query::nickInfoChanged()
m_nickInfo->tooltipTableData(tooltip);
tooltip << "</table></qt>";
- QToolTip::add(queryHostmask, strTooltip);
- QToolTip::add(addresseeimage, strTooltip);
- QToolTip::add(addresseelogoimage, strTooltip);
+ TQToolTip::add(queryHostmask, strTooltip);
+ TQToolTip::add(addresseeimage, strTooltip);
+ TQToolTip::add(addresseelogoimage, strTooltip);
}
else
@@ -557,12 +557,12 @@ NickInfoPtr Query::getNickInfo()
return m_nickInfo;
}
-QString Query::getTextInLine() { return queryInput->text(); }
+TQString Query::getTextInLine() { return queryInput->text(); }
bool Query::canBeFrontView() { return true; }
bool Query::searchView() { return true; }
-void Query::appendInputText(const QString& s, bool fromCursor)
+void Query::appendInputText(const TQString& s, bool fromCursor)
{
if(!fromCursor)
{
@@ -578,17 +578,17 @@ void Query::appendInputText(const QString& s, bool fromCursor)
}
// virtual
-void Query::setChannelEncoding(const QString& encoding)
+void Query::setChannelEncoding(const TQString& encoding)
{
Preferences::setChannelEncoding(m_server->getDisplayName(), getName(), encoding);
}
-QString Query::getChannelEncoding() // virtual
+TQString Query::getChannelEncoding() // virtual
{
return Preferences::channelEncoding(m_server->getDisplayName(), getName());
}
-QString Query::getChannelEncodingDefaultDesc() // virtual
+TQString Query::getChannelEncodingDefaultDesc() // virtual
{
return i18n("Identity Default ( %1 )").arg(getServer()->getIdentity()->getCodecName());
}
@@ -613,7 +613,7 @@ void Query::closeWithoutAsking()
m_server->removeQuery(this);
}
-void Query::filesDropped(const QStrList& files)
+void Query::filesDropped(const TQStrList& files)
{
m_server->sendURIs(files,getName());
}
@@ -623,7 +623,7 @@ void Query::serverOnline(bool online)
//queryInput->setEnabled(online);
getTextView()->setNickAndChannelContextMenusEnabled(online);
- QPopupMenu* popup = getTextView()->getPopup();
+ TQPopupMenu* popup = getTextView()->getPopup();
if (popup)
{
@@ -641,7 +641,7 @@ void Query::serverOnline(bool online)
void Query::emitUpdateInfo()
{
- QString info;
+ TQString info;
if(m_nickInfo->loweredNickname() == m_server->loweredNickname())
info = i18n("Talking to yourself");
else if(m_nickInfo)
@@ -653,9 +653,9 @@ void Query::emitUpdateInfo()
}
// show quit message of nick if we see it
-void Query::quitNick(const QString& reason)
+void Query::quitNick(const TQString& reason)
{
- QString displayReason = reason;
+ TQString displayReason = reason;
if (displayReason.isEmpty())
{
@@ -663,7 +663,7 @@ void Query::quitNick(const QString& reason)
}
else
{
- if (displayReason.find(QRegExp("[\\0000-\\0037]"))!=-1)
+ if (displayReason.find(TQRegExp("[\\0000-\\0037]"))!=-1)
displayReason+="\017";
appendCommandMessage(i18n("Quit"),i18n("%1 has left this server (%2).").arg(getName()).arg(displayReason),false);
diff --git a/konversation/src/query.h b/konversation/src/query.h
index 882e3c7..af28087 100644
--- a/konversation/src/query.h
+++ b/konversation/src/query.h
@@ -16,15 +16,15 @@
#include "chatwindow.h"
#include "nickinfo.h"
-#include <qstring.h>
+#include <tqstring.h>
/* TODO: Idle counter to close query after XXX minutes of inactivity */
/* TODO: Use /USERHOST to check if queries are still valid */
-class QLineEdit;
-class QCheckBox;
-class QLabel;
-class QSplitter;
+class TQLineEdit;
+class TQCheckBox;
+class TQLabel;
+class TQSplitter;
class IRCInput;
@@ -37,7 +37,7 @@ class Query : public ChatWindow
Q_OBJECT
public:
- explicit Query(QWidget* parent, QString name);
+ explicit Query(TQWidget* parent, TQString name);
virtual void setServer(Server* newServer);
~Query();
@@ -51,14 +51,14 @@ class Query : public ChatWindow
* This should be fixed maybe? I don't know.
*/
NickInfoPtr getNickInfo();
- virtual QString getTextInLine();
+ virtual TQString getTextInLine();
virtual bool closeYourself(bool askForConfirmation=true);
virtual bool canBeFrontView();
virtual bool searchView();
- virtual void setChannelEncoding(const QString& encoding);
- virtual QString getChannelEncoding();
- virtual QString getChannelEncodingDefaultDesc();
+ virtual void setChannelEncoding(const TQString& encoding);
+ virtual TQString getChannelEncoding();
+ virtual TQString getChannelEncodingDefaultDesc();
virtual void emitUpdateInfo();
virtual bool isInsertSupported() { return true; }
@@ -66,15 +66,15 @@ class Query : public ChatWindow
/** call this when you see a nick quit from the server.
* @param reason The quit reason given by that user.
*/
- void quitNick(const QString& reason);
+ void quitNick(const TQString& reason);
signals:
- void sendFile(const QString& recipient);
- void updateQueryChrome(ChatWindow*, const QString&);
+ void sendFile(const TQString& recipient);
+ void updateQueryChrome(ChatWindow*, const TQString&);
public slots:
- void sendQueryText(const QString& text);
- void appendInputText(const QString& s, bool fromCursor);
+ void sendQueryText(const TQString& text);
+ void appendInputText(const TQString& s, bool fromCursor);
virtual void indicateAway(bool show);
void updateAppearance();
void setEncryptedOutput(bool);
@@ -84,32 +84,32 @@ class Query : public ChatWindow
void queryTextEntered();
void queryPassthroughCommand();
void sendFileMenu();
- void filesDropped(const QStrList& files);
+ void filesDropped(const TQStrList& files);
// connected to IRCInput::textPasted() - used to handle large/multiline pastes
- void textPasted(const QString& text);
+ void textPasted(const TQString& text);
void popup(int id);
void nickInfoChanged();
void closeWithoutAsking();
virtual void serverOnline(bool online);
protected:
- void setName(const QString& newName);
- void showEvent(QShowEvent* event);
+ void setName(const TQString& newName);
+ void showEvent(TQShowEvent* event);
/** Called from ChatWindow adjustFocus */
virtual void childAdjustFocus();
bool awayChanged;
bool awayState;
- QString queryName;
- QString buffer;
+ TQString queryName;
+ TQString buffer;
- QSplitter* m_headerSplitter;
+ TQSplitter* m_headerSplitter;
Konversation::TopicLabel* queryHostmask;
- QLabel* addresseeimage;
- QLabel* addresseelogoimage;
- QLabel* awayLabel;
- QLabel* blowfishLabel;
+ TQLabel* addresseeimage;
+ TQLabel* addresseelogoimage;
+ TQLabel* awayLabel;
+ TQLabel* blowfishLabel;
IRCInput* queryInput;
NickInfoPtr m_nickInfo;
diff --git a/konversation/src/queuetuner.cpp b/konversation/src/queuetuner.cpp
index 7686ae4..6f12646 100644
--- a/konversation/src/queuetuner.cpp
+++ b/konversation/src/queuetuner.cpp
@@ -18,10 +18,10 @@
#include "viewcontainer.h"
#include "konversationapplication.h"
-#include <qtoolbutton.h>
-#include <qspinbox.h>
-#include <qpopupmenu.h>
-#include <qevent.h>
+#include <tqtoolbutton.h>
+#include <tqspinbox.h>
+#include <tqpopupmenu.h>
+#include <tqevent.h>
#include <kdebug.h>
#include <kapplication.h>
@@ -31,26 +31,26 @@
#include <klocale.h>
-QueueTuner::QueueTuner(QWidget* parent, ViewContainer *container)
+QueueTuner::QueueTuner(TQWidget* parent, ViewContainer *container)
: QueueTunerBase(parent), m_server(0), m_timer(this, "qTuner"),
m_vis(Preferences::self()->showQueueTunerItem()->value())
{
m_closeButton->setIconSet(kapp->iconLoader()->loadIconSet("fileclose", KIcon::Toolbar, 16));
- connect(m_closeButton, SIGNAL(clicked()), SLOT(close()));
- connect(container, SIGNAL(frontServerChanging(Server*)), SLOT(setServer(Server*)));
- connect(&m_timer, SIGNAL(timeout()), SLOT(timerFired()));
+ connect(m_closeButton, TQT_SIGNAL(clicked()), TQT_SLOT(close()));
+ connect(container, TQT_SIGNAL(frontServerChanging(Server*)), TQT_SLOT(setServer(Server*)));
+ connect(&m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(timerFired()));
- connect(m_slowRate, SIGNAL(valueChanged(int)), SLOT(slowRateChanged(int)));
- connect(m_slowType, SIGNAL(activated(int)), SLOT(slowTypeChanged(int)));
- connect(m_slowInterval, SIGNAL(valueChanged(int)), SLOT(slowIntervalChanged(int)));
+ connect(m_slowRate, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slowRateChanged(int)));
+ connect(m_slowType, TQT_SIGNAL(activated(int)), TQT_SLOT(slowTypeChanged(int)));
+ connect(m_slowInterval, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slowIntervalChanged(int)));
- connect(m_normalRate, SIGNAL(valueChanged(int)), SLOT(normalRateChanged(int)));
- connect(m_normalType, SIGNAL(activated(int)), SLOT(normalTypeChanged(int)));
- connect(m_normalInterval, SIGNAL(valueChanged(int)), SLOT(normalIntervalChanged(int)));
+ connect(m_normalRate, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(normalRateChanged(int)));
+ connect(m_normalType, TQT_SIGNAL(activated(int)), TQT_SLOT(normalTypeChanged(int)));
+ connect(m_normalInterval, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(normalIntervalChanged(int)));
- connect(m_fastRate, SIGNAL(valueChanged(int)), SLOT(fastRateChanged(int)));
- connect(m_fastType, SIGNAL(activated(int)), SLOT(fastTypeChanged(int)));
- connect(m_fastInterval, SIGNAL(valueChanged(int)), SLOT(fastIntervalChanged(int)));
+ connect(m_fastRate, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(fastRateChanged(int)));
+ connect(m_fastType, TQT_SIGNAL(activated(int)), TQT_SLOT(fastTypeChanged(int)));
+ connect(m_fastInterval, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(fastIntervalChanged(int)));
}
QueueTuner::~QueueTuner()
@@ -58,14 +58,14 @@ QueueTuner::~QueueTuner()
}
//lps, lpm, bps, kbps
-static void rateToWidget(IRCQueue::EmptyingRate& rate, QSpinBox *r, QComboBox* t, QSpinBox *i)
+static void rateToWidget(IRCQueue::EmptyingRate& rate, TQSpinBox *r, TQComboBox* t, TQSpinBox *i)
{
r->setValue(rate.m_rate);
t->setCurrentItem(rate.m_type);
i->setValue(rate.m_interval/1000);
}
-void QueueTuner::serverDestroyed(QObject* ref)
+void QueueTuner::serverDestroyed(TQObject* ref)
{
if (ref == m_server)
setServer(0);
@@ -96,7 +96,7 @@ void QueueTuner::setServer(Server* newServer)
if (m_server)
{
- connect(m_server, SIGNAL(destroyed(QObject*)), SLOT(serverDestroyed(QObject*)));
+ connect(m_server, TQT_SIGNAL(destroyed(TQObject*)), TQT_SLOT(serverDestroyed(TQObject*)));
getRates();
}
@@ -234,16 +234,16 @@ void QueueTuner::fastIntervalChanged(int v)
r=v*1000;
}
-void QueueTuner::contextMenuEvent(QContextMenuEvent* e)
+void QueueTuner::contextMenuEvent(TQContextMenuEvent* e)
{
- QPopupMenu p(this);
+ TQPopupMenu p(this);
p.insertItem("Reset...", 1);
int id = p.exec(e->globalPos());
if (id > 0)
{
- QString question(i18n("This cannot be undone, are you sure you wish to reset to default values?"));
- int x = KMessageBox::warningContinueCancel(this, question, i18n("Reset Values"), KStdGuiItem::reset(), QString::null, KMessageBox::Dangerous);
+ TQString question(i18n("This cannot be undone, are you sure you wish to reset to default values?"));
+ int x = KMessageBox::warningContinueCancel(this, question, i18n("Reset Values"), KStdGuiItem::reset(), TQString::null, KMessageBox::Dangerous);
if ( x == KMessageBox::Continue)
{
Server::_resetRates();
diff --git a/konversation/src/queuetuner.h b/konversation/src/queuetuner.h
index 081572c..c64c0be 100644
--- a/konversation/src/queuetuner.h
+++ b/konversation/src/queuetuner.h
@@ -17,18 +17,18 @@
class Server;
class ViewContainer;
-class QTimer;
+class TQTimer;
-#include <qtimer.h>
+#include <tqtimer.h>
class QueueTuner: public QueueTunerBase
{
Q_OBJECT
public:
- QueueTuner(QWidget* parent, ViewContainer *container);
+ QueueTuner(TQWidget* parent, ViewContainer *container);
~QueueTuner();
- virtual void contextMenuEvent (QContextMenuEvent*);
+ virtual void contextMenuEvent (TQContextMenuEvent*);
public slots:
void setServer(Server* newServer);
@@ -47,14 +47,14 @@ class QueueTuner: public QueueTunerBase
void fastRateChanged(int);
void fastTypeChanged(int);
void fastIntervalChanged(int);
- void serverDestroyed(QObject*);
+ void serverDestroyed(TQObject*);
signals:
void hidden();
private:
Server* m_server;
- QTimer m_timer;
+ TQTimer m_timer;
bool &m_vis;
};
diff --git a/konversation/src/quickbutton.cpp b/konversation/src/quickbutton.cpp
index 004e857..b69bc07 100644
--- a/konversation/src/quickbutton.cpp
+++ b/konversation/src/quickbutton.cpp
@@ -14,11 +14,11 @@
#include "quickbutton.h"
-QuickButton::QuickButton(const QString &label,const QString &newDefinition,QWidget* parent) :
-QPushButton::QPushButton(label,parent)
+QuickButton::QuickButton(const TQString &label,const TQString &newDefinition,TQWidget* parent) :
+TQPushButton::TQPushButton(label,parent)
{
setDefinition(newDefinition);
- connect(this,SIGNAL (clicked()),this,SLOT (wasClicked()) );
+ connect(this,TQT_SIGNAL (clicked()),this,TQT_SLOT (wasClicked()) );
}
QuickButton::~QuickButton()
@@ -30,7 +30,7 @@ void QuickButton::wasClicked()
emit clicked(definition);
}
-void QuickButton::setDefinition(const QString &newDefinition)
+void QuickButton::setDefinition(const TQString &newDefinition)
{
definition=newDefinition;
}
diff --git a/konversation/src/quickbutton.h b/konversation/src/quickbutton.h
index 02a1040..7b1373b 100644
--- a/konversation/src/quickbutton.h
+++ b/konversation/src/quickbutton.h
@@ -14,7 +14,7 @@
#ifndef QUICKBUTTON_H
#define QUICKBUTTON_H
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
class QuickButton : public QPushButton
@@ -22,14 +22,14 @@ class QuickButton : public QPushButton
Q_OBJECT
public:
- QuickButton(const QString &label,const QString &newDefinition,QWidget* parent);
+ QuickButton(const TQString &label,const TQString &newDefinition,TQWidget* parent);
~QuickButton();
- void setDefinition(const QString &newDefinition);
+ void setDefinition(const TQString &newDefinition);
signals:
void clicked(int);
- void clicked(const QString &definition);
+ void clicked(const TQString &definition);
public slots:
void wasClicked();
@@ -37,6 +37,6 @@ class QuickButton : public QPushButton
protected:
int id;
- QString definition;
+ TQString definition;
};
#endif
diff --git a/konversation/src/quickbuttons_preferences.cpp b/konversation/src/quickbuttons_preferences.cpp
index 3dabf68..564e1ee 100644
--- a/konversation/src/quickbuttons_preferences.cpp
+++ b/konversation/src/quickbuttons_preferences.cpp
@@ -13,9 +13,9 @@
#include "quickbuttons_preferences.h"
#include "config/preferences.h"
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qheader.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqheader.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -25,7 +25,7 @@
#include <klistview.h>
-QuickButtons_Config::QuickButtons_Config(QWidget* parent, const char* name)
+QuickButtons_Config::QuickButtons_Config(TQWidget* parent, const char* name)
: QuickButtons_ConfigUI(parent, name)
{
// reset flag to defined state (used to block signals when just selecting a new item)
@@ -38,15 +38,15 @@ QuickButtons_Config::QuickButtons_Config(QWidget* parent, const char* name)
buttonListView->setSorting(-1,false);
buttonListView->header()->setMovingEnabled(false);
- connect(buttonListView,SIGNAL (selectionChanged(QListViewItem*)),this,SLOT (entrySelected(QListViewItem*)) );
- connect(buttonListView,SIGNAL (clicked(QListViewItem*)),this,SLOT (entrySelected(QListViewItem*)) );
- connect(buttonListView,SIGNAL (moved()),this,SIGNAL (modified()) );
+ connect(buttonListView,TQT_SIGNAL (selectionChanged(TQListViewItem*)),this,TQT_SLOT (entrySelected(TQListViewItem*)) );
+ connect(buttonListView,TQT_SIGNAL (clicked(TQListViewItem*)),this,TQT_SLOT (entrySelected(TQListViewItem*)) );
+ connect(buttonListView,TQT_SIGNAL (moved()),this,TQT_SIGNAL (modified()) );
- connect(nameInput,SIGNAL (textChanged(const QString&)),this,SLOT (nameChanged(const QString&)) );
- connect(actionInput,SIGNAL (textChanged(const QString&)),this,SLOT (actionChanged(const QString&)) );
+ connect(nameInput,TQT_SIGNAL (textChanged(const TQString&)),this,TQT_SLOT (nameChanged(const TQString&)) );
+ connect(actionInput,TQT_SIGNAL (textChanged(const TQString&)),this,TQT_SLOT (actionChanged(const TQString&)) );
- connect(newButton,SIGNAL (clicked()),this,SLOT (addEntry()));
- connect(removeButton,SIGNAL (clicked()),this,SLOT (removeEntry()));
+ connect(newButton,TQT_SIGNAL (clicked()),this,TQT_SLOT (addEntry()));
+ connect(removeButton,TQT_SIGNAL (clicked()),this,TQT_SLOT (removeEntry()));
}
QuickButtons_Config::~QuickButtons_Config()
@@ -62,7 +62,7 @@ void QuickButtons_Config::loadSettings()
}
// fill listview with button definitions
-void QuickButtons_Config::setButtonsListView(const QStringList &buttonList)
+void QuickButtons_Config::setButtonsListView(const TQStringList &buttonList)
{
// clear listView
buttonListView->clear();
@@ -70,7 +70,7 @@ void QuickButtons_Config::setButtonsListView(const QStringList &buttonList)
for(unsigned int index=buttonList.count();index!=0;index--)
{
// get button definition
- QString definition=buttonList[index-1];
+ TQString definition=buttonList[index-1];
// cut definition apart in name and action, and create a new listview item
new KListViewItem(buttonListView,definition.section(',',0,0),definition.section(',',1));
} // for
@@ -89,7 +89,7 @@ void QuickButtons_Config::saveSettings()
config->setGroup("Button List");
// create empty list
- QStringList newList=currentButtonList();
+ TQStringList newList=currentButtonList();
// check if there are any quick buttons in the list view
if(newList.count())
@@ -98,13 +98,13 @@ void QuickButtons_Config::saveSettings()
for(unsigned int index=0;index<newList.count();index++)
{
// write the current button's name and definition
- config->writeEntry(QString("Button%1").arg(index),newList[index]);
+ config->writeEntry(TQString("Button%1").arg(index),newList[index]);
} // for
}
// if there were no buttons at all, write a dummy entry to prevent KConfigXT from "optimizing"
// the group out, which would in turn make konvi restore the default buttons
else
- config->writeEntry("Empty List",QString());
+ config->writeEntry("Empty List",TQString());
// set internal button list
Preferences::setQuickButtonList(newList);
@@ -118,12 +118,12 @@ void QuickButtons_Config::restorePageToDefaults()
setButtonsListView(Preferences::defaultQuickButtonList());
}
-QStringList QuickButtons_Config::currentButtonList()
+TQStringList QuickButtons_Config::currentButtonList()
{
// get first item of the button listview
- QListViewItem* item=buttonListView->firstChild();
+ TQListViewItem* item=buttonListView->firstChild();
// create empty list
- QStringList newList;
+ TQStringList newList;
// go through all items and save them into the configuration
while(item)
@@ -146,7 +146,7 @@ bool QuickButtons_Config::hasChanged()
// slots
// what to do when the user selects an item
-void QuickButtons_Config::entrySelected(QListViewItem* quickButtonEntry)
+void QuickButtons_Config::entrySelected(TQListViewItem* quickButtonEntry)
{
// play it safe, assume disabling all widgets first
bool enabled=false;
@@ -174,10 +174,10 @@ void QuickButtons_Config::entrySelected(QListViewItem* quickButtonEntry)
}
// what to do when the user change the name of a quick button
-void QuickButtons_Config::nameChanged(const QString& newName)
+void QuickButtons_Config::nameChanged(const TQString& newName)
{
// get possible first selected item
- QListViewItem* item=buttonListView->selectedItem();
+ TQListViewItem* item=buttonListView->selectedItem();
// sanity check
if(item)
@@ -190,10 +190,10 @@ void QuickButtons_Config::nameChanged(const QString& newName)
}
// what to do when the user change the action definition of a quick button
-void QuickButtons_Config::actionChanged(const QString& newAction)
+void QuickButtons_Config::actionChanged(const TQString& newAction)
{
// get possible first selected item
- QListViewItem* item=buttonListView->selectedItem();
+ TQListViewItem* item=buttonListView->selectedItem();
// sanity check
if(item)
@@ -209,7 +209,7 @@ void QuickButtons_Config::actionChanged(const QString& newAction)
void QuickButtons_Config::addEntry()
{
// add new item at the bottom of list view
- KListViewItem* newItem=new KListViewItem(buttonListView,buttonListView->lastChild(),i18n("New"),QString());
+ KListViewItem* newItem=new KListViewItem(buttonListView,buttonListView->lastChild(),i18n("New"),TQString());
// if successful ...
if(newItem)
{
@@ -229,13 +229,13 @@ void QuickButtons_Config::addEntry()
void QuickButtons_Config::removeEntry()
{
// get possible first selected item
- QListViewItem* item=buttonListView->selectedItem();
+ TQListViewItem* item=buttonListView->selectedItem();
// sanity check
if(item)
{
// get item below the current one
- QListViewItem* nextItem=item->itemBelow();
+ TQListViewItem* nextItem=item->itemBelow();
// if there was none, get the one above
if(!nextItem) nextItem=item->itemAbove();
diff --git a/konversation/src/quickbuttons_preferences.h b/konversation/src/quickbuttons_preferences.h
index 12a9ac0..8ee4600 100644
--- a/konversation/src/quickbuttons_preferences.h
+++ b/konversation/src/quickbuttons_preferences.h
@@ -22,7 +22,7 @@ class QuickButtons_Config : public QuickButtons_ConfigUI, public KonviSettingsPa
Q_OBJECT
public:
- explicit QuickButtons_Config(QWidget* parent, const char* name=NULL);
+ explicit QuickButtons_Config(TQWidget* parent, const char* name=NULL);
~QuickButtons_Config();
virtual void saveSettings();
@@ -35,19 +35,19 @@ class QuickButtons_Config : public QuickButtons_ConfigUI, public KonviSettingsPa
void modified();
protected slots:
- void entrySelected(QListViewItem* quickButtonEntry);
- void nameChanged(const QString& newName);
- void actionChanged(const QString& newAction);
+ void entrySelected(TQListViewItem* quickButtonEntry);
+ void nameChanged(const TQString& newName);
+ void actionChanged(const TQString& newAction);
void addEntry();
void removeEntry();
protected:
- void setButtonsListView(const QStringList &buttonList);
+ void setButtonsListView(const TQStringList &buttonList);
bool m_newItemSelected;
- QStringList m_oldButtonList;
- QStringList currentButtonList();
+ TQStringList m_oldButtonList;
+ TQStringList currentButtonList();
};
#endif
diff --git a/konversation/src/quickconnectdialog.cpp b/konversation/src/quickconnectdialog.cpp
index a8aacae..0d86fcc 100644
--- a/konversation/src/quickconnectdialog.cpp
+++ b/konversation/src/quickconnectdialog.cpp
@@ -15,55 +15,55 @@
#include "quickconnectdialog.h"
#include "konversationapplication.h"
-#include <qlayout.h>
-#include <qwhatsthis.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
#include <klineedit.h>
#include <klocale.h>
-QuickConnectDialog::QuickConnectDialog(QWidget *parent)
+QuickConnectDialog::QuickConnectDialog(TQWidget *parent)
:KDialogBase(parent, "quickconnect", true, i18n("Quick Connect"),
KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true)
{
- QWidget* page = new QWidget(this);
+ TQWidget* page = new TQWidget(this);
setMainWidget(page);
- QGridLayout* layout = new QGridLayout(page, 2, 4);
+ TQGridLayout* layout = new TQGridLayout(page, 2, 4);
layout->setSpacing(spacingHint());
layout->setColStretch(1, 10);
- QLabel* hostNameLabel = new QLabel(i18n("&Server host:"), page);
- QString hostNameWT = i18n("Enter the host of the network here.");
- QWhatsThis::add(hostNameLabel, hostNameWT);
+ TQLabel* hostNameLabel = new TQLabel(i18n("&Server host:"), page);
+ TQString hostNameWT = i18n("Enter the host of the network here.");
+ TQWhatsThis::add(hostNameLabel, hostNameWT);
hostNameInput = new KLineEdit(page);
- QWhatsThis::add(hostNameInput, hostNameWT);
+ TQWhatsThis::add(hostNameInput, hostNameWT);
hostNameLabel->setBuddy(hostNameInput);
- QLabel* portLabel = new QLabel(i18n("&Port:"), page);
- QString portWT = i18n("The port that the IRC server is using.");
- QWhatsThis::add(portLabel, portWT);
+ TQLabel* portLabel = new TQLabel(i18n("&Port:"), page);
+ TQString portWT = i18n("The port that the IRC server is using.");
+ TQWhatsThis::add(portLabel, portWT);
portInput = new KLineEdit("6667", page );
- QWhatsThis::add(portInput, portWT);
+ TQWhatsThis::add(portInput, portWT);
portLabel->setBuddy(portInput);
- QLabel* nickLabel = new QLabel(i18n("&Nick:"), page);
- QString nickWT = i18n("The nick you want to use.");
- QWhatsThis::add(nickLabel, nickWT);
+ TQLabel* nickLabel = new TQLabel(i18n("&Nick:"), page);
+ TQString nickWT = i18n("The nick you want to use.");
+ TQWhatsThis::add(nickLabel, nickWT);
nickInput = new KLineEdit(Preferences::nickname(0), page);
- QWhatsThis::add(nickInput, nickWT);
+ TQWhatsThis::add(nickInput, nickWT);
nickLabel->setBuddy(nickInput);
- QLabel* passwordLabel = new QLabel(i18n("P&assword:"), page);
- QString passwordWT = i18n("If the IRC server requires a password, enter it here (most servers do not require a password.)");
- QWhatsThis::add(passwordLabel, passwordWT);
+ TQLabel* passwordLabel = new TQLabel(i18n("P&assword:"), page);
+ TQString passwordWT = i18n("If the IRC server requires a password, enter it here (most servers do not require a password.)");
+ TQWhatsThis::add(passwordLabel, passwordWT);
passwordInput = new KLineEdit(page);
- QWhatsThis::add(passwordInput, passwordWT);
+ TQWhatsThis::add(passwordInput, passwordWT);
passwordLabel->setBuddy(passwordInput);
- sslCheckBox = new QCheckBox(page, "sslCheckBox");
+ sslCheckBox = new TQCheckBox(page, "sslCheckBox");
sslCheckBox->setText(i18n("&Use SSL"));
layout->addWidget(hostNameLabel, 0, 0);
diff --git a/konversation/src/quickconnectdialog.h b/konversation/src/quickconnectdialog.h
index 6d96941..7322854 100644
--- a/konversation/src/quickconnectdialog.h
+++ b/konversation/src/quickconnectdialog.h
@@ -20,7 +20,7 @@
#include <kdialogbase.h>
-class QCheckBox;
+class TQCheckBox;
class KLineEdit;
class QuickConnectDialog : public KDialogBase
@@ -28,16 +28,16 @@ class QuickConnectDialog : public KDialogBase
Q_OBJECT
public:
- explicit QuickConnectDialog(QWidget* parent=0);
+ explicit QuickConnectDialog(TQWidget* parent=0);
~QuickConnectDialog();
signals:
void connectClicked(Konversation::ConnectionFlag flag,
- const QString& hostName,
- const QString& port,
- const QString& password,
- const QString& nick,
- const QString& channel,
+ const TQString& hostName,
+ const TQString& port,
+ const TQString& password,
+ const TQString& nick,
+ const TQString& channel,
bool useSSL
);
@@ -49,6 +49,6 @@ class QuickConnectDialog : public KDialogBase
KLineEdit* portInput;
KLineEdit* passwordInput;
KLineEdit* nickInput;
- QCheckBox* sslCheckBox;
+ TQCheckBox* sslCheckBox;
};
#endif
diff --git a/konversation/src/rawlog.cpp b/konversation/src/rawlog.cpp
index 30d3d9b..bb3d65f 100644
--- a/konversation/src/rawlog.cpp
+++ b/konversation/src/rawlog.cpp
@@ -23,7 +23,7 @@
#include <kdebug.h>
-RawLog::RawLog(QWidget* parent) : ChatWindow(parent)
+RawLog::RawLog(TQWidget* parent) : ChatWindow(parent)
{
setName(i18n("Raw Log"));
setType(ChatWindow::RawLog);
@@ -51,7 +51,7 @@ void RawLog::updateAppearance()
else
{
getTextView()->setViewBackground(Preferences::color(Preferences::TextViewBackground),
- QString());
+ TQString());
}
if (Preferences::customTextFont())
diff --git a/konversation/src/rawlog.h b/konversation/src/rawlog.h
index 8f3e6e8..83ab545 100644
--- a/konversation/src/rawlog.h
+++ b/konversation/src/rawlog.h
@@ -23,7 +23,7 @@ class RawLog : public ChatWindow
Q_OBJECT
public:
- explicit RawLog(QWidget* parent);
+ explicit RawLog(TQWidget* parent);
~RawLog();
virtual bool closeYourself();
diff --git a/konversation/src/scriptlauncher.cpp b/konversation/src/scriptlauncher.cpp
index a81965e..40c2300 100644
--- a/konversation/src/scriptlauncher.cpp
+++ b/konversation/src/scriptlauncher.cpp
@@ -15,9 +15,9 @@
#include "konversationapplication.h"
#include "server.h"
-#include <qstringlist.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqstringlist.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
#include <kdebug.h>
#include <kstandarddirs.h>
@@ -26,7 +26,7 @@
ScriptLauncher::ScriptLauncher(Server* server)
-: QObject(server)
+: TQObject(server)
{
m_server = server;
}
@@ -35,34 +35,34 @@ ScriptLauncher::~ScriptLauncher()
{
}
-void ScriptLauncher::launchScript(const QString& target, const QString &parameter)
+void ScriptLauncher::launchScript(const TQString& target, const TQString &parameter)
{
KStandardDirs kstddir;
- // QString scriptPath(kstddir.saveLocation("data",QString("konversation/scripts")));
+ // TQString scriptPath(kstddir.saveLocation("data",TQString("konversation/scripts")));
KProcess process;
// send the script all the information it will need
- QStringList parameterList=QStringList::split(' ',parameter);
+ TQStringList parameterList=TQStringList::split(' ',parameter);
// find script path (could be installed for all users in $KDEDIR/share/apps/ or
// for one user alone in $HOME/.kde/share/apps/
- QString scriptPath(kstddir.findResource("data","konversation/scripts/"+parameterList[0]));
+ TQString scriptPath(kstddir.findResource("data","konversation/scripts/"+parameterList[0]));
process << scriptPath // script path and name
<< kapp->dcopClient()->appId() // our dcop port
- << QString::number(m_server->connectionId()) // the server we are connected to
+ << TQString::number(m_server->connectionId()) // the server we are connected to
<< target; // the target where the call came from
// send remaining parameters to the script
for(unsigned int index=1;index<parameterList.count();index++)
process << parameterList[index];
- QFileInfo fileInfo(scriptPath);
+ TQFileInfo fileInfo(scriptPath);
process.setWorkingDirectory(fileInfo.dirPath());
if(process.start()==false)
{
- QFile file(parameterList[0]);
+ TQFile file(parameterList[0]);
if(!file.exists()) emit scriptNotFound(file.name());
else emit scriptExecutionError(file.name());
}
diff --git a/konversation/src/scriptlauncher.h b/konversation/src/scriptlauncher.h
index 8350077..d52e222 100644
--- a/konversation/src/scriptlauncher.h
+++ b/konversation/src/scriptlauncher.h
@@ -10,7 +10,7 @@
Copyright (C) 2004 Peter Simonsson <psn@linux.se>
*/
-#include <qobject.h>
+#include <tqobject.h>
#ifndef SCRIPTLAUNCHER_H
#define SCRIPTLAUNCHER_H
@@ -27,11 +27,11 @@ class ScriptLauncher : public QObject
~ScriptLauncher();
signals:
- void scriptNotFound(const QString& name);
- void scriptExecutionError(const QString& name);
+ void scriptNotFound(const TQString& name);
+ void scriptExecutionError(const TQString& name);
public slots:
- void launchScript(const QString& target, const QString& parameter);
+ void launchScript(const TQString& target, const TQString& parameter);
protected:
Server* m_server;
diff --git a/konversation/src/searchbar.cpp b/konversation/src/searchbar.cpp
index 992086a..7f8c004 100644
--- a/konversation/src/searchbar.cpp
+++ b/konversation/src/searchbar.cpp
@@ -12,16 +12,16 @@
#include "searchbar.h"
-#include <qcheckbox.h>
-#include <qtimer.h>
-#include <qpalette.h>
-#include <qaccel.h>
-#include <qlabel.h>
-#include <qpixmap.h>
-#include <qobjectlist.h>
-#include <qtoolbutton.h>
-#include <qpopupmenu.h>
-#include <qwidgetstack.h>
+#include <tqcheckbox.h>
+#include <tqtimer.h>
+#include <tqpalette.h>
+#include <tqaccel.h>
+#include <tqlabel.h>
+#include <tqpixmap.h>
+#include <tqobjectlist.h>
+#include <tqtoolbutton.h>
+#include <tqpopupmenu.h>
+#include <tqwidgetstack.h>
#include <kdebug.h>
#include <kapplication.h>
@@ -36,7 +36,7 @@
#define FROM_CURSOR_MENU 4
-SearchBar::SearchBar(QWidget* parent)
+SearchBar::SearchBar(TQWidget* parent)
: SearchBarBase(parent)
{
m_searchFoward = false;
@@ -52,25 +52,25 @@ SearchBar::SearchBar(QWidget* parent)
m_statusPixLabel->hide();
m_statusTextLabel->hide();
- m_timer = new QTimer(this);
+ m_timer = new TQTimer(this);
- QAccel* accel = new QAccel(this);
- accel->connectItem( accel->insertItem(Qt::Key_Escape), this, SLOT(hide()));
+ TQAccel* accel = new TQAccel(this);
+ accel->connectItem( accel->insertItem(Qt::Key_Escape), this, TQT_SLOT(hide()));
- connect(m_timer, SIGNAL(timeout()), SLOT(slotFind()));
- connect(m_searchEdit, SIGNAL(textChanged(const QString&)), SLOT(slotTextChanged()));
- connect(m_searchEdit, SIGNAL(returnPressed()), SLOT(slotFindNext()));
- connect(m_findNextButton, SIGNAL(clicked()), SLOT(slotFindNext()));
- connect(m_findPreviousButton, SIGNAL(clicked()), SLOT(slotFindPrevious()));
- connect(m_closeButton, SIGNAL(clicked()), SLOT(hide()));
- connect(m_optionsButton, SIGNAL(clicked()), this, SLOT(showOptionsMenu()));
+ connect(m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotFind()));
+ connect(m_searchEdit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotTextChanged()));
+ connect(m_searchEdit, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotFindNext()));
+ connect(m_findNextButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotFindNext()));
+ connect(m_findPreviousButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotFindPrevious()));
+ connect(m_closeButton, TQT_SIGNAL(clicked()), TQT_SLOT(hide()));
+ connect(m_optionsButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(showOptionsMenu()));
- m_optionsMenu = new QPopupMenu(m_optionsButton, "options_menu");
+ m_optionsMenu = new TQPopupMenu(m_optionsButton, "options_menu");
m_optionsMenu->setCheckable(true);
- m_optionsMenu->insertItem(i18n("Find Forward"), this, SLOT(toggleSearchFoward()), 0, SEARCH_FORWARD_MENU);
- m_optionsMenu->insertItem(i18n("Case Sensitive"), this, SLOT(toggleMatchCase()), 0, MATCH_CASE_MENU);
- m_optionsMenu->insertItem(i18n("Whole Words Only"), this, SLOT(toggleWholeWords()), 0, WHOLE_WORDS_ONLY_MENU);
- m_optionsMenu->insertItem(i18n("From Cursor"), this, SLOT(toggleFromCursor()), 0, FROM_CURSOR_MENU);
+ m_optionsMenu->insertItem(i18n("Find Forward"), this, TQT_SLOT(toggleSearchFoward()), 0, SEARCH_FORWARD_MENU);
+ m_optionsMenu->insertItem(i18n("Case Sensitive"), this, TQT_SLOT(toggleMatchCase()), 0, MATCH_CASE_MENU);
+ m_optionsMenu->insertItem(i18n("Whole Words Only"), this, TQT_SLOT(toggleWholeWords()), 0, WHOLE_WORDS_ONLY_MENU);
+ m_optionsMenu->insertItem(i18n("From Cursor"), this, TQT_SLOT(toggleFromCursor()), 0, FROM_CURSOR_MENU);
m_optionsButton->setPopup(m_optionsMenu);
}
@@ -79,7 +79,7 @@ SearchBar::~SearchBar()
{
}
-void SearchBar::showEvent(QShowEvent *e)
+void SearchBar::showEvent(TQShowEvent *e)
{
SearchBarBase::showEvent(e);
m_searchEdit->selectAll();
@@ -87,15 +87,15 @@ void SearchBar::showEvent(QShowEvent *e)
bool SearchBar::focusedChild()
{
- QObjectList *l = queryList("QWidget", 0,0, true);
- QObjectListIt it( *l );
- QObject *obj;
+ TQObjectList *l = queryList("TQWidget", 0,0, true);
+ TQObjectListIt it( *l );
+ TQObject *obj;
bool has=false;
while ((obj = it.current()) != 0)
{
++it;
- if (((QWidget*)obj)->hasFocus())
+ if (((TQWidget*)obj)->hasFocus())
{
has=true;
break;
@@ -126,7 +126,7 @@ void SearchBar::slotFind()
m_searchEdit->unsetPalette();
m_findNextButton->setEnabled(false);
m_findPreviousButton->setEnabled(false);
- setStatus(QPixmap(), "");
+ setStatus(TQPixmap(), "");
return;
}
@@ -140,7 +140,7 @@ void SearchBar::slotFindNext()
m_searchEdit->unsetPalette();
m_findNextButton->setEnabled(false);
m_findPreviousButton->setEnabled(false);
- setStatus(QPixmap(), "");
+ setStatus(TQPixmap(), "");
return;
}
@@ -154,7 +154,7 @@ void SearchBar::slotFindPrevious()
m_searchEdit->unsetPalette();
m_findNextButton->setEnabled(false);
m_findPreviousButton->setEnabled(false);
- setStatus(QPixmap(), "");
+ setStatus(TQPixmap(), "");
return;
}
@@ -163,14 +163,14 @@ void SearchBar::slotFindPrevious()
void SearchBar::setHasMatch(bool value)
{
- QPalette pal = m_searchEdit->palette();
- pal.setColor(QPalette::Active, QColorGroup::Base, value ? Qt::green : Qt::red);
+ TQPalette pal = m_searchEdit->palette();
+ pal.setColor(TQPalette::Active, TQColorGroup::Base, value ? Qt::green : Qt::red);
m_searchEdit->setPalette(pal);
m_findNextButton->setEnabled(value);
m_findPreviousButton->setEnabled(value);
}
-void SearchBar::setStatus(const QPixmap& pix, const QString& text)
+void SearchBar::setStatus(const TQPixmap& pix, const TQString& text)
{
if(!text.isEmpty()) {
m_statusPixLabel->show();
@@ -184,7 +184,7 @@ void SearchBar::setStatus(const QPixmap& pix, const QString& text)
m_statusTextLabel->setText(text);
}
-QString SearchBar::pattern() const
+TQString SearchBar::pattern() const
{
return m_searchEdit->text();
}
diff --git a/konversation/src/searchbar.h b/konversation/src/searchbar.h
index b831ffe..7818441 100644
--- a/konversation/src/searchbar.h
+++ b/konversation/src/searchbar.h
@@ -22,20 +22,20 @@
the konvi gods
*/
-class QPopupMenu;
+class TQPopupMenu;
class SearchBar : public SearchBarBase
{
Q_OBJECT
public:
- explicit SearchBar(QWidget* parent);
+ explicit SearchBar(TQWidget* parent);
~SearchBar();
void setHasMatch(bool value);
- void setStatus(const QPixmap& pix, const QString& text);
+ void setStatus(const TQPixmap& pix, const TQString& text);
- QString pattern() const;
+ TQString pattern() const;
bool searchForward() const;
bool caseSensitive() const;
@@ -43,7 +43,7 @@ class SearchBar : public SearchBarBase
bool fromCursor() const;
protected:
- virtual void showEvent(QShowEvent* e);
+ virtual void showEvent(TQShowEvent* e);
bool focusedChild();
public slots:
@@ -63,16 +63,16 @@ class SearchBar : public SearchBarBase
void showOptionsMenu();
signals:
- void signalSearchChanged(const QString& pattern);
+ void signalSearchChanged(const TQString& pattern);
void signalSearchNext();
void signalSearchPrevious();
void signalPropertiesChanged();
void hidden();
private:
- QTimer* m_timer;
+ TQTimer* m_timer;
- QPopupMenu* m_optionsMenu;
+ TQPopupMenu* m_optionsMenu;
bool m_searchFoward;
bool m_matchCase;
diff --git a/konversation/src/server.cpp b/konversation/src/server.cpp
index 8a25b22..6477995 100644
--- a/konversation/src/server.cpp
+++ b/konversation/src/server.cpp
@@ -42,10 +42,10 @@
#include "blowfish.h"
#include "dcctransfermanager.h"
-#include <qregexp.h>
-#include <qhostaddress.h>
-#include <qtextcodec.h>
-#include <qdatetime.h>
+#include <tqregexp.h>
+#include <tqhostaddress.h>
+#include <tqtextcodec.h>
+#include <tqdatetime.h>
#include <kapplication.h>
#include <klocale.h>
@@ -64,7 +64,7 @@
int Server::m_availableConnectionId = 0;
-Server::Server(QObject* parent, ConnectionSettings& settings) : QObject(parent)
+Server::Server(TQObject* parent, ConnectionSettings& settings) : TQObject(parent)
{
m_connectionId = m_availableConnectionId;
m_availableConnectionId++;
@@ -75,7 +75,7 @@ Server::Server(QObject* parent, ConnectionSettings& settings) : QObject(parent)
for (int i=0;i<=_max_queue();i++)
{
- QValueList<int> r=Preferences::queueRate(i);
+ TQValueList<int> r=Preferences::queueRate(i);
IRCQueue *q=new IRCQueue(this, staticrates[i]); //FIXME these are supposed to be in the rc
m_queues.append(q);
}
@@ -94,7 +94,7 @@ Server::Server(QObject* parent, ConnectionSettings& settings) : QObject(parent)
m_serverISON = 0;
m_away = false;
m_socket = 0;
- m_prevISONList = QStringList();
+ m_prevISONList = TQStringList();
m_bytesReceived = 0;
m_encodedBytesSent=0;
m_bytesSent=0;
@@ -104,7 +104,7 @@ Server::Server(QObject* parent, ConnectionSettings& settings) : QObject(parent)
m_serverNickPrefixes = "@+%";
m_channelPrefixes = "#&";
- setName(QString("server_" + settings.name()).ascii());
+ setName(TQString("server_" + settings.name()).ascii());
setNickname(settings.initialNick());
obtainNickInfo(getNickname());
@@ -126,9 +126,9 @@ Server::Server(QObject* parent, ConnectionSettings& settings) : QObject(parent)
updateAutoJoin(settings.initialChannel());
if (!getIdentity()->getShellCommand().isEmpty())
- QTimer::singleShot(0, this, SLOT(doPreShellCommand()));
+ TQTimer::singleShot(0, this, TQT_SLOT(doPreShellCommand()));
else
- QTimer::singleShot(0, this, SLOT(connectToIRCServer()));
+ TQTimer::singleShot(0, this, TQT_SLOT(connectToIRCServer()));
initTimers();
@@ -146,7 +146,7 @@ Server::~Server()
m_serverISON = 0;
// clear nicks online
- emit nicksNowOnline(this,QStringList(),true);
+ emit nicksNowOnline(this,TQStringList(),true);
// Make sure no signals get sent to a soon to be dying Server Window
if (m_socket)
@@ -182,7 +182,7 @@ Server::~Server()
m_queryNicks.clear();
//Delete the queues
- for (QValueVector<IRCQueue *>::iterator it=m_queues.begin(); it != m_queues.end(); ++it)
+ for (TQValueVector<IRCQueue *>::iterator it=m_queues.begin(); it != m_queues.end(); ++it)
delete *it;
emit destroyed(m_connectionId);
@@ -193,21 +193,21 @@ Server::~Server()
//... so called to match the ChatWindow derivatives.
bool Server::closeYourself(bool)
{
- QTimer::singleShot(0, m_statusView, SLOT(serverSaysClose()));
+ TQTimer::singleShot(0, m_statusView, TQT_SLOT(serverSaysClose()));
return true;
}
void Server::doPreShellCommand()
{
- QString command = getIdentity()->getShellCommand();
+ TQString command = getIdentity()->getShellCommand();
getStatusView()->appendServerMessage(i18n("Info"),"Running preconfigured command...");
- connect(&m_preShellCommand,SIGNAL(processExited(KProcess*)), this, SLOT(preShellCommandExited(KProcess*)));
+ connect(&m_preShellCommand,TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(preShellCommandExited(KProcess*)));
- QStringList commandList = QStringList::split(" ",command);
+ TQStringList commandList = TQStringList::split(" ",command);
- for (QStringList::ConstIterator it = commandList.begin(); it != commandList.end(); ++it)
+ for (TQStringList::ConstIterator it = commandList.begin(); it != commandList.end(); ++it)
m_preShellCommand << *it;
if (!m_preShellCommand.start()) preShellCommandExited(NULL);
@@ -217,7 +217,7 @@ void Server::_fetchRates()
{
for (int i=0;i<=_max_queue();i++)
{
- QValueList<int> r=Preferences::queueRate(i);
+ TQValueList<int> r=Preferences::queueRate(i);
staticrates[i]=IRCQueue::EmptyingRate(r[0], r[1]*1000,IRCQueue::EmptyingRate::RateType(r[2]));
}
}
@@ -226,7 +226,7 @@ void Server::_stashRates()
{
for (int i=0;i<=_max_queue();i++)
{
- QValueList<int> r;
+ TQValueList<int> r;
r.append(staticrates[i].m_rate);
r.append(staticrates[i].m_interval/1000);
r.append(int(staticrates[i].m_type));
@@ -239,7 +239,7 @@ void Server::_resetRates()
for (int i=0;i<=_max_queue();i++)
{
Preferences::self()->queueRateItem(i)->setDefault();
- QValueList<int> r=Preferences::queueRate(i);
+ TQValueList<int> r=Preferences::queueRate(i);
staticrates[i]=IRCQueue::EmptyingRate(r[0], r[1]*1000,IRCQueue::EmptyingRate::RateType(r[2]));
}
}
@@ -253,90 +253,90 @@ void Server::initTimers()
void Server::connectSignals()
{
// Timers
- connect(&m_incomingTimer, SIGNAL(timeout()), this, SLOT(processIncomingData()));
- connect(&m_notifyTimer, SIGNAL(timeout()), this, SLOT(notifyTimeout()));
- connect(&m_pingResponseTimer, SIGNAL(timeout()), this, SLOT(updateLongPongLag()));
+ connect(&m_incomingTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(processIncomingData()));
+ connect(&m_notifyTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(notifyTimeout()));
+ connect(&m_pingResponseTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateLongPongLag()));
// OutputFilter
- connect(getOutputFilter(), SIGNAL(requestDccSend()), this,SLOT(requestDccSend()));
- connect(getOutputFilter(), SIGNAL(requestDccSend(const QString&)), this, SLOT(requestDccSend(const QString&)));
- connect(getOutputFilter(), SIGNAL(multiServerCommand(const QString&, const QString&)),
- this, SLOT(sendMultiServerCommand(const QString&, const QString&)));
- connect(getOutputFilter(), SIGNAL(reconnectServer()), this, SLOT(reconnect()));
- connect(getOutputFilter(), SIGNAL(disconnectServer()), this, SLOT(disconnect()));
- connect(getOutputFilter(), SIGNAL(openDccSend(const QString &, KURL)), this, SLOT(addDccSend(const QString &, KURL)));
- connect(getOutputFilter(), SIGNAL(openDccChat(const QString &)), this, SLOT(openDccChat(const QString &)));
- connect(getOutputFilter(), SIGNAL(sendToAllChannels(const QString&)), this, SLOT(sendToAllChannels(const QString&)));
- connect(getOutputFilter(), SIGNAL(banUsers(const QStringList&,const QString&,const QString&)),
- this, SLOT(requestBan(const QStringList&,const QString&,const QString&)));
- connect(getOutputFilter(), SIGNAL(unbanUsers(const QString&,const QString&)),
- this, SLOT(requestUnban(const QString&,const QString&)));
- connect(getOutputFilter(), SIGNAL(openRawLog(bool)), this, SLOT(addRawLog(bool)));
- connect(getOutputFilter(), SIGNAL(closeRawLog()), this, SLOT(closeRawLog()));
- connect(getOutputFilter(), SIGNAL(encodingChanged()), this, SLOT(updateEncoding()));
+ connect(getOutputFilter(), TQT_SIGNAL(requestDccSend()), this,TQT_SLOT(requestDccSend()));
+ connect(getOutputFilter(), TQT_SIGNAL(requestDccSend(const TQString&)), this, TQT_SLOT(requestDccSend(const TQString&)));
+ connect(getOutputFilter(), TQT_SIGNAL(multiServerCommand(const TQString&, const TQString&)),
+ this, TQT_SLOT(sendMultiServerCommand(const TQString&, const TQString&)));
+ connect(getOutputFilter(), TQT_SIGNAL(reconnectServer()), this, TQT_SLOT(reconnect()));
+ connect(getOutputFilter(), TQT_SIGNAL(disconnectServer()), this, TQT_SLOT(disconnect()));
+ connect(getOutputFilter(), TQT_SIGNAL(openDccSend(const TQString &, KURL)), this, TQT_SLOT(addDccSend(const TQString &, KURL)));
+ connect(getOutputFilter(), TQT_SIGNAL(openDccChat(const TQString &)), this, TQT_SLOT(openDccChat(const TQString &)));
+ connect(getOutputFilter(), TQT_SIGNAL(sendToAllChannels(const TQString&)), this, TQT_SLOT(sendToAllChannels(const TQString&)));
+ connect(getOutputFilter(), TQT_SIGNAL(banUsers(const TQStringList&,const TQString&,const TQString&)),
+ this, TQT_SLOT(requestBan(const TQStringList&,const TQString&,const TQString&)));
+ connect(getOutputFilter(), TQT_SIGNAL(unbanUsers(const TQString&,const TQString&)),
+ this, TQT_SLOT(requestUnban(const TQString&,const TQString&)));
+ connect(getOutputFilter(), TQT_SIGNAL(openRawLog(bool)), this, TQT_SLOT(addRawLog(bool)));
+ connect(getOutputFilter(), TQT_SIGNAL(closeRawLog()), this, TQT_SLOT(closeRawLog()));
+ connect(getOutputFilter(), TQT_SIGNAL(encodingChanged()), this, TQT_SLOT(updateEncoding()));
KonversationApplication* konvApp = static_cast<KonversationApplication*>(kapp);
- connect(getOutputFilter(), SIGNAL(connectTo(Konversation::ConnectionFlag, const QString&,
- const QString&, const QString&, const QString&, const QString&, bool)),
- konvApp->getConnectionManager(), SLOT(connectTo(Konversation::ConnectionFlag,
- const QString&, const QString&, const QString&, const QString&, const QString&, bool)));
+ connect(getOutputFilter(), TQT_SIGNAL(connectTo(Konversation::ConnectionFlag, const TQString&,
+ const TQString&, const TQString&, const TQString&, const TQString&, bool)),
+ konvApp->getConnectionManager(), TQT_SLOT(connectTo(Konversation::ConnectionFlag,
+ const TQString&, const TQString&, const TQString&, const TQString&, const TQString&, bool)));
- connect(konvApp->getDccTransferManager(), SIGNAL(newTransferQueued(DccTransfer*)),
- this, SLOT(slotNewDccTransferItemQueued(DccTransfer*)));
+ connect(konvApp->getDccTransferManager(), TQT_SIGNAL(newTransferQueued(DccTransfer*)),
+ this, TQT_SLOT(slotNewDccTransferItemQueued(DccTransfer*)));
- connect(konvApp, SIGNAL(appearanceChanged()), this, SLOT(startNotifyTimer()));
+ connect(konvApp, TQT_SIGNAL(appearanceChanged()), this, TQT_SLOT(startNotifyTimer()));
// ViewContainer
- connect(this, SIGNAL(showView(ChatWindow*)), getViewContainer(), SLOT(showView(ChatWindow*)));
- connect(this, SIGNAL(addDccPanel()), getViewContainer(), SLOT(addDccPanel()));
- connect(this, SIGNAL(addDccChat(const QString&,const QString&,const QStringList&,bool)),
- getViewContainer(), SLOT(addDccChat(const QString&,const QString&,const QStringList&,bool)) );
- connect(this, SIGNAL(serverLag(Server*, int)), getViewContainer(), SIGNAL(updateStatusBarLagLabel(Server*, int)));
- connect(this, SIGNAL(tooLongLag(Server*, int)), getViewContainer(), SIGNAL(setStatusBarLagLabelTooLongLag(Server*, int)));
- connect(this, SIGNAL(resetLag()), getViewContainer(), SIGNAL(resetStatusBarLagLabel()));
- connect(getOutputFilter(), SIGNAL(showView(ChatWindow*)), getViewContainer(), SLOT(showView(ChatWindow*)));
- connect(getOutputFilter(), SIGNAL(openKonsolePanel()), getViewContainer(), SLOT(addKonsolePanel()));
- connect(getOutputFilter(), SIGNAL(openChannelList(const QString&, bool)), getViewContainer(), SLOT(openChannelList(const QString&, bool)));
- connect(getOutputFilter(), SIGNAL(closeDccPanel()), getViewContainer(), SLOT(closeDccPanel()));
- connect(getOutputFilter(), SIGNAL(addDccPanel()), getViewContainer(), SLOT(addDccPanel()));
- connect(&m_inputFilter, SIGNAL(addDccChat(const QString&,const QString&,const QStringList&,bool)),
- getViewContainer(), SLOT(addDccChat(const QString&,const QString&,const QStringList&,bool)) );
+ connect(this, TQT_SIGNAL(showView(ChatWindow*)), getViewContainer(), TQT_SLOT(showView(ChatWindow*)));
+ connect(this, TQT_SIGNAL(addDccPanel()), getViewContainer(), TQT_SLOT(addDccPanel()));
+ connect(this, TQT_SIGNAL(addDccChat(const TQString&,const TQString&,const TQStringList&,bool)),
+ getViewContainer(), TQT_SLOT(addDccChat(const TQString&,const TQString&,const TQStringList&,bool)) );
+ connect(this, TQT_SIGNAL(serverLag(Server*, int)), getViewContainer(), TQT_SIGNAL(updateStatusBarLagLabel(Server*, int)));
+ connect(this, TQT_SIGNAL(tooLongLag(Server*, int)), getViewContainer(), TQT_SIGNAL(setStatusBarLagLabelTooLongLag(Server*, int)));
+ connect(this, TQT_SIGNAL(resetLag()), getViewContainer(), TQT_SIGNAL(resetStatusBarLagLabel()));
+ connect(getOutputFilter(), TQT_SIGNAL(showView(ChatWindow*)), getViewContainer(), TQT_SLOT(showView(ChatWindow*)));
+ connect(getOutputFilter(), TQT_SIGNAL(openKonsolePanel()), getViewContainer(), TQT_SLOT(addKonsolePanel()));
+ connect(getOutputFilter(), TQT_SIGNAL(openChannelList(const TQString&, bool)), getViewContainer(), TQT_SLOT(openChannelList(const TQString&, bool)));
+ connect(getOutputFilter(), TQT_SIGNAL(closeDccPanel()), getViewContainer(), TQT_SLOT(closeDccPanel()));
+ connect(getOutputFilter(), TQT_SIGNAL(addDccPanel()), getViewContainer(), TQT_SLOT(addDccPanel()));
+ connect(&m_inputFilter, TQT_SIGNAL(addDccChat(const TQString&,const TQString&,const TQStringList&,bool)),
+ getViewContainer(), TQT_SLOT(addDccChat(const TQString&,const TQString&,const TQStringList&,bool)) );
// Inputfilter
- connect(&m_inputFilter, SIGNAL(welcome(const QString&)), this, SLOT(connectionEstablished(const QString&)));
- connect(&m_inputFilter, SIGNAL(notifyResponse(const QString&)), this, SLOT(notifyResponse(const QString&)));
- connect(&m_inputFilter, SIGNAL(startReverseDccSendTransfer(const QString&,const QStringList&)),
- this, SLOT(startReverseDccSendTransfer(const QString&,const QStringList&)));
- connect(&m_inputFilter, SIGNAL(addDccGet(const QString&, const QStringList&)),
- this, SLOT(addDccGet(const QString&, const QStringList&)));
- connect(&m_inputFilter, SIGNAL(resumeDccGetTransfer(const QString&, const QStringList&)),
- this, SLOT(resumeDccGetTransfer(const QString&, const QStringList&)));
- connect(&m_inputFilter, SIGNAL(resumeDccSendTransfer(const QString&, const QStringList&)),
- this, SLOT(resumeDccSendTransfer(const QString&, const QStringList&)));
- connect(&m_inputFilter, SIGNAL(userhost(const QString&,const QString&,bool,bool)),
- this, SLOT(userhost(const QString&,const QString&,bool,bool)) );
- connect(&m_inputFilter, SIGNAL(topicAuthor(const QString&,const QString&,QDateTime)),
- this, SLOT(setTopicAuthor(const QString&,const QString&,QDateTime)) );
- connect(&m_inputFilter, SIGNAL(endOfWho(const QString&)),
- this, SLOT(endOfWho(const QString&)) );
- connect(&m_inputFilter, SIGNAL(invitation(const QString&,const QString&)),
- this,SLOT(invitation(const QString&,const QString&)) );
- connect(&m_inputFilter, SIGNAL(addToChannelList(const QString&, int, const QString& )),
- this, SLOT(addToChannelList(const QString&, int, const QString& )));
+ connect(&m_inputFilter, TQT_SIGNAL(welcome(const TQString&)), this, TQT_SLOT(connectionEstablished(const TQString&)));
+ connect(&m_inputFilter, TQT_SIGNAL(notifyResponse(const TQString&)), this, TQT_SLOT(notifyResponse(const TQString&)));
+ connect(&m_inputFilter, TQT_SIGNAL(startReverseDccSendTransfer(const TQString&,const TQStringList&)),
+ this, TQT_SLOT(startReverseDccSendTransfer(const TQString&,const TQStringList&)));
+ connect(&m_inputFilter, TQT_SIGNAL(addDccGet(const TQString&, const TQStringList&)),
+ this, TQT_SLOT(addDccGet(const TQString&, const TQStringList&)));
+ connect(&m_inputFilter, TQT_SIGNAL(resumeDccGetTransfer(const TQString&, const TQStringList&)),
+ this, TQT_SLOT(resumeDccGetTransfer(const TQString&, const TQStringList&)));
+ connect(&m_inputFilter, TQT_SIGNAL(resumeDccSendTransfer(const TQString&, const TQStringList&)),
+ this, TQT_SLOT(resumeDccSendTransfer(const TQString&, const TQStringList&)));
+ connect(&m_inputFilter, TQT_SIGNAL(userhost(const TQString&,const TQString&,bool,bool)),
+ this, TQT_SLOT(userhost(const TQString&,const TQString&,bool,bool)) );
+ connect(&m_inputFilter, TQT_SIGNAL(topicAuthor(const TQString&,const TQString&,TQDateTime)),
+ this, TQT_SLOT(setTopicAuthor(const TQString&,const TQString&,TQDateTime)) );
+ connect(&m_inputFilter, TQT_SIGNAL(endOfWho(const TQString&)),
+ this, TQT_SLOT(endOfWho(const TQString&)) );
+ connect(&m_inputFilter, TQT_SIGNAL(invitation(const TQString&,const TQString&)),
+ this,TQT_SLOT(invitation(const TQString&,const TQString&)) );
+ connect(&m_inputFilter, TQT_SIGNAL(addToChannelList(const TQString&, int, const TQString& )),
+ this, TQT_SLOT(addToChannelList(const TQString&, int, const TQString& )));
// Status View
- connect(this, SIGNAL(serverOnline(bool)), getStatusView(), SLOT(serverOnline(bool)));
+ connect(this, TQT_SIGNAL(serverOnline(bool)), getStatusView(), TQT_SLOT(serverOnline(bool)));
// Scripts
- connect(getOutputFilter(), SIGNAL(launchScript(const QString&, const QString&)),
- m_scriptLauncher, SLOT(launchScript(const QString&, const QString&)));
- connect(m_scriptLauncher, SIGNAL(scriptNotFound(const QString&)),
- this, SLOT(scriptNotFound(const QString&)));
- connect(m_scriptLauncher, SIGNAL(scriptExecutionError(const QString&)),
- this, SLOT(scriptExecutionError(const QString&)));
+ connect(getOutputFilter(), TQT_SIGNAL(launchScript(const TQString&, const TQString&)),
+ m_scriptLauncher, TQT_SLOT(launchScript(const TQString&, const TQString&)));
+ connect(m_scriptLauncher, TQT_SIGNAL(scriptNotFound(const TQString&)),
+ this, TQT_SLOT(scriptNotFound(const TQString&)));
+ connect(m_scriptLauncher, TQT_SIGNAL(scriptExecutionError(const TQString&)),
+ this, TQT_SLOT(scriptExecutionError(const TQString&)));
// Stats
- connect(this, SIGNAL(sentStat(int, int)), SLOT(collectStats(int, int)));
+ connect(this, TQT_SIGNAL(sentStat(int, int)), TQT_SLOT(collectStats(int, int)));
}
int Server::getPort()
@@ -378,7 +378,7 @@ void Server::connectToIRCServer()
updateConnectionState(Konversation::SSConnecting);
m_autoIdentifyLock = false;
- m_ownIpByUserhost = QString();
+ m_ownIpByUserhost = TQString();
resetQueues();
@@ -390,25 +390,25 @@ void Server::connectToIRCServer()
// connect() will do a async lookup too
if(!getConnectionSettings().server().SSLEnabled())
{
- m_socket = new KNetwork::KBufferedSocket(QString(), QString(), 0L, "serverSocket");
- connect(m_socket, SIGNAL(connected(const KResolverEntry&)), SLOT (ircServerConnectionSuccess()));
+ m_socket = new KNetwork::KBufferedSocket(TQString(), TQString(), 0L, "serverSocket");
+ connect(m_socket, TQT_SIGNAL(connected(const KResolverEntry&)), TQT_SLOT (ircServerConnectionSuccess()));
}
else
{
m_socket = new SSLSocket(getViewContainer()->getWindow(), 0L, "serverSSLSocket");
- connect(m_socket, SIGNAL(sslInitDone()), SLOT(ircServerConnectionSuccess()));
- connect(m_socket, SIGNAL(sslFailure(const QString&)), SIGNAL(sslInitFailure()));
- connect(m_socket, SIGNAL(sslFailure(const QString&)), SLOT(sslError(const QString&)));
+ connect(m_socket, TQT_SIGNAL(sslInitDone()), TQT_SLOT(ircServerConnectionSuccess()));
+ connect(m_socket, TQT_SIGNAL(sslFailure(const TQString&)), TQT_SIGNAL(sslInitFailure()));
+ connect(m_socket, TQT_SIGNAL(sslFailure(const TQString&)), TQT_SLOT(sslError(const TQString&)));
}
m_socket->enableWrite(false);
- connect(m_socket, SIGNAL(hostFound()), SLOT(lookupFinished()));
- connect(m_socket, SIGNAL(gotError(int)), SLOT(broken(int)) );
- connect(m_socket, SIGNAL(readyRead()), SLOT(incoming()));
- connect(m_socket, SIGNAL(closed()), SLOT(closed()));
+ connect(m_socket, TQT_SIGNAL(hostFound()), TQT_SLOT(lookupFinished()));
+ connect(m_socket, TQT_SIGNAL(gotError(int)), TQT_SLOT(broken(int)) );
+ connect(m_socket, TQT_SIGNAL(readyRead()), TQT_SLOT(incoming()));
+ connect(m_socket, TQT_SIGNAL(closed()), TQT_SLOT(closed()));
- m_socket->connect(getConnectionSettings().server().host(), QString::number(getConnectionSettings().server().port()));
+ m_socket->connect(getConnectionSettings().server().host(), TQString::number(getConnectionSettings().server().port()));
// set up the connection details
setPrefixes(m_serverNickPrefixModes, m_serverNickPrefixes);
@@ -430,27 +430,27 @@ void Server::showSSLDialog()
}
// set available channel types according to 005 RPL_ISUPPORT
-void Server::setChannelTypes(const QString &pre)
+void Server::setChannelTypes(const TQString &pre)
{
m_channelPrefixes = pre;
}
-QString Server::getChannelTypes() const
+TQString Server::getChannelTypes() const
{
return m_channelPrefixes;
}
// set user mode prefixes according to non-standard 005-Reply (see inputfilter.cpp)
-void Server::setPrefixes(const QString &modes, const QString& prefixes)
+void Server::setPrefixes(const TQString &modes, const TQString& prefixes)
{
- // NOTE: serverModes is QString::null, if server did not supply the
+ // NOTE: serverModes is TQString::null, if server did not supply the
// modes which relates to the network's nick-prefixes
m_serverNickPrefixModes = modes;
m_serverNickPrefixes = prefixes;
}
// return a nickname without possible mode character at the beginning
-void Server::mangleNicknameWithModes(QString& nickname,bool& isAdmin,bool& isOwner,
+void Server::mangleNicknameWithModes(TQString& nickname,bool& isAdmin,bool& isOwner,
bool& isOp,bool& isHalfop,bool& hasVoice)
{
isAdmin = false;
@@ -552,15 +552,15 @@ void Server::ircServerConnectionSuccess()
Konversation::ServerSettings serverSettings = getConnectionSettings().server();
- connect(this, SIGNAL(nicknameChanged(const QString&)), getStatusView(), SLOT(setNickname(const QString&)));
+ connect(this, TQT_SIGNAL(nicknameChanged(const TQString&)), getStatusView(), TQT_SLOT(setNickname(const TQString&)));
getStatusView()->appendServerMessage(i18n("Info"),i18n("Connected; logging in..."));
- QString connectString = "USER " +
+ TQString connectString = "USER " +
getIdentity()->getIdent() +
" 8 * :" + // 8 = +i; 4 = +w
getIdentity()->getRealName();
- QStringList ql;
+ TQStringList ql;
if (!serverSettings.password().isEmpty())
ql << "PASS " + serverSettings.password();
@@ -598,7 +598,7 @@ void Server::broken(int state)
}
emit resetLag();
- emit nicksNowOnline(this,QStringList(),true);
+ emit nicksNowOnline(this,TQStringList(),true);
updateAutoJoin();
@@ -606,7 +606,7 @@ void Server::broken(int state)
{
static_cast<KonversationApplication*>(kapp)->notificationHandler()->connectionFailure(getStatusView(), getServerName());
- QString error = i18n("Connection to Server %1 lost: %2.")
+ TQString error = i18n("Connection to Server %1 lost: %2.")
.arg(getConnectionSettings().server().host())
.arg(KNetwork::KSocketBase::errorString((KNetwork::KSocketBase::SocketError)state));
@@ -616,9 +616,9 @@ void Server::broken(int state)
}
}
-void Server::sslError(const QString& reason)
+void Server::sslError(const TQString& reason)
{
- QString error = i18n("Could not connect to %1:%2 using SSL encryption.Maybe the server does not support SSL, or perhaps you have the wrong port? %3")
+ TQString error = i18n("Could not connect to %1:%2 using SSL encryption.Maybe the server does not support SSL, or perhaps you have the wrong port? %3")
.arg(getConnectionSettings().server().host())
.arg(getConnectionSettings().server().port())
.arg(reason);
@@ -628,12 +628,12 @@ void Server::sslError(const QString& reason)
}
// Will be called from InputFilter as soon as the Welcome message was received
-void Server::connectionEstablished(const QString& ownHost)
+void Server::connectionEstablished(const TQString& ownHost)
{
// Some servers don't include the userhost in RPL_WELCOME, so we
// need to use RPL_USERHOST to get ahold of our IP later on
if (!ownHost.isEmpty())
- KNetwork::KResolver::resolveAsync(this,SLOT(gotOwnResolvedHostByWelcome(KResolverResults)),ownHost,"0");
+ KNetwork::KResolver::resolveAsync(this,TQT_SLOT(gotOwnResolvedHostByWelcome(KResolverResults)),ownHost,"0");
updateConnectionState(Konversation::SSConnected);
@@ -648,7 +648,7 @@ void Server::connectionEstablished(const QString& ownHost)
requestUserhost(getNickname());
// Start the PINGPONG match
- QTimer::singleShot(1000 /*1 sec*/, this, SLOT(sendPing()));
+ TQTimer::singleShot(1000 /*1 sec*/, this, TQT_SLOT(sendPing()));
// Recreate away state if we were set away prior to a reconnect.
if (m_away)
@@ -672,12 +672,12 @@ void Server::registerWithServices()
}
//FIXME operator[] inserts an empty T& so each destination might just as well have its own key storage
-QCString Server::getKeyForRecipient(const QString& recipient) const
+TQCString Server::getKeyForRecipient(const TQString& recipient) const
{
return m_keyMap[recipient];
}
-void Server::setKeyForRecipient(const QString& recipient, const QCString& key)
+void Server::setKeyForRecipient(const TQString& recipient, const TQCString& key)
{
m_keyMap[recipient] = key;
}
@@ -697,8 +697,8 @@ void Server::quitServer()
// a QUIT).
updateConnectionState(Konversation::SSDeliberatelyDisconnected);
- QString command(Preferences::commandChar()+"QUIT");
- Konversation::OutputFilterResult result = getOutputFilter()->parse(getNickname(),command, QString());
+ TQString command(Preferences::commandChar()+"QUIT");
+ Konversation::OutputFilterResult result = getOutputFilter()->parse(getNickname(),command, TQString());
queue(result.toServer, HighPriority);
m_socket->enableRead(false);
@@ -710,33 +710,33 @@ void Server::quitServer()
getStatusView()->appendServerMessage(i18n("Info"), i18n("Disconnected from %1.").arg(getConnectionSettings().server().host()));
}
-void Server::notifyAction(const QString& nick)
+void Server::notifyAction(const TQString& nick)
{
// parse wildcards (toParse,nickname,channelName,nickList,parameter)
- QString out = parseWildcards(Preferences::notifyDoubleClickAction(),
+ TQString out = parseWildcards(Preferences::notifyDoubleClickAction(),
getNickname(),
- QString(),
- QString(),
+ TQString(),
+ TQString(),
nick,
- QString());
+ TQString());
// Send all strings, one after another
- QStringList outList = QStringList::split('\n',out);
+ TQStringList outList = TQStringList::split('\n',out);
for (unsigned int index=0; index<outList.count(); ++index)
{
- Konversation::OutputFilterResult result = getOutputFilter()->parse(getNickname(),outList[index],QString());
+ Konversation::OutputFilterResult result = getOutputFilter()->parse(getNickname(),outList[index],TQString());
queue(result.toServer);
} // endfor
}
-void Server::notifyResponse(const QString& nicksOnline)
+void Server::notifyResponse(const TQString& nicksOnline)
{
bool nicksOnlineChanged = false;
- QStringList actualList = QStringList::split(' ',nicksOnline);
- QString lcActual = ' ' + nicksOnline + ' ';
- QString lcPrevISON = ' ' + (m_prevISONList.join(" ")) + ' ';
+ TQStringList actualList = TQStringList::split(' ',nicksOnline);
+ TQString lcActual = ' ' + nicksOnline + ' ';
+ TQString lcPrevISON = ' ' + (m_prevISONList.join(" ")) + ' ';
- QStringList::iterator it;
+ TQStringList::iterator it;
//Are any nicks gone offline
for (it = m_prevISONList.begin(); it != m_prevISONList.end(); ++it)
@@ -784,7 +784,7 @@ void Server::notifyTimeout()
if (Preferences::useNotify())
{
// But only if there actually are nicks in the notify list
- QString list = getISONListString();
+ TQString list = getISONListString();
if (!list.isEmpty()) queue("ISON "+list, LowPriority);
@@ -795,27 +795,27 @@ void Server::autoCommandsAndChannels()
{
if (getServerGroup() && !getServerGroup()->connectCommands().isEmpty())
{
- QString connectCommands = getServerGroup()->connectCommands();
+ TQString connectCommands = getServerGroup()->connectCommands();
if (!getNickname().isEmpty())
connectCommands.replace("%nick", getNickname());
- QStringList connectCommandsList = QStringList::split(";", connectCommands);
- QStringList::iterator iter;
+ TQStringList connectCommandsList = TQStringList::split(";", connectCommands);
+ TQStringList::iterator iter;
for (iter = connectCommandsList.begin(); iter != connectCommandsList.end(); ++iter)
{
- QString output(*iter);
+ TQString output(*iter);
output = output.simplifyWhiteSpace();
getOutputFilter()->replaceAliases(output);
- Konversation::OutputFilterResult result = getOutputFilter()->parse(getNickname(),output,QString());
+ Konversation::OutputFilterResult result = getOutputFilter()->parse(getNickname(),output,TQString());
queue(result.toServer);
}
}
if (getAutoJoin())
{
- for ( QStringList::Iterator it = m_autoJoinCommands.begin(); it != m_autoJoinCommands.end(); ++it )
+ for ( TQStringList::Iterator it = m_autoJoinCommands.begin(); it != m_autoJoinCommands.end(); ++it )
queue((*it));
}
}
@@ -846,20 +846,20 @@ void Server::resetNickSelection()
m_nickIndices.append(len);
}
-QString Server::getNextNickname()
+TQString Server::getNextNickname()
{
//if the identity changed underneath us (likely impossible), start over
if (m_referenceNicklist != getIdentity()->getNicknameList())
resetNickSelection();
- QString newNick = getIdentity()->getNickname(m_nickIndices.front());
+ TQString newNick = getIdentity()->getNickname(m_nickIndices.front());
m_nickIndices.pop_front();
if (newNick.isNull())
{
- QString inputText = i18n("No nicknames from the \"%1\" identity were accepted by the connection \"%2\".\nPlease enter a new one or press Cancel to disconnect:").arg(getIdentity()->getName()).arg(getDisplayName());
+ TQString inputText = i18n("No nicknames from the \"%1\" identity were accepted by the connection \"%2\".\nPlease enter a new one or press Cancel to disconnect:").arg(getIdentity()->getName()).arg(getDisplayName());
newNick = KInputDialog::getText(i18n("Nickname error"), inputText,
- QString(), 0, getStatusView(), "NickChangeDialog");
+ TQString(), 0, getStatusView(), "NickChangeDialog");
}
return newNick;
@@ -872,12 +872,12 @@ void Server::processIncomingData()
if (!m_inputBuffer.isEmpty() && !m_processingIncoming)
{
m_processingIncoming = true;
- QString front(m_inputBuffer.front());
+ TQString front(m_inputBuffer.front());
m_inputBuffer.pop_front();
if (m_rawLog)
{
- QString toRaw = front;
- m_rawLog->appendRaw("&gt;&gt; " + toRaw.replace("&","&amp;").replace("<","&lt;").replace(">","&gt;").replace(QRegExp("\\s"), "&nbsp;"));
+ TQString toRaw = front;
+ m_rawLog->appendRaw("&gt;&gt; " + toRaw.replace("&","&amp;").replace("<","&lt;").replace(">","&gt;").replace(TQRegExp("\\s"), "&nbsp;"));
}
m_inputFilter.parseLine(front);
m_processingIncoming = false;
@@ -895,7 +895,7 @@ void Server::incoming()
// else we will stall when displaying MOTD etc.
int max_bytes = m_socket->bytesAvailable();
- QByteArray buffer(max_bytes+1);
+ TQByteArray buffer(max_bytes+1);
int len = 0;
// Read at max "max_bytes" bytes into "buffer"
@@ -916,10 +916,10 @@ void Server::incoming()
buffer[len] = 0;
- QCString qcsBuffer = m_inputBufferIncomplete + QCString(buffer);
+ TQCString qcsBuffer = m_inputBufferIncomplete + TQCString(buffer);
// split buffer to lines
- QValueList<QCString> qcsBufferLines;
+ TQValueList<TQCString> qcsBufferLines;
int lastLFposition = -1;
for( int nextLFposition ; ( nextLFposition = qcsBuffer.find('\n', lastLFposition+1) ) != -1 ; lastLFposition = nextLFposition )
qcsBufferLines << qcsBuffer.mid(lastLFposition+1, nextLFposition-lastLFposition-1);
@@ -931,13 +931,13 @@ void Server::incoming()
{
// Pre parsing is needed in case encryption/decryption is needed
// BEGIN set channel encoding if specified
- QString senderNick;
+ TQString senderNick;
bool isServerMessage = false;
- QString channelKey;
- QTextCodec* codec = getIdentity()->getCodec();
- QCString front = qcsBufferLines.front();
+ TQString channelKey;
+ TQTextCodec* codec = getIdentity()->getCodec();
+ TQCString front = qcsBufferLines.front();
- QStringList lineSplit = QStringList::split(" ",codec->toUnicode(front));
+ TQStringList lineSplit = TQStringList::split(" ",codec->toUnicode(front));
if( lineSplit.count() >= 1 )
{
@@ -953,7 +953,7 @@ void Server::incoming()
}
// BEGIN pre-parse to know where the message belongs to
- QString command = lineSplit[0].lower();
+ TQString command = lineSplit[0].lower();
if( isServerMessage )
{
if( lineSplit.count() >= 3 )
@@ -999,11 +999,11 @@ void Server::incoming()
bool isUtf8 = Konversation::isUtf8(front);
if( isUtf8 )
- m_inputBuffer << QString::fromUtf8(front);
+ m_inputBuffer << TQString::fromUtf8(front);
else
{
// check setting
- QString channelEncoding;
+ TQString channelEncoding;
if( !channelKey.isEmpty() )
{
channelEncoding = Preferences::channelEncoding(getDisplayName(), channelKey);
@@ -1016,7 +1016,7 @@ void Server::incoming()
// if channel encoding is utf-8 and the string is definitely not utf-8
// then try latin-1
if ( !isUtf8 && codec->mibEnum() == 106 )
- codec = QTextCodec::codecForMib( 4 /* iso-8859-1 */ );
+ codec = TQTextCodec::codecForMib( 4 /* iso-8859-1 */ );
m_inputBuffer << codec->toUnicode(front);
}
@@ -1033,7 +1033,7 @@ void Server::incoming()
This is necessary because the irc server will clip messages so that the
client receives a maximum of 512 bytes at once.
*/
-int Server::getPreLength(const QString& command, const QString& dest)
+int Server::getPreLength(const TQString& command, const TQString& dest)
{
NickInfo* info = getNickInfo(getNickname());
int hostMaskLength = 0;
@@ -1050,11 +1050,11 @@ int Server::getPreLength(const QString& command, const QString& dest)
}
//Commands greater than 1 have localizeable text: 0 1 2 3 4 5 6
-static QStringList outcmds=QStringList::split(QChar(' '),"WHO QUIT PRIVMSG NOTICE KICK PART TOPIC");
+static TQStringList outcmds=TQStringList::split(TQChar(' '),"WHO QUIT PRIVMSG NOTICE KICK PART TOPIC");
-int Server::_send_internal(QString outputLine)
+int Server::_send_internal(TQString outputLine)
{
- QStringList outputLineSplit=QStringList::split(" ", outputLine);
+ TQStringList outputLineSplit=TQStringList::split(" ", outputLine);
//Lets cache the uppercase command so we don't miss or reiterate too much
int outboundCommand=outcmds.findIndex(outputLineSplit[0].upper());
@@ -1076,13 +1076,13 @@ int Server::_send_internal(QString outputLine)
updateConnectionState(Konversation::SSDeliberatelyDisconnected);
// set channel encoding if specified
- QString channelCodecName;
+ TQString channelCodecName;
//[ PRIVMSG | NOTICE | KICK | PART | TOPIC ] target :message
if (outputLineSplit.count() > 2 && outboundCommand > 1)
channelCodecName=Preferences::channelEncoding(getDisplayName(), outputLineSplit[1]);
- QTextCodec* codec;
+ TQTextCodec* codec;
if (channelCodecName.isEmpty())
codec = getIdentity()->getCodec();
else
@@ -1094,9 +1094,9 @@ int Server::_send_internal(QString outputLine)
int outlen=outputLine.length();
//leaving this done twice for now, i'm uncertain of the implications of not encoding other commands
- QCString encoded=codec->fromUnicode(outputLine, outlen);
+ TQCString encoded=codec->fromUnicode(outputLine, outlen);
- QString blowfishKey=getKeyForRecipient(outputLineSplit[1]);
+ TQString blowfishKey=getKeyForRecipient(outputLineSplit[1]);
if (!blowfishKey.isEmpty() && outboundCommand >1)
{
int colon = outputLine.find(':');
@@ -1104,13 +1104,13 @@ int Server::_send_internal(QString outputLine)
{
colon++;
- QString pay(outputLine.mid(colon));
+ TQString pay(outputLine.mid(colon));
int len=pay.length();
//only encode the actual user text, IRCD *should* desire only ASCII 31 < x < 127 for protocol elements
- QCString payload=codec->fromUnicode(pay, len);
+ TQCString payload=codec->fromUnicode(pay, len);
//apparently channel name isn't a protocol element...
len=outputLineSplit[1].length();
- QCString dest=codec->fromUnicode(outputLineSplit[1], len);
+ TQCString dest=codec->fromUnicode(outputLineSplit[1], len);
if (outboundCommand == 2 || outboundCommand == 6) // outboundCommand == 3
{
@@ -1141,7 +1141,7 @@ int Server::_send_internal(QString outputLine)
return sout;
}
-void Server::toServer(QString&s, IRCQueue* q)
+void Server::toServer(TQString&s, IRCQueue* q)
{
int sizesent = _send_internal(s);
@@ -1164,7 +1164,7 @@ bool Server::validQueue(QueuePriority priority)
return false;
}
-bool Server::queue(const QString& line, QueuePriority priority)
+bool Server::queue(const TQString& line, QueuePriority priority)
{
if (!line.isEmpty() && validQueue(priority))
{
@@ -1175,7 +1175,7 @@ bool Server::queue(const QString& line, QueuePriority priority)
return false;
}
-bool Server::queueList(const QStringList& buffer, QueuePriority priority)
+bool Server::queueList(const TQStringList& buffer, QueuePriority priority)
{
if (buffer.isEmpty() || !validQueue(priority))
return false;
@@ -1184,7 +1184,7 @@ bool Server::queueList(const QStringList& buffer, QueuePriority priority)
for(unsigned int i=0;i<buffer.count();i++)
{
- QString line=*buffer.at(i);
+ TQString line=*buffer.at(i);
if (!line.isEmpty())
out.enqueue(line);
}
@@ -1225,7 +1225,7 @@ void Server::closed()
broken(m_socket->error());
}
-void Server::dcopRaw(const QString& command)
+void Server::dcopRaw(const TQString& command)
{
if(command.startsWith(Preferences::commandChar()))
{
@@ -1235,7 +1235,7 @@ void Server::dcopRaw(const QString& command)
queue(command);
}
-void Server::dcopSay(const QString& target,const QString& command)
+void Server::dcopSay(const TQString& target,const TQString& command)
{
if(isAChannel(target))
{
@@ -1265,20 +1265,20 @@ void Server::dcopSay(const QString& target,const QString& command)
}
}
-void Server::dcopInfo(const QString& string)
+void Server::dcopInfo(const TQString& string)
{
appendMessageToFrontmost(i18n("DCOP"),string);
}
-void Server::ctcpReply(const QString &receiver,const QString &text)
+void Server::ctcpReply(const TQString &receiver,const TQString &text)
{
queue("NOTICE "+receiver+" :"+'\x01'+text+'\x01');
}
// Given a nickname, returns NickInfo object. 0 if not found.
-NickInfoPtr Server::getNickInfo(const QString& nickname)
+NickInfoPtr Server::getNickInfo(const TQString& nickname)
{
- QString lcNickname(nickname.lower());
+ TQString lcNickname(nickname.lower());
if (m_allNicks.contains(lcNickname))
{
NickInfoPtr nickinfo = m_allNicks[lcNickname];
@@ -1291,13 +1291,13 @@ NickInfoPtr Server::getNickInfo(const QString& nickname)
// Given a nickname, returns an existing NickInfo object, or creates a new NickInfo object.
// Returns pointer to the found or created NickInfo object.
-NickInfoPtr Server::obtainNickInfo(const QString& nickname)
+NickInfoPtr Server::obtainNickInfo(const TQString& nickname)
{
NickInfoPtr nickInfo = getNickInfo(nickname);
if (!nickInfo)
{
nickInfo = new NickInfo(nickname, this);
- m_allNicks.insert(QString(nickname.lower()), nickInfo);
+ m_allNicks.insert(TQString(nickname.lower()), nickInfo);
}
return nickInfo;
}
@@ -1307,9 +1307,9 @@ const NickInfoMap* Server::getAllNicks() { return &m_allNicks; }
// Returns the list of members for a channel in the joinedChannels list.
// 0 if channel is not in the joinedChannels list.
// Using code must not alter the list.
-const ChannelNickMap *Server::getJoinedChannelMembers(const QString& channelName) const
+const ChannelNickMap *Server::getJoinedChannelMembers(const TQString& channelName) const
{
- QString lcChannelName = channelName.lower();
+ TQString lcChannelName = channelName.lower();
if (m_joinedChannels.contains(lcChannelName))
return m_joinedChannels[lcChannelName];
else
@@ -1319,9 +1319,9 @@ const ChannelNickMap *Server::getJoinedChannelMembers(const QString& channelName
// Returns the list of members for a channel in the unjoinedChannels list.
// 0 if channel is not in the unjoinedChannels list.
// Using code must not alter the list.
-const ChannelNickMap *Server::getUnjoinedChannelMembers(const QString& channelName) const
+const ChannelNickMap *Server::getUnjoinedChannelMembers(const TQString& channelName) const
{
- QString lcChannelName = channelName.lower();
+ TQString lcChannelName = channelName.lower();
if (m_unjoinedChannels.contains(lcChannelName))
return m_unjoinedChannels[lcChannelName];
else
@@ -1331,7 +1331,7 @@ const ChannelNickMap *Server::getUnjoinedChannelMembers(const QString& channelNa
// Searches the Joined and Unjoined lists for the given channel and returns the member list.
// 0 if channel is not in either list.
// Using code must not alter the list.
-const ChannelNickMap *Server::getChannelMembers(const QString& channelName) const
+const ChannelNickMap *Server::getChannelMembers(const TQString& channelName) const
{
const ChannelNickMap *members = getJoinedChannelMembers(channelName);
if (members)
@@ -1342,9 +1342,9 @@ const ChannelNickMap *Server::getChannelMembers(const QString& channelName) cons
// Returns pointer to the ChannelNick (mode and pointer to NickInfo) for a given channel and nickname.
// 0 if not found.
-ChannelNickPtr Server::getChannelNick(const QString& channelName, const QString& nickname)
+ChannelNickPtr Server::getChannelNick(const TQString& channelName, const TQString& nickname)
{
- QString lcNickname = nickname.lower();
+ TQString lcNickname = nickname.lower();
const ChannelNickMap *channelNickMap = getChannelMembers(channelName);
if (channelNickMap)
{
@@ -1363,17 +1363,17 @@ ChannelNickPtr Server::getChannelNick(const QString& channelName, const QString&
// is in the watch list, adds the channel and nick to the unjoinedChannels list.
// If mode != 99, sets the mode for the nick in the channel.
// Returns the NickInfo object if nick is on any lists, otherwise 0.
-ChannelNickPtr Server::setChannelNick(const QString& channelName, const QString& nickname, unsigned int mode)
+ChannelNickPtr Server::setChannelNick(const TQString& channelName, const TQString& nickname, unsigned int mode)
{
- QString lcNickname = nickname.lower();
+ TQString lcNickname = nickname.lower();
// If already on a list, update mode.
ChannelNickPtr channelNick = getChannelNick(channelName, lcNickname);
if (!channelNick)
{
// Get watch list from preferences.
- QString watchlist=getWatchListString();
+ TQString watchlist=getWatchListString();
// Create a lower case nick list from the watch list.
- QStringList watchLowerList=QStringList::split(' ',watchlist.lower());
+ TQStringList watchLowerList=TQStringList::split(' ',watchlist.lower());
// If on the watch list, add channel and nick to unjoinedChannels list.
if (watchLowerList.find(lcNickname) != watchLowerList.end())
{
@@ -1388,10 +1388,10 @@ ChannelNickPtr Server::setChannelNick(const QString& channelName, const QString&
}
// Returns a list of all the joined channels that a nick is in.
-QStringList Server::getNickJoinedChannels(const QString& nickname)
+TQStringList Server::getNickJoinedChannels(const TQString& nickname)
{
- QString lcNickname = nickname.lower();
- QStringList channellist;
+ TQString lcNickname = nickname.lower();
+ TQStringList channellist;
ChannelMembershipMap::ConstIterator channel;
for( channel = m_joinedChannels.begin(); channel != m_joinedChannels.end(); ++channel )
{
@@ -1401,10 +1401,10 @@ QStringList Server::getNickJoinedChannels(const QString& nickname)
}
// Returns a list of all the channels (joined or unjoined) that a nick is in.
-QStringList Server::getNickChannels(const QString& nickname)
+TQStringList Server::getNickChannels(const TQString& nickname)
{
- QString lcNickname = nickname.lower();
- QStringList channellist;
+ TQString lcNickname = nickname.lower();
+ TQStringList channellist;
ChannelMembershipMap::ConstIterator channel;
for( channel = m_joinedChannels.begin(); channel != m_joinedChannels.end(); ++channel )
{
@@ -1417,40 +1417,40 @@ QStringList Server::getNickChannels(const QString& nickname)
return channellist;
}
-bool Server::isNickOnline(const QString &nickname)
+bool Server::isNickOnline(const TQString &nickname)
{
NickInfoPtr nickInfo = getNickInfo(nickname);
return (nickInfo != 0);
}
-QString Server::getOwnIpByNetworkInterface()
+TQString Server::getOwnIpByNetworkInterface()
{
return m_socket->localAddress().nodeName();
}
-QString Server::getOwnIpByServerMessage()
+TQString Server::getOwnIpByServerMessage()
{
if(!m_ownIpByWelcome.isEmpty())
return m_ownIpByWelcome;
else if(!m_ownIpByUserhost.isEmpty())
return m_ownIpByUserhost;
else
- return QString();
+ return TQString();
}
class Query* Server::addQuery(const NickInfoPtr & nickInfo, bool weinitiated)
{
- QString nickname = nickInfo->getNickname();
+ TQString nickname = nickInfo->getNickname();
// Only create new query object if there isn't already one with the same name
class Query* query=getQueryByName(nickname);
if (!query)
{
- QString lcNickname = nickname.lower();
+ TQString lcNickname = nickname.lower();
query = getViewContainer()->addQuery(this, nickInfo, weinitiated);
- connect(query, SIGNAL(sendFile(const QString&)),this, SLOT(requestDccSend(const QString&)));
- connect(this, SIGNAL(serverOnline(bool)), query, SLOT(serverOnline(bool)));
+ connect(query, TQT_SIGNAL(sendFile(const TQString&)),this, TQT_SLOT(requestDccSend(const TQString&)));
+ connect(this, TQT_SIGNAL(serverOnline(bool)), query, TQT_SLOT(serverOnline(bool)));
// Append query to internal list
m_queryList.append(query);
@@ -1469,7 +1469,7 @@ class Query* Server::addQuery(const NickInfoPtr & nickInfo, bool weinitiated)
return query;
}
-void Server::closeQuery(const QString &name)
+void Server::closeQuery(const TQString &name)
{
class Query* query = getQueryByName(name);
removeQuery(query);
@@ -1477,12 +1477,12 @@ void Server::closeQuery(const QString &name)
// Update NickInfo. If no longer on any lists, delete it altogether, but
// only if not on the watch list. ISON replies will determine whether the NickInfo
// is deleted altogether in that case.
- QString lcNickname = name.lower();
+ TQString lcNickname = name.lower();
m_queryNicks.remove(lcNickname);
if (!isWatchedNick(name)) deleteNickIfUnlisted(name);
}
-void Server::closeChannel(const QString& name)
+void Server::closeChannel(const TQString& name)
{
kdDebug() << "Server::closeChannel(" << name << ")" << endl;
Channel* channelToClose = getChannelByName(name);
@@ -1497,54 +1497,54 @@ void Server::closeChannel(const QString& name)
void Server::requestChannelList()
{
- m_inputFilter.setAutomaticRequest("LIST", QString(), true);
- queue(QString("LIST"));
+ m_inputFilter.setAutomaticRequest("LIST", TQString(), true);
+ queue(TQString("LIST"));
}
-void Server::requestWhois(const QString& nickname)
+void Server::requestWhois(const TQString& nickname)
{
m_inputFilter.setAutomaticRequest("WHOIS", nickname, true);
queue("WHOIS "+nickname, LowPriority);
}
-void Server::requestWho(const QString& channel)
+void Server::requestWho(const TQString& channel)
{
m_inputFilter.setAutomaticRequest("WHO", channel, true);
queue("WHO "+channel, LowPriority);
}
-void Server::requestUserhost(const QString& nicks)
+void Server::requestUserhost(const TQString& nicks)
{
- QStringList nicksList = QStringList::split(" ", nicks);
- for(QStringList::ConstIterator it=nicksList.begin() ; it!=nicksList.end() ; ++it)
+ TQStringList nicksList = TQStringList::split(" ", nicks);
+ for(TQStringList::ConstIterator it=nicksList.begin() ; it!=nicksList.end() ; ++it)
m_inputFilter.setAutomaticRequest("USERHOST", *it, true);
queue("USERHOST "+nicks, LowPriority);
}
-void Server::requestTopic(const QString& channel)
+void Server::requestTopic(const TQString& channel)
{
m_inputFilter.setAutomaticRequest("TOPIC", channel, true);
queue("TOPIC "+channel, LowPriority);
}
-void Server::resolveUserhost(const QString& nickname)
+void Server::resolveUserhost(const TQString& nickname)
{
m_inputFilter.setAutomaticRequest("WHOIS", nickname, true);
m_inputFilter.setAutomaticRequest("DNS", nickname, true);
queue("WHOIS "+nickname, LowPriority); //FIXME when is this really used?
}
-void Server::requestBan(const QStringList& users,const QString& channel,const QString& a_option)
+void Server::requestBan(const TQStringList& users,const TQString& channel,const TQString& a_option)
{
- QString hostmask;
- QString option=a_option.lower();
+ TQString hostmask;
+ TQString option=a_option.lower();
Channel* targetChannel=getChannelByName(channel);
for(unsigned int index=0;index<users.count();index++)
{
// first, set the ban mask to the specified nick
- QString mask=users[index];
+ TQString mask=users[index];
// did we specify an option?
if(!option.isEmpty())
{
@@ -1553,7 +1553,7 @@ void Server::requestBan(const QStringList& users,const QString& channel,const QS
// if we found the nick try to find their hostmask
if(targetNick)
{
- QString hostmask=targetNick->getChannelNick()->getHostmask();
+ TQString hostmask=targetNick->getChannelNick()->getHostmask();
// if we found the hostmask, add it to the ban mask
if(!hostmask.isEmpty())
{
@@ -1577,7 +1577,7 @@ void Server::requestBan(const QStringList& users,const QString& channel,const QS
}
}
-void Server::requestUnban(const QString& mask,const QString& channel)
+void Server::requestUnban(const TQString& mask,const TQString& channel)
{
Konversation::OutputFilterResult result = getOutputFilter()->execUnban(mask,channel);
queue(result.toServer);
@@ -1585,28 +1585,28 @@ void Server::requestUnban(const QString& mask,const QString& channel)
void Server::requestDccSend()
{
- requestDccSend(QString());
+ requestDccSend(TQString());
}
-void Server::sendURIs(const QStrList& uris, const QString& nick)
+void Server::sendURIs(const TQStrList& uris, const TQString& nick)
{
- for (QStrListIterator it(uris) ; *it; ++it)
+ for (TQStrListIterator it(uris) ; *it; ++it)
addDccSend(nick,KURL(*it));
}
-void Server::requestDccSend(const QString &a_recipient)
+void Server::requestDccSend(const TQString &a_recipient)
{
- QString recipient(a_recipient);
+ TQString recipient(a_recipient);
// if we don't have a recipient yet, let the user select one
if(recipient.isEmpty())
{
- QStringList nickList;
+ TQStringList nickList;
Channel* lookChannel=m_channelList.first();
// fill nickList with all nicks we know about
while (lookChannel)
{
- QPtrList<Nick> nicks=lookChannel->getNickList();
+ TQPtrList<Nick> nicks=lookChannel->getNickList();
Nick* lookNick=nicks.first();
while(lookNick)
{
@@ -1631,7 +1631,7 @@ void Server::requestDccSend(const QString &a_recipient)
{
KURL::List fileURLs=KFileDialog::getOpenURLs(
":lastDccDir",
- QString(),
+ TQString(),
getViewContainer()->getWindow(),
i18n("Select File(s) to Send to %1").arg(recipient)
);
@@ -1650,18 +1650,18 @@ void Server::slotNewDccTransferItemQueued(DccTransfer* transfer)
kdDebug() << "Server::slotNewDccTranfserItemQueued(): connecting slots for " << transfer->getFileName() << " [" << transfer->getType() << "]" << endl;
if ( transfer->getType() == DccTransfer::Receive )
{
- connect( transfer, SIGNAL( done( DccTransfer* ) ), this, SLOT( dccGetDone( DccTransfer* ) ) );
- connect( transfer, SIGNAL( statusChanged( DccTransfer*, int, int ) ), this, SLOT( dccStatusChanged( DccTransfer*, int, int ) ) );
+ connect( transfer, TQT_SIGNAL( done( DccTransfer* ) ), this, TQT_SLOT( dccGetDone( DccTransfer* ) ) );
+ connect( transfer, TQT_SIGNAL( statusChanged( DccTransfer*, int, int ) ), this, TQT_SLOT( dccStatusChanged( DccTransfer*, int, int ) ) );
}
else
{
- connect( transfer, SIGNAL( done( DccTransfer* ) ), this, SLOT( dccSendDone( DccTransfer* ) ) );
- connect( transfer, SIGNAL( statusChanged( DccTransfer*, int, int ) ), this, SLOT( dccStatusChanged( DccTransfer*, int, int ) ) );
+ connect( transfer, TQT_SIGNAL( done( DccTransfer* ) ), this, TQT_SLOT( dccSendDone( DccTransfer* ) ) );
+ connect( transfer, TQT_SIGNAL( statusChanged( DccTransfer*, int, int ) ), this, TQT_SLOT( dccStatusChanged( DccTransfer*, int, int ) ) );
}
}
}
-void Server::addDccSend(const QString &recipient,KURL fileURL, const QString &altFileName, uint fileSize)
+void Server::addDccSend(const TQString &recipient,KURL fileURL, const TQString &altFileName, uint fileSize)
{
if (!fileURL.isValid()) return;
@@ -1683,7 +1683,7 @@ void Server::addDccSend(const QString &recipient,KURL fileURL, const QString &al
newDcc->start();
}
-void Server::addDccGet(const QString &sourceNick, const QStringList &dccArguments)
+void Server::addDccGet(const TQString &sourceNick, const TQStringList &dccArguments)
{
emit addDccPanel();
@@ -1702,7 +1702,7 @@ void Server::addDccGet(const QString &sourceNick, const QStringList &dccArgument
if ( newDcc->queue() )
{
- QString showfile = newDcc->getFileName();
+ TQString showfile = newDcc->getFileName();
if(showfile.startsWith("\"") && showfile.endsWith("\""))
showfile = showfile.mid(1, showfile.length() - 2);
@@ -1718,22 +1718,22 @@ void Server::addDccGet(const QString &sourceNick, const QStringList &dccArgument
}
}
-void Server::openDccChat(const QString& nickname)
+void Server::openDccChat(const TQString& nickname)
{
- emit addDccChat(getNickname(),nickname,QStringList(),true);
+ emit addDccChat(getNickname(),nickname,TQStringList(),true);
}
-void Server::requestDccChat(const QString& partnerNick, const QString& numericalOwnIp, const QString& ownPort)
+void Server::requestDccChat(const TQString& partnerNick, const TQString& numericalOwnIp, const TQString& ownPort)
{
- queue(QString("PRIVMSG %1 :\001DCC CHAT chat %2 %3\001").arg(partnerNick).arg(numericalOwnIp).arg(ownPort));
+ queue(TQString("PRIVMSG %1 :\001DCC CHAT chat %2 %3\001").arg(partnerNick).arg(numericalOwnIp).arg(ownPort));
}
-void Server::dccSendRequest(const QString &partner, const QString &fileName, const QString &address, const QString &port, unsigned long size)
+void Server::dccSendRequest(const TQString &partner, const TQString &fileName, const TQString &address, const TQString &port, unsigned long size)
{
Konversation::OutputFilterResult result = getOutputFilter()->sendRequest(partner,fileName,address,port,size);
queue(result.toServer);
- QString showfile = fileName;
+ TQString showfile = fileName;
if(showfile.startsWith("\"") && showfile.endsWith("\""))
showfile = showfile.mid(1, showfile.length() - 2);
@@ -1745,13 +1745,13 @@ void Server::dccSendRequest(const QString &partner, const QString &fileName, con
( size == 0 ) ? i18n( "unknown size" ) : KIO::convertSize( size ) ) );
}
-void Server::dccPassiveSendRequest(const QString& recipient,const QString& fileName,const QString& address,unsigned long size,const QString& token)
+void Server::dccPassiveSendRequest(const TQString& recipient,const TQString& fileName,const TQString& address,unsigned long size,const TQString& token)
{
Konversation::OutputFilterResult result = getOutputFilter()->passiveSendRequest(recipient,fileName,address,size,token);
queue(result.toServer);
}
-void Server::dccResumeGetRequest(const QString &sender, const QString &fileName, const QString &port, KIO::filesize_t startAt)
+void Server::dccResumeGetRequest(const TQString &sender, const TQString &fileName, const TQString &port, KIO::filesize_t startAt)
{
Konversation::OutputFilterResult result;
@@ -1763,13 +1763,13 @@ void Server::dccResumeGetRequest(const QString &sender, const QString &fileName,
queue(result.toServer);
}
-void Server::dccReverseSendAck(const QString& partnerNick,const QString& fileName,const QString& ownAddress,const QString& ownPort,unsigned long size,const QString& reverseToken)
+void Server::dccReverseSendAck(const TQString& partnerNick,const TQString& fileName,const TQString& ownAddress,const TQString& ownPort,unsigned long size,const TQString& reverseToken)
{
Konversation::OutputFilterResult result = getOutputFilter()->acceptPassiveSendRequest(partnerNick,fileName,ownAddress,ownPort,size,reverseToken);
queue(result.toServer);
}
-void Server::startReverseDccSendTransfer(const QString& sourceNick,const QStringList& dccArguments)
+void Server::startReverseDccSendTransfer(const TQString& sourceNick,const TQStringList& dccArguments)
{
DccTransferManager* dtm = KonversationApplication::instance()->getDccTransferManager();
@@ -1781,7 +1781,7 @@ void Server::startReverseDccSendTransfer(const QString& sourceNick,const QString
dccArguments[4] // Reverse DCC token
) == 0 )
{
- QString showfile = dccArguments[0];
+ TQString showfile = dccArguments[0];
if(showfile.startsWith("\"") && showfile.endsWith("\""))
showfile = showfile.mid(1, showfile.length() - 2);
@@ -1797,17 +1797,17 @@ void Server::startReverseDccSendTransfer(const QString& sourceNick,const QString
}
-void Server::resumeDccGetTransfer(const QString &sourceNick, const QStringList &dccArguments)
+void Server::resumeDccGetTransfer(const TQString &sourceNick, const TQStringList &dccArguments)
{
DccTransferManager* dtm = KonversationApplication::instance()->getDccTransferManager();
- QString fileName( dccArguments[0] );
- QString ownPort( dccArguments[1] );
+ TQString fileName( dccArguments[0] );
+ TQString ownPort( dccArguments[1] );
unsigned long position = dccArguments[2].toULong();
DccTransferRecv* dccTransfer = dtm->resumeDownload( connectionId(), sourceNick, fileName, ownPort, position );
- QString showfile = fileName;
+ TQString showfile = fileName;
if(showfile.startsWith("\"") && showfile.endsWith("\""))
showfile = showfile.mid(1, showfile.length() - 2);
@@ -1819,7 +1819,7 @@ void Server::resumeDccGetTransfer(const QString &sourceNick, const QStringList &
"Resuming download of \"%1\" from %2 starting at %3% of %4..." )
.arg( showfile,
sourceNick,
- QString::number( dccTransfer->getProgress() ),
+ TQString::number( dccTransfer->getProgress() ),
( dccTransfer->getFileSize() == 0 ) ? i18n( "unknown size" ) : KIO::convertSize( dccTransfer->getFileSize() ) ) );
}
else
@@ -1832,17 +1832,17 @@ void Server::resumeDccGetTransfer(const QString &sourceNick, const QStringList &
}
}
-void Server::resumeDccSendTransfer(const QString &sourceNick, const QStringList &dccArguments)
+void Server::resumeDccSendTransfer(const TQString &sourceNick, const TQStringList &dccArguments)
{
DccTransferManager* dtm = KonversationApplication::instance()->getDccTransferManager();
- QString fileName( dccArguments[0] );
- QString ownPort( dccArguments[1] );
+ TQString fileName( dccArguments[0] );
+ TQString ownPort( dccArguments[1] );
unsigned long position = dccArguments[2].toULong();
DccTransferSend* dccTransfer = dtm->resumeUpload( connectionId(), sourceNick, fileName, ownPort, position );
- QString showfile = fileName;
+ TQString showfile = fileName;
if(showfile.startsWith("\"") && showfile.endsWith("\""))
showfile = showfile.mid(1, showfile.length() - 2);
@@ -1854,7 +1854,7 @@ void Server::resumeDccSendTransfer(const QString &sourceNick, const QStringList
"Resuming upload of \"%1\" to %2 starting at %3% of %4...")
.arg( showfile,
sourceNick,
- QString::number(dccTransfer->getProgress()),
+ TQString::number(dccTransfer->getProgress()),
( dccTransfer->getFileSize() == 0 ) ? i18n( "unknown size" ) : KIO::convertSize( dccTransfer->getFileSize() ) ) );
// FIXME: this operation should be done by DccTransferManager
@@ -1877,7 +1877,7 @@ void Server::dccGetDone(DccTransfer* item)
if (!item)
return;
- QString showfile = item->getFileName();
+ TQString showfile = item->getFileName();
if(showfile.startsWith("\"") && showfile.endsWith("\""))
showfile = showfile.mid(1, showfile.length() - 2);
@@ -1896,7 +1896,7 @@ void Server::dccSendDone(DccTransfer* item)
if (!item)
return;
- QString showfile = item->getFileName();
+ TQString showfile = item->getFileName();
if(showfile.startsWith("\"") && showfile.endsWith("\""))
showfile = showfile.mid(1, showfile.length() - 2);
@@ -1915,7 +1915,7 @@ void Server::dccStatusChanged(DccTransfer *item, int newStatus, int oldStatus)
if(!item)
return;
- QString showfile = item->getFileName();
+ TQString showfile = item->getFileName();
if(showfile.startsWith("\"") && showfile.endsWith("\""))
showfile = showfile.mid(1, showfile.length() - 2);
@@ -1962,14 +1962,14 @@ void Server::removeQuery(class Query* query)
query->deleteLater();
}
-void Server::sendJoinCommand(const QString& name, const QString& password)
+void Server::sendJoinCommand(const TQString& name, const TQString& password)
{
Konversation::OutputFilterResult result = getOutputFilter()->parse(getNickname(),
- Preferences::commandChar() + "JOIN " + name + ' ' + password, QString());
+ Preferences::commandChar() + "JOIN " + name + ' ' + password, TQString());
queue(result.toServer);
}
-void Server::joinChannel(const QString& name, const QString& hostmask)
+void Server::joinChannel(const TQString& name, const TQString& hostmask)
{
// (re-)join channel, open a new panel if needed
Channel* channel = getChannelByName(name);
@@ -1991,8 +1991,8 @@ void Server::joinChannel(const QString& name, const QString& hostmask)
m_channelList.append(channel);
- connect(channel,SIGNAL (sendFile()),this,SLOT (requestDccSend()) );
- connect(this, SIGNAL(nicknameChanged(const QString&)), channel, SLOT(setNickname(const QString&)));
+ connect(channel,TQT_SIGNAL (sendFile()),this,TQT_SLOT (requestDccSend()) );
+ connect(this, TQT_SIGNAL(nicknameChanged(const TQString&)), channel, TQT_SLOT(setNickname(const TQString&)));
}
// Move channel from unjoined (if present) to joined list and add our own nickname to the joined list.
ChannelNickPtr channelNick = addNickToJoinedChannelsList(name, getNickname());
@@ -2021,7 +2021,7 @@ void Server::removeChannel(Channel* channel)
m_channelList.removeRef(channel);
}
-void Server::updateChannelMode(const QString &updater, const QString &channelName, char mode, bool plus, const QString &parameter)
+void Server::updateChannelMode(const TQString &updater, const TQString &channelName, char mode, bool plus, const TQString &parameter)
{
Channel* channel=getChannelByName(channelName);
@@ -2032,7 +2032,7 @@ void Server::updateChannelMode(const QString &updater, const QString &channelNam
// Answer from JOHNFLUX - I think that admin is the same as owner. Channel.h has owner as "a"
// "q" is the likely answer.. UnrealIRCd and euIRCd use it.
// TODO these need to become dynamic
- QString userModes="vhoqa"; // voice halfop op owner admin
+ TQString userModes="vhoqa"; // voice halfop op owner admin
int modePos = userModes.find(mode);
if (modePos > 0)
{
@@ -2067,15 +2067,15 @@ void Server::updateChannelMode(const QString &updater, const QString &channelNam
{
if (plus)
{
- QDateTime when;
- addBan(channelName, QString("%1 %2 %3").arg(parameter).arg(updater).arg(QDateTime::currentDateTime().toTime_t()));
+ TQDateTime when;
+ addBan(channelName, TQString("%1 %2 %3").arg(parameter).arg(updater).arg(TQDateTime::currentDateTime().toTime_t()));
} else {
removeBan(channelName, parameter);
}
}
}
-void Server::updateChannelModeWidgets(const QString &channelName, char mode, const QString &parameter)
+void Server::updateChannelModeWidgets(const TQString &channelName, char mode, const TQString &parameter)
{
Channel* channel=getChannelByName(channelName);
if(channel) channel->updateModeWidgets(mode,true,parameter);
@@ -2092,10 +2092,10 @@ void Server::updateChannelQuickButtons()
}
}
-Channel* Server::getChannelByName(const QString& name)
+Channel* Server::getChannelByName(const TQString& name)
{
// Convert wanted channel name to lowercase
- QString wanted=name;
+ TQString wanted=name;
wanted=wanted.lower();
// Traverse through list to find the channel named "name"
@@ -2109,10 +2109,10 @@ Channel* Server::getChannelByName(const QString& name)
return 0;
}
-class Query* Server::getQueryByName(const QString& name)
+class Query* Server::getQueryByName(const TQString& name)
{
// Convert wanted query name to lowercase
- QString wanted=name;
+ TQString wanted=name;
wanted=wanted.lower();
// Traverse through list to find the query with "name"
@@ -2126,13 +2126,13 @@ class Query* Server::getQueryByName(const QString& name)
return 0;
}
-void Server::resetNickList(const QString& channelName)
+void Server::resetNickList(const TQString& channelName)
{
Channel* outChannel=getChannelByName(channelName);
if(outChannel) outChannel->resetNickList();
}
-void Server::addPendingNickList(const QString& channelName,const QStringList& nickList)
+void Server::addPendingNickList(const TQString& channelName,const TQStringList& nickList)
{
Channel* outChannel=getChannelByName(channelName);
if(outChannel) outChannel->addPendingNickList(nickList);
@@ -2142,12 +2142,12 @@ void Server::addPendingNickList(const QString& channelName,const QStringList& ni
// Creates new NickInfo if necessary.
// If needed, moves the channel from the unjoined list to the joined list.
// Returns the NickInfo for the nickname.
-ChannelNickPtr Server::addNickToJoinedChannelsList(const QString& channelName, const QString& nickname)
+ChannelNickPtr Server::addNickToJoinedChannelsList(const TQString& channelName, const TQString& nickname)
{
bool doChannelJoinedSignal = false;
bool doWatchedNickChangedSignal = false;
bool doChannelMembersChangedSignal = false;
- QString lcNickname = nickname.lower();
+ TQString lcNickname = nickname.lower();
// Create NickInfo if not already created.
NickInfoPtr nickInfo = getNickInfo(nickname);
if (!nickInfo)
@@ -2162,7 +2162,7 @@ ChannelNickPtr Server::addNickToJoinedChannelsList(const QString& channelName, c
nickInfo->setNickname(nickname);
// Move the channel from unjoined list (if present) to joined list.
- QString lcChannelName = channelName.lower();
+ TQString lcChannelName = channelName.lower();
ChannelNickMap *channel;
if (m_unjoinedChannels.contains(lcChannelName))
{
@@ -2225,12 +2225,12 @@ void Server::emitNickInfoChanged(const NickInfoPtr nickInfo)
// If needed, moves the channel from the joined list to the unjoined list.
// If mode != 99 sets the mode for this nick in this channel.
// Returns the NickInfo for the nickname.
-ChannelNickPtr Server::addNickToUnjoinedChannelsList(const QString& channelName, const QString& nickname)
+ChannelNickPtr Server::addNickToUnjoinedChannelsList(const TQString& channelName, const TQString& nickname)
{
bool doChannelUnjoinedSignal = false;
bool doWatchedNickChangedSignal = false;
bool doChannelMembersChangedSignal = false;
- QString lcNickname = nickname.lower();
+ TQString lcNickname = nickname.lower();
// Create NickInfo if not already created.
NickInfoPtr nickInfo = getNickInfo(nickname);
if (!nickInfo)
@@ -2240,7 +2240,7 @@ ChannelNickPtr Server::addNickToUnjoinedChannelsList(const QString& channelName,
doWatchedNickChangedSignal = isWatchedNick(nickname);
}
// Move the channel from joined list (if present) to unjoined list.
- QString lcChannelName = channelName.lower();
+ TQString lcChannelName = channelName.lower();
ChannelNickMap *channel;
if (m_joinedChannels.contains(lcChannelName))
{
@@ -2284,12 +2284,12 @@ ChannelNickPtr Server::addNickToUnjoinedChannelsList(const QString& channelName,
* @param nickname The nickname that is online.
* @return Pointer to NickInfo for nick.
*/
-NickInfoPtr Server::setWatchedNickOnline(const QString& nickname)
+NickInfoPtr Server::setWatchedNickOnline(const TQString& nickname)
{
NickInfoPtr nickInfo = getNickInfo(nickname);
if (!nickInfo)
{
- QString lcNickname = nickname.lower();
+ TQString lcNickname = nickname.lower();
nickInfo = new NickInfo(nickname, this);
m_allNicks.insert(lcNickname, nickInfo);
}
@@ -2307,7 +2307,7 @@ NickInfoPtr Server::setWatchedNickOnline(const QString& nickname)
return nickInfo;
}
-void Server::setWatchedNickOffline(const QString& nickname, const NickInfoPtr nickInfo)
+void Server::setWatchedNickOffline(const TQString& nickname, const NickInfoPtr nickInfo)
{
if (nickInfo) {
KABC::Addressee addressee = nickInfo->getAddressee();
@@ -2322,9 +2322,9 @@ void Server::setWatchedNickOffline(const QString& nickname, const NickInfoPtr ni
}
-bool Server::setNickOffline(const QString& nickname)
+bool Server::setNickOffline(const TQString& nickname)
{
- QString lcNickname = nickname.lower();
+ TQString lcNickname = nickname.lower();
NickInfoPtr nickInfo = getNickInfo(lcNickname);
bool wasOnline = nickInfo->getPrintedOnline();
@@ -2333,12 +2333,12 @@ bool Server::setNickOffline(const QString& nickname)
// Delete from query list, if present.
if (m_queryNicks.contains(lcNickname)) m_queryNicks.remove(lcNickname);
// Delete the nickname from all channels (joined or unjoined).
- QStringList nickChannels = getNickChannels(lcNickname);
- QStringList::iterator itEnd = nickChannels.end();
+ TQStringList nickChannels = getNickChannels(lcNickname);
+ TQStringList::iterator itEnd = nickChannels.end();
- for(QStringList::iterator it = nickChannels.begin(); it != itEnd; ++it)
+ for(TQStringList::iterator it = nickChannels.begin(); it != itEnd; ++it)
{
- QString channel = (*it);
+ TQString channel = (*it);
removeChannelNick(channel, lcNickname);
}
@@ -2360,15 +2360,15 @@ bool Server::setNickOffline(const QString& nickname)
* @param nickname The nickname to be deleted. Case insensitive.
* @return True if the nickname is deleted.
*/
-bool Server::deleteNickIfUnlisted(const QString &nickname)
+bool Server::deleteNickIfUnlisted(const TQString &nickname)
{
- QString lcNickname = nickname.lower();
+ TQString lcNickname = nickname.lower();
// Don't delete our own nickinfo.
if (lcNickname == loweredNickname()) return false;
if (!m_queryNicks.contains(lcNickname))
{
- QStringList nickChannels = getNickChannels(nickname);
+ TQStringList nickChannels = getNickChannels(nickname);
if (nickChannels.isEmpty())
{
m_allNicks.remove(lcNickname);
@@ -2383,12 +2383,12 @@ bool Server::deleteNickIfUnlisted(const QString &nickname)
* @param channelName The channel name. Case insensitive.
* @param nickname The nickname. Case insensitive.
*/
-void Server::removeChannelNick(const QString& channelName, const QString& nickname)
+void Server::removeChannelNick(const TQString& channelName, const TQString& nickname)
{
bool doSignal = false;
bool joined = false;
- QString lcChannelName = channelName.lower();
- QString lcNickname = nickname.lower();
+ TQString lcChannelName = channelName.lower();
+ TQString lcNickname = nickname.lower();
ChannelNickMap *channel;
if (m_joinedChannels.contains(lcChannelName))
{
@@ -2421,37 +2421,37 @@ void Server::removeChannelNick(const QString& channelName, const QString& nickna
if (doSignal) emit channelMembersChanged(this, channelName, joined, true, nickname);
}
-QStringList Server::getWatchList()
+TQStringList Server::getWatchList()
{
// no nickinfo ISON for the time being
return Preferences::notifyListByGroupName(getDisplayName());
if (m_serverISON)
return m_serverISON->getWatchList();
else
- return QStringList();
+ return TQStringList();
}
-QString Server::getWatchListString() { return getWatchList().join(" "); }
+TQString Server::getWatchListString() { return getWatchList().join(" "); }
-QStringList Server::getISONList()
+TQStringList Server::getISONList()
{
// no nickinfo ISON for the time being
return Preferences::notifyListByGroupName(getDisplayName());
if (m_serverISON)
return m_serverISON->getISONList();
else
- return QStringList();
+ return TQStringList();
}
-QString Server::getISONListString() { return getISONList().join(" "); }
+TQString Server::getISONListString() { return getISONList().join(" "); }
/**
* Return true if the given nickname is on the watch list.
*/
-bool Server::isWatchedNick(const QString& nickname)
+bool Server::isWatchedNick(const TQString& nickname)
{
// Get watch list from preferences.
- QString watchlist= ' ' + getWatchListString() + ' ';
+ TQString watchlist= ' ' + getWatchListString() + ' ';
// Search case-insensitivly
return (watchlist.find(' ' + nickname + ' ', 0, 0) != -1);
}
@@ -2462,11 +2462,11 @@ bool Server::isWatchedNick(const QString& nickname)
* empty, it is deleted.
* @param channelName Name of the channel. Case sensitive.
*/
-void Server::removeJoinedChannel(const QString& channelName)
+void Server::removeJoinedChannel(const TQString& channelName)
{
bool doSignal = false;
- QStringList watchListLower = getWatchList();
- QString lcChannelName = channelName.lower();
+ TQStringList watchListLower = getWatchList();
+ TQString lcChannelName = channelName.lower();
// Move the channel nick list from the joined to unjoined lists.
if (m_joinedChannels.contains(lcChannelName))
{
@@ -2481,7 +2481,7 @@ void Server::removeJoinedChannel(const QString& channelName)
ChannelNickMap::Iterator member;
for ( member = channel->begin(); member != channel->end() ;)
{
- QString lcNickname = member.key();
+ TQString lcNickname = member.key();
if (watchListLower.find(lcNickname) == watchListLower.end())
{
// Remove the unwatched nickname from the unjoined channel.
@@ -2509,23 +2509,23 @@ void Server::removeJoinedChannel(const QString& channelName)
// Renames a nickname in all NickInfo lists.
// Returns pointer to the NickInfo object or 0 if nick not found.
-void Server::renameNickInfo(NickInfoPtr nickInfo, const QString& newname)
+void Server::renameNickInfo(NickInfoPtr nickInfo, const TQString& newname)
{
if (nickInfo)
{
// Get existing lowercase nickname and rename nickname in the NickInfo object.
- QString lcNickname = nickInfo->loweredNickname();
+ TQString lcNickname = nickInfo->loweredNickname();
nickInfo->setNickname(newname);
nickInfo->setIdentified(false);
- QString lcNewname = newname.lower();
+ TQString lcNewname = newname.lower();
// Rename the key in m_allNicks list.
m_allNicks.remove(lcNickname);
m_allNicks.insert(lcNewname, nickInfo);
// Rename key in the joined and unjoined lists.
- QStringList nickChannels = getNickChannels(lcNickname);
- QStringList::iterator itEnd = nickChannels.end();
+ TQStringList nickChannels = getNickChannels(lcNickname);
+ TQStringList::iterator itEnd = nickChannels.end();
- for(QStringList::iterator it = nickChannels.begin(); it != itEnd; ++it)
+ for(TQStringList::iterator it = nickChannels.begin(); it != itEnd; ++it)
{
const ChannelNickMap *channel = getChannelMembers(*it);
Q_ASSERT(channel);
@@ -2548,7 +2548,7 @@ void Server::renameNickInfo(NickInfoPtr nickInfo, const QString& newname)
}
}
-Channel* Server::nickJoinsChannel(const QString &channelName, const QString &nickname, const QString &hostmask)
+Channel* Server::nickJoinsChannel(const TQString &channelName, const TQString &nickname, const TQString &hostmask)
{
Channel* outChannel=getChannelByName(channelName);
if(outChannel)
@@ -2566,7 +2566,7 @@ Channel* Server::nickJoinsChannel(const QString &channelName, const QString &nic
return outChannel;
}
-void Server::addHostmaskToNick(const QString& sourceNick, const QString& sourceHostmask)
+void Server::addHostmaskToNick(const TQString& sourceNick, const TQString& sourceHostmask)
{
// Update NickInfo.
NickInfoPtr nickInfo=getNickInfo(sourceNick);
@@ -2579,7 +2579,7 @@ void Server::addHostmaskToNick(const QString& sourceNick, const QString& sourceH
}
}
-Channel* Server::removeNickFromChannel(const QString &channelName, const QString &nickname, const QString &reason, bool quit)
+Channel* Server::removeNickFromChannel(const TQString &channelName, const TQString &nickname, const TQString &reason, bool quit)
{
Channel* outChannel=getChannelByName(channelName);
if(outChannel)
@@ -2595,14 +2595,14 @@ Channel* Server::removeNickFromChannel(const QString &channelName, const QString
// the NickInfo, if on the notify list.
if (!isWatchedNick(nickname))
{
- QString nicky = nickname;
+ TQString nicky = nickname;
deleteNickIfUnlisted(nicky);
}
return outChannel;
}
-void Server::nickWasKickedFromChannel(const QString &channelName, const QString &nickname, const QString &kicker, const QString &reason)
+void Server::nickWasKickedFromChannel(const TQString &channelName, const TQString &nickname, const TQString &kicker, const TQString &reason)
{
Channel* outChannel=getChannelByName(channelName);
if(outChannel)
@@ -2618,7 +2618,7 @@ void Server::nickWasKickedFromChannel(const QString &channelName, const QString
}
}
-void Server::removeNickFromServer(const QString &nickname,const QString &reason)
+void Server::removeNickFromServer(const TQString &nickname,const TQString &reason)
{
Channel* channel = m_channelList.first();
while (channel)
@@ -2638,7 +2638,7 @@ void Server::removeNickFromServer(const QString &nickname,const QString &reason)
setNickOffline(nickname);
}
-void Server::renameNick(const QString &nickname, const QString &newNick)
+void Server::renameNick(const TQString &nickname, const TQString &newNick)
{
if(nickname.isEmpty() || newNick.isEmpty())
{
@@ -2683,16 +2683,16 @@ void Server::renameNick(const QString &nickname, const QString &newNick)
}
-void Server::userhost(const QString& nick,const QString& hostmask,bool away,bool /* ircOp */)
+void Server::userhost(const TQString& nick,const TQString& hostmask,bool away,bool /* ircOp */)
{
addHostmaskToNick(nick, hostmask);
// remember my IP for DCC things
// myself
if (m_ownIpByUserhost.isEmpty() && nick == getNickname())
{
- QString myhost = hostmask.section('@', 1);
+ TQString myhost = hostmask.section('@', 1);
// Use async lookup else you will be blocking GUI badly
- KNetwork::KResolver::resolveAsync(this,SLOT(gotOwnResolvedHostByUserhost(KResolverResults)),myhost,"0");
+ KNetwork::KResolver::resolveAsync(this,TQT_SLOT(gotOwnResolvedHostByUserhost(KResolverResults)),myhost,"0");
}
NickInfoPtr nickInfo = getNickInfo(nick);
if (nickInfo)
@@ -2712,13 +2712,13 @@ void Server::gotOwnResolvedHostByUserhost(KResolverResults res)
kdDebug() << "Server::gotOwnResolvedHostByUserhost(): Got error: " << ( int )res.error() << endl;
}
-void Server::appendServerMessageToChannel(const QString& channel,const QString& type,const QString& message)
+void Server::appendServerMessageToChannel(const TQString& channel,const TQString& type,const TQString& message)
{
Channel* outChannel = getChannelByName(channel);
if (outChannel) outChannel->appendServerMessage(type,message);
}
-void Server::appendCommandMessageToChannel(const QString& channel,const QString& command,const QString& message, bool highlight)
+void Server::appendCommandMessageToChannel(const TQString& channel,const TQString& command,const TQString& message, bool highlight)
{
Channel* outChannel = getChannelByName(channel);
if (outChannel)
@@ -2727,28 +2727,28 @@ void Server::appendCommandMessageToChannel(const QString& channel,const QString&
}
else
{
- appendStatusMessage(command, QString("%1 %2").arg(channel).arg(message));
+ appendStatusMessage(command, TQString("%1 %2").arg(channel).arg(message));
}
}
-void Server::appendStatusMessage(const QString& type,const QString& message)
+void Server::appendStatusMessage(const TQString& type,const TQString& message)
{
getStatusView()->appendServerMessage(type,message);
}
-void Server::appendMessageToFrontmost(const QString& type,const QString& message, bool parseURL)
+void Server::appendMessageToFrontmost(const TQString& type,const TQString& message, bool parseURL)
{
getViewContainer()->appendToFrontmost(type, message, getStatusView(), parseURL);
}
-void Server::setNickname(const QString &newNickname)
+void Server::setNickname(const TQString &newNickname)
{
m_nickname = newNickname;
m_loweredNickname = newNickname.lower();
emit nicknameChanged(newNickname);
}
-void Server::setChannelTopic(const QString &channel, const QString &newTopic)
+void Server::setChannelTopic(const TQString &channel, const TQString &newTopic)
{
Channel* outChannel = getChannelByName(channel);
if(outChannel)
@@ -2759,7 +2759,7 @@ void Server::setChannelTopic(const QString &channel, const QString &newTopic)
}
// Overloaded
-void Server::setChannelTopic(const QString& nickname, const QString &channel, const QString &newTopic)
+void Server::setChannelTopic(const TQString& nickname, const TQString &channel, const TQString &newTopic)
{
Channel* outChannel = getChannelByName(channel);
if(outChannel)
@@ -2769,62 +2769,62 @@ void Server::setChannelTopic(const QString& nickname, const QString &channel, co
}
}
-void Server::setTopicAuthor(const QString& channel, const QString& author, QDateTime time)
+void Server::setTopicAuthor(const TQString& channel, const TQString& author, TQDateTime time)
{
Channel* outChannel = getChannelByName(channel);
if(outChannel)
outChannel->setTopicAuthor(author, time);
}
-void Server::endOfWho(const QString& target)
+void Server::endOfWho(const TQString& target)
{
Channel* channel = getChannelByName(target);
if(channel)
channel->scheduleAutoWho();
}
-bool Server::isNickname(const QString &compare) const
+bool Server::isNickname(const TQString &compare) const
{
return (m_nickname == compare);
}
-QString Server::getNickname() const
+TQString Server::getNickname() const
{
return m_nickname;
}
-QString Server::loweredNickname() const
+TQString Server::loweredNickname() const
{
return m_loweredNickname;
}
-QString Server::parseWildcards(const QString& toParse,
-const QString& sender,
-const QString& channelName,
-const QString& channelKey,
-const QString& nick,
-const QString& parameter)
+TQString Server::parseWildcards(const TQString& toParse,
+const TQString& sender,
+const TQString& channelName,
+const TQString& channelKey,
+const TQString& nick,
+const TQString& parameter)
{
- return parseWildcards(toParse,sender,channelName,channelKey,QStringList::split(' ',nick),parameter);
+ return parseWildcards(toParse,sender,channelName,channelKey,TQStringList::split(' ',nick),parameter);
}
-QString Server::parseWildcards(const QString& toParse,
-const QString& sender,
-const QString& channelName,
-const QString& channelKey,
-const QStringList& nickList,
-const QString& /*parameter*/)
+TQString Server::parseWildcards(const TQString& toParse,
+const TQString& sender,
+const TQString& channelName,
+const TQString& channelKey,
+const TQStringList& nickList,
+const TQString& /*parameter*/)
{
// TODO: parameter handling, since parameters are not functional yet
// store the parsed version
- QString out;
+ TQString out;
// default separator
- QString separator(" ");
+ TQString separator(" ");
int index = 0, found = 0;
- QChar toExpand;
+ TQChar toExpand;
while ((found = toParse.find('%',index)) != -1)
{
@@ -2880,7 +2880,7 @@ const QString& /*parameter*/)
return out;
}
-void Server::sendToAllChannels(const QString &text)
+void Server::sendToAllChannels(const TQString &text)
{
// Send a message to all channels we are in
Channel* channel = m_channelList.first();
@@ -2891,7 +2891,7 @@ void Server::sendToAllChannels(const QString &text)
}
}
-void Server::invitation(const QString& nick,const QString& channel)
+void Server::invitation(const TQString& nick,const TQString& channel)
{
if(KMessageBox::questionYesNo(getViewContainer()->getWindow(),
i18n("You were invited by %1 to join channel %2. "
@@ -2905,17 +2905,17 @@ void Server::invitation(const QString& nick,const QString& channel)
}
}
-void Server::scriptNotFound(const QString& name)
+void Server::scriptNotFound(const TQString& name)
{
appendMessageToFrontmost(i18n("DCOP"),i18n("Error: Could not find script \"%1\".").arg(name));
}
-void Server::scriptExecutionError(const QString& name)
+void Server::scriptExecutionError(const TQString& name)
{
appendMessageToFrontmost(i18n("DCOP"),i18n("Error: Could not execute script \"%1\". Check file permissions.").arg(name));
}
-bool Server::isAChannel(const QString &channel) const
+bool Server::isAChannel(const TQString &channel) const
{
return (getChannelTypes().contains(channel.at(0)) > 0);
}
@@ -2924,7 +2924,7 @@ void Server::addRawLog(bool show)
{
if (!m_rawLog) m_rawLog = getViewContainer()->addRawLog(this);
- connect(this, SIGNAL(serverOnline(bool)), m_rawLog, SLOT(serverOnline(bool)));
+ connect(this, TQT_SIGNAL(serverOnline(bool)), m_rawLog, TQT_SLOT(serverOnline(bool)));
// bring raw log to front since the main window does not do this for us
if (show) emit showView(m_rawLog);
@@ -2941,15 +2941,15 @@ ChannelListPanel* Server::addChannelListPanel()
{
m_channelListPanel = getViewContainer()->addChannelListPanel(this);
- connect(m_channelListPanel, SIGNAL(refreshChannelList()), this, SLOT(requestChannelList()));
- connect(m_channelListPanel, SIGNAL(joinChannel(const QString&)), this, SLOT(sendJoinCommand(const QString&)));
- connect(this, SIGNAL(serverOnline(bool)), m_channelListPanel, SLOT(serverOnline(bool)));
+ connect(m_channelListPanel, TQT_SIGNAL(refreshChannelList()), this, TQT_SLOT(requestChannelList()));
+ connect(m_channelListPanel, TQT_SIGNAL(joinChannel(const TQString&)), this, TQT_SLOT(sendJoinCommand(const TQString&)));
+ connect(this, TQT_SIGNAL(serverOnline(bool)), m_channelListPanel, TQT_SLOT(serverOnline(bool)));
}
return m_channelListPanel;
}
-void Server::addToChannelList(const QString& channel, int users, const QString& topic)
+void Server::addToChannelList(const TQString& channel, int users, const TQString& topic)
{
addChannelListPanel();
m_channelListPanel->addToChannelList(channel, users, topic);
@@ -2971,7 +2971,7 @@ void Server::updateAutoJoin(Konversation::ChannelSettings channel)
{
setAutoJoin(true);
- setAutoJoinCommands(QStringList("JOIN " + channel.name() + " " + channel.password()));
+ setAutoJoinCommands(TQStringList("JOIN " + channel.name() + " " + channel.password()));
return;
}
@@ -2982,7 +2982,7 @@ void Server::updateAutoJoin(Konversation::ChannelSettings channel)
tmpList = getServerGroup()->channelList();
else
{
- QPtrListIterator<Channel> it(m_channelList);
+ TQPtrListIterator<Channel> it(m_channelList);
Channel* channel;
while ((channel = it.current()) != 0)
@@ -2996,17 +2996,17 @@ void Server::updateAutoJoin(Konversation::ChannelSettings channel)
{
setAutoJoin(true);
- QStringList channels;
- QStringList passwords;
- QStringList joinCommands;
+ TQStringList channels;
+ TQStringList passwords;
+ TQStringList joinCommands;
uint length = 0;
Konversation::ChannelList::iterator it;
for (it = tmpList.begin(); it != tmpList.end(); ++it)
{
- QString channel = (*it).name();;
- QString password = ((*it).password().isEmpty() ? "." : (*it).password());
+ TQString channel = (*it).name();;
+ TQString password = ((*it).password().isEmpty() ? "." : (*it).password());
int tempLen = channel.length();
length += getIdentity()->getCodec()->fromUnicode(channel, tempLen).length();
@@ -3062,22 +3062,22 @@ bool Server::getUseSSL() const
return (sslsocket != 0);
}
-QString Server::getSSLInfo() const
+TQString Server::getSSLInfo() const
{
SSLSocket* sslsocket = dynamic_cast<SSLSocket*>(m_socket);
if(sslsocket)
return sslsocket->details();
- return QString();
+ return TQString();
}
-void Server::sendMultiServerCommand(const QString& command, const QString& parameter)
+void Server::sendMultiServerCommand(const TQString& command, const TQString& parameter)
{
emit multiServerCommand(command, parameter);
}
-void Server::executeMultiServerCommand(const QString& command, const QString& parameter)
+void Server::executeMultiServerCommand(const TQString& command, const TQString& parameter)
{
if (command == "msg")
sendToAllChannelsAndQueries(parameter);
@@ -3085,7 +3085,7 @@ void Server::executeMultiServerCommand(const QString& command, const QString& pa
sendToAllChannelsAndQueries(Preferences::commandChar() + command + ' ' + parameter);
}
-void Server::sendToAllChannelsAndQueries(const QString& text)
+void Server::sendToAllChannelsAndQueries(const TQString& text)
{
// Send a message to all channels we are in
Channel* channel = m_channelList.first();
@@ -3136,7 +3136,7 @@ void Server::reconnect()
// quitServer might cause is delivered before connectToIRCServer
// sets SSConnecting and broken() announces a deliberate disconnect
// due to the failure allegedly occuring during SSConnecting.
- QTimer::singleShot(0, this, SLOT(connectToIRCServer()));
+ TQTimer::singleShot(0, this, TQT_SLOT(connectToIRCServer()));
}
void Server::disconnect()
@@ -3144,9 +3144,9 @@ void Server::disconnect()
if (isSocketConnected()) quitServer();
}
-void Server::requestAway(const QString& reason)
+void Server::requestAway(const TQString& reason)
{
- QString awayReason = reason;
+ TQString awayReason = reason;
IdentityPtr identity = getIdentity();
if (awayReason.isEmpty() || !identity)
@@ -3184,8 +3184,8 @@ void Server::setAway(bool away)
if (identity && identity->getShowAwayMessage())
{
- QString message = identity->getAwayMessage();
- sendToAllChannels(message.replace(QRegExp("%s", false), m_awayReason));
+ TQString message = identity->getAwayMessage();
+ sendToAllChannels(message.replace(TQRegExp("%s", false), m_awayReason));
}
if (identity && identity->getInsertRememberLineOnAway())
@@ -3193,7 +3193,7 @@ void Server::setAway(bool away)
}
else
{
- m_awayReason = QString();
+ m_awayReason = TQString();
emit awayState(false);
@@ -3209,8 +3209,8 @@ void Server::setAway(bool away)
if (identity && identity->getShowAwayMessage())
{
- QString message = identity->getReturnMessage();
- sendToAllChannels(message.replace(QRegExp("%t", false), awayTime()));
+ TQString message = identity->getReturnMessage();
+ sendToAllChannels(message.replace(TQRegExp("%t", false), awayTime()));
}
}
else
@@ -3220,31 +3220,31 @@ void Server::setAway(bool away)
}
}
-QString Server::awayTime() const
+TQString Server::awayTime() const
{
- QString retVal;
+ TQString retVal;
if (m_away)
{
- int diff = QDateTime::currentDateTime().toTime_t() - m_awayTime;
+ int diff = TQDateTime::currentDateTime().toTime_t() - m_awayTime;
int num = diff / 3600;
if (num < 10)
- retVal = '0' + QString::number(num) + ':';
+ retVal = '0' + TQString::number(num) + ':';
else
- retVal = QString::number(num) + ':';
+ retVal = TQString::number(num) + ':';
num = (diff % 3600) / 60;
if (num < 10) retVal += '0';
- retVal += QString::number(num) + ':';
+ retVal += TQString::number(num) + ':';
num = (diff % 3600) % 60;
if (num < 10) retVal += '0';
- retVal += QString::number(num);
+ retVal += TQString::number(num);
}
else
retVal = "00:00:00";
@@ -3254,10 +3254,10 @@ QString Server::awayTime() const
void Server::startAwayTimer()
{
- m_awayTime = QDateTime::currentDateTime().toTime_t();
+ m_awayTime = TQDateTime::currentDateTime().toTime_t();
}
-KABC::Addressee Server::getOfflineNickAddressee(QString& nickname)
+KABC::Addressee Server::getOfflineNickAddressee(TQString& nickname)
{
if (m_serverISON)
return m_serverISON->getOfflineNickAddressee(nickname);
@@ -3275,7 +3275,7 @@ bool Server::identifyMsgEnabled()
return m_identifyMsg;
}
-void Server::addBan(const QString &channel, const QString &ban)
+void Server::addBan(const TQString &channel, const TQString &ban)
{
Channel* outChannel = getChannelByName(channel);
if(outChannel)
@@ -3284,7 +3284,7 @@ void Server::addBan(const QString &channel, const QString &ban)
}
}
-void Server::removeBan(const QString &channel, const QString &ban)
+void Server::removeBan(const TQString &channel, const TQString &ban)
{
Channel* outChannel = getChannelByName(channel);
if(outChannel)
@@ -3300,8 +3300,8 @@ void Server::sendPing()
//It might be more intelligent to only do this when there is text
//in the inputbox. Kinda changes this into a "do minutely"
//queue :-)
- QStringList ql;
- ql << "PING LAG" + QTime::currentTime().toString("hhmmss");
+ TQStringList ql;
+ ql << "PING LAG" + TQTime::currentTime().toString("hhmmss");
getInputFilter()->setAutomaticRequest("WHO", getNickname(), true);
ql << "WHO " + getNickname();
queueList(ql, HighPriority);
@@ -3320,7 +3320,7 @@ void Server::pongReceived()
emit serverLag(this, m_currentLag);
// Send another PING in 60 seconds
- QTimer::singleShot(60000 /*60 sec*/, this, SLOT(sendPing()));
+ TQTimer::singleShot(60000 /*60 sec*/, this, TQT_SLOT(sendPing()));
}
void Server::updateLongPongLag()
diff --git a/konversation/src/server.h b/konversation/src/server.h
index e2781fb..be6d62c 100644
--- a/konversation/src/server.h
+++ b/konversation/src/server.h
@@ -26,9 +26,9 @@
#include "servergroupsettings.h"
#include "connectionsettings.h"
-#include <qtimer.h>
-#include <qvaluevector.h>
-#include <qguardedptr.h>
+#include <tqtimer.h>
+#include <tqvaluevector.h>
+#include <tqguardedptr.h>
#include <ksharedptr.h>
#include <kprocess.h>
@@ -47,7 +47,7 @@ class RawLog;
class ChannelListPanel;
class ScriptLauncher;
class ServerISON;
-class QStrList;
+class TQStrList;
class ChatWindow;
class ViewContainer;
@@ -76,7 +76,7 @@ void resetNickSelection();
RegularPriority=StandardPriority
};
- Server(QObject* parent, ConnectionSettings& settings);
+ Server(TQObject* parent, ConnectionSettings& settings);
~Server();
int connectionId() { return m_connectionId; }
@@ -84,8 +84,8 @@ void resetNickSelection();
ConnectionSettings& getConnectionSettings() { return m_connectionSettings; }
void setConnectionSettings(ConnectionSettings& settings) { m_connectionSettings = settings; }
- QString getDisplayName() { return m_connectionSettings.name(); }
- QString getServerName() { return m_connectionSettings.server().host(); }
+ TQString getDisplayName() { return m_connectionSettings.name(); }
+ TQString getServerName() { return m_connectionSettings.server().host(); }
Konversation::ServerGroupSettingsPtr getServerGroup() { return m_connectionSettings.serverGroup(); }
IdentityPtr getIdentity() { return m_connectionSettings.identity(); }
@@ -96,86 +96,86 @@ void resetNickSelection();
bool isConnecting() { return (m_connectionState == Konversation::SSConnecting); }
bool getUseSSL() const;
- QString getSSLInfo() const;
+ TQString getSSLInfo() const;
int getPort();
int getLag() const;
void updateAutoJoin(Konversation::ChannelSettings channel = Konversation::ChannelSettings());
- void resetNickList(const QString& channelName);
- void addPendingNickList(const QString& channelName,const QStringList& nickList);
- void addHostmaskToNick(const QString &sourceNick, const QString &sourceHostmask);
- Channel* nickJoinsChannel(const QString &channelName, const QString &nickname, const QString &hostmask);
- void renameNick(const QString &nickname,const QString &newNick);
- Channel* removeNickFromChannel(const QString &channelName, const QString &nickname, const QString &reason, bool quit=false);
- void nickWasKickedFromChannel(const QString &channelName, const QString &nickname, const QString &kicker, const QString &reason);
- void removeNickFromServer(const QString &nickname, const QString &reason);
+ void resetNickList(const TQString& channelName);
+ void addPendingNickList(const TQString& channelName,const TQStringList& nickList);
+ void addHostmaskToNick(const TQString &sourceNick, const TQString &sourceHostmask);
+ Channel* nickJoinsChannel(const TQString &channelName, const TQString &nickname, const TQString &hostmask);
+ void renameNick(const TQString &nickname,const TQString &newNick);
+ Channel* removeNickFromChannel(const TQString &channelName, const TQString &nickname, const TQString &reason, bool quit=false);
+ void nickWasKickedFromChannel(const TQString &channelName, const TQString &nickname, const TQString &kicker, const TQString &reason);
+ void removeNickFromServer(const TQString &nickname, const TQString &reason);
- void setChannelTypes(const QString &types);
- QString getChannelTypes() const;
+ void setChannelTypes(const TQString &types);
+ TQString getChannelTypes() const;
// extended user modes support
- void setPrefixes(const QString &modes, const QString& prefixes);
- void mangleNicknameWithModes(QString &nickname,bool& isAdmin,bool& isOwner,bool &isOp,
+ void setPrefixes(const TQString &modes, const TQString& prefixes);
+ void mangleNicknameWithModes(TQString &nickname,bool& isAdmin,bool& isOwner,bool &isOp,
bool& isHalfop,bool &hasVoice);
- bool isAChannel(const QString &channel) const;
- bool isNickname(const QString& compare) const;
+ bool isAChannel(const TQString &channel) const;
+ bool isNickname(const TQString& compare) const;
- QString getNickname() const;
- QString loweredNickname() const;
+ TQString getNickname() const;
+ TQString loweredNickname() const;
- QString getNextNickname();
+ TQString getNextNickname();
InputFilter* getInputFilter() { return &m_inputFilter; }
Konversation::OutputFilter* getOutputFilter() { return m_outputFilter; };
- void joinChannel(const QString& name, const QString& hostmask);
+ void joinChannel(const TQString& name, const TQString& hostmask);
void removeChannel(Channel* channel);
- void appendServerMessageToChannel(const QString& channel, const QString& type, const QString& message);
- void appendCommandMessageToChannel(const QString& channel, const QString& command, const QString& message, bool highlight = true);
- void appendStatusMessage(const QString& type,const QString& message);
- void appendMessageToFrontmost(const QString& type,const QString& message, bool parseURL = true);
+ void appendServerMessageToChannel(const TQString& channel, const TQString& type, const TQString& message);
+ void appendCommandMessageToChannel(const TQString& channel, const TQString& command, const TQString& message, bool highlight = true);
+ void appendStatusMessage(const TQString& type,const TQString& message);
+ void appendMessageToFrontmost(const TQString& type,const TQString& message, bool parseURL = true);
- int getPreLength(const QString& command, const QString& dest);
+ int getPreLength(const TQString& command, const TQString& dest);
- void dcopRaw(const QString& command);
- void dcopSay(const QString& target,const QString& command);
- void dcopInfo(const QString& string);
- void ctcpReply(const QString& receiver, const QString& text);
+ void dcopRaw(const TQString& command);
+ void dcopSay(const TQString& target,const TQString& command);
+ void dcopInfo(const TQString& string);
+ void ctcpReply(const TQString& receiver, const TQString& text);
- void setChannelTopic(const QString& channel, const QString& topic);
+ void setChannelTopic(const TQString& channel, const TQString& topic);
// Overloaded
- void setChannelTopic(const QString& nickname, const QString& channel, const QString& topic);
- void updateChannelMode(const QString& nick, const QString& channel, char mode, bool plus, const QString& parameter);
- void updateChannelModeWidgets(const QString& channel, char mode, const QString& parameter);
+ void setChannelTopic(const TQString& nickname, const TQString& channel, const TQString& topic);
+ void updateChannelMode(const TQString& nick, const TQString& channel, char mode, bool plus, const TQString& parameter);
+ void updateChannelModeWidgets(const TQString& channel, char mode, const TQString& parameter);
- Channel* getChannelByName(const QString& name);
- Query* getQueryByName(const QString& name);
- QString parseWildcards(const QString& toParse, const QString& nickname, const QString& channelName, const QString &channelKey, const QStringList &nickList, const QString& parameter);
- QString parseWildcards(const QString& toParse, const QString& nickname, const QString& channelName, const QString &channelKey, const QString& nick, const QString& parameter);
+ Channel* getChannelByName(const TQString& name);
+ Query* getQueryByName(const TQString& name);
+ TQString parseWildcards(const TQString& toParse, const TQString& nickname, const TQString& channelName, const TQString &channelKey, const TQStringList &nickList, const TQString& parameter);
+ TQString parseWildcards(const TQString& toParse, const TQString& nickname, const TQString& channelName, const TQString &channelKey, const TQString& nick, const TQString& parameter);
void autoCommandsAndChannels();
- void sendURIs(const QStrList& uris, const QString& nick);
+ void sendURIs(const TQStrList& uris, const TQString& nick);
- void notifyAction(const QString& nick);
+ void notifyAction(const TQString& nick);
ChannelListPanel* getChannelListPanel() const;
StatusPanel* getStatusView() const { return m_statusView; }
virtual bool closeYourself(bool askForConfirmation=true);
- QString getOwnIpByNetworkInterface();
- QString getOwnIpByServerMessage();
+ TQString getOwnIpByNetworkInterface();
+ TQString getOwnIpByServerMessage();
- void requestAway(const QString& reason = "");
+ void requestAway(const TQString& reason = "");
void requestUnaway();
bool isAway() { return m_away; }
void setAway(bool away);
- QString awayTime() const;
+ TQString awayTime() const;
- void setAwayReason(const QString& reason) { m_awayReason = reason; }
+ void setAwayReason(const TQString& reason) { m_awayReason = reason; }
/**
* Returns true if the given nickname is known to be online.
@@ -185,7 +185,7 @@ void resetNickSelection();
* notify list, and has not initiated a query with you, may well be online,
* but server doesn't know if it is or not, in which case False is returned.
*/
- bool isNickOnline(const QString &nickname);
+ bool isNickOnline(const TQString &nickname);
/** Given a nickname, returns NickInfo object.
* @param nickname The desired nickname. Case insensitive.
* @return Pointer to the nickinfo for this nickname if one exists.
@@ -198,13 +198,13 @@ void resetNickSelection();
* - The nick initiated a query with the user.
* A NickInfo is destroyed when it is offline.
*/
- NickInfoPtr getNickInfo(const QString& nickname);
+ NickInfoPtr getNickInfo(const TQString& nickname);
/** Given a nickname, returns an existing NickInfo object, or creates a new NickInfo object.
* Guaranteed to return a nickinfo.
* @param nickname The desired nickname. Case sensitive.
* @return Pointer to the found or created NickInfo object.
*/
- NickInfoPtr obtainNickInfo(const QString& nickname);
+ NickInfoPtr obtainNickInfo(const TQString& nickname);
/** Returns a list of all the NickInfos that are online and known to the server.
* Caller should not modify the list.
* A nick will be known if:
@@ -212,7 +212,7 @@ void resetNickSelection();
* - It is on the notify list and is known to be online.
* - The nick initiated a query with the user.
*
- * @return A QMap of KSharedPtrs to NickInfos indexed by lowercase nickname.
+ * @return A TQMap of KSharedPtrs to NickInfos indexed by lowercase nickname.
*/
const NickInfoMap* getAllNicks();
/** Returns the list of members for a channel in the joinedChannels list.
@@ -223,7 +223,7 @@ void resetNickSelection();
* @return A map of all the nicks in the channel.
* 0 if channel is not in the joinedChannels list.
*/
- const ChannelNickMap *getJoinedChannelMembers(const QString& channelName) const;
+ const ChannelNickMap *getJoinedChannelMembers(const TQString& channelName) const;
/** Returns the list of members for a channel in the unjoinedChannels list.
* An unjoinedChannel is a channel you aren't in. As such, this is only going to return
* nicks that you know are in that channel because a /whois has been done against them.
@@ -233,21 +233,21 @@ void resetNickSelection();
* @return A map of only the nicks that we know that are in the channel.
* 0 if channel is not in the unjoinedChannels list.
*/
- const ChannelNickMap *getUnjoinedChannelMembers(const QString& channelName) const;
+ const ChannelNickMap *getUnjoinedChannelMembers(const TQString& channelName) const;
/** Searches the Joined and Unjoined lists for the given channel and returns the member list.
* Code that calls this must not modify the list.
* @param channelName Name of desired channel. Case insensitive.
* @return A map of nicks in that channel. 0 if channel is not in either list.
*
- * @see getJoinedChannelMembers(const QString& channelName)
- * @see getUnjoinedChannelMembers(const QString& channelName)
+ * @see getJoinedChannelMembers(const TQString& channelName)
+ * @see getUnjoinedChannelMembers(const TQString& channelName)
*/
- const ChannelNickMap *getChannelMembers(const QString& channelName) const;
+ const ChannelNickMap *getChannelMembers(const TQString& channelName) const;
/** Returns a list of all the joined channels that a nick is in.
* @param nickname The desired nickname. Case insensitive.
* @return A list of joined channels the nick is in. Empty if none.
*/
- QStringList getNickJoinedChannels(const QString& nickname);
+ TQStringList getNickJoinedChannels(const TQString& nickname);
/** Returns a list of all the channels (joined or unjoined) that a nick is in.
* @param nickname The desired nickname. Case insensitive.
* @return A list of channels the nick is in. Empty if none.
@@ -255,7 +255,7 @@ void resetNickSelection();
* A nick will not appear in the Unjoined channels list unless a WHOIS
* has been performed on it.
*/
- QStringList getNickChannels(const QString& nickname);
+ TQStringList getNickChannels(const TQString& nickname);
/** Returns pointer to the ChannelNick (mode and pointer to NickInfo) for a
* given channel and nickname.
* @param channelName The desired channel name. Case insensitive.
@@ -264,7 +264,7 @@ void resetNickSelection();
* to the NickInfo and the mode of the nick in the channel.
* 0 if not found.
*/
- ChannelNickPtr getChannelNick(const QString& channelName, const QString& nickname);
+ ChannelNickPtr getChannelNick(const TQString& channelName, const TQString& nickname);
/** Updates a nickname in a channel. If not on the joined or unjoined lists, and nick
* is in the watch list, adds the channel and nick to the unjoinedChannels list.
* If mode != 99, sets the mode for the nick in the channel.
@@ -274,19 +274,19 @@ void resetNickSelection();
* @param mode Bit mask containing the modes the nick has in the channel,
* or 99 if not known. See channelnick.cpp for bit definitions.
*/
- ChannelNickPtr setChannelNick(const QString& channelName, const QString& nickname, unsigned int mode = 99);
+ ChannelNickPtr setChannelNick(const TQString& channelName, const TQString& nickname, unsigned int mode = 99);
/**
* Given the nickname of nick that is offline (or at least not known to be online),
* returns the addressbook entry (if any) for the nick.
* @param nickname Desired nickname. Case insensitive.
* @return Addressbook entry of the nick or empty if not found.
*/
- KABC::Addressee getOfflineNickAddressee(QString& nickname);
+ KABC::Addressee getOfflineNickAddressee(TQString& nickname);
/**
- * Returns a QPtrList of all channels
+ * Returns a TQPtrList of all channels
*/
- const QPtrList<Channel>& getChannelList() const { return m_channelList; }
+ const TQPtrList<Channel>& getChannelList() const { return m_channelList; }
void emitChannelNickChanged(const ChannelNickPtr channelNick);
void emitNickInfoChanged(const NickInfoPtr nickInfo);
@@ -294,18 +294,18 @@ void resetNickSelection();
/**
* Returns a list of all the nicks on the user watch list plus nicks in the addressbook.
*/
- QStringList getWatchList();
- QString getWatchListString();
+ TQStringList getWatchList();
+ TQString getWatchListString();
/**
* Return true if the given nickname is on the watch list.
*/
- bool isWatchedNick(const QString& nickname);
+ bool isWatchedNick(const TQString& nickname);
/**
* Returns a list of all the nicks on the watch list that are not in joined
* channels. ISON command is sent for these nicks.
*/
- QStringList getISONList();
- QString getISONListString();
+ TQStringList getISONList();
+ TQString getISONListString();
ViewContainer* getViewContainer() const;
@@ -318,27 +318,27 @@ void resetNickSelection();
* @param nickname The nickname. Case sensitive.
* @return The NickInfo for the nickname.
*/
- ChannelNickPtr addNickToJoinedChannelsList(const QString& channelName, const QString& nickname);
+ ChannelNickPtr addNickToJoinedChannelsList(const TQString& channelName, const TQString& nickname);
- void setAllowedChannelModes(const QString& modes) { m_allowedChannelModes = modes; }
- QString allowedChannelModes() const { return m_allowedChannelModes; }
+ void setAllowedChannelModes(const TQString& modes) { m_allowedChannelModes = modes; }
+ TQString allowedChannelModes() const { return m_allowedChannelModes; }
void registerWithServices();
// Blowfish stuff
- QCString getKeyForRecipient(const QString& recipient) const;
- void setKeyForRecipient(const QString& recipient, const QCString& key);
+ TQCString getKeyForRecipient(const TQString& recipient) const;
+ void setKeyForRecipient(const TQString& recipient, const TQCString& key);
bool identifyMsg() const { return m_identifyMsg; }
ChannelListPanel* addChannelListPanel();
// invoked by DccTransferSend
- void dccSendRequest(const QString& recipient,const QString& fileName,const QString& address,const QString& port,unsigned long size);
- void dccPassiveSendRequest(const QString& recipient,const QString& fileName,const QString& address,unsigned long size,const QString& token);
+ void dccSendRequest(const TQString& recipient,const TQString& fileName,const TQString& address,const TQString& port,unsigned long size);
+ void dccPassiveSendRequest(const TQString& recipient,const TQString& fileName,const TQString& address,unsigned long size,const TQString& token);
// invoked by DccTransferRecv
- void dccResumeGetRequest(const QString& sender,const QString& fileName,const QString& port,KIO::filesize_t startAt);
- void dccReverseSendAck(const QString& partnerNick,const QString& fileName,const QString& ownAddress,const QString& ownPort,unsigned long size,const QString& reverseToken);
+ void dccResumeGetRequest(const TQString& sender,const TQString& fileName,const TQString& port,KIO::filesize_t startAt);
+ void dccReverseSendAck(const TQString& partnerNick,const TQString& fileName,const TQString& ownAddress,const TQString& ownPort,unsigned long size,const TQString& reverseToken);
// IRCQueueManager
bool validQueue(QueuePriority priority); ///< is this queue index valid?
@@ -362,13 +362,13 @@ void resetNickSelection();
signals:
void destroyed(int connectionId);
- void nicknameChanged(const QString&);
+ void nicknameChanged(const TQString&);
void serverLag(Server* server,int msec); /// will be connected to KonversationMainWindow::updateLag()
void tooLongLag(Server* server, int msec);/// will be connected to KonversationMainWindow::updateLag()
void resetLag(); ///< will be emitted when new 303 came in
- void nicksNowOnline(Server* server,const QStringList& list,bool changed);
+ void nicksNowOnline(Server* server,const TQStringList& list,bool changed);
void awayState(bool away); /// will be connected to any user input panel;
- void multiServerCommand(const QString& command, const QString& parameter);
+ void multiServerCommand(const TQString& command, const TQString& parameter);
/**
* Emitted when the server gains/loses connection.
@@ -397,15 +397,15 @@ void resetNickSelection();
/// call getJoinedChannelMembers or getUnjoinedChannelMembers, or just
/// getChannelMembers to get a list of all the nicks now in the channel.
/// parted indicates whether the nick joined or left the channel.
- void channelMembersChanged(Server* server, const QString& channelName, bool joined, bool parted, const QString& nickname);
+ void channelMembersChanged(Server* server, const TQString& channelName, bool joined, bool parted, const TQString& nickname);
/// Fires when a channel is moved to/from the Joinied/Unjoined lists.
/// joined indicates which list it is now on. Note that if joined is False, it is
/// possible the channel does not exist in any list anymore.
- void channelJoinedOrUnjoined(Server* server, const QString& channelName, bool joined);
+ void channelJoinedOrUnjoined(Server* server, const TQString& channelName, bool joined);
/// Fires when a nick on the watch list goes online or offline.
- void watchedNickChanged(Server* server, const QString& nickname, bool online);
+ void watchedNickChanged(Server* server, const TQString& nickname, bool online);
///Fires when the user switches his state to away and has enabled "Insert Remember Line on away" in his identity.
void awayInsertRememberLine(Server* server);
void sslInitFailure();
@@ -415,58 +415,58 @@ void resetNickSelection();
void showView(ChatWindow* view);
void addDccPanel();
- void addDccChat(const QString& myNick,const QString& nick,const QStringList& arguments,bool listen);
+ void addDccChat(const TQString& myNick,const TQString& nick,const TQStringList& arguments,bool listen);
public slots:
void connectToIRCServer();
/** Adds line to queue if non-empty. */
- bool queue(const QString& line, QueuePriority priority=StandardPriority);
- //TODO this should be an overload, not a separate name. ambiguous cases need QString() around the cstring
- bool queueList(const QStringList& buffer, QueuePriority priority=StandardPriority);
+ bool queue(const TQString& line, QueuePriority priority=StandardPriority);
+ //TODO this should be an overload, not a separate name. ambiguous cases need TQString() around the cstring
+ bool queueList(const TQStringList& buffer, QueuePriority priority=StandardPriority);
- void setNickname(const QString &newNickname);
+ void setNickname(const TQString &newNickname);
/** This is called when we want to open a new query, or focus an existing one.
* @param nickInfo The nickinfo we want to open the query to. Must exist.
* @param weinitiated This is whether we initiated this - did we do /query, or somebody else sending us a message.
* @return A pointer to a new or already-existing query. Guaranteed to be non-null
*/
Query *addQuery(const NickInfoPtr & nickInfo, bool weinitiated);
- void closeQuery(const QString &name);
- void closeChannel(const QString &name);
+ void closeQuery(const TQString &name);
+ void closeChannel(const TQString &name);
void quitServer();
- void openDccChat(const QString& nickname);
- void requestDccChat(const QString& partnerNick, const QString& numericalOwnIp, const QString& ownPort);
- void requestBan(const QStringList& users,const QString& channel,const QString& option);
- void requestUnban(const QString& mask,const QString& channel);
+ void openDccChat(const TQString& nickname);
+ void requestDccChat(const TQString& partnerNick, const TQString& numericalOwnIp, const TQString& ownPort);
+ void requestBan(const TQStringList& users,const TQString& channel,const TQString& option);
+ void requestUnban(const TQString& mask,const TQString& channel);
- void addDccSend(const QString &recipient,KURL fileURL, const QString &altFileName = QString(), uint fileSize = 0);
+ void addDccSend(const TQString &recipient,KURL fileURL, const TQString &altFileName = TQString(), uint fileSize = 0);
void removeQuery(Query *query);
void startNotifyTimer(int msec=0);
- void sendJoinCommand(const QString& channelName, const QString& password = QString());
+ void sendJoinCommand(const TQString& channelName, const TQString& password = TQString());
void requestChannelList();
- void requestWhois(const QString& nickname);
- void requestWho(const QString& channel);
- void requestUserhost(const QString& nicks);
- void requestTopic(const QString& channel);
- void resolveUserhost(const QString& nickname);
+ void requestWhois(const TQString& nickname);
+ void requestWho(const TQString& channel);
+ void requestUserhost(const TQString& nicks);
+ void requestTopic(const TQString& channel);
+ void resolveUserhost(const TQString& nickname);
void addRawLog(bool show);
void closeRawLog();
- void addToChannelList(const QString& channel, int users, const QString& topic);
+ void addToChannelList(const TQString& channel, int users, const TQString& topic);
void closeChannelListPanel();
void updateChannelQuickButtons();
- void sendMultiServerCommand(const QString& command, const QString& parameter);
- void executeMultiServerCommand(const QString& command, const QString& parameter);
+ void sendMultiServerCommand(const TQString& command, const TQString& parameter);
+ void executeMultiServerCommand(const TQString& command, const TQString& parameter);
void reconnect();
void disconnect(); //FIXME is this overriding a qobject method? do we care?
void showSSLDialog();
- void sendToAllChannels(const QString& text);
+ void sendToAllChannels(const TQString& text);
void notifyTimeout();
void enableIdentifyMsg(bool enabled);
bool identifyMsgEnabled();
- void addBan(const QString &channel, const QString &ban);
- void removeBan(const QString &channel, const QString &ban);
+ void addBan(const TQString &channel, const TQString &ban);
+ void removeBan(const TQString &channel, const TQString &ban);
/// Called when we received a PONG from the server
void pongReceived();
@@ -478,37 +478,37 @@ void resetNickSelection();
void startAwayTimer();
void incoming();
void processIncomingData();
- /// Sends the QString to the socket. No longer has any internal concept of queueing
- void toServer(QString&, IRCQueue *);
+ /// Sends the TQString to the socket. No longer has any internal concept of queueing
+ void toServer(TQString&, IRCQueue *);
/// Because KBufferedSocket has no closed(int) signal we use this slot to call broken(0)
void closed();
void broken(int state);
/** This is connected to the SSLSocket failed.
* @param reason The reason why this failed. This is already translated, ready to show the user.
*/
- void sslError(const QString& reason);
- void connectionEstablished(const QString& ownHost);
- void notifyResponse(const QString& nicksOnline);
+ void sslError(const TQString& reason);
+ void connectionEstablished(const TQString& ownHost);
+ void notifyResponse(const TQString& nicksOnline);
void slotNewDccTransferItemQueued(DccTransfer* transfer);
- void startReverseDccSendTransfer(const QString& sourceNick,const QStringList& dccArguments);
- void addDccGet(const QString& sourceNick,const QStringList& dccArguments);
+ void startReverseDccSendTransfer(const TQString& sourceNick,const TQStringList& dccArguments);
+ void addDccGet(const TQString& sourceNick,const TQStringList& dccArguments);
void requestDccSend(); // -> to outputFilter, dccPanel
// -> to outputFilter
- void requestDccSend(const QString& recipient);
+ void requestDccSend(const TQString& recipient);
// -> to inputFilter
- void resumeDccGetTransfer(const QString& sourceNick,const QStringList& dccArguments);
+ void resumeDccGetTransfer(const TQString& sourceNick,const TQStringList& dccArguments);
// -> to inputFilter
- void resumeDccSendTransfer(const QString& sourceNick,const QStringList& dccArguments);
+ void resumeDccSendTransfer(const TQString& sourceNick,const TQStringList& dccArguments);
void dccGetDone(DccTransfer* item);
void dccSendDone(DccTransfer* item);
void dccStatusChanged(DccTransfer* item, int newStatus, int oldStatus);
- void scriptNotFound(const QString& name);
- void scriptExecutionError(const QString& name);
- void userhost(const QString& nick,const QString& hostmask,bool away,bool ircOp);
- void setTopicAuthor(const QString& channel,const QString& author, QDateTime t);
- void endOfWho(const QString& target);
- void invitation(const QString& nick,const QString& channel);
- void sendToAllChannelsAndQueries(const QString& text);
+ void scriptNotFound(const TQString& name);
+ void scriptExecutionError(const TQString& name);
+ void userhost(const TQString& nick,const TQString& hostmask,bool away,bool ircOp);
+ void setTopicAuthor(const TQString& channel,const TQString& author, TQDateTime t);
+ void endOfWho(const TQString& target);
+ void invitation(const TQString& nick,const TQString& channel);
+ void sendToAllChannelsAndQueries(const TQString& text);
void gotOwnResolvedHostByWelcome(KResolverResults res);
void gotOwnResolvedHostByUserhost(KResolverResults res);
@@ -537,7 +537,7 @@ void resetNickSelection();
/// Connect to the signals used in this class.
void connectSignals();
- int _send_internal(QString outputline); ///< Guts of old send, isn't a slot.
+ int _send_internal(TQString outputline); ///< Guts of old send, isn't a slot.
/** Adds a nickname to the unjoinedChannels list.
* Creates new NickInfo if necessary.
@@ -548,7 +548,7 @@ void resetNickSelection();
* @param nickname The nickname. Case sensitive.
* @return The NickInfo for the nickname.
*/
- ChannelNickPtr addNickToUnjoinedChannelsList(const QString& channelName, const QString& nickname);
+ ChannelNickPtr addNickToUnjoinedChannelsList(const TQString& channelName, const TQString& nickname);
/**
* If not already online, changes a nick to the online state by creating
@@ -557,7 +557,7 @@ void resetNickSelection();
* @param nickname The nickname that is online.
* @return Pointer to NickInfo for nick.
*/
- NickInfoPtr setWatchedNickOnline(const QString& nickname);
+ NickInfoPtr setWatchedNickOnline(const TQString& nickname);
/**
* Display offline notification for a certain nickname. The function doesn't change NickInfo objects.
@@ -566,7 +566,7 @@ void resetNickSelection();
* @param nickname The nickname that is offline
* @param nickInfo Pointer to NickInfo for nick
*/
- void setWatchedNickOffline(const QString& nickname, const NickInfoPtr nickInfo);
+ void setWatchedNickOffline(const TQString& nickname, const NickInfoPtr nickInfo);
/**
* If nickname is no longer on any channel list, or the query list, delete it altogether.
@@ -575,7 +575,7 @@ void resetNickSelection();
* @param nickname The nickname to be deleted. Case insensitive.
* @return True if the nickname is deleted.
*/
- bool deleteNickIfUnlisted(const QString &nickname);
+ bool deleteNickIfUnlisted(const TQString &nickname);
/**
* If not already offline, changes a nick to the offline state.
@@ -588,78 +588,78 @@ void resetNickSelection();
* @param nickname The nickname. Case sensitive.
* @return True if the nick was online.
*/
- bool setNickOffline(const QString& nickname);
+ bool setNickOffline(const TQString& nickname);
/** Remove nickname from a channel (on joined or unjoined lists).
* @param channelName The channel name. Case insensitive.
* @param nickname The nickname. Case insensitive.
*/
- void removeChannelNick(const QString& channelName, const QString& nickname);
+ void removeChannelNick(const TQString& channelName, const TQString& nickname);
/** Remove channel from the joined list.
* Nicknames in the channel are added to the unjoined list if they are in the watch list.
* @param channelName The channel name. Case insensitive.
*/
- void removeJoinedChannel(const QString& channelName);
+ void removeJoinedChannel(const TQString& channelName);
/** Renames a nickname in all NickInfo lists.
* @param nickInfo Pointer to existing NickInfo object.
* @param newname New nickname for the nick. Case sensitive.
*/
- void renameNickInfo(NickInfoPtr nickInfo, const QString& newname);
+ void renameNickInfo(NickInfoPtr nickInfo, const TQString& newname);
bool getAutoJoin() const;
void setAutoJoin(bool on);
- QStringList getAutoJoinCommands() const { return m_autoJoinCommands; }
- void setAutoJoinCommands(const QStringList& commands) { m_autoJoinCommands = commands; }
+ TQStringList getAutoJoinCommands() const { return m_autoJoinCommands; }
+ void setAutoJoinCommands(const TQStringList& commands) { m_autoJoinCommands = commands; }
unsigned int m_completeQueryPosition;
- QValueList<int> m_nickIndices;
- QStringList m_referenceNicklist;
+ TQValueList<int> m_nickIndices;
+ TQStringList m_referenceNicklist;
- // TODO roll these into a QMap.
- QString m_serverNickPrefixes; // Prefixes used by the server to indicate a mode
- QString m_serverNickPrefixModes; // if supplied: modes related to those prefixes
- QString m_channelPrefixes; // prefixes that indicate channel names. defaults to RFC1459 "#&"
+ // TODO roll these into a TQMap.
+ TQString m_serverNickPrefixes; // Prefixes used by the server to indicate a mode
+ TQString m_serverNickPrefixModes; // if supplied: modes related to those prefixes
+ TQString m_channelPrefixes; // prefixes that indicate channel names. defaults to RFC1459 "#&"
bool m_autoJoin;
- QStringList m_autoJoinCommands;
+ TQStringList m_autoJoinCommands;
KNetwork::KStreamSocket* m_socket;
- QTimer m_reconnectTimer;
- QTimer m_incomingTimer;
- QTimer m_notifyTimer;
- QStringList m_notifyCache; // List of users found with ISON
+ TQTimer m_reconnectTimer;
+ TQTimer m_incomingTimer;
+ TQTimer m_notifyTimer;
+ TQStringList m_notifyCache; // List of users found with ISON
int m_checkTime; // Time elapsed while waiting for server 303 response
int m_currentLag;
- QCString m_inputBufferIncomplete;
- QStringList m_inputBuffer;
+ TQCString m_inputBufferIncomplete;
+ TQStringList m_inputBuffer;
- QValueVector<IRCQueue *> m_queues;
+ TQValueVector<IRCQueue *> m_queues;
int m_bytesSent, m_encodedBytesSent, m_linesSent, m_bytesReceived;
- QString m_nickname;
- QString m_loweredNickname;
- QString m_ownIpByUserhost; // RPL_USERHOST
- QString m_ownIpByWelcome; // RPL_WELCOME
+ TQString m_nickname;
+ TQString m_loweredNickname;
+ TQString m_ownIpByUserhost; // RPL_USERHOST
+ TQString m_ownIpByWelcome; // RPL_WELCOME
- QPtrList<Channel> m_channelList;
- QPtrList<Query> m_queryList;
+ TQPtrList<Channel> m_channelList;
+ TQPtrList<Query> m_queryList;
InputFilter m_inputFilter;
Konversation::OutputFilter* m_outputFilter;
- QGuardedPtr<StatusPanel> m_statusView;
- QGuardedPtr<RawLog> m_rawLog;
- QGuardedPtr<ChannelListPanel> m_channelListPanel;
+ TQGuardedPtr<StatusPanel> m_statusView;
+ TQGuardedPtr<RawLog> m_rawLog;
+ TQGuardedPtr<ChannelListPanel> m_channelListPanel;
bool m_away;
- QString m_awayReason;
- QString m_nonAwayNick;
+ TQString m_awayReason;
+ TQString m_nonAwayNick;
int m_awayTime;
Konversation::ConnectionState m_connectionState;
@@ -689,10 +689,10 @@ void resetNickSelection();
/// List of nicks in Queries.
NickInfoMap m_queryNicks;
- QString m_allowedChannelModes;
+ TQString m_allowedChannelModes;
// Blowfish key map
- QMap<QString,QCString> m_keyMap;
+ TQMap<TQString,TQCString> m_keyMap;
bool m_identifyMsg;
bool m_autoIdentifyLock;
@@ -701,12 +701,12 @@ void resetNickSelection();
bool m_processingIncoming;
/// Meassures the lag between PING and PONG
- QTime m_lagTime;
+ TQTime m_lagTime;
/// Updates the gui when the lag gets too high
- QTimer m_pingResponseTimer;
+ TQTimer m_pingResponseTimer;
/// Previous ISON reply of the server, needed for comparison with the next reply
- QStringList m_prevISONList;
+ TQStringList m_prevISONList;
ConnectionSettings m_connectionSettings;
diff --git a/konversation/src/serverdialog.cpp b/konversation/src/serverdialog.cpp
index 1c185dd..060cf6d 100644
--- a/konversation/src/serverdialog.cpp
+++ b/konversation/src/serverdialog.cpp
@@ -12,13 +12,13 @@
#include "serverdialog.h"
#include "serversettings.h"
-#include <qlayout.h>
-#include <qframe.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qspinbox.h>
-#include <qcheckbox.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqspinbox.h>
+#include <tqcheckbox.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -27,31 +27,31 @@
namespace Konversation
{
- ServerDialog::ServerDialog(const QString& title, QWidget *parent, const char *name)
+ ServerDialog::ServerDialog(const TQString& title, TQWidget *parent, const char *name)
: KDialogBase(Plain, title, Ok|Cancel, Ok, parent, name)
{
- QFrame* mainWidget = plainPage();
- QGridLayout* mainLayout = new QGridLayout(mainWidget, 1, 4, 0, spacingHint());
+ TQFrame* mainWidget = plainPage();
+ TQGridLayout* mainLayout = new TQGridLayout(mainWidget, 1, 4, 0, spacingHint());
- QLabel* serverLbl = new QLabel(i18n("&Server:"), mainWidget);
- m_serverEdit = new QLineEdit(mainWidget);
- QWhatsThis::add(m_serverEdit, i18n("The name or IP number of the server. irchelp.org maintains a list of servers."));
+ TQLabel* serverLbl = new TQLabel(i18n("&Server:"), mainWidget);
+ m_serverEdit = new TQLineEdit(mainWidget);
+ TQWhatsThis::add(m_serverEdit, i18n("The name or IP number of the server. irchelp.org maintains a list of servers."));
serverLbl->setBuddy(m_serverEdit);
- QLabel* portLbl = new QLabel(i18n("&Port:"), mainWidget);
+ TQLabel* portLbl = new TQLabel(i18n("&Port:"), mainWidget);
- m_portSBox = new QSpinBox(1, 65535, 1, mainWidget);
+ m_portSBox = new TQSpinBox(1, 65535, 1, mainWidget);
m_portSBox->setValue(6667);
- QWhatsThis::add(m_portSBox, i18n("Enter the port number required to connect to the server. For most servers, this should be <b>6667</b>."));
+ TQWhatsThis::add(m_portSBox, i18n("Enter the port number required to connect to the server. For most servers, this should be <b>6667</b>."));
portLbl->setBuddy(m_portSBox);
- QLabel* passwordLbl = new QLabel(i18n("Pass&word:"), mainWidget);
- m_passwordEdit = new QLineEdit(mainWidget);
- m_passwordEdit->setEchoMode(QLineEdit::Password);
+ TQLabel* passwordLbl = new TQLabel(i18n("Pass&word:"), mainWidget);
+ m_passwordEdit = new TQLineEdit(mainWidget);
+ m_passwordEdit->setEchoMode(TQLineEdit::Password);
passwordLbl->setBuddy(m_passwordEdit);
- m_sslChBox = new QCheckBox(i18n("S&ecure connection (SSL)"), mainWidget);
- QWhatsThis::add(m_sslChBox, i18n("Check if you want to use Secure Socket Layer (SSL) protocol to communicate with the server. This protects the privacy of your communications between your computer and the IRC server. The server must support SSL protocol for this to work. In most cases, if the server does not support SSL, the connection will fail."));
+ m_sslChBox = new TQCheckBox(i18n("S&ecure connection (SSL)"), mainWidget);
+ TQWhatsThis::add(m_sslChBox, i18n("Check if you want to use Secure Socket Layer (SSL) protocol to communicate with the server. This protects the privacy of your communications between your computer and the IRC server. The server must support SSL protocol for this to work. In most cases, if the server does not support SSL, the connection will fail."));
mainLayout->addWidget(serverLbl, 0, 0);
mainLayout->addWidget(m_serverEdit, 0, 1);
diff --git a/konversation/src/serverdialog.h b/konversation/src/serverdialog.h
index 48ece84..cb51d3f 100644
--- a/konversation/src/serverdialog.h
+++ b/konversation/src/serverdialog.h
@@ -14,9 +14,9 @@
#include <kdialogbase.h>
-class QLineEdit;
-class QSpinBox;
-class QCheckBox;
+class TQLineEdit;
+class TQSpinBox;
+class TQCheckBox;
namespace Konversation
{
@@ -28,7 +28,7 @@ namespace Konversation
Q_OBJECT
public:
- explicit ServerDialog(const QString& title, QWidget *parent = 0, const char *name = 0);
+ explicit ServerDialog(const TQString& title, TQWidget *parent = 0, const char *name = 0);
~ServerDialog();
void setServerSettings(const ServerSettings& server);
@@ -38,10 +38,10 @@ namespace Konversation
void slotOk();
private:
- QLineEdit* m_serverEdit;
- QSpinBox* m_portSBox;
- QLineEdit* m_passwordEdit;
- QCheckBox* m_sslChBox;
+ TQLineEdit* m_serverEdit;
+ TQSpinBox* m_portSBox;
+ TQLineEdit* m_passwordEdit;
+ TQCheckBox* m_sslChBox;
};
}
diff --git a/konversation/src/servergroupdialog.cpp b/konversation/src/servergroupdialog.cpp
index 0bfbfb2..f8278e5 100644
--- a/konversation/src/servergroupdialog.cpp
+++ b/konversation/src/servergroupdialog.cpp
@@ -21,17 +21,17 @@
#include "identitydialog.h"
#include "servergroupdialogui.h"
-#include <qframe.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qgroupbox.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qtoolbutton.h>
-#include <qcheckbox.h>
-#include <qwhatsthis.h>
+#include <tqframe.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqgroupbox.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqtoolbutton.h>
+#include <tqcheckbox.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -44,7 +44,7 @@
namespace Konversation
{
- ServerGroupDialog::ServerGroupDialog(const QString& title, QWidget *parent, const char *name)
+ ServerGroupDialog::ServerGroupDialog(const TQString& title, TQWidget *parent, const char *name)
: KDialogBase(Swallow, title, Ok|Cancel, Ok, parent, name)
{
m_id = -1;
@@ -54,48 +54,48 @@ namespace Konversation
m_mainWidget = new ServerGroupDialogUI(this);
setMainWidget(m_mainWidget);
- QWhatsThis::add(m_mainWidget->m_nameEdit, i18n("Enter the name of the Network here. You may create as many entries in the Server List screen with the same Network as you like."));
+ TQWhatsThis::add(m_mainWidget->m_nameEdit, i18n("Enter the name of the Network here. You may create as many entries in the Server List screen with the same Network as you like."));
m_mainWidget->m_networkLabel->setBuddy(m_mainWidget->m_nameEdit);
- QWhatsThis::add(m_mainWidget->m_identityCBox,i18n("Choose an existing Identity or click the Edit button to add a new Identity or edit an existing one. The Identity will identify you and determine your nickname when you connect to the network."));
+ TQWhatsThis::add(m_mainWidget->m_identityCBox,i18n("Choose an existing Identity or click the Edit button to add a new Identity or edit an existing one. The Identity will identify you and determine your nickname when you connect to the network."));
m_mainWidget->m_identityLabel->setBuddy(m_mainWidget->m_identityCBox);
- connect(m_mainWidget->m_editIdentityButton, SIGNAL(clicked()), this, SLOT(editIdentity()));
+ connect(m_mainWidget->m_editIdentityButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(editIdentity()));
IdentityList identities = Preferences::identityList();
for (IdentityList::ConstIterator it = identities.begin(); it != identities.end(); ++it)
m_mainWidget->m_identityCBox->insertItem((*it)->getName());
- QWhatsThis::add(m_mainWidget->m_commandEdit, i18n("Optional. This command will be sent to the server after connecting. Example: <b>/msg NickServ IDENTIFY <i>konvirocks</i></b>. This example is for the freenode network, which requires users to register their nickname with a password and login when connecting. <i>konvirocks<i> is the password for the nickname given in Identity. You may enter more than one command by separating them with semicolons."));
+ TQWhatsThis::add(m_mainWidget->m_commandEdit, i18n("Optional. This command will be sent to the server after connecting. Example: <b>/msg NickServ IDENTIFY <i>konvirocks</i></b>. This example is for the freenode network, which requires users to register their nickname with a password and login when connecting. <i>konvirocks<i> is the password for the nickname given in Identity. You may enter more than one command by separating them with semicolons."));
m_mainWidget->m_commandsLabel->setBuddy(m_mainWidget->m_commandEdit);
- QWhatsThis::add(m_mainWidget->m_autoConnectCBox, i18n("Check here if you want Konversation to automatically connect to this network whenever you open Konversation."));
+ TQWhatsThis::add(m_mainWidget->m_autoConnectCBox, i18n("Check here if you want Konversation to automatically connect to this network whenever you open Konversation."));
- QWhatsThis::add(m_mainWidget->m_serverLBox, i18n("This is a list of IRC Servers in the network. When connecting to the network, Konversation will attempt to connect to the top server first. If this fails, it will attempt the second server. If this fails, it will attempt the third, and so on. At least one server must be specified. Click a server to highlight it."));
+ TQWhatsThis::add(m_mainWidget->m_serverLBox, i18n("This is a list of IRC Servers in the network. When connecting to the network, Konversation will attempt to connect to the top server first. If this fails, it will attempt the second server. If this fails, it will attempt the third, and so on. At least one server must be specified. Click a server to highlight it."));
m_mainWidget->m_removeServerButton->setIconSet(SmallIconSet("editdelete"));
m_mainWidget->m_removeServerButton->setTextLabel(i18n("Delete"));
m_mainWidget->m_upServerBtn->setIconSet(SmallIconSet("up"));
m_mainWidget->m_downServerBtn->setIconSet(SmallIconSet("down"));
- connect(m_mainWidget->m_addServerButton, SIGNAL(clicked()), this, SLOT(addServer()));
- connect(m_mainWidget->m_changeServerButton, SIGNAL(clicked()), this, SLOT(editServer()));
- connect(m_mainWidget->m_removeServerButton, SIGNAL(clicked()), this, SLOT(deleteServer()));
- connect(m_mainWidget->m_serverLBox, SIGNAL(selectionChanged()), this, SLOT(updateServerArrows()));
- connect(m_mainWidget->m_upServerBtn, SIGNAL(clicked()), this, SLOT(moveServerUp()));
- connect(m_mainWidget->m_downServerBtn, SIGNAL(clicked()), this, SLOT(moveServerDown()));
+ connect(m_mainWidget->m_addServerButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(addServer()));
+ connect(m_mainWidget->m_changeServerButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(editServer()));
+ connect(m_mainWidget->m_removeServerButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteServer()));
+ connect(m_mainWidget->m_serverLBox, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(updateServerArrows()));
+ connect(m_mainWidget->m_upServerBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(moveServerUp()));
+ connect(m_mainWidget->m_downServerBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(moveServerDown()));
- QWhatsThis::add(m_mainWidget->m_channelLBox, i18n("Optional. This is a list of the channels that will be automatically joined once Konversation has connected to a server. You may leave this blank if you wish to not automatically join any channels."));
+ TQWhatsThis::add(m_mainWidget->m_channelLBox, i18n("Optional. This is a list of the channels that will be automatically joined once Konversation has connected to a server. You may leave this blank if you wish to not automatically join any channels."));
m_mainWidget->m_removeChannelButton->setIconSet(SmallIconSet("editdelete"));
m_mainWidget->m_removeChannelButton->setTextLabel(i18n("Delete"));
m_mainWidget->m_upChannelBtn->setIconSet(SmallIconSet("up"));
m_mainWidget->m_downChannelBtn->setIconSet(SmallIconSet("down"));
- connect(m_mainWidget->m_addChannelButton, SIGNAL(clicked()), this, SLOT(addChannel()));
- connect(m_mainWidget->m_changeChannelButton, SIGNAL(clicked()), this, SLOT(editChannel()));
- connect(m_mainWidget->m_removeChannelButton, SIGNAL(clicked()), this, SLOT(deleteChannel()));
- connect(m_mainWidget->m_channelLBox, SIGNAL(selectionChanged()), this, SLOT(updateChannelArrows()));
- connect(m_mainWidget->m_upChannelBtn, SIGNAL(clicked()), this, SLOT(moveChannelUp()));
- connect(m_mainWidget->m_downChannelBtn, SIGNAL(clicked()), this, SLOT(moveChannelDown()));
+ connect(m_mainWidget->m_addChannelButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(addChannel()));
+ connect(m_mainWidget->m_changeChannelButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(editChannel()));
+ connect(m_mainWidget->m_removeChannelButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteChannel()));
+ connect(m_mainWidget->m_channelLBox, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(updateChannelArrows()));
+ connect(m_mainWidget->m_upChannelBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(moveChannelUp()));
+ connect(m_mainWidget->m_downChannelBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(moveChannelDown()));
setButtonOK(KGuiItem(i18n("&OK"), "button_ok", i18n("Change network information")));
setButtonCancel(KGuiItem(i18n("&Cancel"), "button_cancel", i18n("Discards all changes made")));
diff --git a/konversation/src/servergroupdialog.h b/konversation/src/servergroupdialog.h
index a8222d0..96977de 100644
--- a/konversation/src/servergroupdialog.h
+++ b/konversation/src/servergroupdialog.h
@@ -18,11 +18,11 @@
#include <kdialogbase.h>
-class QLineEdit;
-class QComboBox;
-class QListBox;
-class QCheckBox;
-class QToolButton;
+class TQLineEdit;
+class TQComboBox;
+class TQListBox;
+class TQCheckBox;
+class TQToolButton;
class ServerGroupDialogUI;
namespace Konversation
@@ -32,7 +32,7 @@ namespace Konversation
{
Q_OBJECT
public:
- explicit ServerGroupDialog(const QString& title, QWidget* parent = 0, const char* name = 0);
+ explicit ServerGroupDialog(const TQString& title, TQWidget* parent = 0, const char* name = 0);
~ServerGroupDialog();
void setServerGroupSettings(ServerGroupSettingsPtr settings);
diff --git a/konversation/src/servergroupsettings.cpp b/konversation/src/servergroupsettings.cpp
index e10d553..567edfc 100644
--- a/konversation/src/servergroupsettings.cpp
+++ b/konversation/src/servergroupsettings.cpp
@@ -63,7 +63,7 @@ namespace Konversation
m_sortIndex = settings.sortIndex();
}
- ServerGroupSettings::ServerGroupSettings(const QString& name)
+ ServerGroupSettings::ServerGroupSettings(const TQString& name)
: KShared()
{
setName(name);
@@ -163,7 +163,7 @@ namespace Konversation
m_channelHistory.append(channel);
}
- ChannelSettings ServerGroupSettings::channelByNameFromHistory(const QString& channelName)
+ ChannelSettings ServerGroupSettings::channelByNameFromHistory(const TQString& channelName)
{
ChannelList::iterator endIt = m_channelHistory.end();
@@ -194,20 +194,20 @@ namespace Konversation
setNotificationsEnabled(settings.enableNotifications());
}
- ChannelSettings::ChannelSettings(const QString& name)
+ ChannelSettings::ChannelSettings(const TQString& name)
{
setName(name);
setNotificationsEnabled(true);
}
- ChannelSettings::ChannelSettings(const QString& name, const QString& password)
+ ChannelSettings::ChannelSettings(const TQString& name, const TQString& password)
{
setName(name);
setPassword(password);
setNotificationsEnabled(true);
}
- ChannelSettings::ChannelSettings(const QString& name, const QString& password, bool enableNotifications)
+ ChannelSettings::ChannelSettings(const TQString& name, const TQString& password, bool enableNotifications)
{
setName(name);
setPassword(password);
diff --git a/konversation/src/servergroupsettings.h b/konversation/src/servergroupsettings.h
index 903725a..3a7cc2d 100644
--- a/konversation/src/servergroupsettings.h
+++ b/konversation/src/servergroupsettings.h
@@ -16,8 +16,8 @@
#include "serversettings.h"
#include "identity.h"
-#include <qvaluelist.h>
-#include <qstringlist.h>
+#include <tqvaluelist.h>
+#include <tqstringlist.h>
#include <ksharedptr.h>
@@ -30,16 +30,16 @@ namespace Konversation
public:
ChannelSettings();
ChannelSettings(const ChannelSettings& settings);
- explicit ChannelSettings(const QString& name);
- ChannelSettings(const QString& name, const QString& password);
- ChannelSettings(const QString& name, const QString& password, bool enableNotifications);
+ explicit ChannelSettings(const TQString& name);
+ ChannelSettings(const TQString& name, const TQString& password);
+ ChannelSettings(const TQString& name, const TQString& password, bool enableNotifications);
~ChannelSettings();
- void setName(const QString& name) { m_name = name; }
- QString name() const { return m_name; }
+ void setName(const TQString& name) { m_name = name; }
+ TQString name() const { return m_name; }
- void setPassword(const QString& password) { m_password = password; }
- QString password() const { return m_password; }
+ void setPassword(const TQString& password) { m_password = password; }
+ TQString password() const { return m_password; }
void setNotificationsEnabled(bool enable) { m_enableNotifications = enable; }
bool enableNotifications() const { return m_enableNotifications; }
@@ -47,17 +47,17 @@ namespace Konversation
bool operator==(const ChannelSettings& channel) const;
private:
- QString m_name;
- QString m_password;
+ TQString m_name;
+ TQString m_password;
bool m_enableNotifications;
};
class ServerGroupSettings;
typedef KSharedPtr<ServerGroupSettings> ServerGroupSettingsPtr;
- typedef QValueList<ServerGroupSettingsPtr> ServerGroupList;
- typedef QValueList<ServerSettings> ServerList;
- typedef QValueList<ChannelSettings> ChannelList;
+ typedef TQValueList<ServerGroupSettingsPtr> ServerGroupList;
+ typedef TQValueList<ServerSettings> ServerList;
+ typedef TQValueList<ChannelSettings> ChannelList;
class ServerGroupSettings : public KShared
{
@@ -65,11 +65,11 @@ namespace Konversation
ServerGroupSettings();
ServerGroupSettings(int id);
ServerGroupSettings(const ServerGroupSettings& settings);
- ServerGroupSettings(const QString& name);
+ ServerGroupSettings(const TQString& name);
~ServerGroupSettings();
- void setName(const QString& name) { m_name = name; }
- QString name() const { return m_name; }
+ void setName(const TQString& name) { m_name = name; }
+ TQString name() const { return m_name; }
void setServerList(const ServerList& list);
void addServer(const ServerSettings& settings) { m_serverList.append(settings); }
@@ -89,8 +89,8 @@ namespace Konversation
ChannelList channelList() const { return m_channelList; }
ChannelSettings channelByIndex(unsigned int index) const;
- void setConnectCommands(const QString& commands) { m_connectCommands = commands; }
- QString connectCommands() const { return m_connectCommands; }
+ void setConnectCommands(const TQString& commands) { m_connectCommands = commands; }
+ TQString connectCommands() const { return m_connectCommands; }
void setAutoConnectEnabled(bool enabled) { m_autoConnect = enabled; }
bool autoConnectEnabled() const { return m_autoConnect; }
@@ -103,7 +103,7 @@ namespace Konversation
void setChannelHistory(const ChannelList& list) { m_channelHistory = list; }
void appendChannelHistory(const ChannelSettings& channel);
ChannelList channelHistory() const { return m_channelHistory; }
- ChannelSettings channelByNameFromHistory(const QString& channelName);
+ ChannelSettings channelByNameFromHistory(const TQString& channelName);
void setNotificationsEnabled(bool enable) { m_enableNotifications = enable; }
bool enableNotifications() const { return m_enableNotifications; }
@@ -114,14 +114,14 @@ namespace Konversation
private:
static int s_availableId;
int m_sortIndex;
- QString m_name;
+ TQString m_name;
ServerList m_serverList;
int m_identityId;
ChannelList m_channelList;
ChannelList m_channelHistory;
- QString m_connectCommands;
+ TQString m_connectCommands;
bool m_autoConnect;
- QString m_group;
+ TQString m_group;
int m_id;
bool m_enableNotifications;
bool m_expanded;
diff --git a/konversation/src/serverison.cpp b/konversation/src/serverison.cpp
index b2d66a2..ac54843 100644
--- a/konversation/src/serverison.cpp
+++ b/konversation/src/serverison.cpp
@@ -22,9 +22,9 @@
#include "nickinfo.h"
#include "viewcontainer.h"
-#include <qmap.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kabc/addressbook.h>
#include <kabc/stdaddressbook.h>
@@ -34,48 +34,48 @@ ServerISON::ServerISON(Server* server) : m_server(server)
m_ISONList_invalid = true;
//We need to know when the addressbook changes because if the info for an offline nick changes,
//we won't get a nickInfoChanged signal.
- connect( Konversation::Addressbook::self()->getAddressBook(), SIGNAL( addressBookChanged( AddressBook * ) ),
- this, SLOT( addressbookChanged() ) );
- connect( Konversation::Addressbook::self(), SIGNAL(addresseesChanged()),
- this, SLOT(addressbookChanged()));
- connect( m_server, SIGNAL(nickInfoChanged(Server*, const NickInfoPtr)),
- this, SLOT(nickInfoChanged(Server*, const NickInfoPtr)));
+ connect( Konversation::Addressbook::self()->getAddressBook(), TQT_SIGNAL( addressBookChanged( AddressBook * ) ),
+ this, TQT_SLOT( addressbookChanged() ) );
+ connect( Konversation::Addressbook::self(), TQT_SIGNAL(addresseesChanged()),
+ this, TQT_SLOT(addressbookChanged()));
+ connect( m_server, TQT_SIGNAL(nickInfoChanged(Server*, const NickInfoPtr)),
+ this, TQT_SLOT(nickInfoChanged(Server*, const NickInfoPtr)));
connect( m_server,
- SIGNAL(channelMembersChanged(Server*, const QString&, bool, bool, const QString& )),
+ TQT_SIGNAL(channelMembersChanged(Server*, const TQString&, bool, bool, const TQString& )),
this,
- SLOT(slotChannelMembersChanged(Server*, const QString&, bool, bool, const QString& )));
+ TQT_SLOT(slotChannelMembersChanged(Server*, const TQString&, bool, bool, const TQString& )));
connect( m_server,
- SIGNAL(channelJoinedOrUnjoined(Server*, const QString&, bool )),
+ TQT_SIGNAL(channelJoinedOrUnjoined(Server*, const TQString&, bool )),
this,
- SLOT(slotChannelJoinedOrUnjoined(Server*, const QString&, bool )));
- connect(KonversationApplication::instance(), SIGNAL(serverGroupsChanged(const Konversation::ServerGroupSettings*)),
- this, SLOT(slotServerGroupsChanged()));
+ TQT_SLOT(slotChannelJoinedOrUnjoined(Server*, const TQString&, bool )));
+ connect(KonversationApplication::instance(), TQT_SIGNAL(serverGroupsChanged(const Konversation::ServerGroupSettings*)),
+ this, TQT_SLOT(slotServerGroupsChanged()));
}
-QStringList ServerISON::getWatchList()
+TQStringList ServerISON::getWatchList()
{
if(m_ISONList_invalid)
recalculateAddressees();
return m_watchList;
}
-QStringList ServerISON::getISONList()
+TQStringList ServerISON::getISONList()
{
if(m_ISONList_invalid)
recalculateAddressees();
return m_ISONList;
}
-QStringList ServerISON::getAddressees()
+TQStringList ServerISON::getAddressees()
{
if(m_ISONList_invalid)
recalculateAddressees();
return m_addresseesISON;
}
-KABC::Addressee ServerISON::getOfflineNickAddressee(QString& nickname)
+KABC::Addressee ServerISON::getOfflineNickAddressee(TQString& nickname)
{
- QString lcNickname = nickname.lower();
+ TQString lcNickname = nickname.lower();
if(m_ISONList_invalid)
recalculateAddressees();
if (m_offlineNickToAddresseeMap.contains(lcNickname))
@@ -94,7 +94,7 @@ void ServerISON::recalculateAddressees()
// Build a map of online nicknames with associated addressbook entry,
// indexed by KABC::Addressee uid.
// Note that there can be more than one nick associated with an addressee.
- QMap<QString,QStringList> addresseeToOnlineNickMap;
+ TQMap<TQString,TQStringList> addresseeToOnlineNickMap;
NickInfoMap::ConstIterator nickInfoItEnd = allNicks->constEnd();
for(NickInfoMap::ConstIterator nickInfoIt=allNicks->constBegin();
nickInfoIt != nickInfoItEnd; ++nickInfoIt)
@@ -103,19 +103,19 @@ void ServerISON::recalculateAddressees()
KABC::Addressee addressee = nickInfo->getAddressee();
if (!addressee.isEmpty())
{
- QString uid = addressee.uid();
- QStringList nicknames = addresseeToOnlineNickMap[uid];
+ TQString uid = addressee.uid();
+ TQStringList nicknames = addresseeToOnlineNickMap[uid];
nicknames.append(nickInfo->getNickname());
addresseeToOnlineNickMap[uid] = nicknames;
}
}
// Lowercase server name and server group.
- QString lserverName = m_server->getServerName().lower();
- QString lserverGroup = m_server->getDisplayName().lower();
+ TQString lserverName = m_server->getServerName().lower();
+ TQString lserverGroup = m_server->getDisplayName().lower();
// Build notify list from nicks in addressbook, eliminating dups (case insensitive).
- QMap<QString,QString> ISONMap;
+ TQMap<TQString,TQString> ISONMap;
m_offlineNickToAddresseeMap.clear();
for( KABC::AddressBook::ConstIterator it =
Konversation::Addressbook::self()->getAddressBook()->begin();
@@ -123,16 +123,16 @@ void ServerISON::recalculateAddressees()
{
if(Konversation::Addressbook::self()->hasAnyNicks(*it))
{
- QString uid = (*it).uid();
+ TQString uid = (*it).uid();
// First check if we already know that this addressee is online.
// If so, add all the nicks of the addressee that are online, but do not
// add the offline nicks. There is no point in monitoring such nicks.
if (addresseeToOnlineNickMap.contains(uid))
{
- QStringList nicknames = addresseeToOnlineNickMap[uid];
- QStringList::iterator itEnd = nicknames.end();
+ TQStringList nicknames = addresseeToOnlineNickMap[uid];
+ TQStringList::iterator itEnd = nicknames.end();
- for(QStringList::iterator it = nicknames.begin(); it != itEnd; ++it)
+ for(TQStringList::iterator it = nicknames.begin(); it != itEnd; ++it)
{
ISONMap.insert((*it).lower(), (*it), true);
}
@@ -144,18 +144,18 @@ void ServerISON::recalculateAddressees()
// to the notify list.
// Simultaneously, build a map of all offline nicks and corresponding
// KABC::Addressee, indexed by lowercase nickname.
- QStringList nicks = QStringList::split( QChar( 0xE000 ),
+ TQStringList nicks = TQStringList::split( TQChar( 0xE000 ),
(*it).custom("messaging/irc", "All") );
- QStringList::ConstIterator nicksItEnd = nicks.constEnd();
- for( QStringList::ConstIterator nicksIt = nicks.constBegin();
+ TQStringList::ConstIterator nicksItEnd = nicks.constEnd();
+ for( TQStringList::ConstIterator nicksIt = nicks.constBegin();
nicksIt != nicksItEnd; ++nicksIt )
{
- QString lserverOrGroup = (*nicksIt).section(QChar(0xE120),1).lower();
+ TQString lserverOrGroup = (*nicksIt).section(TQChar(0xE120),1).lower();
if(lserverOrGroup == lserverName || lserverOrGroup == lserverGroup ||
lserverOrGroup.isEmpty())
{
- QString nickname = (*nicksIt).section(QChar(0xE120),0,0);
- QString lcNickname = nickname.lower();
+ TQString nickname = (*nicksIt).section(TQChar(0xE120),0,0);
+ TQString lcNickname = nickname.lower();
ISONMap.insert(lcNickname, nickname, true);
m_offlineNickToAddresseeMap.insert(lcNickname, *it, true);
}
@@ -168,11 +168,11 @@ void ServerISON::recalculateAddressees()
// Merge with watch list from prefs, eliminating dups (case insensitive).
// TODO: Don't add nick on user watch list if nick is known to be online
// under a different nickname?
- QStringList prefsWatchList =
+ TQStringList prefsWatchList =
Preferences::notifyListByGroupName(m_server->getDisplayName());
- QStringList::iterator itEnd = prefsWatchList.end();
+ TQStringList::iterator itEnd = prefsWatchList.end();
- for(QStringList::iterator it = prefsWatchList.begin(); it != itEnd; ++it)
+ for(TQStringList::iterator it = prefsWatchList.begin(); it != itEnd; ++it)
{
ISONMap.insert((*it).lower(), (*it), true);
}
@@ -184,7 +184,7 @@ void ServerISON::recalculateAddressees()
m_ISONList.clear();
itEnd = m_watchList.end();
- for(QStringList::iterator it = m_watchList.begin(); it != itEnd; ++it)
+ for(TQStringList::iterator it = m_watchList.begin(); it != itEnd; ++it)
{
if (m_server->getNickJoinedChannels(*it).isEmpty())
{
@@ -222,8 +222,8 @@ void ServerISON::addressbookChanged()
m_ISONList_invalid = true;
}
-void ServerISON::slotChannelMembersChanged(Server* /*server*/, const QString& /*channelName*/,
-bool joined, bool parted, const QString& nickname)
+void ServerISON::slotChannelMembersChanged(Server* /*server*/, const TQString& /*channelName*/,
+bool joined, bool parted, const TQString& nickname)
{
// Whenever a nick on the watch list leaves the last joined channel, must recalculate lists.
// The nick will be added to the ISON list.
@@ -232,7 +232,7 @@ bool joined, bool parted, const QString& nickname)
}
void ServerISON::slotChannelJoinedOrUnjoined(Server* /*server*/,
-const QString& /*channelName*/, bool /*joined*/)
+const TQString& /*channelName*/, bool /*joined*/)
{
// If user left or joined a channel, need to recalculate lists, since watched nicks
// may need to be moved from/to ISON list.
diff --git a/konversation/src/serverison.h b/konversation/src/serverison.h
index 4500564..8a2dc23 100644
--- a/konversation/src/serverison.h
+++ b/konversation/src/serverison.h
@@ -28,7 +28,7 @@
class Server;
-typedef QMap<QString,KABC::Addressee> OfflineNickToAddresseeMap;
+typedef TQMap<TQString,KABC::Addressee> OfflineNickToAddresseeMap;
class ServerISON : public QObject
{
@@ -47,14 +47,14 @@ class ServerISON : public QObject
*
* @see getAddressees()
*/
- QStringList getWatchList();
+ TQStringList getWatchList();
/**
* The same list as getWatchList, but with nicks in joined channels eliminated.
* There is no point in performing an ISON on such nicks because we already
* know they are online. This function is called, and the result sent to the
* server as an /ISON command.
*/
- QStringList getISONList();
+ TQStringList getISONList();
/**
* Returns _some_ of the nicks that the addressees have.
@@ -68,7 +68,7 @@ class ServerISON : public QObject
* duration between ISON's.
* - Otherwise, add all the nicks we know the addressee has.
*/
- QStringList getAddressees();
+ TQStringList getAddressees();
/**
* Given the nickname of nick that is offline (or at least not known to be online),
@@ -76,14 +76,14 @@ class ServerISON : public QObject
* @param nickname Desired nickname. Case insensitive.
* @return Addressbook entry of the nick or empty if not found.
*/
- KABC::Addressee getOfflineNickAddressee(QString& nickname);
+ KABC::Addressee getOfflineNickAddressee(TQString& nickname);
private slots:
void addressbookChanged();
void nickInfoChanged(Server* server, const NickInfoPtr nickInfo);
void slotServerGroupsChanged();
- void slotChannelMembersChanged(Server* server, const QString& channelName, bool joined, bool parted, const QString& nickname);
- void slotChannelJoinedOrUnjoined(Server* server, const QString& channelName, bool joined);
+ void slotChannelMembersChanged(Server* server, const TQString& channelName, bool joined, bool parted, const TQString& nickname);
+ void slotChannelJoinedOrUnjoined(Server* server, const TQString& channelName, bool joined);
private:
/** Map of all offline nicks in the addressbook associated with this server
@@ -94,13 +94,13 @@ class ServerISON : public QObject
/// A pointer to the server we are a member of.
Server* m_server;
/// List of nicks to watch that come from addressbook.
- QStringList m_addresseesISON;
+ TQStringList m_addresseesISON;
/// List from above merged with Watch List from preferences.
- QStringList m_watchList;
+ TQStringList m_watchList;
/// List from above but with nicks that are in joined channels eliminated.
/// There is no point in doing an ISON on such nicks because we know they are
/// online in one of the channels the user is in.
- QStringList m_ISONList;
+ TQStringList m_ISONList;
/// If this is true, then we need to call recalculateAddressee before returning m_ISONList
bool m_ISONList_invalid;
/**
diff --git a/konversation/src/serverlistdialog.cpp b/konversation/src/serverlistdialog.cpp
index 92a4a80..cd37cd1 100644
--- a/konversation/src/serverlistdialog.cpp
+++ b/konversation/src/serverlistdialog.cpp
@@ -16,13 +16,13 @@
#include "servergroupdialog.h"
#include "connectionsettings.h"
-#include <qpushbutton.h>
-#include <qframe.h>
-#include <qlayout.h>
-#include <qstringlist.h>
-#include <qwhatsthis.h>
-#include <qheader.h>
-#include <qcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqframe.h>
+#include <tqlayout.h>
+#include <tqstringlist.h>
+#include <tqwhatsthis.h>
+#include <tqheader.h>
+#include <tqcheckbox.h>
#include <klocale.h>
#include <kdebug.h>
@@ -37,7 +37,7 @@ namespace Konversation
//
ServerListItem::ServerListItem(KListView* parent, int serverGroupId, int sortIndex,
- const QString& serverGroup, const QString& identity, const QString& channels)
+ const TQString& serverGroup, const TQString& identity, const TQString& channels)
: KListViewItem(parent, serverGroup, identity, channels)
{
m_serverGroupId = serverGroupId;
@@ -46,8 +46,8 @@ namespace Konversation
m_isServer = false;
}
- ServerListItem::ServerListItem(QListViewItem* parent, int serverGroupId, int sortIndex,
- const QString& name, const ServerSettings& server)
+ ServerListItem::ServerListItem(TQListViewItem* parent, int serverGroupId, int sortIndex,
+ const TQString& name, const ServerSettings& server)
: KListViewItem(parent, name)
{
m_serverGroupId = serverGroupId;
@@ -61,7 +61,7 @@ namespace Konversation
{
int count = 0;
- QListViewItem* item = firstChild();
+ TQListViewItem* item = firstChild();
while (item)
{
@@ -74,7 +74,7 @@ namespace Konversation
return count;
}
- int ServerListItem::compare(QListViewItem *i, int col, bool ascending) const
+ int ServerListItem::compare(TQListViewItem *i, int col, bool ascending) const
{
ServerListItem* item = static_cast<ServerListItem*>(i);
@@ -101,18 +101,18 @@ namespace Konversation
return key( col, ascending ).localeAwareCompare( i->key( col, ascending ) );
}
- ServerListDialog::ServerListDialog(QWidget *parent, const char *name)
+ ServerListDialog::ServerListDialog(TQWidget *parent, const char *name)
: KDialogBase(Plain, i18n("Server List"), Ok|Close, Ok, parent, name, false)
{
setButtonOK(KGuiItem(i18n("C&onnect"), "connect_creating", i18n("Connect to the server"), i18n("Click here to connect to the selected IRC network and channel.")));
- QFrame* mainWidget = plainPage();
+ TQFrame* mainWidget = plainPage();
m_serverList = new ServerListView(mainWidget);
- QWhatsThis::add(m_serverList, i18n("This shows the listof configured IRC networks. An IRC network is a collection of cooperating servers. You need only connect to one of the servers in the network to be connected to the entire IRC network. Once connected, Konversation will automatically join the channels shown. When Konversation is started for the first time, the Freenode network and the <i>#kde</i> channel are already entered for you."));
+ TQWhatsThis::add(m_serverList, i18n("This shows the listof configured IRC networks. An IRC network is a collection of cooperating servers. You need only connect to one of the servers in the network to be connected to the entire IRC network. Once connected, Konversation will automatically join the channels shown. When Konversation is started for the first time, the Freenode network and the <i>#kde</i> channel are already entered for you."));
m_serverList->setAllColumnsShowFocus(true);
m_serverList->setRootIsDecorated(true);
- m_serverList->setResizeMode(QListView::AllColumns);
+ m_serverList->setResizeMode(TQListView::AllColumns);
m_serverList->addColumn(i18n("Network"));
m_serverList->addColumn(i18n("Identity"));
m_serverList->addColumn(i18n("Channels"));
@@ -124,16 +124,16 @@ namespace Konversation
m_serverList->setDropVisualizer(true);
m_serverList->header()->setMovingEnabled(false);
- m_addButton = new QPushButton(i18n("&New..."), mainWidget);
- QWhatsThis::add(m_addButton, i18n("Click here to define a new Network, including the server to connect to, and the Channels to automatically join once connected."));
- m_editButton = new QPushButton(i18n("&Edit..."), mainWidget);
- m_delButton = new QPushButton(i18n("&Delete"), mainWidget);
+ m_addButton = new TQPushButton(i18n("&New..."), mainWidget);
+ TQWhatsThis::add(m_addButton, i18n("Click here to define a new Network, including the server to connect to, and the Channels to automatically join once connected."));
+ m_editButton = new TQPushButton(i18n("&Edit..."), mainWidget);
+ m_delButton = new TQPushButton(i18n("&Delete"), mainWidget);
- QCheckBox* showAtStartup = new QCheckBox(i18n("Show at application startup"), mainWidget);
+ TQCheckBox* showAtStartup = new TQCheckBox(i18n("Show at application startup"), mainWidget);
showAtStartup->setChecked(Preferences::showServerList());
- connect(showAtStartup, SIGNAL(toggled(bool)), this, SLOT(setShowAtStartup(bool)));
+ connect(showAtStartup, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setShowAtStartup(bool)));
- QGridLayout* layout = new QGridLayout(mainWidget, 5, 2, 0, spacingHint());
+ TQGridLayout* layout = new TQGridLayout(mainWidget, 5, 2, 0, spacingHint());
layout->addMultiCellWidget(m_serverList, 0, 3, 0, 0);
layout->addWidget(m_addButton, 0, 1);
@@ -150,21 +150,21 @@ namespace Konversation
// Load server list
updateServerList();
- connect(m_serverList, SIGNAL(aboutToMove()), this, SLOT(slotAboutToMove()));
- connect(m_serverList, SIGNAL(moved()), this, SLOT(slotMoved()));
- connect(m_serverList, SIGNAL(doubleClicked(QListViewItem *, const QPoint&, int)), this, SLOT(slotOk()));
- connect(m_serverList, SIGNAL(selectionChanged()), this, SLOT(updateButtons()));
- connect(m_serverList, SIGNAL(expanded(QListViewItem*)), this, SLOT(slotSetGroupExpanded(QListViewItem*)));
- connect(m_serverList, SIGNAL(collapsed(QListViewItem*)), this, SLOT(slotSetGroupCollapsed(QListViewItem*)));
- connect(m_addButton, SIGNAL(clicked()), this, SLOT(slotAdd()));
- connect(m_editButton, SIGNAL(clicked()), this, SLOT(slotEdit()));
- connect(m_delButton, SIGNAL(clicked()), this, SLOT(slotDelete()));
+ connect(m_serverList, TQT_SIGNAL(aboutToMove()), this, TQT_SLOT(slotAboutToMove()));
+ connect(m_serverList, TQT_SIGNAL(moved()), this, TQT_SLOT(slotMoved()));
+ connect(m_serverList, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint&, int)), this, TQT_SLOT(slotOk()));
+ connect(m_serverList, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(updateButtons()));
+ connect(m_serverList, TQT_SIGNAL(expanded(TQListViewItem*)), this, TQT_SLOT(slotSetGroupExpanded(TQListViewItem*)));
+ connect(m_serverList, TQT_SIGNAL(collapsed(TQListViewItem*)), this, TQT_SLOT(slotSetGroupCollapsed(TQListViewItem*)));
+ connect(m_addButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAdd()));
+ connect(m_editButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEdit()));
+ connect(m_delButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDelete()));
updateButtons();
KConfig* config = kapp->config();
config->setGroup("ServerListDialog");
- QSize newSize = size();
+ TQSize newSize = size();
newSize = config->readSizeEntry("Size", &newSize);
resize(newSize);
@@ -186,7 +186,7 @@ namespace Konversation
void ServerListDialog::slotOk()
{
- QPtrList<QListViewItem> selected = m_serverList->selectedItems();
+ TQPtrList<TQListViewItem> selected = m_serverList->selectedItems();
ServerListItem * item = static_cast<ServerListItem*>(selected.first());
while (item)
@@ -270,7 +270,7 @@ namespace Konversation
void ServerListDialog::slotDelete()
{
- QPtrList<QListViewItem> selectedItems = m_serverList->selectedServerListItems();
+ TQPtrList<TQListViewItem> selectedItems = m_serverList->selectedServerListItems();
if (selectedItems.isEmpty())
return;
@@ -304,7 +304,7 @@ namespace Konversation
item = static_cast<ServerListItem*>(selectedItems.first());
// Ask the user if he really wants to delete what he selected
- QString question;
+ TQString question;
if (selectedItems.count()>1)
question = i18n("Do you really want to delete the selected entries?");
@@ -316,8 +316,8 @@ namespace Konversation
return;
}
- QListViewItem* itemBelow = 0;
- QListViewItem* itemAbove = 0;
+ TQListViewItem* itemBelow = 0;
+ TQListViewItem* itemAbove = 0;
// Have fun deleting
while (item)
@@ -362,14 +362,14 @@ namespace Konversation
emit serverGroupsChanged();
}
- void ServerListDialog::slotSetGroupExpanded(QListViewItem* item)
+ void ServerListDialog::slotSetGroupExpanded(TQListViewItem* item)
{
ServerListItem* listItem = static_cast<ServerListItem*>(item);
Konversation::ServerGroupSettingsPtr serverGroup = Preferences::serverGroupById(listItem->serverGroupId());
serverGroup->setExpanded(true);
}
- void ServerListDialog::slotSetGroupCollapsed(QListViewItem* item)
+ void ServerListDialog::slotSetGroupCollapsed(TQListViewItem* item)
{
ServerListItem* listItem = static_cast<ServerListItem*>(item);
Konversation::ServerGroupSettingsPtr serverGroup = Preferences::serverGroupById(listItem->serverGroupId());
@@ -432,7 +432,7 @@ namespace Konversation
}
Preferences::addServerGroup(serverGroup);
- QListViewItem* item = insertServerGroup(serverGroup);
+ TQListViewItem* item = insertServerGroup(serverGroup);
m_serverList->clearSelection();
m_serverList->setSelected(item,true);
m_serverList->setCurrentItem(item);
@@ -460,7 +460,7 @@ namespace Konversation
Konversation::ServerGroupList serverGroups = Preferences::serverGroupList();
Konversation::ServerGroupList::iterator it;
- QListViewItem* networkItem = 0;
+ TQListViewItem* networkItem = 0;
for(it = serverGroups.begin(); it != serverGroups.end(); ++it)
{
@@ -486,10 +486,10 @@ namespace Konversation
m_serverList->repaint();
}
- QListViewItem* ServerListDialog::insertServerGroup(ServerGroupSettingsPtr serverGroup)
+ TQListViewItem* ServerListDialog::insertServerGroup(ServerGroupSettingsPtr serverGroup)
{
// Produce a list of this server group's channels
- QString channels;
+ TQString channels;
Konversation::ChannelList channelList = serverGroup->channelList();
Konversation::ChannelList::iterator channelIt;
@@ -503,7 +503,7 @@ namespace Konversation
channels += (*channelIt).name();
}
- QListViewItem* networkItem = 0;
+ TQListViewItem* networkItem = 0;
// Insert the server group into the list
networkItem = new ServerListItem(m_serverList,
@@ -521,16 +521,16 @@ namespace Konversation
Konversation::ServerList serverList = serverGroup->serverList();
Konversation::ServerList::iterator serverIt;
- QListViewItem* serverItem = 0;
+ TQListViewItem* serverItem = 0;
int i = 0;
for (serverIt = serverList.begin(); serverIt != serverList.end(); ++serverIt)
{
// Produce a string representation of the server object
- QString name = (*serverIt).host();
+ TQString name = (*serverIt).host();
if ((*serverIt).port() != 6667)
- name += ':' + QString::number((*serverIt).port());
+ name += ':' + TQString::number((*serverIt).port());
if ((*serverIt).SSLEnabled())
name += + " (SSL)";
diff --git a/konversation/src/serverlistdialog.h b/konversation/src/serverlistdialog.h
index 909f235..34beed0 100644
--- a/konversation/src/serverlistdialog.h
+++ b/konversation/src/serverlistdialog.h
@@ -21,8 +21,8 @@
class ConnectionSettings;
class Preferences;
-class QPushButton;
-class QStringList;
+class TQPushButton;
+class TQStringList;
namespace Konversation
{
@@ -30,9 +30,9 @@ namespace Konversation
{
public:
ServerListItem(KListView* parent, int serverGroupId, int sortIndex,
- const QString& serverGroup, const QString& identity, const QString& channels);
- ServerListItem(QListViewItem* parent, int serverGroupId, int sortIndex,
- const QString& name, const ServerSettings& server);
+ const TQString& serverGroup, const TQString& identity, const TQString& channels);
+ ServerListItem(TQListViewItem* parent, int serverGroupId, int sortIndex,
+ const TQString& name, const ServerSettings& server);
int serverGroupId() const { return m_serverGroupId; }
@@ -40,17 +40,17 @@ namespace Konversation
int sortIndex() const { return m_sortIndex; }
ServerSettings server() const { return m_server; }
- QString name() const { return m_name; }
+ TQString name() const { return m_name; }
bool isServer() const { return m_isServer; }
int selectedChildrenCount();
- int compare(QListViewItem *i, int col, bool ascending) const;
+ int compare(TQListViewItem *i, int col, bool ascending) const;
private:
int m_serverGroupId;
int m_sortIndex;
- QString m_name;
+ TQString m_name;
ServerSettings m_server;
bool m_isServer;
};
@@ -60,7 +60,7 @@ namespace Konversation
Q_OBJECT
public:
- explicit ServerListDialog(QWidget *parent = 0, const char *name = 0);
+ explicit ServerListDialog(TQWidget *parent = 0, const char *name = 0);
~ServerListDialog();
public slots:
@@ -78,8 +78,8 @@ namespace Konversation
void slotEdit();
void slotDelete();
- void slotSetGroupExpanded(QListViewItem* item);
- void slotSetGroupCollapsed(QListViewItem* item);
+ void slotSetGroupExpanded(TQListViewItem* item);
+ void slotSetGroupCollapsed(TQListViewItem* item);
void slotAboutToMove();
void slotMoved();
@@ -89,19 +89,19 @@ namespace Konversation
void setShowAtStartup(bool show);
protected:
- QListViewItem* insertServerGroup(ServerGroupSettingsPtr serverGroup);
+ TQListViewItem* insertServerGroup(ServerGroupSettingsPtr serverGroup);
void addServerGroup(ServerGroupSettingsPtr serverGroup);
private:
ServerListView* m_serverList;
- QPushButton* m_addButton;
- QPushButton* m_editButton;
- QPushButton* m_delButton;
+ TQPushButton* m_addButton;
+ TQPushButton* m_editButton;
+ TQPushButton* m_delButton;
bool m_selectedItem;
int m_selectedServerGroupId;
ServerSettings m_selectedServer;
- QListViewItem* m_selectedItemPtr;
+ TQListViewItem* m_selectedItemPtr;
int m_lastSortColumn;
SortOrder m_lastSortOrder;
diff --git a/konversation/src/serverlistview.cpp b/konversation/src/serverlistview.cpp
index dbae9a9..be33e43 100644
--- a/konversation/src/serverlistview.cpp
+++ b/konversation/src/serverlistview.cpp
@@ -14,11 +14,11 @@
#include "serverlistview.h"
-#include <qdragobject.h>
+#include <tqdragobject.h>
#include <kdebug.h>
-ServerListView::ServerListView(QWidget *parent)
+ServerListView::ServerListView(TQWidget *parent)
: KListView(parent)
{
}
@@ -27,13 +27,13 @@ ServerListView::~ServerListView()
{
}
-QPtrList<QListViewItem> ServerListView::selectedServerListItems()
+TQPtrList<TQListViewItem> ServerListView::selectedServerListItems()
{
- QPtrList<QListViewItem> selectedItems = KListView::selectedItems();
- QPtrList<QListViewItem> selectedServerListItems;
+ TQPtrList<TQListViewItem> selectedItems = KListView::selectedItems();
+ TQPtrList<TQListViewItem> selectedServerListItems;
- QListViewItem* item = selectedItems.first();
+ TQListViewItem* item = selectedItems.first();
while (item)
{
@@ -53,14 +53,14 @@ QPtrList<QListViewItem> ServerListView::selectedServerListItems()
return selectedServerListItems;
}
-void ServerListView::findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem *&after)
+void ServerListView::findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after)
{
- QPoint p (contentsToViewport(pos));
+ TQPoint p (contentsToViewport(pos));
// Get the position to put it in
- QListViewItem *atpos = itemAt(p);
+ TQListViewItem *atpos = itemAt(p);
- QListViewItem *above;
+ TQListViewItem *above;
if (!atpos) // put it at the end
above = lastItem();
else
@@ -92,13 +92,13 @@ void ServerListView::findDrop(const QPoint &pos, QListViewItem *&parent, QListVi
parent = after ? after->parent() : 0L;
}
-QDragObject* ServerListView::dragObject()
+TQDragObject* ServerListView::dragObject()
{
if (!currentItem())
return 0;
- QPtrList<QListViewItem> selected = selectedItems();
- QListViewItem* item = selected.first();
+ TQPtrList<TQListViewItem> selected = selectedItems();
+ TQListViewItem* item = selected.first();
while (item)
{
@@ -108,7 +108,7 @@ QDragObject* ServerListView::dragObject()
item = selected.next();
}
- return new QStoredDrag("application/x-qlistviewitem", viewport());
+ return new TQStoredDrag("application/x-qlistviewitem", viewport());
}
#include "serverlistview.moc"
diff --git a/konversation/src/serverlistview.h b/konversation/src/serverlistview.h
index 08153a8..a0824e6 100644
--- a/konversation/src/serverlistview.h
+++ b/konversation/src/serverlistview.h
@@ -18,21 +18,21 @@
#include <klistview.h>
-class QDragObject;
+class TQDragObject;
class ServerListView : public KListView
{
Q_OBJECT
public:
- explicit ServerListView(QWidget *parent);
+ explicit ServerListView(TQWidget *parent);
~ServerListView();
- QPtrList<QListViewItem> selectedServerListItems();
+ TQPtrList<TQListViewItem> selectedServerListItems();
protected:
- void findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem *&after);
- QDragObject* dragObject();
+ void findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after);
+ TQDragObject* dragObject();
};
#endif
diff --git a/konversation/src/serversettings.cpp b/konversation/src/serversettings.cpp
index de5214e..3be7bc4 100644
--- a/konversation/src/serversettings.cpp
+++ b/konversation/src/serversettings.cpp
@@ -30,7 +30,7 @@ namespace Konversation
setSSLEnabled(settings.SSLEnabled());
}
- ServerSettings::ServerSettings(const QString& host)
+ ServerSettings::ServerSettings(const TQString& host)
{
setHost(host);
setPort(6667);
@@ -54,12 +54,12 @@ namespace Konversation
return false;
}
- void ServerSettings::setHost(const QString& host)
+ void ServerSettings::setHost(const TQString& host)
{
m_host = host.stripWhiteSpace();
}
- void ServerSettings::setPassword(const QString& password)
+ void ServerSettings::setPassword(const TQString& password)
{
m_password = password.stripWhiteSpace();
}
diff --git a/konversation/src/serversettings.h b/konversation/src/serversettings.h
index d1eec69..5705e6a 100644
--- a/konversation/src/serversettings.h
+++ b/konversation/src/serversettings.h
@@ -13,7 +13,7 @@
#ifndef KONVERSATIONSERVERSETTINGS_H
#define KONVERSATIONSERVERSETTINGS_H
-#include <qstring.h>
+#include <tqstring.h>
namespace Konversation
{
@@ -23,17 +23,17 @@ namespace Konversation
public:
ServerSettings();
ServerSettings(const ServerSettings& settings);
- explicit ServerSettings(const QString& host);
+ explicit ServerSettings(const TQString& host);
~ServerSettings();
- void setHost(const QString& host);
- QString host() const { return m_host; }
+ void setHost(const TQString& host);
+ TQString host() const { return m_host; }
void setPort(int port) { m_port = port; }
int port() const { return m_port;}
- void setPassword(const QString& password);
- QString password() const { return m_password; }
+ void setPassword(const TQString& password);
+ TQString password() const { return m_password; }
void setSSLEnabled(bool enabled) { m_SSLEnabled = enabled; }
bool SSLEnabled() const { return m_SSLEnabled; }
@@ -41,9 +41,9 @@ namespace Konversation
bool operator== (const ServerSettings& settings) const;
private:
- QString m_host;
+ TQString m_host;
int m_port;
- QString m_password;
+ TQString m_password;
bool m_SSLEnabled;
};
diff --git a/konversation/src/ssllabel.cpp b/konversation/src/ssllabel.cpp
index 593acbe..ea2a9a6 100644
--- a/konversation/src/ssllabel.cpp
+++ b/konversation/src/ssllabel.cpp
@@ -15,12 +15,12 @@
#include "ssllabel.h"
-SSLLabel::SSLLabel(QWidget* parent,const char* name)
-: QLabel(parent,name)
+SSLLabel::SSLLabel(TQWidget* parent,const char* name)
+: TQLabel(parent,name)
{
}
-void SSLLabel::mouseReleaseEvent(QMouseEvent *e)
+void SSLLabel::mouseReleaseEvent(TQMouseEvent *e)
{
Q_UNUSED(e);
emit clicked();
diff --git a/konversation/src/ssllabel.h b/konversation/src/ssllabel.h
index d96223e..27eb87b 100644
--- a/konversation/src/ssllabel.h
+++ b/konversation/src/ssllabel.h
@@ -15,17 +15,17 @@
*/
-#include <qlabel.h>
+#include <tqlabel.h>
class SSLLabel : public QLabel
{
Q_OBJECT
public:
- SSLLabel(QWidget* parent, const char* name);
+ SSLLabel(TQWidget* parent, const char* name);
protected:
- void mouseReleaseEvent(QMouseEvent *e);
+ void mouseReleaseEvent(TQMouseEvent *e);
signals:
void clicked();
diff --git a/konversation/src/sslsocket.cpp b/konversation/src/sslsocket.cpp
index 189a504..9d95cd5 100644
--- a/konversation/src/sslsocket.cpp
+++ b/konversation/src/sslsocket.cpp
@@ -31,15 +31,15 @@
struct SSLSocketPrivate
{
int m_sslCertState;
- QString remoteHost;
- QString url;
- QString m_sslCertErrors;
+ TQString remoteHost;
+ TQString url;
+ TQString m_sslCertErrors;
KSSL* kssl;
KSSLCertificateCache* cc;
};
-SSLSocket::SSLSocket(QWidget* serverParent, QObject* parent, const char* name)
+SSLSocket::SSLSocket(TQWidget* serverParent, TQObject* parent, const char* name)
: KStreamSocket(0L,0L,parent,name), m_serverParent(serverParent)
{
d = new SSLSocketPrivate;
@@ -87,11 +87,11 @@ void SSLSocket::stateChanging(KClientSocketBase::SocketState newState)
KClientSocketBase::stateChanging(newState);
}
-const QString SSLSocket::details()
+const TQString SSLSocket::details()
{
int strength = d->kssl->connectionInfo().getCipherUsedBits();
- QString details = i18n("Connection is secured with %1 bit SSL.").arg(strength);
+ TQString details = i18n("Connection is secured with %1 bit SSL.").arg(strength);
return details;
}
@@ -141,8 +141,8 @@ void SSLSocket::showSSLInfoDialog()
KSSLInfoDlg* sslInfoDlg = new KSSLInfoDlg(true, m_serverParent, "sslInfoDlg", true);
sslInfoDlg->setCertState( d->m_sslCertErrors );
sslInfoDlg->setup( *(d->kssl),
- (const QString&) d->remoteHost,
- (const QString&) d->url
+ (const TQString&) d->remoteHost,
+ (const TQString&) d->url
);
sslInfoDlg->exec();
}
@@ -154,7 +154,7 @@ int SSLSocket::verifyCertificate()
bool permacache = false;
bool ipMatchesCN = false;
bool doAddHost = false;
- QString hostname;
+ TQString hostname;
KSSLCertificate::KSSLValidation validation;
d->remoteHost = peerAddress().nodeName();
@@ -185,13 +185,13 @@ int SSLSocket::verifyCertificate()
for(KSSLCertificate::KSSLValidationList::ConstIterator it = validationList.begin();
it != validationList.end(); ++it)
{
- d->m_sslCertErrors += QString::number(*it)+':';
+ d->m_sslCertErrors += TQString::number(*it)+':';
}
if (peerCertificate.chain().isValid() && peerCertificate.chain().depth() > 1)
{
- QString theChain;
- QPtrList<KSSLCertificate> chain = peerCertificate.chain().getChain();
+ TQString theChain;
+ TQPtrList<KSSLCertificate> chain = peerCertificate.chain().getChain();
for (KSSLCertificate *c = chain.first(); c; c = chain.next())
{
theChain += c->toString();
@@ -224,7 +224,7 @@ int SSLSocket::verifyCertificate()
{
do
{
- QString msg = i18n("The IP address of the host %1 "
+ TQString msg = i18n("The IP address of the host %1 "
"does not match the one the "
"certificate was issued to.");
result = KMessageBox::warningYesNoCancel( m_serverParent,
@@ -261,7 +261,7 @@ int SSLSocket::verifyCertificate()
{
if (validation == KSSLCertificate::InvalidHost)
{
- QString msg = i18n("The IP address of the host %1 "
+ TQString msg = i18n("The IP address of the host %1 "
"does not match the one the "
"certificate was issued to.");
result = KMessageBox::warningYesNoCancel( m_serverParent,
@@ -269,19 +269,19 @@ int SSLSocket::verifyCertificate()
i18n("Server Authentication"),
KGuiItem(i18n("Details")),
KGuiItem(i18n("Continue")),
- QString::null,
+ TQString::null,
KMessageBox::Dangerous);
}
else
{
- QString msg = i18n("The server (%1) certificate failed the "
+ TQString msg = i18n("The server (%1) certificate failed the "
"authenticity test.");
result = KMessageBox::warningYesNoCancel( m_serverParent,
msg.arg(hostname),
i18n("Server Authentication"),
KGuiItem(i18n("Details")),
KGuiItem(i18n("Continue")),
- QString::null,
+ TQString::null,
KMessageBox::Dangerous);
}
diff --git a/konversation/src/sslsocket.h b/konversation/src/sslsocket.h
index aa15de0..596cb5e 100644
--- a/konversation/src/sslsocket.h
+++ b/konversation/src/sslsocket.h
@@ -29,11 +29,11 @@ class SSLSocket : public KStreamSocket
Q_OBJECT
public:
- explicit SSLSocket(QWidget* serverParent, QObject* parent = 0L, const char* name = 0L);
+ explicit SSLSocket(TQWidget* serverParent, TQObject* parent = 0L, const char* name = 0L);
~SSLSocket();
void showInfoDialog();
- const QString details();
+ const TQString details();
Q_LONG writeBlock (const char *data, Q_ULONG len);
Q_LONG readBlock (char *data, Q_ULONG maxlen);
@@ -45,7 +45,7 @@ class SSLSocket : public KStreamSocket
/** Emitted when there is a problem with SSL
* @param reason An error string that has already been through i18n
*/
- void sslFailure(const QString& reason);
+ void sslFailure(const TQString& reason);
void sslInitDone();
private:
@@ -53,7 +53,7 @@ class SSLSocket : public KStreamSocket
int verifyCertificate();
void showSSLInfoDialog();
- QWidget* m_serverParent;
+ TQWidget* m_serverParent;
SSLSocketPrivate* d;
};
diff --git a/konversation/src/statuspanel.cpp b/konversation/src/statuspanel.cpp
index f593559..867af61 100644
--- a/konversation/src/statuspanel.cpp
+++ b/konversation/src/statuspanel.cpp
@@ -18,19 +18,19 @@
#include "ircviewbox.h"
#include "server.h"
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qhbox.h>
-#include <qtextcodec.h>
-#include <qlineedit.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqhbox.h>
+#include <tqtextcodec.h>
+#include <tqlineedit.h>
#include <kdebug.h>
#include <klocale.h>
#include <kmessagebox.h>
-StatusPanel::StatusPanel(QWidget* parent) : ChatWindow(parent)
+StatusPanel::StatusPanel(TQWidget* parent) : ChatWindow(parent)
{
setType(ChatWindow::Status);
@@ -43,16 +43,16 @@ StatusPanel::StatusPanel(QWidget* parent) : ChatWindow(parent)
IRCViewBox* ircBox = new IRCViewBox(this, 0); // Server will be set later in setServer()
setTextView(ircBox->ircView());
- QHBox* commandLineBox=new QHBox(this);
+ TQHBox* commandLineBox=new TQHBox(this);
commandLineBox->setSpacing(spacing());
commandLineBox->setMargin(0);
- nicknameCombobox=new QComboBox(commandLineBox);
+ nicknameCombobox=new TQComboBox(commandLineBox);
nicknameCombobox->setEditable(true);
nicknameCombobox->insertStringList(Preferences::nicknameList());
oldNick=nicknameCombobox->currentText();
- awayLabel=new QLabel(i18n("(away)"),commandLineBox);
+ awayLabel=new TQLabel(i18n("(away)"),commandLineBox);
awayLabel->hide();
statusInput=new IRCInput(commandLineBox);
@@ -61,20 +61,20 @@ StatusPanel::StatusPanel(QWidget* parent) : ChatWindow(parent)
setLog(Preferences::log());
- connect(getTextView(),SIGNAL (gotFocus()),statusInput,SLOT (setFocus()) );
+ connect(getTextView(),TQT_SIGNAL (gotFocus()),statusInput,TQT_SLOT (setFocus()) );
- connect(getTextView(),SIGNAL (sendFile()),this,SLOT (sendFileMenu()) );
- connect(getTextView(),SIGNAL (autoText(const QString&)),this,SLOT (sendStatusText(const QString&)) );
+ connect(getTextView(),TQT_SIGNAL (sendFile()),this,TQT_SLOT (sendFileMenu()) );
+ connect(getTextView(),TQT_SIGNAL (autoText(const TQString&)),this,TQT_SLOT (sendStatusText(const TQString&)) );
- connect(statusInput,SIGNAL (submit()),this,SLOT(statusTextEntered()) );
- connect(statusInput,SIGNAL (textPasted(const QString&)),this,SLOT(textPasted(const QString&)) );
- connect(getTextView(), SIGNAL(textPasted(bool)), statusInput, SLOT(paste(bool)));
- connect(getTextView(), SIGNAL(popupCommand(int)), this, SLOT(popupCommand(int)));
+ connect(statusInput,TQT_SIGNAL (submit()),this,TQT_SLOT(statusTextEntered()) );
+ connect(statusInput,TQT_SIGNAL (textPasted(const TQString&)),this,TQT_SLOT(textPasted(const TQString&)) );
+ connect(getTextView(), TQT_SIGNAL(textPasted(bool)), statusInput, TQT_SLOT(paste(bool)));
+ connect(getTextView(), TQT_SIGNAL(popupCommand(int)), this, TQT_SLOT(popupCommand(int)));
- connect(nicknameCombobox,SIGNAL (activated(int)),this,SLOT(nicknameComboboxChanged()));
+ connect(nicknameCombobox,TQT_SIGNAL (activated(int)),this,TQT_SLOT(nicknameComboboxChanged()));
Q_ASSERT(nicknameCombobox->lineEdit()); //it should be editedable. if we design it so it isn't, remove these lines.
if(nicknameCombobox->lineEdit())
- connect(nicknameCombobox->lineEdit(), SIGNAL (lostFocus()),this,SLOT(nicknameComboboxChanged()));
+ connect(nicknameCombobox->lineEdit(), TQT_SIGNAL (lostFocus()),this,TQT_SLOT(nicknameComboboxChanged()));
updateAppearance();
}
@@ -88,7 +88,7 @@ void StatusPanel::serverSaysClose()
closeYourself(false);
}
-void StatusPanel::setNickname(const QString& newNickname)
+void StatusPanel::setNickname(const TQString& newNickname)
{
nicknameCombobox->setCurrentText(newNickname);
}
@@ -98,24 +98,24 @@ void StatusPanel::childAdjustFocus()
statusInput->setFocus();
}
-void StatusPanel::sendStatusText(const QString& sendLine)
+void StatusPanel::sendStatusText(const TQString& sendLine)
{
// create a work copy
- QString outputAll(sendLine);
+ TQString outputAll(sendLine);
// replace aliases and wildcards
if(m_server->getOutputFilter()->replaceAliases(outputAll))
{
- outputAll = m_server->parseWildcards(outputAll, m_server->getNickname(), QString(), QString(), QString(), QString());
+ outputAll = m_server->parseWildcards(outputAll, m_server->getNickname(), TQString(), TQString(), TQString(), TQString());
}
// Send all strings, one after another
- QStringList outList=QStringList::split('\n',outputAll);
+ TQStringList outList=TQStringList::split('\n',outputAll);
for(unsigned int index=0;index<outList.count();index++)
{
- QString output(outList[index]);
+ TQString output(outList[index]);
// encoding stuff is done in Server()
- Konversation::OutputFilterResult result = m_server->getOutputFilter()->parse(m_server->getNickname(), output, QString());
+ Konversation::OutputFilterResult result = m_server->getOutputFilter()->parse(m_server->getNickname(), output, TQString());
if(!result.output.isEmpty())
{
@@ -127,7 +127,7 @@ void StatusPanel::sendStatusText(const QString& sendLine)
void StatusPanel::statusTextEntered()
{
- QString line=statusInput->text();
+ TQString line=statusInput->text();
statusInput->setText("");
if(line.lower()==Preferences::commandChar()+"clear") textView->clear();
@@ -137,15 +137,15 @@ void StatusPanel::statusTextEntered()
}
}
-void StatusPanel::textPasted(const QString& text)
+void StatusPanel::textPasted(const TQString& text)
{
if(m_server)
{
- QStringList multiline=QStringList::split('\n',text);
+ TQStringList multiline=TQStringList::split('\n',text);
for(unsigned int index=0;index<multiline.count();index++)
{
- QString line=multiline[index];
- QString cChar(Preferences::commandChar());
+ TQString line=multiline[index];
+ TQString cChar(Preferences::commandChar());
// make sure that lines starting with command char get escaped
if(line.startsWith(cChar)) line=cChar+line;
sendStatusText(line);
@@ -155,8 +155,8 @@ void StatusPanel::textPasted(const QString& text)
void StatusPanel::updateAppearance()
{
- QColor fg;
- QColor bg;
+ TQColor fg;
+ TQColor bg;
if(Preferences::inputFieldsBackgroundColor())
{
fg=Preferences::color(Preferences::ChannelMessage);
@@ -182,7 +182,7 @@ void StatusPanel::updateAppearance()
else
{
getTextView()->setViewBackground(Preferences::color(Preferences::TextViewBackground),
- QString());
+ TQString());
}
if (Preferences::customTextFont())
@@ -203,7 +203,7 @@ void StatusPanel::updateAppearance()
ChatWindow::updateAppearance();
}
-void StatusPanel::setName(const QString& newName)
+void StatusPanel::setName(const TQString& newName)
{
ChatWindow::setName(newName);
setLogfileName(newName.lower());
@@ -211,7 +211,7 @@ void StatusPanel::setName(const QString& newName)
void StatusPanel::updateName()
{
- QString newName = getServer()->getDisplayName();
+ TQString newName = getServer()->getDisplayName();
setName(newName);
setLogfileName(newName.lower());
}
@@ -239,8 +239,8 @@ void StatusPanel::indicateAway(bool show)
}
}
-// fix Qt's broken behavior on hidden QListView pages
-void StatusPanel::showEvent(QShowEvent*)
+// fix Qt's broken behavior on hidden TQListView pages
+void StatusPanel::showEvent(TQShowEvent*)
{
if(awayChanged)
{
@@ -249,7 +249,7 @@ void StatusPanel::showEvent(QShowEvent*)
}
}
-QString StatusPanel::getTextInLine() { return statusInput->text(); }
+TQString StatusPanel::getTextInLine() { return statusInput->text(); }
bool StatusPanel::canBeFrontView() { return true; }
bool StatusPanel::searchView() { return true; }
@@ -297,7 +297,7 @@ bool StatusPanel::closeYourself(bool confirm)
void StatusPanel::nicknameComboboxChanged()
{
- QString newNick=nicknameCombobox->currentText();
+ TQString newNick=nicknameCombobox->currentText();
oldNick=m_server->getNickname();
if(oldNick!=newNick)
{
@@ -308,7 +308,7 @@ void StatusPanel::nicknameComboboxChanged()
statusInput->setFocus();
}
-void StatusPanel::changeNickname(const QString& newNickname)
+void StatusPanel::changeNickname(const TQString& newNickname)
{
m_server->queue("NICK "+newNickname);
}
@@ -318,7 +318,7 @@ void StatusPanel::emitUpdateInfo()
emit updateInfo(getServer()->getDisplayName());
}
-void StatusPanel::appendInputText(const QString& text, bool fromCursor)
+void StatusPanel::appendInputText(const TQString& text, bool fromCursor)
{
if(!fromCursor)
{
@@ -334,18 +334,18 @@ void StatusPanel::appendInputText(const QString& text, bool fromCursor)
}
// virtual
-void StatusPanel::setChannelEncoding(const QString& encoding)
+void StatusPanel::setChannelEncoding(const TQString& encoding)
{
Preferences::setChannelEncoding(m_server->getDisplayName(), ":server", encoding);
}
-QString StatusPanel::getChannelEncoding() // virtual
+TQString StatusPanel::getChannelEncoding() // virtual
{
return Preferences::channelEncoding(m_server->getDisplayName(), ":server");
}
// virtual
-QString StatusPanel::getChannelEncodingDefaultDesc()
+TQString StatusPanel::getChannelEncodingDefaultDesc()
{
return i18n("Identity Default ( %1 )").arg(getServer()->getIdentity()->getCodecName());
}
diff --git a/konversation/src/statuspanel.h b/konversation/src/statuspanel.h
index 3704361..dcef517 100644
--- a/konversation/src/statuspanel.h
+++ b/konversation/src/statuspanel.h
@@ -15,13 +15,13 @@
#include "chatwindow.h"
-#include <qstring.h>
+#include <tqstring.h>
-class QPushButton;
-class QCheckBox;
-class QLabel;
-class QComboBox;
+class TQPushButton;
+class TQCheckBox;
+class TQLabel;
+class TQComboBox;
class IRCInput;
class NickChangeDialog;
@@ -31,19 +31,19 @@ class StatusPanel : public ChatWindow
Q_OBJECT
public:
- explicit StatusPanel(QWidget* parent);
+ explicit StatusPanel(TQWidget* parent);
~StatusPanel();
- virtual void setName(const QString& newName);
+ virtual void setName(const TQString& newName);
- virtual QString getTextInLine();
+ virtual TQString getTextInLine();
virtual bool closeYourself(bool askForConfirmation=true);
virtual bool canBeFrontView();
virtual bool searchView();
- virtual void setChannelEncoding(const QString& encoding);
- virtual QString getChannelEncoding();
- virtual QString getChannelEncodingDefaultDesc();
+ virtual void setChannelEncoding(const TQString& encoding);
+ virtual TQString getChannelEncoding();
+ virtual TQString getChannelEncodingDefaultDesc();
virtual void emitUpdateInfo();
void setIdentity(const IdentityPtr identity);
@@ -56,21 +56,21 @@ class StatusPanel : public ChatWindow
void sendFile();
public slots:
- void setNickname(const QString& newNickname);
+ void setNickname(const TQString& newNickname);
virtual void indicateAway(bool show);
void showNicknameBox(bool show);
void updateAppearance();
- virtual void appendInputText(const QString&, bool fromCursor);
+ virtual void appendInputText(const TQString&, bool fromCursor);
void updateName();
void serverSaysClose();
protected slots:
void sendFileMenu();
void statusTextEntered();
- void sendStatusText(const QString& line);
+ void sendStatusText(const TQString& line);
// connected to IRCInput::textPasted() - used for large/multiline pastes
- void textPasted(const QString& text);
- void changeNickname(const QString& newNickname);
+ void textPasted(const TQString& text);
+ void changeNickname(const TQString& newNickname);
void nicknameComboboxChanged();
//Used to disable functions when not connected
virtual void serverOnline(bool online);
@@ -85,12 +85,12 @@ class StatusPanel : public ChatWindow
bool awayChanged;
bool awayState;
- void showEvent(QShowEvent* event);
+ void showEvent(TQShowEvent* event);
- QComboBox* nicknameCombobox;
- QLabel* awayLabel;
+ TQComboBox* nicknameCombobox;
+ TQLabel* awayLabel;
IRCInput* statusInput;
- QCheckBox* logCheckBox;
- QString oldNick;
+ TQCheckBox* logCheckBox;
+ TQString oldNick;
};
#endif
diff --git a/konversation/src/tabs_preferences.cpp b/konversation/src/tabs_preferences.cpp
index 80815b3..c3f8836 100644
--- a/konversation/src/tabs_preferences.cpp
+++ b/konversation/src/tabs_preferences.cpp
@@ -12,14 +12,14 @@
#include "tabs_preferences.h"
#include "tabs_preferencesui.h"
-#include <qcombobox.h>
-#include <qcheckbox.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
-Tabs_Config::Tabs_Config(QWidget *parent, const char *name)
+Tabs_Config::Tabs_Config(TQWidget *parent, const char *name)
: Tabs_PreferencesUI(parent, name)
{
- connect(kcfg_TabPlacement, SIGNAL(activated(int)), this, SLOT(toggleCheckBoxes(int)));
+ connect(kcfg_TabPlacement, TQT_SIGNAL(activated(int)), this, TQT_SLOT(toggleCheckBoxes(int)));
}
Tabs_Config::~Tabs_Config()
@@ -28,7 +28,7 @@ Tabs_Config::~Tabs_Config()
void Tabs_Config::show()
{
- QWidget::show();
+ TQWidget::show();
if (kcfg_TabPlacement->currentItem() == 0 || kcfg_TabPlacement->currentItem() == 1)
{
diff --git a/konversation/src/tabs_preferences.h b/konversation/src/tabs_preferences.h
index de78817..3be891b 100644
--- a/konversation/src/tabs_preferences.h
+++ b/konversation/src/tabs_preferences.h
@@ -20,7 +20,7 @@ class Tabs_Config : public Tabs_PreferencesUI
Q_OBJECT
public:
- explicit Tabs_Config(QWidget *parent = 0, const char *name = 0);
+ explicit Tabs_Config(TQWidget *parent = 0, const char *name = 0);
~Tabs_Config();
public slots:
diff --git a/konversation/src/theme_preferences.cpp b/konversation/src/theme_preferences.cpp
index 35f93d2..1b052fd 100644
--- a/konversation/src/theme_preferences.cpp
+++ b/konversation/src/theme_preferences.cpp
@@ -18,16 +18,16 @@
#include "common.h"
#include "konversationapplication.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qhbox.h>
-#include <qpushbutton.h>
-#include <qvbox.h>
-#include <qfileinfo.h>
-#include <qstringlist.h>
-#include <qbitmap.h>
-#include <qpainter.h>
-#include <qtooltip.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
+#include <tqpushbutton.h>
+#include <tqvbox.h>
+#include <tqfileinfo.h>
+#include <tqstringlist.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
#include <klistbox.h>
#include <kurl.h>
@@ -47,7 +47,7 @@
using namespace Konversation;
-Theme_Config::Theme_Config(QWidget* parent, const char* name)
+Theme_Config::Theme_Config(TQWidget* parent, const char* name)
: Theme_ConfigUI( parent, name)
{
m_defaultThemeIndex = -1;
@@ -55,11 +55,11 @@ Theme_Config::Theme_Config(QWidget* parent, const char* name)
// load the current settings
loadSettings();
- connect(iconThemeIndex,SIGNAL(highlighted(int)),this,SLOT(updatePreview(int)));
- connect(iconThemeIndex,SIGNAL(selectionChanged()),this,SLOT(updateButtons()));
- connect(iconThemeIndex,SIGNAL(selectionChanged()),this,SIGNAL(modified()));
- connect(installButton,SIGNAL(clicked()),this,SLOT(installTheme()));
- connect(removeButton,SIGNAL(clicked()),this,SLOT(removeTheme()));
+ connect(iconThemeIndex,TQT_SIGNAL(highlighted(int)),this,TQT_SLOT(updatePreview(int)));
+ connect(iconThemeIndex,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(updateButtons()));
+ connect(iconThemeIndex,TQT_SIGNAL(selectionChanged()),this,TQT_SIGNAL(modified()));
+ connect(installButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(installTheme()));
+ connect(removeButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(removeTheme()));
}
Theme_Config::~Theme_Config()
@@ -68,8 +68,8 @@ Theme_Config::~Theme_Config()
void Theme_Config::loadSettings()
{
- QString themeName, themeComment, themeDir;
- QString currentTheme = Preferences::iconTheme();
+ TQString themeName, themeComment, themeDir;
+ TQString currentTheme = Preferences::iconTheme();
int currentThemeIndex = 0;
// get list of theme dirs
@@ -85,7 +85,7 @@ void Theme_Config::loadSettings()
// initialize index counter
int i = 0;
// iterate through all found theme directories
- for(QStringList::ConstIterator it = m_dirs.begin(); it != m_dirs.end(); ++it)
+ for(TQStringList::ConstIterator it = m_dirs.begin(); it != m_dirs.end(); ++it)
{
KDesktopFile themeRC(*it);
// get the name and comment from the theme
@@ -167,7 +167,7 @@ void Theme_Config::restorePageToDefaults()
void Theme_Config::installTheme()
{
- KURL themeURL = KFileDialog::getOpenURL(QString(),
+ KURL themeURL = KFileDialog::getOpenURL(TQString(),
i18n("*.tar.gz *.tar.bz2 *.tar *.zip|Konversation Themes"),
NULL,
i18n("Select Theme Package")
@@ -176,8 +176,8 @@ void Theme_Config::installTheme()
if(themeURL.isEmpty())
return;
- QString themesDir(locateLocal("data", "konversation/themes/"));
- QString tmpThemeFile;
+ TQString themesDir(locateLocal("data", "konversation/themes/"));
+ TQString tmpThemeFile;
if(!KIO::NetAccess::download(themeURL, tmpThemeFile, NULL))
{
@@ -189,7 +189,7 @@ void Theme_Config::installTheme()
return;
}
- QDir themeInstallDir(tmpThemeFile);
+ TQDir themeInstallDir(tmpThemeFile);
if(themeInstallDir.exists()) // We got a directory not a file
{
@@ -212,9 +212,9 @@ void Theme_Config::installTheme()
kapp->processEvents();
const KArchiveDirectory* themeDir = themeArchive.directory();;
- QStringList allEntries = themeDir->entries();
+ TQStringList allEntries = themeDir->entries();
- for(QStringList::ConstIterator it=allEntries.begin(); it != allEntries.end(); ++it)
+ for(TQStringList::ConstIterator it=allEntries.begin(); it != allEntries.end(); ++it)
{
if(themeDir->entry(*it+"/index.desktop") == NULL)
{
@@ -239,8 +239,8 @@ void Theme_Config::installTheme()
void Theme_Config::removeTheme()
{
- QString dir;
- QString themeName = iconThemeIndex->currentText();
+ TQString dir;
+ TQString themeName = iconThemeIndex->currentText();
dir = m_dirs[iconThemeIndex->currentItem()];
@@ -253,9 +253,9 @@ void Theme_Config::removeTheme()
if(remove == KMessageBox::Continue)
{
- unlink(QFile::encodeName(dir));
+ unlink(TQFile::encodeName(dir));
KIO::DeleteJob* job = KIO::del(KURL(dir.remove("index.desktop")));
- connect(job, SIGNAL(result(KIO::Job*)), this, SLOT(postRemoveTheme(KIO::Job*)));
+ connect(job, TQT_SIGNAL(result(KIO::Job*)), this, TQT_SLOT(postRemoveTheme(KIO::Job*)));
}
}
@@ -266,18 +266,18 @@ void Theme_Config::postRemoveTheme(KIO::Job* /* delete_job */)
void Theme_Config::updatePreview(int id)
{
- QString dir;
+ TQString dir;
dir = m_dirs[id];
dir.remove("/index.desktop");
- QPixmap normal(dir+"/irc_normal.png");
+ TQPixmap normal(dir+"/irc_normal.png");
previewLabel1->setPixmap(normal);
- previewLabel2->setPixmap(overlayPixmaps(normal,QPixmap(dir+"/irc_away.png")));
- previewLabel3->setPixmap(overlayPixmaps(normal,QPixmap(dir+"/irc_voice.png")));
- previewLabel4->setPixmap(overlayPixmaps(normal,QPixmap(dir+"/irc_halfop.png")));
- previewLabel5->setPixmap(overlayPixmaps(normal,QPixmap(dir+"/irc_op.png")));
- previewLabel6->setPixmap(overlayPixmaps(normal,QPixmap(dir+"/irc_admin.png")));
- previewLabel7->setPixmap(overlayPixmaps(normal,QPixmap(dir+"/irc_owner.png")));
+ previewLabel2->setPixmap(overlayPixmaps(normal,TQPixmap(dir+"/irc_away.png")));
+ previewLabel3->setPixmap(overlayPixmaps(normal,TQPixmap(dir+"/irc_voice.png")));
+ previewLabel4->setPixmap(overlayPixmaps(normal,TQPixmap(dir+"/irc_halfop.png")));
+ previewLabel5->setPixmap(overlayPixmaps(normal,TQPixmap(dir+"/irc_op.png")));
+ previewLabel6->setPixmap(overlayPixmaps(normal,TQPixmap(dir+"/irc_admin.png")));
+ previewLabel7->setPixmap(overlayPixmaps(normal,TQPixmap(dir+"/irc_owner.png")));
}
void Theme_Config::updateButtons()
@@ -290,8 +290,8 @@ void Theme_Config::updateButtons()
}
// get directory of current theme
- QString dir = m_dirs[iconThemeIndex->currentItem()];
- QFile themeRC(dir);
+ TQString dir = m_dirs[iconThemeIndex->currentItem()];
+ TQFile themeRC(dir);
// get name for directory
m_currentTheme = dir.section('/',-2,-2);
diff --git a/konversation/src/theme_preferences.h b/konversation/src/theme_preferences.h
index 2027910..52acff2 100644
--- a/konversation/src/theme_preferences.h
+++ b/konversation/src/theme_preferences.h
@@ -21,14 +21,14 @@
#include <kio/job.h>
-class QStringList;
+class TQStringList;
class Theme_Config : public Theme_ConfigUI, public KonviSettingsPage
{
Q_OBJECT
public:
- explicit Theme_Config(QWidget* parent, const char* name=NULL);
+ explicit Theme_Config(TQWidget* parent, const char* name=NULL);
~Theme_Config();
virtual void restorePageToDefaults();
@@ -48,9 +48,9 @@ class Theme_Config : public Theme_ConfigUI, public KonviSettingsPage
void postRemoveTheme(KIO::Job* delete_job);
private:
- QStringList m_dirs;
- QString m_oldTheme;
- QString m_currentTheme;
+ TQStringList m_dirs;
+ TQString m_oldTheme;
+ TQString m_currentTheme;
int m_defaultThemeIndex;
};
#endif
diff --git a/konversation/src/topiccombobox.cpp b/konversation/src/topiccombobox.cpp
index 2b71e9a..1340f02 100644
--- a/konversation/src/topiccombobox.cpp
+++ b/konversation/src/topiccombobox.cpp
@@ -14,18 +14,18 @@
#include "topiccombobox.h"
-TopicComboBox::TopicComboBox(QWidget* parent) :
+TopicComboBox::TopicComboBox(TQWidget* parent) :
KComboBox(parent,"topic_combo_box")
{
- connect(this,SIGNAL(activated(int)),this,SLOT(topicActivated(int)));
- connect(this,SIGNAL(returnPressed(const QString&)),this,SLOT(topicActivated(const QString&)));
+ connect(this,TQT_SIGNAL(activated(int)),this,TQT_SLOT(topicActivated(int)));
+ connect(this,TQT_SIGNAL(returnPressed(const TQString&)),this,TQT_SLOT(topicActivated(const TQString&)));
}
TopicComboBox::~TopicComboBox()
{
}
-void TopicComboBox::topicActivated(const QString& newTopic)
+void TopicComboBox::topicActivated(const TQString& newTopic)
{
emit topicChanged(newTopic);
}
@@ -35,14 +35,14 @@ void TopicComboBox::topicActivated(int index)
emit topicChanged(text(index).section(' ',1));
}
-void TopicComboBox::insertStringList(const QStringList& list)
+void TopicComboBox::insertStringList(const TQStringList& list)
{
KComboBox::insertStringList(list);
setEditText(list[0].section(' ',1));
}
-void TopicComboBox::wheelEvent(QWheelEvent *ev)
+void TopicComboBox::wheelEvent(TQWheelEvent *ev)
{
ev->ignore();
}
diff --git a/konversation/src/topiccombobox.h b/konversation/src/topiccombobox.h
index 5ccc193..7161355 100644
--- a/konversation/src/topiccombobox.h
+++ b/konversation/src/topiccombobox.h
@@ -22,18 +22,18 @@ class TopicComboBox : public KComboBox
Q_OBJECT
public:
- explicit TopicComboBox(QWidget* parent);
+ explicit TopicComboBox(TQWidget* parent);
~TopicComboBox();
- void insertStringList(const QStringList& list);
+ void insertStringList(const TQStringList& list);
protected:
- void wheelEvent(QWheelEvent *ev);
+ void wheelEvent(TQWheelEvent *ev);
signals:
- void topicChanged(const QString& newTopic);
+ void topicChanged(const TQString& newTopic);
protected slots:
- void topicActivated(const QString& newTopic);
+ void topicActivated(const TQString& newTopic);
void topicActivated(int index);
};
#endif
diff --git a/konversation/src/topiclabel.cpp b/konversation/src/topiclabel.cpp
index b9fdd87..caa8eed 100644
--- a/konversation/src/topiclabel.cpp
+++ b/konversation/src/topiclabel.cpp
@@ -17,9 +17,9 @@
#include "common.h"
#include "channel.h"
-#include <qsimplerichtext.h>
-#include <qtooltip.h>
-#include <qclipboard.h>
+#include <tqsimplerichtext.h>
+#include <tqtooltip.h>
+#include <tqclipboard.h>
#include <krun.h>
#include <kprocess.h>
@@ -37,39 +37,39 @@
namespace Konversation
{
- TopicLabel::TopicLabel(QWidget *parent, const char *name)
+ TopicLabel::TopicLabel(TQWidget *parent, const char *name)
: KActiveLabel(parent, name)
{
- setWrapPolicy(QTextEdit::AtWordOrDocumentBoundary);
- setFocusPolicy(QWidget::ClickFocus);
+ setWrapPolicy(TQTextEdit::AtWordOrDocumentBoundary);
+ setFocusPolicy(TQWidget::ClickFocus);
m_isOnChannel = false;
m_copyUrlMenu = false;
mousePressed=false;
- m_popup = new QPopupMenu(this,"topiclabel_context_menu");
+ m_popup = new TQPopupMenu(this,"topiclabel_context_menu");
m_popup->insertItem(SmallIconSet("editcopy"),i18n("&Copy"),Copy);
m_popup->insertItem(i18n("Select All"),SelectAll);
setupChannelPopupMenu();
- connect(this, SIGNAL(highlighted(const QString&)), this, SLOT(highlightedSlot(const QString&)));
+ connect(this, TQT_SIGNAL(highlighted(const TQString&)), this, TQT_SLOT(highlightedSlot(const TQString&)));
}
TopicLabel::~TopicLabel()
{
}
- QSize TopicLabel::minimumSizeHint() const
+ TQSize TopicLabel::minimumSizeHint() const
{
int minHeight = fontMetrics().lineSpacing() + fontMetrics().descent();
- return QSize(0, minHeight);
+ return TQSize(0, minHeight);
}
- QSize TopicLabel::sizeHint() const
+ TQSize TopicLabel::sizeHint() const
{
int minHeight = fontMetrics().lineSpacing() + fontMetrics().descent();
- return QSize(0, minHeight);
+ return TQSize(0, minHeight);
}
void TopicLabel::setServer(Server* server)
@@ -77,9 +77,9 @@ namespace Konversation
m_server = server;
}
- void TopicLabel::contentsMousePressEvent(QMouseEvent *e)
+ void TopicLabel::contentsMousePressEvent(TQMouseEvent *e)
{
- if (e->button()==QMouseEvent::LeftButton)
+ if (e->button()==TQMouseEvent::LeftButton)
{
pressPosition=e->pos();
urlToDrag = anchorAt(pressPosition);
@@ -96,9 +96,9 @@ namespace Konversation
KActiveLabel::contentsMousePressEvent(e);
}
- void TopicLabel::contentsMouseReleaseEvent(QMouseEvent *e)
+ void TopicLabel::contentsMouseReleaseEvent(TQMouseEvent *e)
{
- if (e->button()==QMouseEvent::LeftButton)
+ if (e->button()==TQMouseEvent::LeftButton)
{
if (mousePressed) openLink(urlToDrag);
mousePressed=false;
@@ -106,15 +106,15 @@ namespace Konversation
KActiveLabel::contentsMouseReleaseEvent(e);
}
- void TopicLabel::contentsMouseMoveEvent(QMouseEvent *e)
+ void TopicLabel::contentsMouseMoveEvent(TQMouseEvent *e)
{
- if (mousePressed && (pressPosition-e->pos()).manhattanLength() > QApplication::startDragDistance())
+ if (mousePressed && (pressPosition-e->pos()).manhattanLength() > TQApplication::startDragDistance())
{
mousePressed=false;
removeSelection();
KURL ux = KURL::fromPathOrURL(urlToDrag);
//FIXME consistent IRC URL serialization
- if (urlToDrag.startsWith("##")) ux=QString("irc://%1:%2/%3").arg(m_server->getServerName()).
+ if (urlToDrag.startsWith("##")) ux=TQString("irc://%1:%2/%3").arg(m_server->getServerName()).
arg(m_server->getPort()).arg(urlToDrag.mid(2));
KURLDrag* u=new KURLDrag(ux,viewport());
u->drag();
@@ -122,13 +122,13 @@ namespace Konversation
KActiveLabel::contentsMouseMoveEvent(e);
}
- void TopicLabel::leaveEvent(QEvent*)
+ void TopicLabel::leaveEvent(TQEvent*)
{
emit clearStatusBarTempText();
- m_lastStatusText = QString();
+ m_lastStatusText = TQString();
}
- void TopicLabel::openLink(const QString& link)
+ void TopicLabel::openLink(const TQString& link)
{
if (!link.isEmpty())
{
@@ -139,7 +139,7 @@ namespace Konversation
}
else if (link.startsWith("#") && m_server && m_server->isConnected())
{
- QString channel(link);
+ TQString channel(link);
channel.replace("##","#");
m_server->sendJoinCommand(channel);
}
@@ -150,10 +150,10 @@ namespace Konversation
}
else
{
- QString cmd = Preferences::webBrowserCmd();
+ TQString cmd = Preferences::webBrowserCmd();
cmd.replace("%u",KURL::fromPathOrURL(link).url());
KProcess *proc = new KProcess;
- QStringList cmdAndArgs = KShell::splitArgs(cmd);
+ TQStringList cmdAndArgs = KShell::splitArgs(cmd);
*proc << cmdAndArgs;
// This code will also work, but starts an extra shell process.
// kdDebug() << "IRCView::linkClickSlot(): cmd = " << cmd << endl;
@@ -165,7 +165,7 @@ namespace Konversation
}
}
- void TopicLabel::contentsContextMenuEvent(QContextMenuEvent* ev)
+ void TopicLabel::contentsContextMenuEvent(TQContextMenuEvent* ev)
{
bool block = contextMenu(ev);
@@ -175,7 +175,7 @@ namespace Konversation
}
}
- bool TopicLabel::contextMenu(QContextMenuEvent* ce)
+ bool TopicLabel::contextMenu(TQContextMenuEvent* ce)
{
if (m_isOnChannel)
{
@@ -210,7 +210,7 @@ namespace Konversation
case Bookmark:
{
KBookmarkManager* bm = KBookmarkManager::userBookmarksManager();
- KBookmarkGroup bg = bm->addBookmarkDialog(m_urlToCopy, QString());
+ KBookmarkGroup bg = bm->addBookmarkDialog(m_urlToCopy, TQString());
bm->save();
bm->emitChanged(bg);
break;
@@ -230,10 +230,10 @@ namespace Konversation
m_channelPopup->insertItem(i18n("Get &user list"),Konversation::Names);
m_channelPopup->insertItem(i18n("Get &topic"),Konversation::Topic);
- connect(m_channelPopup, SIGNAL(activated(int)), this, SIGNAL(popupCommand(int)));
+ connect(m_channelPopup, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(popupCommand(int)));
}
- void TopicLabel::setText(const QString& text)
+ void TopicLabel::setText(const TQString& text)
{
m_fullText = text;
updateSqueezedText();
@@ -241,17 +241,17 @@ namespace Konversation
void TopicLabel::updateSqueezedText()
{
- QToolTip::remove(this);
+ TQToolTip::remove(this);
if (m_fullText.isEmpty())
{
- KActiveLabel::setText(QString::null);
+ KActiveLabel::setText(TQString::null);
return;
}
- QFontMetrics fm(currentFont());
- QString text = m_fullText;
+ TQFontMetrics fm(currentFont());
+ TQString text = m_fullText;
// text.replace("&", "&amp;"). Not needed as we do it in tagURLs
text.replace("<", "\x0blt;"). // tagUrls will replace \x0b with &
replace(">", "\x0bgt;");
@@ -261,7 +261,7 @@ namespace Konversation
{
text = rPixelSqueeze(text, visibleWidth() - 10);
setWordWrap(NoWrap);
- QToolTip::add(this, "<qt>" + QStyleSheet::escape(m_fullText) + "</qt>");
+ TQToolTip::add(this, "<qt>" + TQStyleSheet::escape(m_fullText) + "</qt>");
}
else
{
@@ -269,27 +269,27 @@ namespace Konversation
if(height() < contentsHeight())
{
- QToolTip::add(this, "<qt>" + QStyleSheet::escape(m_fullText) + "</qt>");
+ TQToolTip::add(this, "<qt>" + TQStyleSheet::escape(m_fullText) + "</qt>");
}
}
KActiveLabel::setText("<qt>" + text + "</qt>");
}
- void TopicLabel::resizeEvent(QResizeEvent* ev)
+ void TopicLabel::resizeEvent(TQResizeEvent* ev)
{
KActiveLabel::resizeEvent(ev);
updateSqueezedText();
}
- QString TopicLabel::rPixelSqueeze(const QString& text, uint maxPixels)
+ TQString TopicLabel::rPixelSqueeze(const TQString& text, uint maxPixels)
{
- QFontMetrics fm(currentFont());
+ TQFontMetrics fm(currentFont());
uint tw = textWidth(text, fm);
if(tw > maxPixels)
{
- QString tmp = text;
+ TQString tmp = text;
const uint em = fm.maxWidth();
maxPixels -= fm.width("...");
int len, delta;
@@ -310,17 +310,17 @@ namespace Konversation
return text;
}
- uint TopicLabel::textWidth(const QString& text, const QFontMetrics& fm)
+ uint TopicLabel::textWidth(const TQString& text, const TQFontMetrics& fm)
{
- QSimpleRichText richText("<qt>" + text + "</qt>", currentFont());
+ TQSimpleRichText richText("<qt>" + text + "</qt>", currentFont());
richText.setWidth(fm.width(text));
return richText.widthUsed();
}
- void TopicLabel::highlightedSlot(const QString& _link)
+ void TopicLabel::highlightedSlot(const TQString& _link)
{
- QString link = KURL::fromPathOrURL(_link).url();
+ TQString link = KURL::fromPathOrURL(_link).url();
//we just saw this a second ago. no need to reemit.
if (link == m_lastStatusText && !link.isEmpty())
return;
@@ -333,7 +333,7 @@ namespace Konversation
if (!m_lastStatusText.isEmpty())
{
emit clearStatusBarTempText();
- m_lastStatusText = QString();
+ m_lastStatusText = TQString();
}
} else {
m_lastStatusText = link;
@@ -367,7 +367,7 @@ namespace Konversation
emit currentChannelChanged(m_currentChannel);
- QString prettyId = m_currentChannel;
+ TQString prettyId = m_currentChannel;
if (prettyId.length()>15)
{
diff --git a/konversation/src/topiclabel.h b/konversation/src/topiclabel.h
index 06c472f..ca40da6 100644
--- a/konversation/src/topiclabel.h
+++ b/konversation/src/topiclabel.h
@@ -17,7 +17,7 @@
#include <klocale.h>
-class QFontMetrics;
+class TQFontMetrics;
class Server;
class KPopupMenu;
@@ -29,60 +29,60 @@ namespace Konversation
Q_OBJECT
public:
- explicit TopicLabel(QWidget *parent = 0, const char *name = 0);
+ explicit TopicLabel(TQWidget *parent = 0, const char *name = 0);
~TopicLabel();
- QSize minimumSizeHint() const;
- QSize sizeHint() const;
+ TQSize minimumSizeHint() const;
+ TQSize sizeHint() const;
void setServer(Server* server);
enum PopupIDs { Copy,CopyUrl,SelectAll,Bookmark };
public slots:
- virtual void openLink(const QString& link);
- void setText(const QString& text);
+ virtual void openLink(const TQString& link);
+ void setText(const TQString& text);
signals:
- void setStatusBarTempText(const QString&);
+ void setStatusBarTempText(const TQString&);
void clearStatusBarTempText();
void popupCommand(int);
- void currentChannelChanged(const QString&);
+ void currentChannelChanged(const TQString&);
protected:
void updateSqueezedText();
- QString rPixelSqueeze(const QString& text, uint maxPixels);
- uint textWidth(const QString& text, const QFontMetrics& fm);
- virtual void contentsMousePressEvent(QMouseEvent *e);
- virtual void contentsMouseReleaseEvent(QMouseEvent *e);
- virtual void contentsMouseMoveEvent(QMouseEvent *e);
- virtual void leaveEvent (QEvent*);
- virtual void contentsContextMenuEvent(QContextMenuEvent* ev);
- void resizeEvent(QResizeEvent*);
- bool contextMenu(QContextMenuEvent* ce);
+ TQString rPixelSqueeze(const TQString& text, uint maxPixels);
+ uint textWidth(const TQString& text, const TQFontMetrics& fm);
+ virtual void contentsMousePressEvent(TQMouseEvent *e);
+ virtual void contentsMouseReleaseEvent(TQMouseEvent *e);
+ virtual void contentsMouseMoveEvent(TQMouseEvent *e);
+ virtual void leaveEvent (TQEvent*);
+ virtual void contentsContextMenuEvent(TQContextMenuEvent* ev);
+ void resizeEvent(TQResizeEvent*);
+ bool contextMenu(TQContextMenuEvent* ce);
void setupChannelPopupMenu();
protected slots:
- void highlightedSlot(const QString&);
+ void highlightedSlot(const TQString&);
private:
Server* m_server;
- QPopupMenu* m_popup;
+ TQPopupMenu* m_popup;
KPopupMenu* m_channelPopup;
- QString m_fullText;
+ TQString m_fullText;
bool mousePressed;
- QString urlToDrag;
- QPoint pressPosition;
- QString m_lastStatusText;
- QString m_highlightedURL;
- QString m_currentChannel;
+ TQString urlToDrag;
+ TQPoint pressPosition;
+ TQString m_lastStatusText;
+ TQString m_highlightedURL;
+ TQString m_currentChannel;
bool m_isOnChannel;
int m_nickPopupId;
int m_channelPopupId;
bool m_copyUrlMenu;
- QString m_urlToCopy;
+ TQString m_urlToCopy;
};
diff --git a/konversation/src/trayicon.cpp b/konversation/src/trayicon.cpp
index e4b3007..b64bcf6 100644
--- a/konversation/src/trayicon.cpp
+++ b/konversation/src/trayicon.cpp
@@ -19,8 +19,8 @@
#include "chatwindow.h"
#include "config/preferences.h"
-#include <qtimer.h>
-#include <qtooltip.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
#include <kglobal.h>
#include <kiconloader.h>
@@ -30,15 +30,15 @@
namespace Konversation
{
- TrayIcon::TrayIcon(QWidget* parent) : KSystemTray(parent)
+ TrayIcon::TrayIcon(TQWidget* parent) : KSystemTray(parent)
{
m_notificationEnabled = false;
- m_blinkTimer = new QTimer(this);
- connect(m_blinkTimer, SIGNAL(timeout()), SLOT(blinkTimeout()));
+ m_blinkTimer = new TQTimer(this);
+ connect(m_blinkTimer, TQT_SIGNAL(timeout()), TQT_SLOT(blinkTimeout()));
updateAppearance();
- QToolTip::add(this,i18n("Konversation - IRC Client"));
+ TQToolTip::add(this,i18n("Konversation - IRC Client"));
}
TrayIcon::~TrayIcon()
diff --git a/konversation/src/trayicon.h b/konversation/src/trayicon.h
index a4d61b8..44a515d 100644
--- a/konversation/src/trayicon.h
+++ b/konversation/src/trayicon.h
@@ -15,13 +15,13 @@
#ifndef TRAYICON_H
#define TRAYICON_H
-#include <qptrlist.h>
-#include <qpixmap.h>
+#include <tqptrlist.h>
+#include <tqpixmap.h>
#include <ksystemtray.h>
-class QTimer;
+class TQTimer;
class Server;
namespace Konversation
@@ -32,7 +32,7 @@ namespace Konversation
Q_OBJECT
public:
- explicit TrayIcon(QWidget* parent = 0);
+ explicit TrayIcon(TQWidget* parent = 0);
~TrayIcon();
bool notificationEnabled() { return m_notificationEnabled; }
@@ -47,13 +47,13 @@ namespace Konversation
void blinkTimeout();
private:
- QTimer* m_blinkTimer;
+ TQTimer* m_blinkTimer;
bool m_blinkOn;
bool m_notificationEnabled;
- QPixmap m_nomessagePix;
- QPixmap m_messagePix;
+ TQPixmap m_nomessagePix;
+ TQPixmap m_messagePix;
};
}
diff --git a/konversation/src/unicode.cpp b/konversation/src/unicode.cpp
index 650775b..16028cb 100644
--- a/konversation/src/unicode.cpp
+++ b/konversation/src/unicode.cpp
@@ -37,7 +37,7 @@
#define UTF8_ValidTrialByte(c) ( kTrialByte == ((c) & kLeft2BitsMask))
-bool isUtf8(const QCString& text)
+bool isUtf8(const TQCString& text)
{
int i;
int j;
@@ -87,7 +87,7 @@ bool isUtf8(const QCString& text)
/* a single Surrogate should not show in 3 bytes UTF8, instead, the pair should be intepreted
as one single UCS4 char and encoded UTF8 in 4 bytes */
- if((QChar(0xED) == text[i] ) && (0xA0 == (text[i+1] & 0xA0 ) ))
+ if((TQChar(0xED) == text[i] ) && (0xA0 == (text[i+1] & 0xA0 ) ))
return false;
/* 0000 0000 - 0000 07FF : should encode in less bytes */
diff --git a/konversation/src/urlcatcher.cpp b/konversation/src/urlcatcher.cpp
index 142d5f2..cb92742 100644
--- a/konversation/src/urlcatcher.cpp
+++ b/konversation/src/urlcatcher.cpp
@@ -18,12 +18,12 @@
#include "konversationapplication.h"
#include "viewcontainer.h"
-#include <qhbox.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
-#include <qclipboard.h>
-#include <qwhatsthis.h>
-#include <qlayout.h>
+#include <tqhbox.h>
+#include <tqpushbutton.h>
+#include <tqregexp.h>
+#include <tqclipboard.h>
+#include <tqwhatsthis.h>
+#include <tqlayout.h>
#include <kapplication.h>
#include <kactionclasses.h>
@@ -38,7 +38,7 @@
#include <klistviewsearchline.h>
-UrlCatcher::UrlCatcher(QWidget* parent) : ChatWindow(parent)
+UrlCatcher::UrlCatcher(TQWidget* parent) : ChatWindow(parent)
{
layout()->setAutoAdd(false);
setName(i18n("URL Catcher"));
@@ -49,49 +49,49 @@ UrlCatcher::UrlCatcher(QWidget* parent) : ChatWindow(parent)
urlListView->addColumn(i18n("URL"));
urlListView->setFullWidth(true);
urlListView->setAllColumnsShowFocus(true);
- QString urlListViewWT = i18n(
+ TQString urlListViewWT = i18n(
"List of Uniform Resource Locators mentioned in any of the Konversation windows "
"during this session.");
- QWhatsThis::add(urlListView, urlListViewWT);
+ TQWhatsThis::add(urlListView, urlListViewWT);
searchWidget = new KListViewSearchLineWidget(urlListView, this, "search_line");
searchWidget->setEnabled(false);
- QHBox* buttonBox=new QHBox(this);
+ TQHBox* buttonBox=new TQHBox(this);
buttonBox->setSpacing(spacing());
- openUrlButton=new QPushButton(i18n("&Open URL"),buttonBox,"open_url_button");
- QString openUrlButtonWT = i18n(
+ openUrlButton=new TQPushButton(i18n("&Open URL"),buttonBox,"open_url_button");
+ TQString openUrlButtonWT = i18n(
"<p>Select a <b>URL</b> above, then click this button to launch the "
"application associated with the mimetype of the URL.</p>"
"<p>In the <b>Settings</b>, under <b>Behavior</b> | <b>General</b>, "
"you can specify a custom web browser for web URLs.</p>");
- QWhatsThis::add(openUrlButton, openUrlButtonWT);
- copyUrlButton=new QPushButton(i18n("&Copy URL"),buttonBox,"copy_url_button");
- QString copyUrlButtonWT = i18n(
+ TQWhatsThis::add(openUrlButton, openUrlButtonWT);
+ copyUrlButton=new TQPushButton(i18n("&Copy URL"),buttonBox,"copy_url_button");
+ TQString copyUrlButtonWT = i18n(
"Select a <b>URL</b> above, then click this button to copy the URL to the clipboard.");
- QWhatsThis::add(copyUrlButton, copyUrlButtonWT);
- deleteUrlButton=new QPushButton(i18n("&Delete URL"),buttonBox,"delete_url_button");
- QString deleteUrlButtonWT = i18n(
+ TQWhatsThis::add(copyUrlButton, copyUrlButtonWT);
+ deleteUrlButton=new TQPushButton(i18n("&Delete URL"),buttonBox,"delete_url_button");
+ TQString deleteUrlButtonWT = i18n(
"Select a <b>URL</b> above, then click this button to delete the URL from the list.");
- QWhatsThis::add(deleteUrlButton, deleteUrlButtonWT);
- saveListButton=new QPushButton(i18n("Sa&ve List..."),buttonBox,"save_list_button");
- QString saveListButtonWT = i18n(
+ TQWhatsThis::add(deleteUrlButton, deleteUrlButtonWT);
+ saveListButton=new TQPushButton(i18n("Sa&ve List..."),buttonBox,"save_list_button");
+ TQString saveListButtonWT = i18n(
"Click to save the entire list to a file.");
- QWhatsThis::add(saveListButton, saveListButtonWT);
- clearListButton=new QPushButton(i18n("C&lear List"),buttonBox,"clear_list_button");
- QString clearListButtonWT = i18n(
+ TQWhatsThis::add(saveListButton, saveListButtonWT);
+ clearListButton=new TQPushButton(i18n("C&lear List"),buttonBox,"clear_list_button");
+ TQString clearListButtonWT = i18n(
"Click to erase the entire list.");
- QWhatsThis::add(clearListButton, clearListButtonWT);
+ TQWhatsThis::add(clearListButton, clearListButtonWT);
- connect(urlListView,SIGNAL (executed(QListViewItem*)),this,SLOT (openUrl(QListViewItem*)) );
- connect(urlListView,SIGNAL (selectionChanged()),this,SLOT (urlSelected()) );
+ connect(urlListView,TQT_SIGNAL (executed(TQListViewItem*)),this,TQT_SLOT (openUrl(TQListViewItem*)) );
+ connect(urlListView,TQT_SIGNAL (selectionChanged()),this,TQT_SLOT (urlSelected()) );
- connect(openUrlButton,SIGNAL (clicked()),this,SLOT (openUrlClicked()) );
- connect(copyUrlButton,SIGNAL (clicked()),this,SLOT (copyUrlClicked()) );
- connect(deleteUrlButton,SIGNAL (clicked()),this,SLOT (deleteUrlClicked()) );
- connect(saveListButton,SIGNAL (clicked()),this,SLOT (saveListClicked()) );
- connect(clearListButton,SIGNAL (clicked()),this,SLOT (clearListClicked()) );
+ connect(openUrlButton,TQT_SIGNAL (clicked()),this,TQT_SLOT (openUrlClicked()) );
+ connect(copyUrlButton,TQT_SIGNAL (clicked()),this,TQT_SLOT (copyUrlClicked()) );
+ connect(deleteUrlButton,TQT_SIGNAL (clicked()),this,TQT_SLOT (deleteUrlClicked()) );
+ connect(saveListButton,TQT_SIGNAL (clicked()),this,TQT_SLOT (saveListClicked()) );
+ connect(clearListButton,TQT_SIGNAL (clicked()),this,TQT_SLOT (clearListClicked()) );
saveListButton->setEnabled(false);
clearListButton->setEnabled(false);
@@ -110,7 +110,7 @@ UrlCatcher::~UrlCatcher()
void UrlCatcher::urlSelected()
{
- QListViewItem* item=urlListView->selectedItem();
+ TQListViewItem* item=urlListView->selectedItem();
if(item)
{
openUrlButton->setEnabled(true);
@@ -125,7 +125,7 @@ void UrlCatcher::urlSelected()
}
}
-void UrlCatcher::addUrl(const QString& who,const QString& url)
+void UrlCatcher::addUrl(const TQString& who,const TQString& url)
{
new KListViewItem(urlListView,who,url);
clearListButton->setEnabled(true);
@@ -133,19 +133,19 @@ void UrlCatcher::addUrl(const QString& who,const QString& url)
searchWidget->setEnabled(true);
}
-void UrlCatcher::openUrl(QListViewItem* item)
+void UrlCatcher::openUrl(TQListViewItem* item)
{
- QString url = item->text(1);
+ TQString url = item->text(1);
if (!Preferences::useCustomBrowser() || url.lower().startsWith("mailto:") )
{
new KRun(KURL(url));
}
else
{
- QString cmd = Preferences::webBrowserCmd();
+ TQString cmd = Preferences::webBrowserCmd();
cmd.replace("%u", url);
KProcess *proc = new KProcess;
- QStringList cmdAndArgs = KShell::splitArgs(cmd);
+ TQStringList cmdAndArgs = KShell::splitArgs(cmd);
*proc << cmdAndArgs;
// This code will also work, but starts an extra shell process.
// kdDebug() << "UrlCatcher::openUrl(): cmd = " << cmd << endl;
@@ -158,13 +158,13 @@ void UrlCatcher::openUrl(QListViewItem* item)
void UrlCatcher::openUrlClicked()
{
- QListViewItem* item=urlListView->selectedItem();
+ TQListViewItem* item=urlListView->selectedItem();
if(item) openUrl(item);
}
void UrlCatcher::copyUrlClicked()
{
- QListViewItem* item=urlListView->selectedItem();
+ TQListViewItem* item=urlListView->selectedItem();
if(item)
{
QClipboard *cb=KApplication::kApplication()->clipboard();
@@ -175,7 +175,7 @@ void UrlCatcher::copyUrlClicked()
void UrlCatcher::deleteUrlClicked()
{
- QListViewItem* item=urlListView->selectedItem();
+ TQListViewItem* item=urlListView->selectedItem();
if(item)
{
emit deleteUrl(item->text(0),item->text(1));
@@ -204,20 +204,20 @@ void UrlCatcher::clearListClicked()
void UrlCatcher::saveListClicked()
{
// Ask user for file name
- QString fileName=KFileDialog::getSaveFileName(
- QString(),
- QString(),
+ TQString fileName=KFileDialog::getSaveFileName(
+ TQString(),
+ TQString(),
this,
i18n("Save URL List"));
if(!fileName.isEmpty())
{
// now save the list to disk
- QFile listFile(fileName);
+ TQFile listFile(fileName);
listFile.open(IO_WriteOnly);
// wrap the file into a stream
- QTextStream stream(&listFile);
- QListViewItem* item=urlListView->itemAtIndex(0);
+ TQTextStream stream(&listFile);
+ TQListViewItem* item=urlListView->itemAtIndex(0);
while(item)
{
stream << item->text(0) << ": " << item->text(1) << endl;
diff --git a/konversation/src/urlcatcher.h b/konversation/src/urlcatcher.h
index b713a4d..9203b19 100644
--- a/konversation/src/urlcatcher.h
+++ b/konversation/src/urlcatcher.h
@@ -19,8 +19,8 @@
class KListView;
-class QListViewItem;
-class QPushButton;
+class TQListViewItem;
+class TQPushButton;
class ViewContainer;
class KListViewSearchLineWidget;
@@ -29,21 +29,21 @@ class UrlCatcher : public ChatWindow
Q_OBJECT
public:
- explicit UrlCatcher(QWidget* parent);
+ explicit UrlCatcher(TQWidget* parent);
~UrlCatcher();
virtual bool canBeFrontView() { return true; }
signals:
- void deleteUrl(const QString& who,const QString& url);
+ void deleteUrl(const TQString& who,const TQString& url);
void clearUrlList();
public slots:
- void addUrl(const QString& who,const QString& url);
+ void addUrl(const TQString& who,const TQString& url);
protected slots:
void urlSelected();
- void openUrl(QListViewItem* item);
+ void openUrl(TQListViewItem* item);
void openUrlClicked();
void copyUrlClicked();
@@ -57,10 +57,10 @@ class UrlCatcher : public ChatWindow
/** Called from ChatWindow adjustFocus */
virtual void childAdjustFocus();
- QPushButton* openUrlButton;
- QPushButton* copyUrlButton;
- QPushButton* deleteUrlButton;
- QPushButton* saveListButton;
- QPushButton* clearListButton;
+ TQPushButton* openUrlButton;
+ TQPushButton* copyUrlButton;
+ TQPushButton* deleteUrlButton;
+ TQPushButton* saveListButton;
+ TQPushButton* clearListButton;
};
#endif
diff --git a/konversation/src/valuelistviewitem.cpp b/konversation/src/valuelistviewitem.cpp
index 262e43d..9be09ef 100644
--- a/konversation/src/valuelistviewitem.cpp
+++ b/konversation/src/valuelistviewitem.cpp
@@ -16,14 +16,14 @@
#include "valuelistviewitem.h"
-ValueListViewItem::ValueListViewItem(int newValue, KListView* parent, const QString& label)
+ValueListViewItem::ValueListViewItem(int newValue, KListView* parent, const TQString& label)
: KListViewItem(parent,label)
{
m_value=newValue;
enforceSortOrder();
}
-ValueListViewItem::ValueListViewItem(int newValue, KListView* parent, QListViewItem* after, const QString& label)
+ValueListViewItem::ValueListViewItem(int newValue, KListView* parent, TQListViewItem* after, const TQString& label)
: KListViewItem(parent,after,label)
{
m_value=newValue;
diff --git a/konversation/src/valuelistviewitem.h b/konversation/src/valuelistviewitem.h
index b56021d..4eeac1e 100644
--- a/konversation/src/valuelistviewitem.h
+++ b/konversation/src/valuelistviewitem.h
@@ -21,8 +21,8 @@
class ValueListViewItem : public KListViewItem
{
public:
- ValueListViewItem(int newValue, KListView* parent, const QString& label);
- ValueListViewItem(int newValue, KListView* parent, QListViewItem* after, const QString& label);
+ ValueListViewItem(int newValue, KListView* parent, const TQString& label);
+ ValueListViewItem(int newValue, KListView* parent, TQListViewItem* after, const TQString& label);
~ValueListViewItem();
int getValue() const;
diff --git a/konversation/src/viewcontainer.cpp b/konversation/src/viewcontainer.cpp
index 9fbcb09..c939f33 100644
--- a/konversation/src/viewcontainer.cpp
+++ b/konversation/src/viewcontainer.cpp
@@ -34,8 +34,8 @@
#include "joinchanneldialog.h"
#include "servergroupsettings.h"
-#include <qsplitter.h>
-#include <qpopupmenu.h>
+#include <tqsplitter.h>
+#include <tqpopupmenu.h>
#include <kdebug.h>
#include <klocale.h>
@@ -63,7 +63,7 @@ ViewContainer::ViewContainer(KonversationMainWindow* window):
m_queryViewCount = 0;
- m_viewTreeSplitter = new QSplitter(m_window, "view_tree_splitter");
+ m_viewTreeSplitter = new TQSplitter(m_window, "view_tree_splitter");
m_viewTreeSplitter->setOpaqueResize(KGlobalSettings::opaqueResize());
m_saveSplitterSizesLock = true;
@@ -78,7 +78,7 @@ ViewContainer::ViewContainer(KonversationMainWindow* window):
m_dccPanel = new DccTransferPanel(m_tabWidget);
m_dccPanel->hide();
m_dccPanelOpen = false;
- connect(m_dccPanel, SIGNAL(updateTabNotification(ChatWindow*,const Konversation::TabNotifyType&)), this, SLOT(setViewNotification(ChatWindow*,const Konversation::TabNotifyType&)));
+ connect(m_dccPanel, TQT_SIGNAL(updateTabNotification(ChatWindow*,const Konversation::TabNotifyType&)), this, TQT_SLOT(setViewNotification(ChatWindow*,const Konversation::TabNotifyType&)));
}
ViewContainer::~ViewContainer()
@@ -96,7 +96,7 @@ void ViewContainer::showQueueTuner(bool p)
///Use this instead of setting m_frontServer directly so we can emit the frontServerChanging signal easily.
void ViewContainer::setFrontServer(Server* newserver)
{
- if (m_frontServer == QGuardedPtr<Server>(newserver))
+ if (m_frontServer == TQGuardedPtr<Server>(newserver))
return;
emit frontServerChanging(newserver);
m_frontServer = newserver;
@@ -121,7 +121,7 @@ void ViewContainer::initializeSplitterSizes()
{
if (m_viewTree && !m_viewTree->isHidden())
{
- QValueList<int> sizes = Preferences::treeSplitterSizes();
+ TQValueList<int> sizes = Preferences::treeSplitterSizes();
if (sizes.isEmpty())
sizes << 145 << (m_window->width()-145);
@@ -144,7 +144,7 @@ void ViewContainer::setupTabWidget()
{
m_popupViewIndex = -1;
- m_vbox = new QVBox(m_viewTreeSplitter, "main_window_right_side");
+ m_vbox = new TQVBox(m_viewTreeSplitter, "main_window_right_side");
m_tabWidget = new KTabWidget(m_vbox, "main_window_tab_widget");
m_queueTuner = new QueueTuner(m_vbox, this);
m_queueTuner->hide();
@@ -157,14 +157,14 @@ void ViewContainer::setupTabWidget()
KPushButton* closeBtn = new KPushButton(m_tabWidget);
closeBtn->setPixmap(KGlobal::iconLoader()->loadIcon("tab_remove", KIcon::Small));
closeBtn->resize(22, 22);
- closeBtn->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ closeBtn->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
m_tabWidget->setCornerWidget(closeBtn);
- connect(closeBtn, SIGNAL(clicked()), this, SLOT(closeCurrentView()));
+ connect(closeBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(closeCurrentView()));
- connect(m_tabWidget, SIGNAL(currentChanged(QWidget*)), this, SLOT (switchView(QWidget*)));
- connect(m_tabWidget, SIGNAL(closeRequest(QWidget*)), this, SLOT(closeView(QWidget*)));
- connect(m_tabWidget, SIGNAL(contextMenu(QWidget*, const QPoint&)), this, SLOT(showViewContextMenu(QWidget*, const QPoint&)));
- connect(m_tabWidget, SIGNAL(mouseMiddleClick(QWidget*)), this, SLOT(closeViewMiddleClick(QWidget*)));
+ connect(m_tabWidget, TQT_SIGNAL(currentChanged(TQWidget*)), this, TQT_SLOT (switchView(TQWidget*)));
+ connect(m_tabWidget, TQT_SIGNAL(closeRequest(TQWidget*)), this, TQT_SLOT(closeView(TQWidget*)));
+ connect(m_tabWidget, TQT_SIGNAL(contextMenu(TQWidget*, const TQPoint&)), this, TQT_SLOT(showViewContextMenu(TQWidget*, const TQPoint&)));
+ connect(m_tabWidget, TQT_SIGNAL(mouseMiddleClick(TQWidget*)), this, TQT_SLOT(closeViewMiddleClick(TQWidget*)));
updateTabWidgetAppearance();
}
@@ -172,19 +172,19 @@ void ViewContainer::setupTabWidget()
void ViewContainer::setupViewTree()
{
m_viewTree = new ViewTree(m_viewTreeSplitter);
- m_viewTreeSplitter->setResizeMode(m_viewTree, QSplitter::KeepSize);
+ m_viewTreeSplitter->setResizeMode(m_viewTree, TQSplitter::KeepSize);
m_viewTree->hide();
- connect(KonversationApplication::instance(), SIGNAL(appearanceChanged()), m_viewTree, SLOT(updateAppearance()));
- connect(this, SIGNAL(viewChanged(ChatWindow*)), m_viewTree, SLOT(selectView(ChatWindow*)));
- connect(this, SIGNAL(removeView(ChatWindow*)), m_viewTree, SLOT(removeView(ChatWindow*)));
- connect(this, SIGNAL(contextMenuClosed()), m_viewTree, SLOT(unHighlight()));
- connect(m_viewTree, SIGNAL(setViewTreeShown(bool)), this, SLOT(setViewTreeShown(bool)));
- connect(m_viewTree, SIGNAL(showView(ChatWindow*)), this, SLOT(showView(ChatWindow*)));
- connect(m_viewTree, SIGNAL(closeView(ChatWindow*)), this, SLOT(closeView(ChatWindow*)));
- connect(m_viewTree, SIGNAL(showViewContextMenu(QWidget*, const QPoint&)), this, SLOT(showViewContextMenu(QWidget*, const QPoint&)));
- connect(m_viewTree, SIGNAL(sizeChanged()), this, SLOT(saveSplitterSizes()));
- connect(m_viewTree, SIGNAL(syncTabBarToTree()), this, SLOT(syncTabBarToTree()));
+ connect(KonversationApplication::instance(), TQT_SIGNAL(appearanceChanged()), m_viewTree, TQT_SLOT(updateAppearance()));
+ connect(this, TQT_SIGNAL(viewChanged(ChatWindow*)), m_viewTree, TQT_SLOT(selectView(ChatWindow*)));
+ connect(this, TQT_SIGNAL(removeView(ChatWindow*)), m_viewTree, TQT_SLOT(removeView(ChatWindow*)));
+ connect(this, TQT_SIGNAL(contextMenuClosed()), m_viewTree, TQT_SLOT(unHighlight()));
+ connect(m_viewTree, TQT_SIGNAL(setViewTreeShown(bool)), this, TQT_SLOT(setViewTreeShown(bool)));
+ connect(m_viewTree, TQT_SIGNAL(showView(ChatWindow*)), this, TQT_SLOT(showView(ChatWindow*)));
+ connect(m_viewTree, TQT_SIGNAL(closeView(ChatWindow*)), this, TQT_SLOT(closeView(ChatWindow*)));
+ connect(m_viewTree, TQT_SIGNAL(showViewContextMenu(TQWidget*, const TQPoint&)), this, TQT_SLOT(showViewContextMenu(TQWidget*, const TQPoint&)));
+ connect(m_viewTree, TQT_SIGNAL(sizeChanged()), this, TQT_SLOT(saveSplitterSizes()));
+ connect(m_viewTree, TQT_SIGNAL(syncTabBarToTree()), this, TQT_SLOT(syncTabBarToTree()));
KAction* action;
@@ -276,16 +276,16 @@ void ViewContainer::setViewTreeShown(bool show)
void ViewContainer::removeViewTree()
{
- disconnect(KonversationApplication::instance(), SIGNAL(appearanceChanged()), m_viewTree, SLOT(updateAppearance()));
- disconnect(this, SIGNAL(viewChanged(ChatWindow*)), m_viewTree, SLOT(selectView(ChatWindow*)));
- disconnect(this, SIGNAL(removeView(ChatWindow*)), m_viewTree, SLOT(removeView(ChatWindow*)));
- disconnect(this, SIGNAL(contextMenuClosed()), m_viewTree, SLOT(unHighlight()));
- disconnect(m_viewTree, SIGNAL(setViewTreeShown(bool)), this, SLOT(setViewTreeShown(bool)));
- disconnect(m_viewTree, SIGNAL(showView(ChatWindow*)), this, SLOT(showView(ChatWindow*)));
- disconnect(m_viewTree, SIGNAL(closeView(ChatWindow*)), this, SLOT(closeView(ChatWindow*)));
- disconnect(m_viewTree, SIGNAL(showViewContextMenu(QWidget*, const QPoint&)), this, SLOT(showViewContextMenu(QWidget*, const QPoint&)));
- disconnect(m_viewTree, SIGNAL(sizeChanged()), this, SLOT(saveSplitterSizes()));
- disconnect(m_viewTree, SIGNAL(syncTabBarToTree()), this, SLOT(syncTabBarToTree()));
+ disconnect(KonversationApplication::instance(), TQT_SIGNAL(appearanceChanged()), m_viewTree, TQT_SLOT(updateAppearance()));
+ disconnect(this, TQT_SIGNAL(viewChanged(ChatWindow*)), m_viewTree, TQT_SLOT(selectView(ChatWindow*)));
+ disconnect(this, TQT_SIGNAL(removeView(ChatWindow*)), m_viewTree, TQT_SLOT(removeView(ChatWindow*)));
+ disconnect(this, TQT_SIGNAL(contextMenuClosed()), m_viewTree, TQT_SLOT(unHighlight()));
+ disconnect(m_viewTree, TQT_SIGNAL(setViewTreeShown(bool)), this, TQT_SLOT(setViewTreeShown(bool)));
+ disconnect(m_viewTree, TQT_SIGNAL(showView(ChatWindow*)), this, TQT_SLOT(showView(ChatWindow*)));
+ disconnect(m_viewTree, TQT_SIGNAL(closeView(ChatWindow*)), this, TQT_SLOT(closeView(ChatWindow*)));
+ disconnect(m_viewTree, TQT_SIGNAL(showViewContextMenu(TQWidget*, const TQPoint&)), this, TQT_SLOT(showViewContextMenu(TQWidget*, const TQPoint&)));
+ disconnect(m_viewTree, TQT_SIGNAL(sizeChanged()), this, TQT_SLOT(saveSplitterSizes()));
+ disconnect(m_viewTree, TQT_SIGNAL(syncTabBarToTree()), this, TQT_SLOT(syncTabBarToTree()));
KAction* action;
@@ -311,11 +311,11 @@ void ViewContainer::removeViewTree()
void ViewContainer::syncTabBarToTree()
{
- QPtrList<ChatWindow> viewList = m_viewTree->getSortedViewList();
+ TQPtrList<ChatWindow> viewList = m_viewTree->getSortedViewList();
if (m_tabWidget && !viewList.isEmpty())
{
- QPtrListIterator<ChatWindow> it(viewList);
+ TQPtrListIterator<ChatWindow> it(viewList);
ChatWindow* view;
int index = 0;
int oldIndex = 0;
@@ -358,7 +358,7 @@ void ViewContainer::updateAppearance()
if(m_insertCharDialog)
{
- QFont font;
+ TQFont font;
if (Preferences::customTextFont())
font = Preferences::textFont();
@@ -381,7 +381,7 @@ void ViewContainer::updateTabWidgetAppearance()
m_tabWidget->setFont(KGlobalSettings::generalFont());
m_tabWidget->setTabPosition((Preferences::tabPlacement()==Preferences::Top) ?
- QTabWidget::Top : QTabWidget::Bottom);
+ TQTabWidget::Top : TQTabWidget::Bottom);
if (Preferences::showTabBarCloseButton() && !(Preferences::tabPlacement()==Preferences::Left))
m_tabWidget->cornerWidget()->show();
@@ -538,7 +538,7 @@ void ViewContainer::updateViewActions(int index)
{
if (m_frontServer)
{
- QString name = m_frontServer->getDisplayName();
+ TQString name = m_frontServer->getDisplayName();
name = name.replace('&', "&&");
channelListAction->setEnabled(true);
channelListAction->setChecked(m_frontServer->getChannelListPanel());
@@ -560,7 +560,7 @@ void ViewContainer::updateViewActions(int index)
action->setText(i18n("&Open Logfile"));
else
{
- QString name = view->getName();
+ TQString name = view->getName();
name = name.replace('&', "&&");
action->setText(i18n("&Open Logfile for %1").arg(name));
}
@@ -678,19 +678,19 @@ void ViewContainer::updateFrontView()
// Make sure that only views with info output get to be the m_frontView
if (m_frontView)
{
- disconnect(m_frontView, SIGNAL(updateInfo(const QString &)), this, SIGNAL(setStatusBarInfoLabel(const QString &)));
+ disconnect(m_frontView, TQT_SIGNAL(updateInfo(const TQString &)), this, TQT_SIGNAL(setStatusBarInfoLabel(const TQString &)));
}
if (view->canBeFrontView())
{
m_frontView = view;
- connect(view, SIGNAL(updateInfo(const QString &)), this, SIGNAL(setStatusBarInfoLabel(const QString &)));
+ connect(view, TQT_SIGNAL(updateInfo(const TQString &)), this, TQT_SIGNAL(setStatusBarInfoLabel(const TQString &)));
view->emitUpdateInfo();
}
else
{
- QString viewName = Konversation::removeIrcMarkup(view->getName());
+ TQString viewName = Konversation::removeIrcMarkup(view->getName());
if(viewName != "ChatWindowObject")
emit setStatusBarInfoLabel(viewName);
@@ -731,7 +731,7 @@ void ViewContainer::updateViews(const Konversation::ServerGroupSettings* serverG
{
if (view->getType() == ChatWindow::Status && view->getServer()->getServerGroup() == serverGroup)
{
- QString label = view->getServer()->getDisplayName();
+ TQString label = view->getServer()->getDisplayName();
if (!label.isEmpty() && m_tabWidget->tabLabel(view) != label)
{
@@ -755,7 +755,7 @@ void ViewContainer::updateViews(const Konversation::ServerGroupSettings* serverG
if (m_viewTree)
{
if (!Preferences::tabNotificationsLeds() && !Preferences::closeButtons())
- m_viewTree->setViewIcon(view, QIconSet());
+ m_viewTree->setViewIcon(view, TQIconSet());
if (Preferences::closeButtons() && !Preferences::tabNotificationsLeds())
m_viewTree->setViewIcon(view, images->getCloseIcon());
@@ -767,7 +767,7 @@ void ViewContainer::updateViews(const Konversation::ServerGroupSettings* serverG
else if (m_tabWidget)
{
if (!Preferences::tabNotificationsLeds() && !Preferences::closeButtons())
- m_tabWidget->setTabIconSet(view, QIconSet());
+ m_tabWidget->setTabIconSet(view, TQIconSet());
if (Preferences::closeButtons() && !Preferences::tabNotificationsLeds())
m_tabWidget->setTabIconSet(view, images->getCloseIcon());
@@ -1050,7 +1050,7 @@ void ViewContainer::unsetViewNotification(ChatWindow* view)
}
}
- QColor textColor = (Preferences::inputFieldsBackgroundColor()
+ TQColor textColor = (Preferences::inputFieldsBackgroundColor()
? Preferences::color(Preferences::ChannelMessage) : m_window->colorGroup().foreground());
if (view->getType() == ChatWindow::Channel)
@@ -1093,7 +1093,7 @@ void ViewContainer::unsetViewNotification(ChatWindow* view)
}
}
- QColor textColor = m_window->colorGroup().foreground();
+ TQColor textColor = m_window->colorGroup().foreground();
if (view->getType() == ChatWindow::Channel)
{
@@ -1111,7 +1111,7 @@ void ViewContainer::unsetViewNotification(ChatWindow* view)
m_tabWidget->setTabColor(view, textColor);
}
- QValueList<ChatWindow*>::iterator it = m_activeViewOrderList.find(view);
+ TQValueList<ChatWindow*>::iterator it = m_activeViewOrderList.find(view);
if (it != m_activeViewOrderList.end())
m_activeViewOrderList.remove(it);
@@ -1166,18 +1166,18 @@ void ViewContainer::toggleAutoJoin()
}
}
-void ViewContainer::addView(ChatWindow* view, const QString& label, bool weinitiated)
+void ViewContainer::addView(ChatWindow* view, const TQString& label, bool weinitiated)
{
ChatWindow *tmp_ChatWindow;
int placement = -1;
ChatWindow::WindowType wtype;
- QIconSet iconSet;
+ TQIconSet iconSet;
- connect(KonversationApplication::instance(), SIGNAL(appearanceChanged()), view, SLOT(updateAppearance()));
- connect(view, SIGNAL(setStatusBarTempText(const QString&)), this, SIGNAL(setStatusBarTempText(const QString&)));
- connect(view, SIGNAL(clearStatusBarTempText()), this, SIGNAL(clearStatusBarTempText()));
- connect(view, SIGNAL(closing(ChatWindow*)), this, SIGNAL(removeView(ChatWindow*)));
- connect(view, SIGNAL(closing(ChatWindow*)), this, SLOT(cleanupAfterClose(ChatWindow*)));
+ connect(KonversationApplication::instance(), TQT_SIGNAL(appearanceChanged()), view, TQT_SLOT(updateAppearance()));
+ connect(view, TQT_SIGNAL(setStatusBarTempText(const TQString&)), this, TQT_SIGNAL(setStatusBarTempText(const TQString&)));
+ connect(view, TQT_SIGNAL(clearStatusBarTempText()), this, TQT_SIGNAL(clearStatusBarTempText()));
+ connect(view, TQT_SIGNAL(closing(ChatWindow*)), this, TQT_SIGNAL(removeView(ChatWindow*)));
+ connect(view, TQT_SIGNAL(closing(ChatWindow*)), this, TQT_SLOT(cleanupAfterClose(ChatWindow*)));
// Please be careful about changing any of the grouping behavior in here,
// because it needs to match up with the sorting behavior of the tree list,
@@ -1370,7 +1370,7 @@ void ViewContainer::addView(ChatWindow* view, const QString& label, bool weiniti
updateViewActions(m_tabWidget->currentPageIndex());
}
-void ViewContainer::switchView(QWidget* newView)
+void ViewContainer::switchView(TQWidget* newView)
{
ChatWindow* view = static_cast<ChatWindow*>(newView);
@@ -1380,7 +1380,7 @@ void ViewContainer::switchView(QWidget* newView)
{
m_frontView->resetTabNotification();
- disconnect(m_frontView, SIGNAL(updateInfo(const QString &)), this, SIGNAL(setStatusBarInfoLabel(const QString &)));
+ disconnect(m_frontView, TQT_SIGNAL(updateInfo(const TQString &)), this, TQT_SIGNAL(setStatusBarInfoLabel(const TQString &)));
if (Preferences::automaticRememberLine() && m_frontView->isInsertSupported())
m_frontView->getTextView()->insertRememberLine();
@@ -1412,12 +1412,12 @@ void ViewContainer::switchView(QWidget* newView)
updateViewEncoding(view);
- QString tabName = Konversation::removeIrcMarkup(view->getName());
+ TQString tabName = Konversation::removeIrcMarkup(view->getName());
if (tabName != "ChatWindowObject")
emit setWindowCaption(tabName);
else
- emit setWindowCaption(QString());
+ emit setWindowCaption(TQString());
}
void ViewContainer::showView(ChatWindow* view)
@@ -1512,7 +1512,7 @@ void ViewContainer::moveViewRight()
m_popupViewIndex = -1;
}
-void ViewContainer::closeView(QWidget* view)
+void ViewContainer::closeView(TQWidget* view)
{
ChatWindow* viewToClose = static_cast<ChatWindow*>(view);
@@ -1559,12 +1559,12 @@ void ViewContainer::cleanupAfterClose(ChatWindow* view)
m_saveSplitterSizesLock = true;
m_vbox->hide();
emit resetStatusBar();
- emit setWindowCaption(QString::null);
+ emit setWindowCaption(TQString::null);
}
}
// Remove the view from the active view list if it's still on it
- QValueList<ChatWindow*>::iterator it = m_activeViewOrderList.find(view);
+ TQValueList<ChatWindow*>::iterator it = m_activeViewOrderList.find(view);
if (it != m_activeViewOrderList.end())
m_activeViewOrderList.remove(it);
@@ -1579,7 +1579,7 @@ void ViewContainer::cleanupAfterClose(ChatWindow* view)
}
}
-void ViewContainer::closeViewMiddleClick(QWidget* view)
+void ViewContainer::closeViewMiddleClick(TQWidget* view)
{
if (Preferences::middleClickClose())
closeView(view);
@@ -1607,7 +1607,7 @@ void ViewContainer::changeViewCharset(int index)
if (chatWin)
{
if (index == 0)
- chatWin->setChannelEncoding(QString());
+ chatWin->setChannelEncoding(TQString());
else
chatWin->setChannelEncoding(Konversation::IRCCharsets::self()->availableEncodingShortNames()[index - 1]);
}
@@ -1627,7 +1627,7 @@ void ViewContainer::updateViewEncoding(ChatWindow* view)
if(viewType == ChatWindow::Channel || viewType == ChatWindow::Query || viewType == ChatWindow::Status)
{
codecAction->setEnabled(view->isChannelEncodingSupported());
- QString encoding = view->getChannelEncoding();
+ TQString encoding = view->getChannelEncoding();
if(m_frontServer)
{
@@ -1651,12 +1651,12 @@ void ViewContainer::updateViewEncoding(ChatWindow* view)
}
}
-void ViewContainer::showViewContextMenu(QWidget* tab, const QPoint& pos)
+void ViewContainer::showViewContextMenu(TQWidget* tab, const TQPoint& pos)
{
m_popupViewIndex = m_tabWidget->indexOf(tab);
updateViewActions(m_popupViewIndex);
- QPopupMenu* menu = static_cast<QPopupMenu*>(m_window->factory()->container("tabContextMenu", m_window));
+ TQPopupMenu* menu = static_cast<TQPopupMenu*>(m_window->factory()->container("tabContextMenu", m_window));
if (!menu) return;
@@ -1684,7 +1684,7 @@ void ViewContainer::showViewContextMenu(QWidget* tab, const QPoint& pos)
if (viewType == ChatWindow::Status)
{
- QPtrList<KAction> serverActions;
+ TQPtrList<KAction> serverActions;
KAction* action = actionCollection()->action("disconnect_server");
if (action) serverActions.append(action);
action = actionCollection()->action("reconnect_server");
@@ -1718,7 +1718,7 @@ void ViewContainer::showViewContextMenu(QWidget* tab, const QPoint& pos)
updateViewActions(m_tabWidget->currentPageIndex());
}
-QString ViewContainer::currentViewTitle()
+TQString ViewContainer::currentViewTitle()
{
if (m_frontServer)
{
@@ -1729,16 +1729,16 @@ QString ViewContainer::currentViewTitle()
}
else
{
- return QString();
+ return TQString();
}
}
-QString ViewContainer::currentViewURL(bool passNetwork)
+TQString ViewContainer::currentViewURL(bool passNetwork)
{
- QString url;
- QString channel;
- QString port;
- QString server;
+ TQString url;
+ TQString channel;
+ TQString port;
+ TQString server;
if (m_frontServer && m_frontView)
{
@@ -1752,7 +1752,7 @@ QString ViewContainer::currentViewURL(bool passNetwork)
else
{
server = m_frontServer->getServerName();
- port = ':'+QString::number(m_frontServer->getPort());
+ port = ':'+TQString::number(m_frontServer->getPort());
}
if (server.contains(':')) // IPv6
@@ -1764,7 +1764,7 @@ QString ViewContainer::currentViewURL(bool passNetwork)
return url;
}
-int ViewContainer::getViewIndex(QWidget* widget)
+int ViewContainer::getViewIndex(TQWidget* widget)
{
return m_tabWidget->indexOf(widget);
}
@@ -1812,7 +1812,7 @@ void ViewContainer::findPrevText()
if (m_searchView) m_searchView->getTextView()->searchNext(true);
}
-void ViewContainer::appendToFrontmost(const QString& type,const QString& message,ChatWindow* serverView, bool parseURL)
+void ViewContainer::appendToFrontmost(const TQString& type,const TQString& message,ChatWindow* serverView, bool parseURL)
{
if (!m_tabWidget) return;
@@ -1842,7 +1842,7 @@ void ViewContainer::appendToFrontmost(const QString& type,const QString& message
// FIXME: this signal should be sent from the status panel instead, so it
// can be using the correct highlight color, would be more consistent
// anyway!
- // FIXME newText(serverView,QString::null,true);
+ // FIXME newText(serverView,TQString::null,true);
}
else
m_frontView->appendServerMessage(type, message, parseURL);
@@ -1850,7 +1850,7 @@ void ViewContainer::appendToFrontmost(const QString& type,const QString& message
void ViewContainer::insertCharacter()
{
- QFont font;
+ TQFont font;
if (Preferences::customTextFont())
font = Preferences::textFont();
@@ -1860,14 +1860,14 @@ void ViewContainer::insertCharacter()
if (!m_insertCharDialog)
{
m_insertCharDialog = new Konversation::InsertCharDialog(font.family(), m_window);
- connect(m_insertCharDialog, SIGNAL(insertChar(const QChar&)), this, SLOT(insertChar(const QChar&)));
+ connect(m_insertCharDialog, TQT_SIGNAL(insertChar(const TQChar&)), this, TQT_SLOT(insertChar(const TQChar&)));
}
m_insertCharDialog->setFont(font);
m_insertCharDialog->show();
}
-void ViewContainer::insertChar(const QChar& chr)
+void ViewContainer::insertChar(const TQChar& chr)
{
ChatWindow* view = static_cast<ChatWindow*>(m_tabWidget->currentPage());
@@ -1964,7 +1964,7 @@ void ViewContainer::openLogFile()
}
}
-void ViewContainer::openLogFile(const QString& caption, const QString& file)
+void ViewContainer::openLogFile(const TQString& caption, const TQString& file)
{
if (!file.isEmpty())
{
@@ -1979,8 +1979,8 @@ void ViewContainer::addKonsolePanel()
KonsolePanel* panel=new KonsolePanel(m_tabWidget);
panel->setName(i18n("Konsole"));
addView(panel, i18n("Konsole"));
- connect(panel, SIGNAL(updateTabNotification(ChatWindow*,const Konversation::TabNotifyType&)), this, SLOT(setViewNotification(ChatWindow*,const Konversation::TabNotifyType&)));
- connect(panel, SIGNAL(closeView(ChatWindow*)), this, SLOT(closeView(ChatWindow*)));
+ connect(panel, TQT_SIGNAL(updateTabNotification(ChatWindow*,const Konversation::TabNotifyType&)), this, TQT_SLOT(setViewNotification(ChatWindow*,const Konversation::TabNotifyType&)));
+ connect(panel, TQT_SIGNAL(closeView(ChatWindow*)), this, TQT_SLOT(closeView(ChatWindow*)));
}
void ViewContainer::addUrlCatcher()
@@ -1991,17 +1991,17 @@ void ViewContainer::addUrlCatcher()
m_urlCatcherPanel=new UrlCatcher(m_tabWidget);
addView(m_urlCatcherPanel, i18n("URL Catcher"));
KonversationApplication *konvApp=static_cast<KonversationApplication *>(KApplication::kApplication());
- connect(konvApp,SIGNAL(catchUrl(const QString&,const QString&)),
- m_urlCatcherPanel, SLOT(addUrl(const QString&,const QString&)) );
- connect(m_urlCatcherPanel, SIGNAL(deleteUrl(const QString&,const QString&)),
- konvApp, SLOT(deleteUrl(const QString&,const QString&)) );
- connect(m_urlCatcherPanel, SIGNAL(clearUrlList()),
- konvApp, SLOT(clearUrlList()));
-
- QStringList urlList=konvApp->getUrlList();
+ connect(konvApp,TQT_SIGNAL(catchUrl(const TQString&,const TQString&)),
+ m_urlCatcherPanel, TQT_SLOT(addUrl(const TQString&,const TQString&)) );
+ connect(m_urlCatcherPanel, TQT_SIGNAL(deleteUrl(const TQString&,const TQString&)),
+ konvApp, TQT_SLOT(deleteUrl(const TQString&,const TQString&)) );
+ connect(m_urlCatcherPanel, TQT_SIGNAL(clearUrlList()),
+ konvApp, TQT_SLOT(clearUrlList()));
+
+ TQStringList urlList=konvApp->getUrlList();
for(unsigned int index=0;index<urlList.count();index++)
{
- QString urlItem=urlList[index];
+ TQString urlItem=urlList[index];
m_urlCatcherPanel->addUrl(urlItem.section(' ',0,0),urlItem.section(' ',1,1));
} // for
(dynamic_cast<KToggleAction*>(actionCollection()->action("open_url_catcher")))->setChecked(true);
@@ -2067,7 +2067,7 @@ DccTransferPanel* ViewContainer::getDccPanel()
return m_dccPanel;
}
-void ViewContainer::addDccChat(const QString& myNick,const QString& nick,const QStringList& arguments,bool listen)
+void ViewContainer::addDccChat(const TQString& myNick,const TQString& nick,const TQStringList& arguments,bool listen)
{
if (!listen) // Someone else initiated dcc chat
{
@@ -2081,7 +2081,7 @@ void ViewContainer::addDccChat(const QString& myNick,const QString& nick,const Q
? new DccChat(m_tabWidget, listen, m_frontServer, myNick, nick )
: new DccChat(m_tabWidget, listen, m_frontServer, myNick, nick, arguments[1], arguments[2].toInt() );
- connect(dccChatPanel, SIGNAL(updateTabNotification(ChatWindow*,const Konversation::TabNotifyType&)), this, SLOT(setViewNotification(ChatWindow*,const Konversation::TabNotifyType&)));
+ connect(dccChatPanel, TQT_SIGNAL(updateTabNotification(ChatWindow*,const Konversation::TabNotifyType&)), this, TQT_SLOT(setViewNotification(ChatWindow*,const Konversation::TabNotifyType&)));
// This needs to be here as addView will change m_frontServer if focus new tabs is enabled.
addView(dccChatPanel, dccChatPanel->getName());
@@ -2098,19 +2098,19 @@ StatusPanel* ViewContainer::addStatusView(Server* server)
if (server->getServerGroup()) statusView->setNotificationsEnabled(server->getServerGroup()->enableNotifications());
// Get group name for tab if available
- QString label = server->getDisplayName();
+ TQString label = server->getDisplayName();
statusView->setName(label);
- QObject::connect(server, SIGNAL(sslInitFailure()), this, SIGNAL(removeStatusBarSSLLabel()));
- QObject::connect(server, SIGNAL(sslConnected(Server*)), this, SIGNAL(updateStatusBarSSLLabel(Server*)));
+ TQObject::connect(server, TQT_SIGNAL(sslInitFailure()), this, TQT_SIGNAL(removeStatusBarSSLLabel()));
+ TQObject::connect(server, TQT_SIGNAL(sslConnected(Server*)), this, TQT_SIGNAL(updateStatusBarSSLLabel(Server*)));
// ... then put it into the tab widget, otherwise we'd have a race with server member
addView(statusView, label);
- connect(statusView, SIGNAL(updateTabNotification(ChatWindow*,const Konversation::TabNotifyType&)),
- this, SLOT(setViewNotification(ChatWindow*,const Konversation::TabNotifyType&)));
- connect(statusView, SIGNAL(sendFile()), server, SLOT(requestDccSend()));
- connect(server, SIGNAL(awayState(bool)), statusView, SLOT(indicateAway(bool)) );
+ connect(statusView, TQT_SIGNAL(updateTabNotification(ChatWindow*,const Konversation::TabNotifyType&)),
+ this, TQT_SLOT(setViewNotification(ChatWindow*,const Konversation::TabNotifyType&)));
+ connect(statusView, TQT_SIGNAL(sendFile()), server, TQT_SLOT(requestDccSend()));
+ connect(server, TQT_SIGNAL(awayState(bool)), statusView, TQT_SLOT(indicateAway(bool)) );
// make sure that m_frontServer gets set on adding the first status panel, too,
// since there won't be a switchView happening
@@ -2129,8 +2129,8 @@ RawLog* ViewContainer::addRawLog(Server* server)
addView(rawLog, i18n("Raw Log"));
- connect(rawLog, SIGNAL(updateTabNotification(ChatWindow*,const Konversation::TabNotifyType&)),
- this, SLOT(setViewNotification(ChatWindow*,const Konversation::TabNotifyType&)));
+ connect(rawLog, TQT_SIGNAL(updateTabNotification(ChatWindow*,const Konversation::TabNotifyType&)),
+ this, TQT_SLOT(setViewNotification(ChatWindow*,const Konversation::TabNotifyType&)));
return rawLog;
}
@@ -2174,7 +2174,7 @@ void ViewContainer::showJoinChannelDialog()
Konversation::JoinChannelDialog dlg(server, m_window);
- if (dlg.exec() == QDialog::Accepted)
+ if (dlg.exec() == TQDialog::Accepted)
server->sendJoinCommand(dlg.channel(), dlg.password());
}
@@ -2220,17 +2220,17 @@ void ViewContainer::channelJoined(Channel* channel)
}
}
-Channel* ViewContainer::addChannel(Server* server, const QString& name)
+Channel* ViewContainer::addChannel(Server* server, const TQString& name)
{
Channel* channel=new Channel(m_tabWidget, name);
channel->setServer(server);
channel->setName(name); //still have to do this for now
addView(channel, name);
- connect(this, SIGNAL(updateChannelAppearance()), channel, SLOT(updateAppearance()));
- connect(channel, SIGNAL(updateTabNotification(ChatWindow*,const Konversation::TabNotifyType&)), this, SLOT(setViewNotification(ChatWindow*,const Konversation::TabNotifyType&)));
- connect(server, SIGNAL(awayState(bool)), channel, SLOT(indicateAway(bool)) );
- connect(channel, SIGNAL(joined(Channel*)), this, SLOT(channelJoined(Channel*)));
+ connect(this, TQT_SIGNAL(updateChannelAppearance()), channel, TQT_SLOT(updateAppearance()));
+ connect(channel, TQT_SIGNAL(updateTabNotification(ChatWindow*,const Konversation::TabNotifyType&)), this, TQT_SLOT(setViewNotification(ChatWindow*,const Konversation::TabNotifyType&)));
+ connect(server, TQT_SIGNAL(awayState(bool)), channel, TQT_SLOT(indicateAway(bool)) );
+ connect(channel, TQT_SIGNAL(joined(Channel*)), this, TQT_SLOT(channelJoined(Channel*)));
return channel;
}
@@ -2272,7 +2272,7 @@ void ViewContainer::toggleChannelNicklists()
Query* ViewContainer::addQuery(Server* server, const NickInfoPtr& nickInfo, bool weinitiated)
{
- QString name = nickInfo->getNickname();
+ TQString name = nickInfo->getNickname();
Query* query=new Query(m_tabWidget, name);
query->setServer(server);
query->setNickInfo(nickInfo); //still have to do this
@@ -2284,20 +2284,20 @@ Query* ViewContainer::addQuery(Server* server, const NickInfoPtr& nickInfo, bool
++m_queryViewCount;
- connect(query, SIGNAL(updateTabNotification(ChatWindow*,const Konversation::TabNotifyType&)), this, SLOT(setViewNotification(ChatWindow*,const Konversation::TabNotifyType&)));
- connect(query, SIGNAL(updateQueryChrome(ChatWindow*, const QString &)), this, SLOT(updateQueryChrome(ChatWindow*, const QString &)));
- connect(server, SIGNAL(awayState(bool)), query, SLOT(indicateAway(bool)));
+ connect(query, TQT_SIGNAL(updateTabNotification(ChatWindow*,const Konversation::TabNotifyType&)), this, TQT_SLOT(setViewNotification(ChatWindow*,const Konversation::TabNotifyType&)));
+ connect(query, TQT_SIGNAL(updateQueryChrome(ChatWindow*, const TQString &)), this, TQT_SLOT(updateQueryChrome(ChatWindow*, const TQString &)));
+ connect(server, TQT_SIGNAL(awayState(bool)), query, TQT_SLOT(indicateAway(bool)));
return query;
}
-void ViewContainer::updateQueryChrome(ChatWindow* view, const QString& name)
+void ViewContainer::updateQueryChrome(ChatWindow* view, const TQString& name)
{
//FIXME: updateQueryChrome is a last minute fix for 0.19 because
// the updateInfo mess is indecipherable. Replace with a sane and
// encompassing system.
- QString newName = Konversation::removeIrcMarkup(name);
+ TQString newName = Konversation::removeIrcMarkup(name);
if (!newName.isEmpty() && m_tabWidget->tabLabel(view) != newName)
{
@@ -2347,7 +2347,7 @@ ChannelListPanel* ViewContainer::addChannelListPanel(Server* server)
return channelListPanel;
}
-void ViewContainer::openChannelList(const QString& filter, bool getList)
+void ViewContainer::openChannelList(const TQString& filter, bool getList)
{
if (m_frontServer)
{
@@ -2400,10 +2400,10 @@ void ViewContainer::openNicksOnlinePanel()
{
m_nicksOnlinePanel=new NicksOnline(m_window);
addView(m_nicksOnlinePanel, i18n("Watched Nicks Online"));
- connect(m_nicksOnlinePanel, SIGNAL(editClicked()), m_window, SLOT(openNotify()));
- connect(m_nicksOnlinePanel, SIGNAL(doubleClicked(const QString&,const QString&)), m_window, SLOT(notifyAction(const QString&,const QString&)));
- connect(m_nicksOnlinePanel, SIGNAL(showView(ChatWindow*)), this, SLOT(showView(ChatWindow*)));
- connect(m_window, SIGNAL(nicksNowOnline(Server*)), m_nicksOnlinePanel, SLOT(updateServerOnlineList(Server*)));
+ connect(m_nicksOnlinePanel, TQT_SIGNAL(editClicked()), m_window, TQT_SLOT(openNotify()));
+ connect(m_nicksOnlinePanel, TQT_SIGNAL(doubleClicked(const TQString&,const TQString&)), m_window, TQT_SLOT(notifyAction(const TQString&,const TQString&)));
+ connect(m_nicksOnlinePanel, TQT_SIGNAL(showView(ChatWindow*)), this, TQT_SLOT(showView(ChatWindow*)));
+ connect(m_window, TQT_SIGNAL(nicksNowOnline(Server*)), m_nicksOnlinePanel, TQT_SLOT(updateServerOnlineList(Server*)));
(dynamic_cast<KToggleAction*>(actionCollection()->action("open_nicksonline_window")))->setChecked(true);
}
else
@@ -2431,7 +2431,7 @@ void ViewContainer::showNextActiveView()
ChatWindow* prev = m_activeViewOrderList.first();
ChatWindow* view = prev;
- QValueList<ChatWindow*>::ConstIterator it;
+ TQValueList<ChatWindow*>::ConstIterator it;
for (it = m_activeViewOrderList.begin(); it != m_activeViewOrderList.end(); ++it)
{
diff --git a/konversation/src/viewcontainer.h b/konversation/src/viewcontainer.h
index bacedf4..b0d3121 100644
--- a/konversation/src/viewcontainer.h
+++ b/konversation/src/viewcontainer.h
@@ -16,11 +16,11 @@
#include "common.h"
#include "server.h"
-#include <qobject.h>
-#include <qguardedptr.h>
+#include <tqobject.h>
+#include <tqguardedptr.h>
-class QSplitter;
+class TQSplitter;
class KTabWidget;
class KActionCollection;
@@ -49,24 +49,24 @@ class ViewContainer : public QObject
explicit ViewContainer(KonversationMainWindow* window);
~ViewContainer();
- QSplitter* getWidget() { return m_viewTreeSplitter; }
+ TQSplitter* getWidget() { return m_viewTreeSplitter; }
KonversationMainWindow* getWindow() { return m_window; }
KActionCollection* actionCollection() { return m_window->actionCollection(); }
- QGuardedPtr<ChatWindow> getFrontView() { return m_frontView; }
+ TQGuardedPtr<ChatWindow> getFrontView() { return m_frontView; }
Server* getFrontServer() { return m_frontServer; }
void prepareShutdown();
- QString currentViewTitle();
- QString currentViewURL(bool passNetwork);
+ TQString currentViewTitle();
+ TQString currentViewURL(bool passNetwork);
- void appendToFrontmost(const QString& type,const QString& message,ChatWindow* serverView,
+ void appendToFrontmost(const TQString& type,const TQString& message,ChatWindow* serverView,
bool parseURL = true);
void showQueueTuner(bool);
- int getViewIndex(QWidget* widget);
+ int getViewIndex(TQWidget* widget);
public slots:
void updateAppearance();
@@ -81,7 +81,7 @@ class ViewContainer : public QObject
void toggleViewNotifications();
void toggleAutoJoin();
- void switchView(QWidget* newView);
+ void switchView(TQWidget* newView);
void showView(ChatWindow* view);
void goToView(int page);
@@ -90,16 +90,16 @@ class ViewContainer : public QObject
void moveViewLeft();
void moveViewRight();
- void closeView(QWidget* view);
+ void closeView(TQWidget* view);
void closeView(ChatWindow* view);
- void closeViewMiddleClick(QWidget* view);
+ void closeViewMiddleClick(TQWidget* view);
void closeCurrentView();
void cleanupAfterClose(ChatWindow* view);
void changeViewCharset(int index);
void updateViewEncoding(ChatWindow* view);
- void showViewContextMenu(QWidget* tab, const QPoint& pos);
+ void showViewContextMenu(TQWidget* tab, const TQPoint& pos);
void clearView();
void clearAllViews();
@@ -109,7 +109,7 @@ class ViewContainer : public QObject
void findPrevText();
void insertCharacter();
- void insertChar(const QChar& chr);
+ void insertChar(const TQChar& chr);
void insertIRCColor();
void clearViewLines();
@@ -119,7 +119,7 @@ class ViewContainer : public QObject
void insertRememberLines(Server* server);
void openLogFile();
- void openLogFile(const QString& caption, const QString& file);
+ void openLogFile(const TQString& caption, const TQString& file);
void addKonsolePanel();
@@ -132,7 +132,7 @@ class ViewContainer : public QObject
void deleteDccPanel();
DccTransferPanel* getDccPanel();
- void addDccChat(const QString& myNick,const QString& nick,const QStringList& arguments,bool listen);
+ void addDccChat(const TQString& myNick,const TQString& nick,const TQStringList& arguments,bool listen);
StatusPanel* addStatusView(Server* server);
RawLog* addRawLog(Server* server);
@@ -142,17 +142,17 @@ class ViewContainer : public QObject
void connectionStateChanged(Server* server, Konversation::ConnectionState state);
void channelJoined(Channel* channel);
- Channel* addChannel(Server* server, const QString& name);
+ Channel* addChannel(Server* server, const TQString& name);
void rejoinChannel();
void openChannelSettings();
void toggleChannelNicklists();
Query* addQuery(Server* server,const NickInfoPtr & name, bool weinitiated=true);
- void updateQueryChrome(ChatWindow* view, const QString& name);
+ void updateQueryChrome(ChatWindow* view, const TQString& name);
void closeQueries();
ChannelListPanel* addChannelListPanel(Server* server);
- void openChannelList(const QString& filter = QString(), bool getList = false);
+ void openChannelList(const TQString& filter = TQString(), bool getList = false);
void openNicksOnlinePanel();
void closeNicksOnlinePanel();
@@ -162,13 +162,13 @@ class ViewContainer : public QObject
signals:
void viewChanged(ChatWindow* view);
void removeView(ChatWindow* view);
- void setWindowCaption(const QString& caption);
+ void setWindowCaption(const TQString& caption);
void updateChannelAppearance();
void contextMenuClosed();
void resetStatusBar();
- void setStatusBarTempText(const QString& text);
+ void setStatusBarTempText(const TQString& text);
void clearStatusBarTempText();
- void setStatusBarInfoLabel(const QString& text);
+ void setStatusBarInfoLabel(const TQString& text);
void clearStatusBarInfoLabel();
void setStatusBarLagLabelShown(bool shown);
void updateStatusBarLagLabel(Server* server, int msec);
@@ -186,7 +186,7 @@ class ViewContainer : public QObject
void removeViewTree();
void updateTabWidgetAppearance();
- void addView(ChatWindow* view, const QString& label, bool weinitiated=true);
+ void addView(ChatWindow* view, const TQString& label, bool weinitiated=true);
void updateViewActions(int index);
void updateSwitchViewAction();
@@ -199,18 +199,18 @@ class ViewContainer : public QObject
KonversationMainWindow* m_window;
- QSplitter* m_viewTreeSplitter;
+ TQSplitter* m_viewTreeSplitter;
KTabWidget* m_tabWidget;
ViewTree* m_viewTree;
- QVBox *m_vbox;
+ TQVBox *m_vbox;
QueueTuner *m_queueTuner;
Images* images;
- QGuardedPtr<Server> m_frontServer;
- QGuardedPtr<Server> m_contextServer;
- QGuardedPtr<ChatWindow> m_frontView;
- QGuardedPtr<ChatWindow> m_searchView;
+ TQGuardedPtr<Server> m_frontServer;
+ TQGuardedPtr<Server> m_contextServer;
+ TQGuardedPtr<ChatWindow> m_frontView;
+ TQGuardedPtr<ChatWindow> m_searchView;
UrlCatcher* m_urlCatcherPanel;
NicksOnline* m_nicksOnlinePanel;
@@ -223,7 +223,7 @@ class ViewContainer : public QObject
int m_popupViewIndex;
int m_queryViewCount;
- QValueList<ChatWindow*> m_activeViewOrderList;
+ TQValueList<ChatWindow*> m_activeViewOrderList;
};
#endif
diff --git a/konversation/src/viewtree.cpp b/konversation/src/viewtree.cpp
index 7d40ce8..9254be9 100644
--- a/konversation/src/viewtree.cpp
+++ b/konversation/src/viewtree.cpp
@@ -18,13 +18,13 @@
#include "ircview.h"
#include "konsolepanel.h"
-#include <qheader.h>
-#include <qdragobject.h>
-#include <qlistview.h>
-#include <qptrlist.h>
-#include <qpoint.h>
-#include <qpainter.h>
-#include <qtooltip.h>
+#include <tqheader.h>
+#include <tqdragobject.h>
+#include <tqlistview.h>
+#include <tqptrlist.h>
+#include <tqpoint.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
#include <kdebug.h>
#include <klocale.h>
@@ -35,22 +35,22 @@
class ViewTree::ToolTip : public QToolTip
{
public:
- ToolTip(QWidget *parent, KListView *viewTree);
+ ToolTip(TQWidget *parent, KListView *viewTree);
virtual ~ToolTip() {}
protected:
- virtual void maybeTip(const QPoint &pos);
+ virtual void maybeTip(const TQPoint &pos);
private:
KListView* viewTree;
};
-ViewTree::ToolTip::ToolTip(QWidget *parent, KListView *viewTree)
- : QToolTip(parent), viewTree(viewTree)
+ViewTree::ToolTip::ToolTip(TQWidget *parent, KListView *viewTree)
+ : TQToolTip(parent), viewTree(viewTree)
{
}
-void ViewTree::ToolTip::maybeTip (const QPoint &pos)
+void ViewTree::ToolTip::maybeTip (const TQPoint &pos)
{
if (!parentWidget() || !viewTree) return;
@@ -60,17 +60,17 @@ void ViewTree::ToolTip::maybeTip (const QPoint &pos)
}
-ViewTree::ViewTree(QWidget *parent)
+ViewTree::ViewTree(TQWidget *parent)
: KListView(parent)
{
header()->hide();
- setHScrollBarMode(QScrollView::AlwaysOff);
+ setHScrollBarMode(TQScrollView::AlwaysOff);
addColumn(i18n("Tabs"));
setSortColumn(0);
setSortOrder(Qt::Ascending);
- setResizeMode(QListView::AllColumns);
+ setResizeMode(TQListView::AllColumns);
setSelectionModeExt(KListView::Single);
setRootIsDecorated(false);
@@ -90,14 +90,14 @@ ViewTree::ViewTree(QWidget *parent)
m_specialViewCount = 0;
m_closeButtonItem = 0;
- m_enableCloseButtonTimer = new QTimer(this);
+ m_enableCloseButtonTimer = new TQTimer(this);
m_middleClickItem = 0;
- connect(m_enableCloseButtonTimer, SIGNAL(timeout()), SLOT(enableCloseButton()));
- connect(this, SIGNAL(selectionChanged(QListViewItem*)), SLOT(announceSelection(QListViewItem*)));
- connect(this, SIGNAL(aboutToMove()), SLOT(slotAboutToMoveView()));
- connect(this, SIGNAL(moved()), SLOT(slotMovedView()));
+ connect(m_enableCloseButtonTimer, TQT_SIGNAL(timeout()), TQT_SLOT(enableCloseButton()));
+ connect(this, TQT_SIGNAL(selectionChanged(TQListViewItem*)), TQT_SLOT(announceSelection(TQListViewItem*)));
+ connect(this, TQT_SIGNAL(aboutToMove()), TQT_SLOT(slotAboutToMoveView()));
+ connect(this, TQT_SIGNAL(moved()), TQT_SLOT(slotMovedView()));
}
ViewTree::~ViewTree()
@@ -114,7 +114,7 @@ void ViewTree::updateAppearance()
else
setFont(KGlobalSettings::generalFont());
- QColor fg, bg;
+ TQColor fg, bg;
if (Preferences::inputFieldsBackgroundColor())
{
@@ -132,7 +132,7 @@ void ViewTree::updateAppearance()
setPaletteBackgroundColor(bg);
}
-void ViewTree::addView(const QString& name, ChatWindow* view, const QIconSet &iconset, bool select, ChatWindow* afterView)
+void ViewTree::addView(const TQString& name, ChatWindow* view, const TQIconSet &iconset, bool select, ChatWindow* afterView)
{
ViewTreeItem* item = 0;
ViewTreeItem* parent = 0;
@@ -259,7 +259,7 @@ void ViewTree::selectFirstView(bool select)
m_selectFirstView = select;
}
-void ViewTree::setViewName(ChatWindow* view, const QString& name)
+void ViewTree::setViewName(ChatWindow* view, const TQString& name)
{
ViewTreeItem* item = getItemForView(view);
@@ -267,21 +267,21 @@ void ViewTree::setViewName(ChatWindow* view, const QString& name)
}
-void ViewTree::setViewColor(ChatWindow* view, QColor color)
+void ViewTree::setViewColor(ChatWindow* view, TQColor color)
{
ViewTreeItem* item = getItemForView(view);
if (item) item->setColor(color);
}
-void ViewTree::setViewIcon(ChatWindow* view, const QIconSet &iconset)
+void ViewTree::setViewIcon(ChatWindow* view, const TQIconSet &iconset)
{
ViewTreeItem* item = getItemForView(view);
if (item) item->setIcon(iconset.pixmap());
}
-void ViewTree::announceSelection(QListViewItem* item)
+void ViewTree::announceSelection(TQListViewItem* item)
{
unHighlight();
@@ -501,9 +501,9 @@ void ViewTree::enableCloseButton()
if (m_closeButtonItem) m_closeButtonItem->setCloseButtonEnabled();
}
-bool ViewTree::isAboveIcon(QPoint point, ViewTreeItem* item)
+bool ViewTree::isAboveIcon(TQPoint point, ViewTreeItem* item)
{
- QPoint inItem = point - itemRect(item).topLeft();
+ TQPoint inItem = point - itemRect(item).topLeft();
int MARGIN = 2;
int LED_ICON_SIZE = 14;
@@ -520,9 +520,9 @@ bool ViewTree::isAboveIcon(QPoint point, ViewTreeItem* item)
return false;
}
-void ViewTree::contentsMousePressEvent(QMouseEvent* e)
+void ViewTree::contentsMousePressEvent(TQMouseEvent* e)
{
- QPoint vp = contentsToViewport(e->pos());
+ TQPoint vp = contentsToViewport(e->pos());
// Don't allow selecting the separator via the mouse.
if (itemAt(vp) == m_separator)
@@ -555,9 +555,9 @@ void ViewTree::contentsMousePressEvent(QMouseEvent* e)
}
}
-void ViewTree::contentsMouseReleaseEvent(QMouseEvent* e)
+void ViewTree::contentsMouseReleaseEvent(TQMouseEvent* e)
{
- QPoint vp = contentsToViewport(e->pos());
+ TQPoint vp = contentsToViewport(e->pos());
ViewTreeItem* item = static_cast<ViewTreeItem*>(itemAt(vp));
if (!item && e->button() == RightButton)
@@ -584,9 +584,9 @@ void ViewTree::contentsMouseReleaseEvent(QMouseEvent* e)
KListView::contentsMouseReleaseEvent(e);
}
-void ViewTree::contentsMouseMoveEvent(QMouseEvent* e)
+void ViewTree::contentsMouseMoveEvent(TQMouseEvent* e)
{
- QPoint vp = contentsToViewport(e->pos());
+ TQPoint vp = contentsToViewport(e->pos());
ViewTreeItem* item = static_cast<ViewTreeItem*>(itemAt(vp));
if (item && item->isSeparator())
@@ -618,7 +618,7 @@ void ViewTree::contentsMouseMoveEvent(QMouseEvent* e)
item->setCloseButtonShown(true);
m_closeButtonItem = item;
if (!m_enableCloseButtonTimer->isActive())
- m_enableCloseButtonTimer->start(QApplication::doubleClickInterval(), true);
+ m_enableCloseButtonTimer->start(TQApplication::doubleClickInterval(), true);
}
else
{
@@ -635,9 +635,9 @@ void ViewTree::contentsMouseMoveEvent(QMouseEvent* e)
}
}
-void ViewTree::contentsContextMenuEvent(QContextMenuEvent* e)
+void ViewTree::contentsContextMenuEvent(TQContextMenuEvent* e)
{
- QPoint vp = contentsToViewport(e->pos());
+ TQPoint vp = contentsToViewport(e->pos());
ViewTreeItem* atpos = static_cast<ViewTreeItem*>(itemAt(vp));
if (atpos && !atpos->isSeparator())
@@ -649,7 +649,7 @@ void ViewTree::contentsContextMenuEvent(QContextMenuEvent* e)
KListView::contentsContextMenuEvent(e);
}
-void ViewTree::contentsWheelEvent(QWheelEvent* e)
+void ViewTree::contentsWheelEvent(TQWheelEvent* e)
{
if (e->delta() > 0)
selectUpper(true);
@@ -663,7 +663,7 @@ void ViewTree::contentsWheelEvent(QWheelEvent* e)
}
}
-void ViewTree::keyPressEvent(QKeyEvent* e)
+void ViewTree::keyPressEvent(TQKeyEvent* e)
{
if (e->key() == Key_Up)
selectUpper();
@@ -728,20 +728,20 @@ void ViewTree::selectLower(bool wrap)
ensureItemVisible(selectedItem());
}
-void ViewTree::resizeEvent(QResizeEvent* e)
+void ViewTree::resizeEvent(TQResizeEvent* e)
{
KListView::resizeEvent(e);
emit sizeChanged();
}
-void ViewTree::findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem *&after)
+void ViewTree::findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after)
{
- QPoint p (contentsToViewport(pos));
+ TQPoint p (contentsToViewport(pos));
- QListViewItem *atpos = itemAt(p);
+ TQListViewItem *atpos = itemAt(p);
- QListViewItem *above;
+ TQListViewItem *above;
if (!atpos)
above = lastItem();
@@ -858,22 +858,22 @@ void ViewTree::findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem
parent = 0L;
}
-QDragObject* ViewTree::dragObject()
+TQDragObject* ViewTree::dragObject()
{
if (!currentItem())
return 0;
- QListViewItem* item = selectedItem();
+ TQListViewItem* item = selectedItem();
if (!item->dragEnabled())
return 0;
- return new QStoredDrag("application/x-qlistviewitem", viewport());
+ return new TQStoredDrag("application/x-qlistviewitem", viewport());
}
-QPtrList<ChatWindow> ViewTree::getSortedViewList()
+TQPtrList<ChatWindow> ViewTree::getSortedViewList()
{
- QPtrList<ChatWindow> viewList;
+ TQPtrList<ChatWindow> viewList;
ViewTreeItem* item = static_cast<ViewTreeItem*>(firstChild());
@@ -927,7 +927,7 @@ ViewTreeItem* ViewTree::getParentItemForView(ChatWindow* view)
return 0;
}
-ViewTreeItem* ViewTree::getLastChild(QListViewItem* parent)
+ViewTreeItem* ViewTree::getLastChild(TQListViewItem* parent)
{
ViewTreeItem* item = static_cast<ViewTreeItem*>(parent);
Server* server = item->getView()->getServer();
@@ -942,7 +942,7 @@ ViewTreeItem* ViewTree::getLastChild(QListViewItem* parent)
return lastChild;
}
-void ViewTree::paintEmptyArea(QPainter* p, const QRect& rect)
+void ViewTree::paintEmptyArea(TQPainter* p, const TQRect& rect)
{
KListView::paintEmptyArea(p, rect);
@@ -956,9 +956,9 @@ void ViewTree::paintEmptyArea(QPainter* p, const QRect& rect)
if (!rect.contains(x-1, y+2))
return;
- QColor bgColor = paletteBackgroundColor();
- QColor selColor = KGlobalSettings::highlightColor();
- QColor midColor = last->mixColor(bgColor, selColor);
+ TQColor bgColor = paletteBackgroundColor();
+ TQColor selColor = KGlobalSettings::highlightColor();
+ TQColor midColor = last->mixColor(bgColor, selColor);
p->setPen(selColor);
p->drawPoint(x - 1, y);
diff --git a/konversation/src/viewtree.h b/konversation/src/viewtree.h
index 948326c..f2d79ff 100644
--- a/konversation/src/viewtree.h
+++ b/konversation/src/viewtree.h
@@ -23,21 +23,21 @@ class ViewTree : public KListView
Q_OBJECT
public:
- explicit ViewTree(QWidget *parent);
+ explicit ViewTree(TQWidget *parent);
~ViewTree();
void selectFirstView(bool select);
- void addView(const QString& name, ChatWindow* view, const QIconSet &iconset, bool select = false, ChatWindow* afterView = 0);
- void setViewName(ChatWindow* view, const QString& name);
- void setViewColor(ChatWindow* view, QColor color);
- void setViewIcon(ChatWindow* view, const QIconSet &iconset);
+ void addView(const TQString& name, ChatWindow* view, const TQIconSet &iconset, bool select = false, ChatWindow* afterView = 0);
+ void setViewName(ChatWindow* view, const TQString& name);
+ void setViewColor(ChatWindow* view, TQColor color);
+ void setViewIcon(ChatWindow* view, const TQIconSet &iconset);
void moveViewUp(ChatWindow* view);
void moveViewDown(ChatWindow* view);
bool canMoveViewUp(ChatWindow* view);
bool canMoveViewDown(ChatWindow* view);
- QPtrList<ChatWindow> getSortedViewList();
+ TQPtrList<ChatWindow> getSortedViewList();
public slots:
void updateAppearance();
@@ -49,27 +49,27 @@ class ViewTree : public KListView
void setViewTreeShown(bool show);
void showView(ChatWindow* view);
void closeView(ChatWindow* view);
- void showViewContextMenu(QWidget* widget, const QPoint& point);
+ void showViewContextMenu(TQWidget* widget, const TQPoint& point);
void sizeChanged();
void syncTabBarToTree();
protected:
- void contentsMousePressEvent(QMouseEvent* e);
- void contentsMouseReleaseEvent(QMouseEvent* e);
- void contentsMouseMoveEvent(QMouseEvent* e);
- void contentsWheelEvent(QWheelEvent* e);
- void contentsContextMenuEvent(QContextMenuEvent* e);
- void keyPressEvent(QKeyEvent* e);
+ void contentsMousePressEvent(TQMouseEvent* e);
+ void contentsMouseReleaseEvent(TQMouseEvent* e);
+ void contentsMouseMoveEvent(TQMouseEvent* e);
+ void contentsWheelEvent(TQWheelEvent* e);
+ void contentsContextMenuEvent(TQContextMenuEvent* e);
+ void keyPressEvent(TQKeyEvent* e);
- void resizeEvent(QResizeEvent* e);
+ void resizeEvent(TQResizeEvent* e);
- void findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem *&after);
- QDragObject* dragObject();
+ void findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after);
+ TQDragObject* dragObject();
- void paintEmptyArea(QPainter* p, const QRect& rect);
+ void paintEmptyArea(TQPainter* p, const TQRect& rect);
private slots:
- void announceSelection(QListViewItem* item);
+ void announceSelection(TQListViewItem* item);
void slotAboutToMoveView();
void slotMovedView();
void enableCloseButton();
@@ -84,12 +84,12 @@ class ViewTree : public KListView
ViewTreeItem* getItemForView(ChatWindow* view);
ViewTreeItem* getParentItemForView(ChatWindow* view);
- ViewTreeItem* getLastChild(QListViewItem* parent);
+ ViewTreeItem* getLastChild(TQListViewItem* parent);
bool canMoveItemUp(ViewTreeItem* item);
bool canMoveItemDown(ViewTreeItem* item);
- bool isAboveIcon(QPoint point, ViewTreeItem* item);
+ bool isAboveIcon(TQPoint point, ViewTreeItem* item);
void hideCloseButtons(ViewTreeItem* exception = 0);
ViewTreeItem* m_separator;
@@ -103,7 +103,7 @@ class ViewTree : public KListView
// and the release event occurred over a close button.
bool m_pressedAboveCloseButton;
ViewTreeItem* m_closeButtonItem;
- QTimer* m_enableCloseButtonTimer;
+ TQTimer* m_enableCloseButtonTimer;
// Used for middle-click close.
ViewTreeItem* m_middleClickItem;
diff --git a/konversation/src/viewtreeitem.cpp b/konversation/src/viewtreeitem.cpp
index c53699c..819176b 100644
--- a/konversation/src/viewtreeitem.cpp
+++ b/konversation/src/viewtreeitem.cpp
@@ -16,10 +16,10 @@
#include "images.h"
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qtimer.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <kglobalsettings.h>
@@ -28,8 +28,8 @@
int ViewTreeItem::s_availableSortIndex = 0;
-ViewTreeItem::ViewTreeItem(QListView* parent, const QString& name, ChatWindow* view)
- : QListViewItem(parent, name)
+ViewTreeItem::ViewTreeItem(TQListView* parent, const TQString& name, ChatWindow* view)
+ : TQListViewItem(parent, name)
{
m_sortIndex = s_availableSortIndex;
s_availableSortIndex++;
@@ -52,8 +52,8 @@ ViewTreeItem::ViewTreeItem(QListView* parent, const QString& name, ChatWindow* v
m_closeButtonEnabled = false;
}
-ViewTreeItem::ViewTreeItem(QListViewItem* parent, const QString& name, ChatWindow* view, int sortIndex)
- : QListViewItem(parent, name)
+ViewTreeItem::ViewTreeItem(TQListViewItem* parent, const TQString& name, ChatWindow* view, int sortIndex)
+ : TQListViewItem(parent, name)
{
if (sortIndex != -1)
setSortIndex(sortIndex);
@@ -82,8 +82,8 @@ ViewTreeItem::ViewTreeItem(QListViewItem* parent, const QString& name, ChatWindo
m_closeButtonEnabled = false;
}
-ViewTreeItem::ViewTreeItem(QListViewItem* parent, QListViewItem* afterItem, const QString& name, ChatWindow* view)
- : QListViewItem(parent, afterItem, name)
+ViewTreeItem::ViewTreeItem(TQListViewItem* parent, TQListViewItem* afterItem, const TQString& name, ChatWindow* view)
+ : TQListViewItem(parent, afterItem, name)
{
m_sortIndex = s_availableSortIndex;
s_availableSortIndex++;
@@ -107,7 +107,7 @@ ViewTreeItem::ViewTreeItem(QListViewItem* parent, QListViewItem* afterItem, cons
m_closeButtonEnabled = false;
}
-ViewTreeItem::ViewTreeItem(QListView* parent) : QListViewItem(parent)
+ViewTreeItem::ViewTreeItem(TQListView* parent) : TQListViewItem(parent)
{
setView(0);
setOpen(true);
@@ -132,12 +132,12 @@ int ViewTreeItem::getSortIndex() const
return m_sortIndex;
}
-void ViewTreeItem::setName(const QString& name)
+void ViewTreeItem::setName(const TQString& name)
{
setText(0, name);
}
-QString ViewTreeItem::getName() const
+TQString ViewTreeItem::getName() const
{
return text(0);
}
@@ -167,7 +167,7 @@ ChatWindow::WindowType ViewTreeItem::getViewType() const
return m_viewType;
}
-void ViewTreeItem::setColor(QColor color)
+void ViewTreeItem::setColor(TQColor color)
{
if (color != m_color)
{
@@ -177,7 +177,7 @@ void ViewTreeItem::setColor(QColor color)
}
}
-QColor ViewTreeItem::getColor() const
+TQColor ViewTreeItem::getColor() const
{
if (!m_customColorSet)
{
@@ -190,7 +190,7 @@ QColor ViewTreeItem::getColor() const
return m_color;
}
-void ViewTreeItem::setIcon(const QPixmap& pm)
+void ViewTreeItem::setIcon(const TQPixmap& pm)
{
m_oldPixmap = pm;
if (!m_closeButtonShown) setPixmap(0, pm);
@@ -269,7 +269,7 @@ bool ViewTreeItem::isSeparator() const
return m_isSeparator;
}
-int ViewTreeItem::compare(QListViewItem *i, int /* col */, bool /* ascending */) const
+int ViewTreeItem::compare(TQListViewItem *i, int /* col */, bool /* ascending */) const
{
ViewTreeItem* item = static_cast<ViewTreeItem*>(i);
@@ -304,7 +304,7 @@ void ViewTreeItem::setup()
int LED_ICON_SIZE = 14;
int MARGIN = 2;
- QRect textRect = listView()->fontMetrics().boundingRect(0, 0, /*width=*/1, 500000, Qt::AlignAuto | Qt::AlignTop | Qt::ShowPrefix, text(/*column=*/0));
+ TQRect textRect = listView()->fontMetrics().boundingRect(0, 0, /*width=*/1, 500000, Qt::AlignAuto | Qt::AlignTop | Qt::ShowPrefix, text(/*column=*/0));
int height = MARGIN + kMax(LED_ICON_SIZE, textRect.height()) + MARGIN;
setHeight(height);
}
@@ -312,22 +312,22 @@ void ViewTreeItem::setup()
setHeight(11);
}
-QColor ViewTreeItem::mixColor(const QColor &color1, const QColor &color2)
+TQColor ViewTreeItem::mixColor(const TQColor &color1, const TQColor &color2)
{
- QColor mixedColor;
+ TQColor mixedColor;
mixedColor.setRgb( (color1.red() + color2.red()) / 2,
(color1.green() + color2.green()) / 2,
(color1.blue() + color2.blue()) / 2 );
return mixedColor;
}
-void ViewTreeItem::paintFocus(QPainter* /* p */, const QColorGroup& /* cg */, const QRect& /* r */)
+void ViewTreeItem::paintFocus(TQPainter* /* p */, const TQColorGroup& /* cg */, const TQRect& /* r */)
{
// Do nothing.
return;
}
-void ViewTreeItem::paintCell(QPainter* p, const QColorGroup& /* cg */, int /* column */, int width, int /* align */)
+void ViewTreeItem::paintCell(TQPainter* p, const TQColorGroup& /* cg */, int /* column */, int width, int /* align */)
{
// Workaround a Qt bug:
// When the splitter is moved to hide the tree view and then the application is restarted,
@@ -338,20 +338,20 @@ void ViewTreeItem::paintCell(QPainter* p, const QColorGroup& /* cg */, int /* co
int MARGIN = 2;
// Bufferize the drawing of items.
- QPixmap buffer(width, height());
- QPainter painter(&buffer);
+ TQPixmap buffer(width, height());
+ TQPainter painter(&buffer);
- QColor textColor = isSelected() ? KGlobalSettings::highlightedTextColor() : getColor();
- QColor background = isSelected() ? KGlobalSettings::highlightColor() : listView()->paletteBackgroundColor();
+ TQColor textColor = isSelected() ? KGlobalSettings::highlightedTextColor() : getColor();
+ TQColor background = isSelected() ? KGlobalSettings::highlightColor() : listView()->paletteBackgroundColor();
if (m_isHighlighted) background = Preferences::inputFieldsBackgroundColor()
? Preferences::color(Preferences::AlternateBackground) : KGlobalSettings::alternateBackgroundColor();
// Fill in background.
painter.fillRect(0, 0, width, height(), background);
- QColor bgColor = listView()->paletteBackgroundColor();
- QColor selColor = m_isHighlighted ? background : KGlobalSettings::highlightColor();
- QColor midColor = mixColor(bgColor, selColor);
+ TQColor bgColor = listView()->paletteBackgroundColor();
+ TQColor selColor = m_isHighlighted ? background : KGlobalSettings::highlightColor();
+ TQColor midColor = mixColor(bgColor, selColor);
int iconWidth = pixmap(0) ? LED_ICON_SIZE : 0;
int textWidth = width - MARGIN - iconWidth - MARGIN - MARGIN;
@@ -359,7 +359,7 @@ void ViewTreeItem::paintCell(QPainter* p, const QColorGroup& /* cg */, int /* co
if (!m_isSeparator)
{
// Draw the rounded rectangle.
- QRect textRect = listView()->fontMetrics().boundingRect(0, 0, /*width=*/1, 500000, Qt::AlignAuto | Qt::AlignTop | Qt::ShowPrefix, text(/*column=*/0));
+ TQRect textRect = listView()->fontMetrics().boundingRect(0, 0, /*width=*/1, 500000, Qt::AlignAuto | Qt::AlignTop | Qt::ShowPrefix, text(/*column=*/0));
int xRound = MARGIN;
int yRound = MARGIN;
int hRound = height() - 2 * MARGIN;
@@ -367,10 +367,10 @@ void ViewTreeItem::paintCell(QPainter* p, const QColorGroup& /* cg */, int /* co
if (wRound > 0)
{
- QPixmap buffer(wRound * 2, hRound * 2);
+ TQPixmap buffer(wRound * 2, hRound * 2);
buffer.fill(background);
- QPainter pBuffer(&buffer);
- QColor colorRound = background;
+ TQPainter pBuffer(&buffer);
+ TQColor colorRound = background;
pBuffer.setPen(colorRound);
pBuffer.setBrush(colorRound);
@@ -385,8 +385,8 @@ void ViewTreeItem::paintCell(QPainter* p, const QColorGroup& /* cg */, int /* co
pBuffer.drawEllipse(0, 0, wRound * 2, hRound * 2);
pBuffer.end();
- QImage imageToScale = buffer.convertToImage();
- QPixmap pmScaled;
+ TQImage imageToScale = buffer.convertToImage();
+ TQPixmap pmScaled;
pmScaled.convertFromImage(imageToScale.smoothScale(wRound, hRound));
painter.drawPixmap(xRound, yRound, pmScaled);
textWidth -= hRound/2;
@@ -461,7 +461,7 @@ void ViewTreeItem::paintCell(QPainter* p, const QColorGroup& /* cg */, int /* co
if (pixmap(0))
xText = MARGIN + LED_ICON_SIZE + MARGIN;
- QString text = getName();
+ TQString text = getName();
if (p->fontMetrics().width(text) > textWidth)
{
@@ -478,7 +478,7 @@ void ViewTreeItem::paintCell(QPainter* p, const QColorGroup& /* cg */, int /* co
}
else
{
- QColor lineColor = Preferences::inputFieldsBackgroundColor()
+ TQColor lineColor = Preferences::inputFieldsBackgroundColor()
? Preferences::color(Preferences::AlternateBackground) : KGlobalSettings::alternateBackgroundColor();
painter.setPen(lineColor);
painter.drawLine(0, 5, width, 5);
diff --git a/konversation/src/viewtreeitem.h b/konversation/src/viewtreeitem.h
index 2d5312b..f132562 100644
--- a/konversation/src/viewtreeitem.h
+++ b/konversation/src/viewtreeitem.h
@@ -14,11 +14,11 @@
#include "chatwindow.h"
-#include <qobject.h>
-#include <qlistview.h>
-#include <qtooltip.h>
-#include <qguardedptr.h>
-#include <qpixmap.h>
+#include <tqobject.h>
+#include <tqlistview.h>
+#include <tqtooltip.h>
+#include <tqguardedptr.h>
+#include <tqpixmap.h>
class ChatWindow;
@@ -28,18 +28,18 @@ class ViewTreeItem : public QListViewItem
{
public:
- ViewTreeItem(QListView* parent, const QString& name, ChatWindow* view);
- ViewTreeItem(QListViewItem* parent, const QString& name, ChatWindow* view, int sortIndex = -1);
- ViewTreeItem(QListViewItem* parent, QListViewItem* afterItem, const QString& name, ChatWindow* view);
+ ViewTreeItem(TQListView* parent, const TQString& name, ChatWindow* view);
+ ViewTreeItem(TQListViewItem* parent, const TQString& name, ChatWindow* view, int sortIndex = -1);
+ ViewTreeItem(TQListViewItem* parent, TQListViewItem* afterItem, const TQString& name, ChatWindow* view);
// Minimal constructor for separator items.
- explicit ViewTreeItem(QListView* parent);
+ explicit ViewTreeItem(TQListView* parent);
~ViewTreeItem();
void setSortIndex(int newSortIndex);
int getSortIndex() const;
- void setName(const QString& name);
- QString getName() const;
+ void setName(const TQString& name);
+ TQString getName() const;
bool isTruncated() const;
void setView(ChatWindow* view);
@@ -48,10 +48,10 @@ class ViewTreeItem : public QListViewItem
ChatWindow::WindowType getViewType() const;
void setViewType(ChatWindow::WindowType);
- void setColor(QColor color);
- QColor getColor() const;
+ void setColor(TQColor color);
+ TQColor getColor() const;
- void setIcon(const QPixmap& pm);
+ void setIcon(const TQPixmap& pm);
void setHighlighted(bool highlight);
void setCloseButtonShown(bool show);
@@ -60,20 +60,20 @@ class ViewTreeItem : public QListViewItem
bool sortLast() const;
bool isSeparator() const;
- int compare(QListViewItem* i, int col, bool ascending) const;
+ int compare(TQListViewItem* i, int col, bool ascending) const;
void setup();
- void paintFocus(QPainter* p, const QColorGroup& cg, const QRect& r);
- void paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align);
+ void paintFocus(TQPainter* p, const TQColorGroup& cg, const TQRect& r);
+ void paintCell(TQPainter* p, const TQColorGroup& cg, int column, int width, int align);
- QColor mixColor(const QColor &color1, const QColor &color2);
+ TQColor mixColor(const TQColor &color1, const TQColor &color2);
private:
uint m_sortIndex;
static int s_availableSortIndex;
- QGuardedPtr<ChatWindow> m_view;
+ TQGuardedPtr<ChatWindow> m_view;
ChatWindow::WindowType m_viewType;
- QColor m_color;
+ TQColor m_color;
bool m_isSeparator;
bool m_isHighlighted;
@@ -82,9 +82,9 @@ class ViewTreeItem : public QListViewItem
Images* images;
- QPixmap m_closeButton;
- QPixmap m_disabledCloseButton;
- QPixmap m_oldPixmap;
+ TQPixmap m_closeButton;
+ TQPixmap m_disabledCloseButton;
+ TQPixmap m_oldPixmap;
bool m_closeButtonShown;
bool m_closeButtonEnabled;
};
diff --git a/konversation/src/warnings_preferences.cpp b/konversation/src/warnings_preferences.cpp
index c775ba7..e8d62b7 100644
--- a/konversation/src/warnings_preferences.cpp
+++ b/konversation/src/warnings_preferences.cpp
@@ -15,7 +15,7 @@
#include "warnings_preferences.h"
#include "konviconfigdialog.h"
-#include <qlistview.h>
+#include <tqlistview.h>
#include <kdebug.h>
#include <kapplication.h>
@@ -24,12 +24,12 @@
#include <klistview.h>
-Warnings_Config::Warnings_Config( QWidget* parent, const char* name, WFlags fl )
+Warnings_Config::Warnings_Config( TQWidget* parent, const char* name, WFlags fl )
: Warnings_ConfigUI( parent, name, fl )
{
dialogListView->setSorting(1);
loadSettings();
- connect(dialogListView, SIGNAL(clicked(QListViewItem *)), this, SIGNAL(modified()));
+ connect(dialogListView, TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SIGNAL(modified()));
}
Warnings_Config::~Warnings_Config()
@@ -39,7 +39,7 @@ Warnings_Config::~Warnings_Config()
void Warnings_Config::restorePageToDefaults()
{
- QCheckListItem* item=static_cast<QCheckListItem*>(dialogListView->itemAtIndex(0));
+ TQCheckListItem* item=static_cast<TQCheckListItem*>(dialogListView->itemAtIndex(0));
bool changed=false;
while(item)
{
@@ -47,7 +47,7 @@ void Warnings_Config::restorePageToDefaults()
item->setOn(true);
changed=true;
}
- item=static_cast<QCheckListItem*>(item->itemBelow());
+ item=static_cast<TQCheckListItem*>(item->itemBelow());
}
if(changed) {
emit modified();
@@ -60,9 +60,9 @@ void Warnings_Config::saveSettings()
config->setGroup("Notification Messages");
// prepare list
- QString warningsChecked;
+ TQString warningsChecked;
- QCheckListItem* item=static_cast<QCheckListItem*>(dialogListView->itemAtIndex(0));
+ TQCheckListItem* item=static_cast<TQCheckListItem*>(dialogListView->itemAtIndex(0));
int i = 0;
while(item)
{
@@ -77,7 +77,7 @@ void Warnings_Config::saveSettings()
}
else
{
- QString state = config->readEntry(item->text(2));
+ TQString state = config->readEntry(item->text(2));
if (!state.isEmpty() && (state == "yes" || state == "no"))
config->writeEntry(item->text(2), state);
@@ -90,7 +90,7 @@ void Warnings_Config::saveSettings()
config->writeEntry(item->text(2),item->isOn() ? "1" : "0");
}
- item=static_cast<QCheckListItem*>(item->itemBelow());
+ item=static_cast<TQCheckListItem*>(item->itemBelow());
++i;
}
@@ -100,8 +100,8 @@ void Warnings_Config::saveSettings()
void Warnings_Config::loadSettings()
{
- QStringList dialogDefinitions;
- QString flagNames = "Invitation,SaveLogfileNote,ClearLogfileQuestion,CloseQueryAfterIgnore,ReconnectWithDifferentServer,ReuseExistingConnection,QuitServerTab,QuitChannelTab,QuitQueryTab,ChannelListNoServerSelected,HideMenuBarWarning,ChannelListWarning,LargePaste,systemtrayquitKonversation,IgnoreNick,UnignoreNick,QuitWithActiveDccTransfers";
+ TQStringList dialogDefinitions;
+ TQString flagNames = "Invitation,SaveLogfileNote,ClearLogfileQuestion,CloseQueryAfterIgnore,ReconnectWithDifferentServer,ReuseExistingConnection,QuitServerTab,QuitChannelTab,QuitQueryTab,ChannelListNoServerSelected,HideMenuBarWarning,ChannelListWarning,LargePaste,systemtrayquitKonversation,IgnoreNick,UnignoreNick,QuitWithActiveDccTransfers";
dialogDefinitions.append(i18n("Automatically join channel on invite"));
dialogDefinitions.append(i18n("Notice that saving logfiles will save whole file"));
dialogDefinitions.append(i18n("Ask before deleting logfile contents"));
@@ -119,22 +119,22 @@ void Warnings_Config::loadSettings()
dialogDefinitions.append(i18n("Ignore"));
dialogDefinitions.append(i18n("Unignore"));
dialogDefinitions.append(i18n("Warn before quitting with active DCC file transfers"));
- QCheckListItem *item;
+ TQCheckListItem *item;
dialogListView->clear();
KConfig* config = kapp->config();
config->setGroup("Notification Messages");
- QString flagName;
+ TQString flagName;
for(unsigned int i=0; i<dialogDefinitions.count() ;i++)
{
- item=new QCheckListItem(dialogListView,dialogDefinitions[i],QCheckListItem::CheckBox);
+ item=new TQCheckListItem(dialogListView,dialogDefinitions[i],TQCheckListItem::CheckBox);
item->setText(1,dialogDefinitions[i]);
flagName = flagNames.section(",",i,i);
item->setText(2,flagName);
if (flagName == "LargePaste" || flagName == "Invitation")
{
- QString state = config->readEntry(flagName);
+ TQString state = config->readEntry(flagName);
if (state == "yes" || state == "no")
item->setOn(false);
@@ -151,17 +151,17 @@ void Warnings_Config::loadSettings()
}
// get a list of checked/unchecked items for hasChanged()
-QString Warnings_Config::currentWarningsChecked()
+TQString Warnings_Config::currentWarningsChecked()
{
// prepare list
- QString newList;
+ TQString newList;
// get first checklist item
- QListViewItem* item=dialogListView->firstChild();
+ TQListViewItem* item=dialogListView->firstChild();
while(item)
{
// save state of this item in hasChanged() list
- newList+=(static_cast<QCheckListItem*>(item)->isOn()) ? "1" : "0";
+ newList+=(static_cast<TQCheckListItem*>(item)->isOn()) ? "1" : "0";
item=item->itemBelow();
}
// return list
diff --git a/konversation/src/warnings_preferences.h b/konversation/src/warnings_preferences.h
index 4d783cd..2d3d39c 100644
--- a/konversation/src/warnings_preferences.h
+++ b/konversation/src/warnings_preferences.h
@@ -17,14 +17,14 @@
#include "konvisettingspage.h"
class KListView;
-class QListViewItem;
+class TQListViewItem;
class Warnings_Config : public Warnings_ConfigUI, public KonviSettingsPage
{
Q_OBJECT
public:
- explicit Warnings_Config( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ explicit Warnings_Config( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~Warnings_Config();
virtual void restorePageToDefaults();
@@ -37,9 +37,9 @@ class Warnings_Config : public Warnings_ConfigUI, public KonviSettingsPage
virtual void languageChange();
protected:
- QString currentWarningsChecked(); // for hasChanged()
+ TQString currentWarningsChecked(); // for hasChanged()
- QString m_oldWarningsChecked; // for hasChanged()
+ TQString m_oldWarningsChecked; // for hasChanged()
signals:
void modified();
diff --git a/konversation/src/watchednicknames_preferences.cpp b/konversation/src/watchednicknames_preferences.cpp
index 74f94ec..2471037 100644
--- a/konversation/src/watchednicknames_preferences.cpp
+++ b/konversation/src/watchednicknames_preferences.cpp
@@ -16,9 +16,9 @@
#include "konversationmainwindow.h"
#include "valuelistviewitem.h"
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -28,7 +28,7 @@
#include <kdebug.h>
-WatchedNicknames_Config::WatchedNicknames_Config(QWidget *parent, const char *name)
+WatchedNicknames_Config::WatchedNicknames_Config(TQWidget *parent, const char *name)
: WatchedNicknames_ConfigUI(parent, name)
{
notifyListView->setRenameable(0,false);
@@ -38,17 +38,17 @@ WatchedNicknames_Config::WatchedNicknames_Config(QWidget *parent, const char *na
loadSettings();
- connect(kcfg_UseNotify,SIGNAL (toggled(bool)),this,SLOT (checkIfEmptyListview(bool)) );
- connect(newButton,SIGNAL (clicked()),this,SLOT (newNotify()) );
- connect(removeButton,SIGNAL (clicked()),this,SLOT (removeNotify()) );
- connect(notifyListView,SIGNAL (selectionChanged(QListViewItem*)),this,SLOT (entrySelected(QListViewItem*)) );
- connect(notifyListView,SIGNAL (clicked(QListViewItem*)),this,SLOT (entrySelected(QListViewItem*)) );
+ connect(kcfg_UseNotify,TQT_SIGNAL (toggled(bool)),this,TQT_SLOT (checkIfEmptyListview(bool)) );
+ connect(newButton,TQT_SIGNAL (clicked()),this,TQT_SLOT (newNotify()) );
+ connect(removeButton,TQT_SIGNAL (clicked()),this,TQT_SLOT (removeNotify()) );
+ connect(notifyListView,TQT_SIGNAL (selectionChanged(TQListViewItem*)),this,TQT_SLOT (entrySelected(TQListViewItem*)) );
+ connect(notifyListView,TQT_SIGNAL (clicked(TQListViewItem*)),this,TQT_SLOT (entrySelected(TQListViewItem*)) );
- connect(networkDropdown,SIGNAL (activated(const QString&)),this,SLOT (networkChanged(const QString&)) );
- connect(nicknameInput,SIGNAL (textChanged(const QString&)),this,SLOT (nicknameChanged(const QString&)) );
+ connect(networkDropdown,TQT_SIGNAL (activated(const TQString&)),this,TQT_SLOT (networkChanged(const TQString&)) );
+ connect(nicknameInput,TQT_SIGNAL (textChanged(const TQString&)),this,TQT_SLOT (nicknameChanged(const TQString&)) );
- connect(KonversationApplication::instance(), SIGNAL(serverGroupsChanged(const Konversation::ServerGroupSettings*)),
- this, SLOT(updateNetworkNames()));
+ connect(KonversationApplication::instance(), TQT_SIGNAL(serverGroupsChanged(const Konversation::ServerGroupSettings*)),
+ this, TQT_SLOT(updateNetworkNames()));
}
WatchedNicknames_Config::~WatchedNicknames_Config()
@@ -86,14 +86,14 @@ void WatchedNicknames_Config::loadSettings()
void WatchedNicknames_Config::addNetworkBranch(Konversation::ServerGroupSettingsPtr serverGroupList)
{
// get the current notify list and an iterator
- QMap<int, QStringList> notifyList = Preferences::notifyList();
+ TQMap<int, TQStringList> notifyList = Preferences::notifyList();
ValueListViewItem* groupItem=new ValueListViewItem(serverGroupList->id(),notifyListView,notifyListView->lastChild(),serverGroupList->name());
// get the group iterator to find all servers in the group
- QMapConstIterator<int, QStringList> groupIt=notifyList.find(serverGroupList->id());
+ TQMapConstIterator<int, TQStringList> groupIt=notifyList.find(serverGroupList->id());
// get list of nicks for the current group
- QStringList nicks=groupIt.data();
+ TQStringList nicks=groupIt.data();
// add group to dropdown list
networkDropdown->insertItem(serverGroupList->name(),0);
// add nicknames to group branch (reverse order again)
@@ -109,11 +109,11 @@ void WatchedNicknames_Config::addNetworkBranch(Konversation::ServerGroupSettings
void WatchedNicknames_Config::saveSettings()
{
// create new in-memory notify structure
- QMap<int,QStringList> notifyList;
+ TQMap<int,TQStringList> notifyList;
// get first notify group
KListView* listView=notifyListView;
- QListViewItem* group=listView->firstChild();
+ TQListViewItem* group=listView->firstChild();
// loop as long as there are more groups in the listview
while(group)
@@ -121,9 +121,9 @@ void WatchedNicknames_Config::saveSettings()
int groupId=static_cast<ValueListViewItem*>(group)->getValue();
// later contains all nicks separated by blanks
- QString nicks;
+ TQString nicks;
// get first nick in the group
- QListViewItem* nick=group->firstChild();
+ TQListViewItem* nick=group->firstChild();
// loop as long as there are still nicks in this group
while(nick)
{
@@ -134,7 +134,7 @@ void WatchedNicknames_Config::saveSettings()
} // while
// write nick list to in-memory notify qstringlist
- notifyList.insert(groupId,QStringList::split(' ',nicks.stripWhiteSpace()));
+ notifyList.insert(groupId,TQStringList::split(' ',nicks.stripWhiteSpace()));
// get next group
group=group->nextSibling();
} // while
@@ -148,14 +148,14 @@ void WatchedNicknames_Config::saveSettings()
}
// returns the currently edited notify list
-QStringList WatchedNicknames_Config::currentNotifyList()
+TQStringList WatchedNicknames_Config::currentNotifyList()
{
// prepare list
- QStringList newList;
+ TQStringList newList;
// get first item
KListView* listView=notifyListView;
- QListViewItem* item=listView->firstChild();
+ TQListViewItem* item=listView->firstChild();
// loop as long as there are more groups in the listview
while(item)
@@ -180,7 +180,7 @@ void WatchedNicknames_Config::updateNetworkNames()
{
// get first notify group
KListView* listView=notifyListView;
- QListViewItem* group=listView->firstChild();
+ TQListViewItem* group=listView->firstChild();
// make sure all widgets are disabled
listView->clearSelection();
@@ -201,7 +201,7 @@ void WatchedNicknames_Config::updateNetworkNames()
if(serverGroup)
{
// get the new name of the server group
- QString serverGroupName=serverGroup->name();
+ TQString serverGroupName=serverGroup->name();
// update the name of the group in the listview
group->setText(0,serverGroupName);
@@ -214,7 +214,7 @@ void WatchedNicknames_Config::updateNetworkNames()
else
{
// get the next group from the listview
- QListViewItem* tmp=group->nextSibling();
+ TQListViewItem* tmp=group->nextSibling();
// remove the group
delete group;
// set the current group
@@ -240,10 +240,10 @@ void WatchedNicknames_Config::updateNetworkNames()
}
// check if an item with the given id exists in the listview
-QListViewItem* WatchedNicknames_Config::getItemById(QListView* listView,int id)
+TQListViewItem* WatchedNicknames_Config::getItemById(TQListView* listView,int id)
{
// get the first item in the listview
- QListViewItem* lookItem=listView->firstChild();
+ TQListViewItem* lookItem=listView->firstChild();
// look for an item with the given id
while(lookItem)
{
@@ -270,7 +270,7 @@ void WatchedNicknames_Config::newNotify()
{
// get listview object and possible first selected item
KListView* listView=notifyListView;
- QListViewItem* item=listView->selectedItem();
+ TQListViewItem* item=listView->selectedItem();
// if there was an item selected, try to find the group it belongs to,
// so the newly created item will go into the same group, otherwise
@@ -283,7 +283,7 @@ void WatchedNicknames_Config::newNotify()
item=listView->firstChild();
// finally insert new item
- item=new QListViewItem(item,i18n("New"));
+ item=new TQListViewItem(item,i18n("New"));
// make this item the current and selected item
item->setSelected(true);
listView->setCurrentItem(item);
@@ -302,13 +302,13 @@ void WatchedNicknames_Config::removeNotify()
{
// get listview pointer and the selected item
KListView* listView=notifyListView;
- QListViewItem* item=listView->selectedItem();
+ TQListViewItem* item=listView->selectedItem();
// sanity check
if(item)
{
// check which item to highlight after we deleted the chosen one
- QListViewItem* itemAfter=item->itemBelow();
+ TQListViewItem* itemAfter=item->itemBelow();
if(!itemAfter) itemAfter=item->itemAbove();
delete(item);
@@ -326,7 +326,7 @@ void WatchedNicknames_Config::removeNotify()
}
// what to do when the user selects an entry
-void WatchedNicknames_Config::entrySelected(QListViewItem* notifyEntry)
+void WatchedNicknames_Config::entrySelected(TQListViewItem* notifyEntry)
{
// play it safe, assume disabling all widgets first
bool enabled=false;
@@ -335,7 +335,7 @@ void WatchedNicknames_Config::entrySelected(QListViewItem* notifyEntry)
if(notifyEntry)
{
// is this entry a nickname?
- QListViewItem* group=notifyEntry->parent();
+ TQListViewItem* group=notifyEntry->parent();
if(group)
{
// all edit widgets may be enabled
@@ -364,22 +364,22 @@ void WatchedNicknames_Config::enableEditWidgets(bool enabled)
}
// user changed the network this nickname is on
-void WatchedNicknames_Config::networkChanged(const QString& newNetwork)
+void WatchedNicknames_Config::networkChanged(const TQString& newNetwork)
{
// get listview pointer and selected entry
KListView* listView=notifyListView;
- QListViewItem* item=listView->selectedItem();
+ TQListViewItem* item=listView->selectedItem();
// sanity check
if(item)
{
// get group the nickname is presently associated to
- QListViewItem* group=item->parent();
+ TQListViewItem* group=item->parent();
// did the user actually change anything?
if(group && group->text(0)!=newNetwork)
{
// find the branch the new network is in
- QListViewItem* lookGroup=listView->firstChild();
+ TQListViewItem* lookGroup=listView->firstChild();
while(lookGroup && (lookGroup->text(0)!=newNetwork)) lookGroup=lookGroup->nextSibling();
// if it was found (should never fail)
if(lookGroup)
@@ -401,11 +401,11 @@ void WatchedNicknames_Config::networkChanged(const QString& newNetwork)
}
// the user edited the nickname
-void WatchedNicknames_Config::nicknameChanged(const QString& newNickname)
+void WatchedNicknames_Config::nicknameChanged(const TQString& newNickname)
{
// get listview pointer and selected item
KListView* listView=notifyListView;
- QListViewItem* item=listView->selectedItem();
+ TQListViewItem* item=listView->selectedItem();
// sanity check
if(item)
diff --git a/konversation/src/watchednicknames_preferences.h b/konversation/src/watchednicknames_preferences.h
index 71b8be7..f2401cd 100644
--- a/konversation/src/watchednicknames_preferences.h
+++ b/konversation/src/watchednicknames_preferences.h
@@ -17,15 +17,15 @@
#include "watchednicknames_preferencesui.h"
-class QListView;
-class QListViewItem;
+class TQListView;
+class TQListViewItem;
class WatchedNicknames_Config : public WatchedNicknames_ConfigUI, public KonviSettingsPage
{
Q_OBJECT
public:
- explicit WatchedNicknames_Config(QWidget *parent = 0, const char *name = 0);
+ explicit WatchedNicknames_Config(TQWidget *parent = 0, const char *name = 0);
~WatchedNicknames_Config();
virtual void saveSettings();
@@ -41,19 +41,19 @@ class WatchedNicknames_Config : public WatchedNicknames_ConfigUI, public KonviSe
void checkIfEmptyListview(bool state);
void newNotify();
void removeNotify();
- void entrySelected(QListViewItem* notifyEntry);
- void networkChanged(const QString& newNetwork);
- void nicknameChanged(const QString& newNickname);
+ void entrySelected(TQListViewItem* notifyEntry);
+ void networkChanged(const TQString& newNetwork);
+ void nicknameChanged(const TQString& newNickname);
void updateNetworkNames();
protected:
void enableEditWidgets(bool enabled);
- QStringList currentNotifyList(); // for hasChanged()
+ TQStringList currentNotifyList(); // for hasChanged()
void addNetworkBranch(Konversation::ServerGroupSettingsPtr group);
- QListViewItem* getItemById(QListView* listView,int id);
+ TQListViewItem* getItemById(TQListView* listView,int id);
bool newItemSelected;
- QStringList m_oldNotifyList;
+ TQStringList m_oldNotifyList;
};
#endif