summaryrefslogtreecommitdiffstats
path: root/kppp/modemdb.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 /kppp/modemdb.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 'kppp/modemdb.cpp')
-rw-r--r--kppp/modemdb.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/kppp/modemdb.cpp b/kppp/modemdb.cpp
index c86be0fc..d762f5fa 100644
--- a/kppp/modemdb.cpp
+++ b/kppp/modemdb.cpp
@@ -32,21 +32,21 @@
//
//---------------------------------------------------------------------------
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kbuttonbox.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include "modemdb.h"
#include <klocale.h>
-#include <qpushbutton.h>
-#include <qlistbox.h>
+#include <tqpushbutton.h>
+#include <tqlistbox.h>
#include <kconfig.h>
#include <kstdguiitem.h>
-ModemSelector::ModemSelector(QWidget *parent) : QDialog(parent, 0, true) {
+ModemSelector::ModemSelector(TQWidget *parent) : TQDialog(parent, 0, true) {
// set up widgets and such
setCaption(i18n("Select Modem Type"));
- QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
- QLabel *l1 = new QLabel(i18n("To set up your modem, first choose its vendor in the "
+ TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10);
+ TQLabel *l1 = new TQLabel(i18n("To set up your modem, first choose its vendor in the "
"list to the left, and then select the model from the "
"right list. If you don't know which modem you have, "
"you can try out one of the \"Generic\" modems."),
@@ -58,10 +58,10 @@ ModemSelector::ModemSelector(QWidget *parent) : QDialog(parent, 0, true) {
tl->addSpacing(10);
- QHBoxLayout *tl1 = new QHBoxLayout(10);
+ TQHBoxLayout *tl1 = new TQHBoxLayout(10);
tl->addLayout(tl1, 1);
- vendor = new QListBox(this);
- model = new QListBox(this);
+ vendor = new TQListBox(this);
+ model = new TQListBox(this);
vendor->setMinimumSize(200, 130);
model->setMinimumSize(200, 130);
tl1->addWidget(vendor, 2);
@@ -81,16 +81,16 @@ ModemSelector::ModemSelector(QWidget *parent) : QDialog(parent, 0, true) {
db = new ModemDatabase();
// set up signal/slots
- connect(ok, SIGNAL(clicked()),
- this, SLOT(reject()));
- connect(cancel, SIGNAL(clicked()),
- this, SLOT(reject()));
- connect(vendor, SIGNAL(highlighted(int)),
- this, SLOT(vendorSelected(int)));
- connect(model, SIGNAL(highlighted(int)),
- this, SLOT(modelSelected(int)));
- connect(model, SIGNAL(selected(int)),
- this, SLOT(selected(int)));
+ connect(ok, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(reject()));
+ connect(cancel, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(reject()));
+ connect(vendor, TQT_SIGNAL(highlighted(int)),
+ this, TQT_SLOT(vendorSelected(int)));
+ connect(model, TQT_SIGNAL(highlighted(int)),
+ this, TQT_SLOT(modelSelected(int)));
+ connect(model, TQT_SIGNAL(selected(int)),
+ this, TQT_SLOT(selected(int)));
// fill vendor list with life
vendor->insertStringList(*db->vendors());
@@ -107,8 +107,8 @@ ModemSelector::~ModemSelector() {
void ModemSelector::vendorSelected(int idx) {
ok->setEnabled(false);
- QString name = vendor->text(idx);
- QStringList *models = db->models(name);
+ TQString name = vendor->text(idx);
+ TQStringList *models = db->models(name);
model->clear();
model->insertStringList(*models);
@@ -139,14 +139,14 @@ ModemDatabase::~ModemDatabase() {
}
-const QStringList *ModemDatabase::vendors() {
+const TQStringList *ModemDatabase::vendors() {
return lvendors;
}
-QStringList *ModemDatabase::models(QString vendor) {
- QStringList *sl = new QStringList;
- QString s = i18n("<Generic>");
+TQStringList *ModemDatabase::models(TQString vendor) {
+ TQStringList *sl = new QStringList;
+ TQString s = i18n("<Generic>");
if(vendor == s)
vendor = i18n("<Generic>");
@@ -163,11 +163,11 @@ QStringList *ModemDatabase::models(QString vendor) {
}
-void ModemDatabase::loadModem(const QString &key, CharDict &dict) {
+void ModemDatabase::loadModem(const TQString &key, CharDict &dict) {
// KEntryIterator *it = modemDB->entryIterator(key);
// KEntryDictEntry *e;
- QMap <QString, QString> map;
- QMap <QString, QString>::Iterator it;
+ TQMap <TQString, TQString> map;
+ TQMap <TQString, TQString>::Iterator it;
// KEntryMapConstIterator e;
KEntry e;
map = modemDB->entryMap(key);
@@ -180,14 +180,14 @@ void ModemDatabase::loadModem(const QString &key, CharDict &dict) {
// e = it->current();
while(!it.key().isNull()) {
if(dict.find(it.key()) == 0) {
- dict.insert(it.key(), new QString(it.data()));
+ dict.insert(it.key(), new TQString(it.data()));
}
it++;
}
// check name attribute
if(dict["Name"] == 0 || key[0]=='!') {
- dict.replace("Name", new QString(key));
+ dict.replace("Name", new TQString(key));
}
// check parent attribute
@@ -206,8 +206,8 @@ void ModemDatabase::load() {
lvendors = new QStringList;
modems.setAutoDelete(true);
- QStringList list = modemDB->groupList();
- QStringList::Iterator it = list.begin();
+ TQStringList list = modemDB->groupList();
+ TQStringList::Iterator it = list.begin();
while(it != list.end()) {
modemDB->setGroup(*it);
CharDict *c = new CharDict;
@@ -216,16 +216,16 @@ void ModemDatabase::load() {
// if(strcmp(it->latin1(), "Common") == 0) {
if(*it == "Common") {
- QString s = i18n("Hayes(tm) compatible modem");
- c->replace("Name", new QString (s));
+ TQString s = i18n("Hayes(tm) compatible modem");
+ c->replace("Name", new TQString (s));
s = i18n("<Generic>");
- c->replace("Vendor", new QString(s));
+ c->replace("Vendor", new TQString(s));
}
modems.append(c);
if(modemDB->hasKey("Vendor")) {
- QString vendor = modemDB->readEntry("Vendor");
+ TQString vendor = modemDB->readEntry("Vendor");
if(lvendors->findIndex(vendor) == -1)
lvendors->append(vendor);
}