summaryrefslogtreecommitdiffstats
path: root/ksirc/KSPrefs/page_autoconnect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ksirc/KSPrefs/page_autoconnect.cpp')
-rw-r--r--ksirc/KSPrefs/page_autoconnect.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/ksirc/KSPrefs/page_autoconnect.cpp b/ksirc/KSPrefs/page_autoconnect.cpp
index a6532915..c9ab585d 100644
--- a/ksirc/KSPrefs/page_autoconnect.cpp
+++ b/ksirc/KSPrefs/page_autoconnect.cpp
@@ -10,12 +10,12 @@
#include "page_autoconnect.h"
-#include <qregexp.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <klistview.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
#include <kapplication.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -26,7 +26,7 @@
#define PASS 2
#define SSL 3
-PageAutoConnect::PageAutoConnect( QWidget *parent, const char *name ) : PageAutoConnectBase( parent, name)
+PageAutoConnect::PageAutoConnect( TQWidget *parent, const char *name ) : PageAutoConnectBase( parent, name)
{
KLVAutoConnect->setSorting( 0 );
//KLVAutoConnect->header()->hide();
@@ -46,34 +46,34 @@ void PageAutoConnect::saveConfig()
KConfig *conf = kapp->config();
conf->setGroup("AutoConnect");
- QStringList servers;
+ TQStringList servers;
- for(QListViewItem *it = KLVAutoConnect->firstChild();
+ for(TQListViewItem *it = KLVAutoConnect->firstChild();
it != 0;
it = it->nextSibling()){
- QString server = it->text(NAME);
+ TQString server = it->text(NAME);
if(it->text(PK).length() > 0)
server += ":" + it->text(1);
if(it->text(SSL).length() > 0)
server += " (SSL)";
if(it->text(PASS).length() > 0)
- server += QString(" (pass: %1)").arg(it->text(PASS));
+ server += TQString(" (pass: %1)").arg(it->text(PASS));
servers << server;
- QStringList channels;
+ TQStringList channels;
- for(QListViewItem *ch = it->firstChild();
+ for(TQListViewItem *ch = it->firstChild();
ch != 0;
ch = ch->nextSibling()){
- QString channel;
+ TQString channel;
channel = ch->text(NAME);
if(ch->text(PK).length() > 0)
- channel += QString(" (key: %1)").arg(ch->text(PK));
+ channel += TQString(" (key: %1)").arg(ch->text(PK));
channels << channel;
@@ -94,17 +94,17 @@ void PageAutoConnect::readConfig()
{
KConfig *conf = kapp->config();
conf->setGroup("AutoConnect");
- QStringList servers = conf->readListEntry("Servers");
+ TQStringList servers = conf->readListEntry("Servers");
servers.sort();
- QStringList::ConstIterator ser = servers.begin();
+ TQStringList::ConstIterator ser = servers.begin();
for( ; ser != servers.end(); ser++){
- QStringList channels = conf->readListEntry(*ser);
- QString server = *ser;
- QString port = "6667";
- QString ssl = QString::null;
- QString pass = QString::null;
+ TQStringList channels = conf->readListEntry(*ser);
+ TQString server = *ser;
+ TQString port = "6667";
+ TQString ssl = TQString::null;
+ TQString pass = TQString::null;
- QRegExp rx("(.+) \\(SSL\\)(.*)");
+ TQRegExp rx("(.+) \\(SSL\\)(.*)");
if(rx.search(server) >= 0){
server = rx.cap(1) + rx.cap(3);
ssl = i18n("SSL");
@@ -121,19 +121,19 @@ void PageAutoConnect::readConfig()
port = rx.cap(2);
}
kdDebug(5008) << server << ": Done " << port << " " << ssl << " " << pass << endl;
- QListViewItem *s = new QListViewItem(KLVAutoConnect, server, port, pass, ssl);
+ TQListViewItem *s = new TQListViewItem(KLVAutoConnect, server, port, pass, ssl);
s->setOpen(TRUE);
channels.sort();
- QStringList::ConstIterator chan = channels.begin();
+ TQStringList::ConstIterator chan = channels.begin();
for(; chan != channels.end(); chan++){
- QString channel = *chan;
- QString key = QString::null;
- QRegExp crx("(.+) \\(key: (\\S+)\\)");
+ TQString channel = *chan;
+ TQString key = TQString::null;
+ TQRegExp crx("(.+) \\(key: (\\S+)\\)");
if(crx.search(channel) >= 0){
channel = crx.cap(1);
key = crx.cap(2);
}
- new QListViewItem(s, channel, key);
+ new TQListViewItem(s, channel, key);
}
}
}
@@ -152,26 +152,26 @@ void PageAutoConnect::changed()
void PageAutoConnect::add_pressed()
{
int fnd = 0;
- QListViewItem *s = 0;
+ TQListViewItem *s = 0;
s = KLVAutoConnect->selectedItem();
if(!s){ /* new item */
- QString server = ServerLE->text();
- QString ssl = QString::null;
- QString port;
+ TQString server = ServerLE->text();
+ TQString ssl = TQString::null;
+ TQString port;
port.setNum(PortKI->value());
if(sslCB->isChecked())
ssl = i18n("SSL");
- s = new QListViewItem(KLVAutoConnect, server, port, PassLE->text(), ssl);
+ s = new TQListViewItem(KLVAutoConnect, server, port, PassLE->text(), ssl);
s->setOpen(TRUE);
- s = new QListViewItem(s, ChannelLE->text(), KeyLE->text());
+ s = new TQListViewItem(s, ChannelLE->text(), KeyLE->text());
KLVAutoConnect->setCurrentItem(s);
}
else { /* update the existing one */
- QListViewItem *parent;
- QListViewItem *child;
+ TQListViewItem *parent;
+ TQListViewItem *child;
if(s->parent()){
parent = s->parent();
@@ -183,12 +183,12 @@ void PageAutoConnect::add_pressed()
}
parent->setText(NAME, ServerLE->text());
- parent->setText(PK, QString("%1").arg(PortKI->value()));
+ parent->setText(PK, TQString("%1").arg(PortKI->value()));
parent->setText(PASS, PassLE->text());
if(sslCB->isChecked())
parent->setText(SSL, i18n("SSL"));
else
- parent->setText(SSL, QString::null);
+ parent->setText(SSL, TQString::null);
if(child){
child->setText(NAME, ChannelLE->text());
@@ -197,7 +197,7 @@ void PageAutoConnect::add_pressed()
else {
if(ChannelLE->text().length() > 0){
fnd = 0;
- QListViewItem *c = parent->firstChild();
+ TQListViewItem *c = parent->firstChild();
for( ; c != 0 && fnd == 0; c = c->nextSibling()){
if(c->text(NAME) == ChannelLE->text()){
c->setText(PK, KeyLE->text());
@@ -205,7 +205,7 @@ void PageAutoConnect::add_pressed()
}
}
if(fnd == 0){
- new QListViewItem(parent, ChannelLE->text(), KeyLE->text());
+ new TQListViewItem(parent, ChannelLE->text(), KeyLE->text());
}
}
}
@@ -228,13 +228,13 @@ void PageAutoConnect::new_pressed()
void PageAutoConnect::delete_pressed()
{
- for(QListViewItem *it = KLVAutoConnect->firstChild();
+ for(TQListViewItem *it = KLVAutoConnect->firstChild();
it != 0;
it = it->nextSibling()){
if(it->text(NAME) == ServerLE->text()){
if(ChannelLE->text().isEmpty() == FALSE){
- for(QListViewItem *ch = it->firstChild();
+ for(TQListViewItem *ch = it->firstChild();
ch != 0;
ch = ch->nextSibling()){
if(ch->text(NAME) == ChannelLE->text()){
@@ -257,7 +257,7 @@ void PageAutoConnect::delete_pressed()
changed();
}
-void PageAutoConnect::kvl_clicked(QListViewItem *it)
+void PageAutoConnect::kvl_clicked(TQListViewItem *it)
{
if(it != 0){
if(it->parent() != 0){