summaryrefslogtreecommitdiffstats
path: root/ksirc/KSPrefs/page_autoconnect.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /ksirc/KSPrefs/page_autoconnect.cpp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to '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){