summaryrefslogtreecommitdiffstats
path: root/kppp
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
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')
-rw-r--r--kppp/accounting.cpp94
-rw-r--r--kppp/accounting.h42
-rw-r--r--kppp/accounts.cpp148
-rw-r--r--kppp/accounts.h46
-rw-r--r--kppp/acctselect.cpp112
-rw-r--r--kppp/acctselect.h36
-rw-r--r--kppp/connect.cpp182
-rw-r--r--kppp/connect.h58
-rw-r--r--kppp/conwindow.cpp86
-rw-r--r--kppp/conwindow.h60
-rw-r--r--kppp/debug.cpp34
-rw-r--r--kppp/debug.h30
-rw-r--r--kppp/docking.cpp18
-rw-r--r--kppp/docking.h18
-rw-r--r--kppp/edit.cpp376
-rw-r--r--kppp/edit.h160
-rw-r--r--kppp/general.cpp280
-rw-r--r--kppp/general.h78
-rw-r--r--kppp/iplined.cpp10
-rw-r--r--kppp/iplined.h4
-rw-r--r--kppp/kpppwidget.cpp260
-rw-r--r--kppp/kpppwidget.h72
-rw-r--r--kppp/loginterm.cpp30
-rw-r--r--kppp/loginterm.h22
-rw-r--r--kppp/logview/export.cpp92
-rw-r--r--kppp/logview/export.h102
-rw-r--r--kppp/logview/log.cpp22
-rw-r--r--kppp/logview/log.h10
-rw-r--r--kppp/logview/loginfo.cpp18
-rw-r--r--kppp/logview/loginfo.h18
-rw-r--r--kppp/logview/main.cpp20
-rw-r--r--kppp/logview/main.h6
-rw-r--r--kppp/logview/monthly.cpp198
-rw-r--r--kppp/logview/monthly.h34
-rw-r--r--kppp/macros.h2
-rw-r--r--kppp/main.cpp44
-rw-r--r--kppp/main.h2
-rw-r--r--kppp/miniterm.cpp66
-rw-r--r--kppp/miniterm.h52
-rw-r--r--kppp/modem.cpp66
-rw-r--r--kppp/modem.h16
-rw-r--r--kppp/modemcmds.cpp154
-rw-r--r--kppp/modemcmds.h100
-rw-r--r--kppp/modemdb.cpp74
-rw-r--r--kppp/modemdb.h28
-rw-r--r--kppp/modeminfo.cpp60
-rw-r--r--kppp/modeminfo.h40
-rw-r--r--kppp/modems.cpp84
-rw-r--r--kppp/modems.h32
-rw-r--r--kppp/newwidget.cpp4
-rw-r--r--kppp/newwidget.h6
-rw-r--r--kppp/pppdargs.cpp70
-rw-r--r--kppp/pppdargs.h20
-rw-r--r--kppp/pppdata.cpp296
-rw-r--r--kppp/pppdata.h256
-rw-r--r--kppp/ppplog.cpp72
-rw-r--r--kppp/ppplog.h4
-rw-r--r--kppp/pppstatdlg.cpp94
-rw-r--r--kppp/pppstatdlg.h86
-rw-r--r--kppp/pppstats.cpp4
-rw-r--r--kppp/pppstats.h10
-rw-r--r--kppp/providerdb.cpp184
-rw-r--r--kppp/providerdb.h60
-rw-r--r--kppp/pwentry.cpp38
-rw-r--r--kppp/pwentry.h26
-rw-r--r--kppp/requester.cpp22
-rw-r--r--kppp/requester.h12
-rw-r--r--kppp/ruleset.cpp110
-rw-r--r--kppp/ruleset.h50
-rw-r--r--kppp/runtests.cpp10
-rw-r--r--kppp/scriptedit.cpp24
-rw-r--r--kppp/scriptedit.h14
72 files changed, 2534 insertions, 2534 deletions
diff --git a/kppp/accounting.cpp b/kppp/accounting.cpp
index e9dcdc4c..76c5f02e 100644
--- a/kppp/accounting.cpp
+++ b/kppp/accounting.cpp
@@ -29,7 +29,7 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <kstandarddirs.h>
#include <klocale.h>
@@ -52,8 +52,8 @@ extern PPPData gpppdata;
// Helper functions
//
/////////////////////////////////////////////////////////////////////////////
-static QString timet2qstring(time_t t) {
- QString s;
+static TQString timet2qstring(time_t t) {
+ TQString s;
s.sprintf("%lu", t);
return s;
@@ -67,14 +67,14 @@ static QString timet2qstring(time_t t) {
// accounting is accomplished withing it's derived classes
//
/////////////////////////////////////////////////////////////////////////////
-AccountingBase::AccountingBase(QObject *parent) :
- QObject(parent),
+AccountingBase::AccountingBase(TQObject *parent) :
+ TQObject(parent),
_total(0),
_session(0)
{
- QDate dt = QDate::currentDate();
- LogFileName = QString("%1-%2.log")
- .arg(QDate::shortMonthName(dt.month()))
+ TQDate dt = TQDate::currentDate();
+ LogFileName = TQString("%1-%2.log")
+ .arg(TQDate::shortMonthName(dt.month()))
.arg(dt.year(), 4);
LogFileName = KGlobal::dirs()->saveLocation("appdata", "Log")
@@ -101,8 +101,8 @@ double AccountingBase::session() const {
// set costs back to zero ( typically once per month)
-void AccountingBase::resetCosts(const QString & accountname){
- QString prev_account = gpppdata.accname();
+void AccountingBase::resetCosts(const TQString & accountname){
+ TQString prev_account = gpppdata.accname();
gpppdata.setAccount(accountname);
gpppdata.setTotalCosts("");
@@ -111,8 +111,8 @@ void AccountingBase::resetCosts(const QString & accountname){
}
-void AccountingBase::resetVolume(const QString & accountname){
- QString prev_account = gpppdata.accname();
+void AccountingBase::resetVolume(const TQString & accountname){
+ TQString prev_account = gpppdata.accname();
gpppdata.setAccount(accountname);
gpppdata.setTotalBytes(0);
@@ -121,10 +121,10 @@ void AccountingBase::resetVolume(const QString & accountname){
}
-void AccountingBase::logMessage(QString s, bool newline) {
+void AccountingBase::logMessage(TQString s, bool newline) {
int old_umask = umask(0077);
- QFile f(LogFileName);
+ TQFile f(LogFileName);
bool result = f.open(IO_ReadWrite);
if(result) {
@@ -140,7 +140,7 @@ void AccountingBase::logMessage(QString s, bool newline) {
f.at(f.size());
}
- QCString tmp = s.local8Bit();
+ TQCString tmp = s.local8Bit();
f.writeBlock(tmp, tmp.length());
f.close();
}
@@ -150,13 +150,13 @@ void AccountingBase::logMessage(QString s, bool newline) {
}
-QString AccountingBase::getCosts(const QString & accountname) {
- QString prev_account = gpppdata.accname();
+TQString AccountingBase::getCosts(const TQString & accountname) {
+ TQString prev_account = gpppdata.accname();
gpppdata.setAccount(accountname);
- QString val = gpppdata.totalCosts();
+ TQString val = gpppdata.totalCosts();
// ### currency from rule file
- // QString val = KGlobal::locale()->formatMoney(gpppdata.totalCosts().toDouble(), currency);
+ // TQString val = KGlobal::locale()->formatMoney(gpppdata.totalCosts().toDouble(), currency);
gpppdata.setAccount(prev_account);
@@ -167,7 +167,7 @@ QString AccountingBase::getCosts(const QString & accountname) {
bool AccountingBase::saveCosts() {
if(!_name.isNull() && _name.length() > 0) {
- QString val;
+ TQString val;
val.setNum(total());
gpppdata.setTotalCosts(val);
@@ -180,9 +180,9 @@ bool AccountingBase::saveCosts() {
bool AccountingBase::loadCosts() {
- QString val = gpppdata.totalCosts();
+ TQString val = gpppdata.totalCosts();
- if(val.isNull()) // QString will segfault if isnull and toDouble called
+ if(val.isNull()) // TQString will segfault if isnull and toDouble called
_total = 0.0;
else {
bool ok;
@@ -195,10 +195,10 @@ bool AccountingBase::loadCosts() {
}
-QString AccountingBase::getAccountingFile(const QString &accountname) {
- QString f = "kppp/Rules/";
+TQString AccountingBase::getAccountingFile(const TQString &accountname) {
+ TQString f = "kppp/Rules/";
f += accountname;
- QString d = locate("data", f);
+ TQString d = locate("data", f);
if(d.isNull())
return "";
@@ -212,7 +212,7 @@ QString AccountingBase::getAccountingFile(const QString &accountname) {
// Accounting class for ruleset files
//
/////////////////////////////////////////////////////////////////////////////
-Accounting::Accounting(QObject *parent, PPPStats *st) :
+Accounting::Accounting(TQObject *parent, PPPStats *st) :
AccountingBase(parent),
acct_timer_id(0),
update_timer_id(0),
@@ -226,14 +226,14 @@ bool Accounting::running() const {
}
-void Accounting::timerEvent(QTimerEvent *t) {
+void Accounting::timerEvent(TQTimerEvent *t) {
if(t->timerId() == acct_timer_id) {
double newCosts;
double newLen;
double connect_time = difftime(time(0), start_time);
- rules.getActiveRule(QDateTime::currentDateTime(), connect_time, newCosts, newLen);
+ rules.getActiveRule(TQDateTime::currentDateTime(), connect_time, newCosts, newLen);
if(newLen < 1) { // changed to < 1
slotStop();
return; // no default rule found
@@ -279,13 +279,13 @@ void Accounting::slotStart() {
_lastcosts = 0.0;
_lastlen = 0.0;
_session = rules.perConnectionCosts();
- rules.setStartTime(QDateTime::currentDateTime());
+ rules.setStartTime(TQDateTime::currentDateTime());
acct_timer_id = startTimer(1);
if(UPDATE_TIME > 0)
update_timer_id = startTimer(UPDATE_TIME);
start_time = time(0);
- QString s;
+ TQString s;
s = timet2qstring(start_time);
s += ":";
s += gpppdata.accname();
@@ -305,7 +305,7 @@ void Accounting::slotStop() {
acct_timer_id = 0;
update_timer_id = 0;
- QString s;
+ TQString s;
s.sprintf(":%s:%0.4e:%0.4e:%u:%u\n",
timet2qstring(time(0)).utf8().data(),
session(),
@@ -319,16 +319,16 @@ void Accounting::slotStop() {
}
-bool Accounting::loadRuleSet(const QString & name) {
+bool Accounting::loadRuleSet(const TQString & name) {
if (name.isEmpty()) {
rules.load(""); // delete old rules
return TRUE;
}
- QString d = AccountingBase::getAccountingFile(name);
+ TQString d = AccountingBase::getAccountingFile(name);
- QFileInfo fg(d);
+ TQFileInfo fg(d);
if(fg.exists()) {
int ret = rules.load(d);
_name = rules.name();
@@ -358,7 +358,7 @@ double Accounting::session() const {
-ExecutableAccounting::ExecutableAccounting(PPPStats *st, QObject *parent) :
+ExecutableAccounting::ExecutableAccounting(PPPStats *st, TQObject *parent) :
AccountingBase(parent),
proc(0),
stats(st)
@@ -371,19 +371,19 @@ bool ExecutableAccounting::running() const {
}
-bool ExecutableAccounting::loadRuleSet(const QString &) {
- QString s = AccountingBase::getAccountingFile(gpppdata.accountingFile());
- return (access(QFile::encodeName(s), X_OK) == 0);
+bool ExecutableAccounting::loadRuleSet(const TQString &) {
+ TQString s = AccountingBase::getAccountingFile(gpppdata.accountingFile());
+ return (access(TQFile::encodeName(s), X_OK) == 0);
}
void ExecutableAccounting::gotData(KProcess */*proc*/, char *buffer, int /*buflen*/) {
- QString field[8];
+ TQString field[8];
int nFields = 0;
int pos, last_pos = 0;
// split string
- QString b(buffer);
+ TQString b(buffer);
pos = b.find(':');
while(pos != -1 && nFields < 8) {
field[nFields++] = b.mid(last_pos, pos-last_pos);
@@ -394,8 +394,8 @@ void ExecutableAccounting::gotData(KProcess */*proc*/, char *buffer, int /*bufle
for(int i = 0; i < nFields;i++)
fprintf(stderr, "FIELD[%d] = %s\n", i, field[i].local8Bit().data());
- QString __total, __session;
- QString s(buffer);
+ TQString __total, __session;
+ TQString s(buffer);
int del1, del2, del3;
del1 = s.find(':');
@@ -433,14 +433,14 @@ void ExecutableAccounting::slotStart() {
slotStop(); // just to make sure
loadCosts();
- QString s = AccountingBase::getAccountingFile(gpppdata.accountingFile());
+ TQString s = AccountingBase::getAccountingFile(gpppdata.accountingFile());
proc = new KProcess;
- QString s_total;
+ TQString s_total;
s_total.sprintf("%0.8f", total());
*proc << s << s_total;
- connect(proc, SIGNAL(receivedStdout(KProcess *, char *, int)),
- this, SLOT(gotData(KProcess *, char *, int)));
+ connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),
+ this, TQT_SLOT(gotData(KProcess *, char *, int)));
proc->start();
time_t start_time = time(0);
@@ -460,7 +460,7 @@ void ExecutableAccounting::slotStop() {
delete proc;
proc = 0;
- QString s;
+ TQString s;
s.sprintf(":%s:%0.4e:%0.4e:%u:%u\n",
timet2qstring(time(0)).local8Bit().data(),
session(),
diff --git a/kppp/accounting.h b/kppp/accounting.h
index 303d5c22..4fe65591 100644
--- a/kppp/accounting.h
+++ b/kppp/accounting.h
@@ -26,7 +26,7 @@
#ifndef __ACCOUNTING__H__
#define __ACCOUNTING__H__
-#include <qobject.h>
+#include <tqobject.h>
#include <kprocess.h>
#include "ruleset.h"
@@ -37,40 +37,40 @@ class PPPStats;
// Accounting base class
//
/////////////////////////////////////////////////////////////////////////////
-class AccountingBase : public QObject {
+class AccountingBase : public TQObject {
Q_OBJECT
public:
- AccountingBase(QObject *parent);
+ AccountingBase(TQObject *parent);
virtual ~AccountingBase();
virtual double total() const;
virtual double session() const;
virtual bool running() const { return false; };
- virtual bool loadRuleSet(const QString & name) = 0;
+ virtual bool loadRuleSet(const TQString & name) = 0;
public slots:
virtual void slotStart() {};
virtual void slotStop() {};
signals:
- void changed(QString total, QString session);
+ void changed(TQString total, TQString session);
protected:
- void logMessage(QString, bool = FALSE);
+ void logMessage(TQString, bool = FALSE);
bool saveCosts();
bool loadCosts();
- QString LogFileName;
+ TQString LogFileName;
double _total, _session;
- QString _name;
+ TQString _name;
// static members
public:
- static void resetCosts(const QString & accountname);
- static void resetVolume(const QString & accountname);
- static QString getCosts(const QString & accountname);
- static QString getAccountingFile(const QString &accountname);
+ static void resetCosts(const TQString & accountname);
+ static void resetVolume(const TQString & accountname);
+ static TQString getCosts(const TQString & accountname);
+ static TQString getAccountingFile(const TQString &accountname);
};
@@ -82,23 +82,23 @@ public:
class Accounting : public AccountingBase {
Q_OBJECT
public:
- Accounting(QObject *parent, PPPStats *st);
+ Accounting(TQObject *parent, PPPStats *st);
virtual double total() const;
virtual double session() const;
- virtual bool loadRuleSet(const QString & name);
+ virtual bool loadRuleSet(const TQString & name);
virtual bool running() const;
private:
- virtual void timerEvent(QTimerEvent *t);
+ virtual void timerEvent(TQTimerEvent *t);
public slots:
virtual void slotStart();
virtual void slotStop();
signals:
- void changed(QString total, QString session);
+ void changed(TQString total, TQString session);
private:
int acct_timer_id;
@@ -119,9 +119,9 @@ private:
class ExecutableAccounting : public AccountingBase {
Q_OBJECT
public:
- ExecutableAccounting(PPPStats *st, QObject *parent = 0);
+ ExecutableAccounting(PPPStats *st, TQObject *parent = 0);
- virtual bool loadRuleSet(const QString & );
+ virtual bool loadRuleSet(const TQString & );
virtual bool running() const;
public slots:
@@ -132,12 +132,12 @@ private slots:
void gotData(KProcess *proc, char *buffer, int buflen);
signals:
- void changed(QString total, QString session);
+ void changed(TQString total, TQString session);
private:
KProcess *proc;
- QString currency;
- QString provider;
+ TQString currency;
+ TQString provider;
PPPStats *stats;
};
diff --git a/kppp/accounts.cpp b/kppp/accounts.cpp
index 25023ad4..d374e6c6 100644
--- a/kppp/accounts.cpp
+++ b/kppp/accounts.cpp
@@ -24,12 +24,12 @@
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qdir.h>
+#include <tqdir.h>
#include <stdlib.h>
-#include <qlayout.h>
-#include <qtabdialog.h>
-#include <qwhatsthis.h>
-#include <qmessagebox.h>
+#include <tqlayout.h>
+#include <tqtabdialog.h>
+#include <tqwhatsthis.h>
+#include <tqmessagebox.h>
#include <kapplication.h>
#include <kbuttonbox.h>
@@ -39,7 +39,7 @@
#include <kwin.h>
#include <kdialogbase.h>
#include <kstdguiitem.h>
-#include <qvgroupbox.h>
+#include <tqvgroupbox.h>
#include <errno.h>
@@ -51,29 +51,29 @@
void parseargs(char* buf, char** args);
-AccountWidget::AccountWidget( QWidget *parent, const char *name )
- : QWidget( parent, name )
+AccountWidget::AccountWidget( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
int min = 0;
- QVBoxLayout *l1 = new QVBoxLayout(parent, 10, 10);
+ TQVBoxLayout *l1 = new TQVBoxLayout(parent, 10, 10);
// add a hbox
- QHBoxLayout *l11 = new QHBoxLayout;
+ TQHBoxLayout *l11 = new QHBoxLayout;
l1->addLayout(l11);
- accountlist_l = new QListBox(parent);
+ accountlist_l = new TQListBox(parent);
accountlist_l->setMinimumSize(160, 128);
- connect(accountlist_l, SIGNAL(highlighted(int)),
- this, SLOT(slotListBoxSelect(int)));
- connect(accountlist_l, SIGNAL(selected(int)),
- this, SLOT(editaccount()));
+ connect(accountlist_l, TQT_SIGNAL(highlighted(int)),
+ this, TQT_SLOT(slotListBoxSelect(int)));
+ connect(accountlist_l, TQT_SIGNAL(selected(int)),
+ this, TQT_SLOT(editaccount()));
l11->addWidget(accountlist_l, 10);
- QVBoxLayout *l111 = new QVBoxLayout;
+ TQVBoxLayout *l111 = new QVBoxLayout;
l11->addLayout(l111, 1);
- edit_b = new QPushButton(i18n("&Edit..."), parent);
- connect(edit_b, SIGNAL(clicked()), SLOT(editaccount()));
- QWhatsThis::add(edit_b, i18n("Allows you to modify the selected account"));
+ edit_b = new TQPushButton(i18n("&Edit..."), parent);
+ connect(edit_b, TQT_SIGNAL(clicked()), TQT_SLOT(editaccount()));
+ TQWhatsThis::add(edit_b, i18n("Allows you to modify the selected account"));
min = edit_b->sizeHint().width();
min = QMAX(70,min);
@@ -81,60 +81,60 @@ AccountWidget::AccountWidget( QWidget *parent, const char *name )
l111->addWidget(edit_b);
- new_b = new QPushButton(i18n("&New..."), parent);
- connect(new_b, SIGNAL(clicked()), SLOT(newaccount()));
+ new_b = new TQPushButton(i18n("&New..."), parent);
+ connect(new_b, TQT_SIGNAL(clicked()), TQT_SLOT(newaccount()));
l111->addWidget(new_b);
- QWhatsThis::add(new_b, i18n("Create a new dialup connection\n"
+ TQWhatsThis::add(new_b, i18n("Create a new dialup connection\n"
"to the Internet"));
- copy_b = new QPushButton(i18n("Co&py"), parent);
- connect(copy_b, SIGNAL(clicked()), SLOT(copyaccount()));
+ copy_b = new TQPushButton(i18n("Co&py"), parent);
+ connect(copy_b, TQT_SIGNAL(clicked()), TQT_SLOT(copyaccount()));
l111->addWidget(copy_b);
- QWhatsThis::add(copy_b,
+ TQWhatsThis::add(copy_b,
i18n("Makes a copy of the selected account. All\n"
"settings of the selected account are copied\n"
"to a new account that you can modify to fit your\n"
"needs"));
- delete_b = new QPushButton(i18n("De&lete"), parent);
- connect(delete_b, SIGNAL(clicked()), SLOT(deleteaccount()));
+ delete_b = new TQPushButton(i18n("De&lete"), parent);
+ connect(delete_b, TQT_SIGNAL(clicked()), TQT_SLOT(deleteaccount()));
l111->addWidget(delete_b);
- QWhatsThis::add(delete_b,
+ TQWhatsThis::add(delete_b,
i18n("<p>Deletes the selected account\n\n"
"<font color=\"red\"><b>Use with care!</b></font>"));
- QHBoxLayout *l12 = new QHBoxLayout;
+ TQHBoxLayout *l12 = new QHBoxLayout;
l1->addStretch(1);
l1->addLayout(l12);
- QVBoxLayout *l121 = new QVBoxLayout;
+ TQVBoxLayout *l121 = new QVBoxLayout;
l12->addLayout(l121);
l121->addStretch(1);
- costlabel = new QLabel(i18n("Phone costs:"), parent);
+ costlabel = new TQLabel(i18n("Phone costs:"), parent);
costlabel->setEnabled(FALSE);
l121->addWidget(costlabel);
- costedit = new QLineEdit(parent);
- costedit->setFocusPolicy(QWidget::NoFocus);
+ costedit = new TQLineEdit(parent);
+ costedit->setFocusPolicy(TQWidget::NoFocus);
costedit->setFixedHeight(costedit->sizeHint().height());
costedit->setEnabled(FALSE);
l121->addWidget(costedit);
l121->addStretch(1);
- QString tmp = i18n("<p>This shows the accumulated phone costs\n"
+ TQString tmp = i18n("<p>This shows the accumulated phone costs\n"
"for the selected account.\n"
"\n"
"<b>Important</b>: If you have more than one \n"
"account - beware, this is <b>NOT</b> the sum \n"
"of the phone costs of all your accounts!");
- QWhatsThis::add(costlabel, tmp);
- QWhatsThis::add(costedit, tmp);
+ TQWhatsThis::add(costlabel, tmp);
+ TQWhatsThis::add(costedit, tmp);
- vollabel = new QLabel(i18n("Volume:"), parent);
+ vollabel = new TQLabel(i18n("Volume:"), parent);
vollabel->setEnabled(FALSE);
l121->addWidget(vollabel);
- voledit = new QLineEdit(parent,"voledit");
- voledit->setFocusPolicy(QWidget::NoFocus);
+ voledit = new TQLineEdit(parent,"voledit");
+ voledit->setFocusPolicy(TQWidget::NoFocus);
voledit->setFixedHeight(voledit->sizeHint().height());
voledit->setEnabled(FALSE);
l121->addWidget(voledit);
@@ -145,23 +145,23 @@ AccountWidget::AccountWidget( QWidget *parent, const char *name )
"\n"
"<a href=\"#volaccounting\">More on volume accounting</a>");
- QWhatsThis::add(vollabel,tmp);
- QWhatsThis::add(voledit, tmp);
+ TQWhatsThis::add(vollabel,tmp);
+ TQWhatsThis::add(voledit, tmp);
- QVBoxLayout *l122 = new QVBoxLayout;
+ TQVBoxLayout *l122 = new QVBoxLayout;
l12->addStretch(1);
l12->addLayout(l122);
l122->addStretch(1);
- reset = new QPushButton(i18n("&Reset..."), parent);
+ reset = new TQPushButton(i18n("&Reset..."), parent);
reset->setEnabled(FALSE);
- connect(reset, SIGNAL(clicked()),
- this, SLOT(resetClicked()));
+ connect(reset, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(resetClicked()));
l122->addWidget(reset);
- log = new QPushButton(i18n("&View Logs"), parent);
- connect(log, SIGNAL(clicked()),
- this, SLOT(viewLogClicked()));
+ log = new TQPushButton(i18n("&View Logs"), parent);
+ connect(log, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(viewLogClicked()));
l122->addWidget(log);
l122->addStretch(1);
@@ -185,7 +185,7 @@ void AccountWidget::slotListBoxSelect(int idx) {
edit_b->setEnabled((bool)(idx != -1));
copy_b->setEnabled((bool)(idx != -1));
if(idx!=-1) {
- QString account = gpppdata.accname();
+ TQString account = gpppdata.accname();
gpppdata.setAccountByIndex(accountlist_l->currentItem());
reset->setEnabled(TRUE);
costlabel->setEnabled(TRUE);
@@ -211,7 +211,7 @@ void AccountWidget::slotListBoxSelect(int idx) {
void AccountWidget::viewLogClicked(){
- QApplication::flushX();
+ TQApplication::flushX();
if(fork() == 0) {
if (setgid(getgid()) < 0 && errno != EPERM)
_exit(2);
@@ -249,7 +249,7 @@ void AccountWidget::editaccount() {
int result = doTab();
- if(result == QDialog::Accepted) {
+ if(result == TQDialog::Accepted) {
accountlist_l->changeItem(gpppdata.accname(),accountlist_l->currentItem());
emit resetaccounts();
gpppdata.save();
@@ -291,7 +291,7 @@ void AccountWidget::newaccount() {
return;
}
- if(result == QDialog::Accepted) {
+ if(result == TQDialog::Accepted) {
accountlist_l->insertItem(gpppdata.accname());
accountlist_l->setSelected(accountlist_l->findItem(gpppdata.accname()),
true);
@@ -323,7 +323,7 @@ void AccountWidget::copyaccount() {
void AccountWidget::deleteaccount() {
- QString s = i18n("Are you sure you want to delete\nthe account \"%1\"?")
+ TQString s = i18n("Are you sure you want to delete\nthe account \"%1\"?")
.arg(accountlist_l->text(accountlist_l->currentItem()));
if(KMessageBox::warningYesNo(this, s, i18n("Confirm"), KGuiItem(i18n("Delete"), "editdelete"), KStdGuiItem::cancel()) != KMessageBox::Yes)
@@ -341,7 +341,7 @@ void AccountWidget::deleteaccount() {
int AccountWidget::doTab(){
- tabWindow = new KDialogBase( KDialogBase::Tabbed, QString::null,
+ tabWindow = new KDialogBase( KDialogBase::Tabbed, TQString::null,
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok,
0, 0, true);
KWin::setIcons(tabWindow->winId(), kapp->icon(), kapp->miniIcon());
@@ -351,7 +351,7 @@ int AccountWidget::doTab(){
tabWindow->setCaption(i18n("New Account"));
isnewaccount = true;
} else {
- QString tit = i18n("Edit Account: ");
+ TQString tit = i18n("Edit Account: ");
tit += gpppdata.accname();
tabWindow->setCaption(tit);
isnewaccount = false;
@@ -372,7 +372,7 @@ int AccountWidget::doTab(){
result = tabWindow->exec();
ok = true;
- if(result == QDialog::Accepted) {
+ if(result == TQDialog::Accepted) {
if (script_w->check()) {
if(dial_w->save()) {
ip_w->save();
@@ -400,10 +400,10 @@ int AccountWidget::doTab(){
}
-QString AccountWidget::prettyPrintVolume(unsigned int n) {
+TQString AccountWidget::prettyPrintVolume(unsigned int n) {
int idx = 0;
- const QString quant[] = {i18n("Byte"), i18n("KB"),
- i18n("MB"), i18n("GB"), QString::null};
+ const TQString quant[] = {i18n("Byte"), i18n("KB"),
+ i18n("MB"), i18n("GB"), TQString::null};
float n1 = n;
while(n >= 1024 && !quant[idx].isNull()) {
@@ -415,7 +415,7 @@ QString AccountWidget::prettyPrintVolume(unsigned int n) {
while(i--)
n1 = n1 / 1024.0;
- QString s = KGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 );
+ TQString s = KGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 );
s += " " + quant[idx];
return s;
}
@@ -426,25 +426,25 @@ QString AccountWidget::prettyPrintVolume(unsigned int n) {
// Queries the user what to reset: costs, volume or both
//
/////////////////////////////////////////////////////////////////////////////
-QueryReset::QueryReset(QWidget *parent) : QDialog(parent, 0, true) {
+QueryReset::QueryReset(TQWidget *parent) : TQDialog(parent, 0, true) {
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
setCaption(i18n("Reset Accounting"));
- QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
- QVGroupBox *f = new QVGroupBox(i18n("What to Reset"), this);
+ TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10);
+ TQVGroupBox *f = new TQVGroupBox(i18n("What to Reset"), this);
- QVBoxLayout *l1 = new QVBoxLayout(parent, 10, 10);
- costs = new QCheckBox(i18n("Reset the accumulated p&hone costs"), f);
+ TQVBoxLayout *l1 = new TQVBoxLayout(parent, 10, 10);
+ costs = new TQCheckBox(i18n("Reset the accumulated p&hone costs"), f);
costs->setChecked(true);
l1->addWidget(costs);
- QWhatsThis::add(costs, i18n("Check this to set the phone costs\n"
+ TQWhatsThis::add(costs, i18n("Check this to set the phone costs\n"
"to zero. Typically you will want to\n"
"do this once a month."));
- volume = new QCheckBox(i18n("Reset &volume accounting"), f);
+ volume = new TQCheckBox(i18n("Reset &volume accounting"), f);
volume->setChecked(true);
l1->addWidget(volume);
- QWhatsThis::add(volume, i18n("Check this to set the volume accounting\n"
+ TQWhatsThis::add(volume, i18n("Check this to set the volume accounting\n"
"to zero. Typically you will want to do this\n"
"once a month."));
@@ -457,14 +457,14 @@ QueryReset::QueryReset(QWidget *parent) : QDialog(parent, 0, true) {
KButtonBox *bbox = new KButtonBox(this);
bbox->addStretch(1);
- QPushButton *ok = bbox->addButton(KStdGuiItem::ok());
+ TQPushButton *ok = bbox->addButton(KStdGuiItem::ok());
ok->setDefault(true);
- QPushButton *cancel = bbox->addButton(KStdGuiItem::cancel());
+ TQPushButton *cancel = bbox->addButton(KStdGuiItem::cancel());
- connect(ok, SIGNAL(clicked()),
- this, SLOT(accepted()));
- connect(cancel, SIGNAL(clicked()),
- this, SLOT(reject()));
+ connect(ok, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(accepted()));
+ connect(cancel, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(reject()));
bbox->layout();
tl->addWidget(bbox);
diff --git a/kppp/accounts.h b/kppp/accounts.h
index bb04478b..155c1658 100644
--- a/kppp/accounts.h
+++ b/kppp/accounts.h
@@ -27,9 +27,9 @@
#ifndef _ACCOUNTS_H_
#define _ACCOUNTS_H_
-#include <qwidget.h>
-#include <qpushbutton.h>
-#include <qlistbox.h>
+#include <tqwidget.h>
+#include <tqpushbutton.h>
+#include <tqlistbox.h>
#include "acctselect.h"
class KDialogBase;
@@ -42,10 +42,10 @@ class IPWidget;
class DNSWidget;
class GatewayWidget;
-class AccountWidget : public QWidget {
+class AccountWidget : public TQWidget {
Q_OBJECT
public:
- AccountWidget( QWidget *parent=0, const char *name=0 );
+ AccountWidget( TQWidget *parent=0, const char *name=0 );
~AccountWidget() {}
private slots:
@@ -62,11 +62,11 @@ private:
signals:
void resetaccounts();
- void resetCosts(const QString &);
- void resetVolume(const QString &);
+ void resetCosts(const TQString &);
+ void resetVolume(const TQString &);
private:
- QString prettyPrintVolume(unsigned int);
+ TQString prettyPrintVolume(unsigned int);
KDialogBase *tabWindow;
DialWidget *dial_w;
@@ -76,25 +76,25 @@ private:
GatewayWidget *gateway_w;
ScriptWidget *script_w;
- QPushButton *reset;
- QPushButton *log;
- QLabel *costlabel;
- QLineEdit *costedit;
- QLabel *vollabel;
- QLineEdit *voledit;
-
- QListBox *accountlist_l;
- QPushButton *edit_b;
- QPushButton *copy_b;
- QPushButton *new_b;
- QPushButton *delete_b;
+ TQPushButton *reset;
+ TQPushButton *log;
+ TQLabel *costlabel;
+ TQLineEdit *costedit;
+ TQLabel *vollabel;
+ TQLineEdit *voledit;
+
+ TQListBox *accountlist_l;
+ TQPushButton *edit_b;
+ TQPushButton *copy_b;
+ TQPushButton *new_b;
+ TQPushButton *delete_b;
};
-class QueryReset : public QDialog {
+class QueryReset : public TQDialog {
Q_OBJECT
public:
- QueryReset(QWidget *parent);
+ QueryReset(TQWidget *parent);
enum {COSTS=1, VOLUME=2};
@@ -102,7 +102,7 @@ private slots:
void accepted();
private:
- QCheckBox *costs, *volume;
+ TQCheckBox *costs, *volume;
};
#endif
diff --git a/kppp/acctselect.cpp b/kppp/acctselect.cpp
index 7c22e030..56a28cb4 100644
--- a/kppp/acctselect.cpp
+++ b/kppp/acctselect.cpp
@@ -33,15 +33,15 @@
//---------------------------------------------------------------------------
-#include <qcombobox.h>
-#include <qlabel.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
#include <kurllabel.h>
-#include <qlayout.h>
-#include <qlistview.h>
-#include <qdir.h>
-#include <qregexp.h>
-#include <qwmatrix.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqlistview.h>
+#include <tqdir.h>
+#include <tqregexp.h>
+#include <tqwmatrix.h>
+#include <tqcheckbox.h>
#include <kdialog.h>
#include <kstandarddirs.h>
#include <klocale.h>
@@ -52,38 +52,38 @@
#include "pppdata.h"
-AccountingSelector::AccountingSelector(QWidget *parent, bool _isnewaccount, const char *name)
- : QWidget(parent, name),
+AccountingSelector::AccountingSelector(TQWidget *parent, bool _isnewaccount, const char *name)
+ : TQWidget(parent, name),
isnewaccount(_isnewaccount)
{
- QVBoxLayout *l1 = new QVBoxLayout(parent, 0, KDialog::spacingHint());
+ TQVBoxLayout *l1 = new TQVBoxLayout(parent, 0, KDialog::spacingHint());
- enable_accounting = new QCheckBox(i18n("&Enable accounting"), parent);
+ enable_accounting = new TQCheckBox(i18n("&Enable accounting"), parent);
l1->addWidget(enable_accounting, 1);
- connect(enable_accounting, SIGNAL(toggled(bool)), this, SLOT(enableItems(bool)));
+ connect(enable_accounting, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(enableItems(bool)));
// insert the tree widget
- tl = new QListView(parent, "treewidget");
+ tl = new TQListView(parent, "treewidget");
- connect(tl, SIGNAL(selectionChanged(QListViewItem*)), this,
- SLOT(slotSelectionChanged(QListViewItem*)));
+ connect(tl, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this,
+ TQT_SLOT(slotSelectionChanged(TQListViewItem*)));
tl->setMinimumSize(220, 200);
l1->addWidget(tl, 1);
KURLLabel *up = new KURLLabel(parent);
up->setText(i18n("Check for rule updates"));
up->setURL("http://developer.kde.org/~kppp/rules.html");
- connect(up, SIGNAL(leftClickedURL(const QString&)), SLOT(openURL(const QString&)));
+ connect(up, TQT_SIGNAL(leftClickedURL(const TQString&)), TQT_SLOT(openURL(const TQString&)));
l1->addWidget(up, 1);
// label to display the currently selected ruleset
- QHBoxLayout *l11 = new QHBoxLayout;
+ TQHBoxLayout *l11 = new QHBoxLayout;
l1->addSpacing(10);
l1->addLayout(l11);
- QLabel *lsel = new QLabel(i18n("Selected:"), parent);
- selected = new QLabel(parent);
- selected->setFrameStyle(QFrame::Sunken | QFrame::WinPanel);
+ TQLabel *lsel = new TQLabel(i18n("Selected:"), parent);
+ selected = new TQLabel(parent);
+ selected->setFrameStyle(TQFrame::Sunken | TQFrame::WinPanel);
selected->setLineWidth(1);
selected->setFixedHeight(selected->sizeHint().height() + 16);
l11->addWidget(lsel, 0);
@@ -92,10 +92,10 @@ AccountingSelector::AccountingSelector(QWidget *parent, bool _isnewaccount, cons
// volume accounting
l1->addStretch(1);
- QHBoxLayout *l12 = new QHBoxLayout;
+ TQHBoxLayout *l12 = new QHBoxLayout;
l1->addLayout(l12);
- QLabel *usevol_l = new QLabel(i18n("Volume accounting:"), parent);
- use_vol = new QComboBox(parent);
+ TQLabel *usevol_l = new TQLabel(i18n("Volume accounting:"), parent);
+ use_vol = new TQComboBox(parent);
use_vol->insertItem(i18n("No Accounting"), 0);
use_vol->insertItem(i18n("Bytes In"), 1);
use_vol->insertItem(i18n("Bytes Out"), 2);
@@ -109,7 +109,7 @@ AccountingSelector::AccountingSelector(QWidget *parent, bool _isnewaccount, cons
// scale the pixmap
if(pmfolder.width() > 0) {
- QWMatrix wm;
+ TQWMatrix wm;
wm.scale(16.0/pmfolder.width(), 16.0/pmfolder.width());
pmfolder = pmfolder.xForm(wm);
}
@@ -119,7 +119,7 @@ AccountingSelector::AccountingSelector(QWidget *parent, bool _isnewaccount, cons
// scale the pixmap
if(pmfile.width() > 0) {
- QWMatrix wm;
+ TQWMatrix wm;
wm.scale(16.0/pmfile.width(), 16.0/pmfile.width());
pmfile = pmfile.xForm(wm);
}
@@ -132,7 +132,7 @@ AccountingSelector::AccountingSelector(QWidget *parent, bool _isnewaccount, cons
}
-QString AccountingSelector::fileNameToName(QString s) {
+TQString AccountingSelector::fileNameToName(TQString s) {
s.replace('_', " ");
return KURL::decode_string(s);
@@ -140,16 +140,16 @@ QString AccountingSelector::fileNameToName(QString s) {
}
-QString AccountingSelector::nameToFileName(QString s) {
+TQString AccountingSelector::nameToFileName(TQString s) {
s.replace(' ', "_");
return s;
}
-QListViewItem *AccountingSelector::findByName(QString name)
+TQListViewItem *AccountingSelector::findByName(TQString name)
{
- QListViewItem *ch = tl->firstChild();
+ TQListViewItem *ch = tl->firstChild();
while(ch) {
if(ch->text(0) == name)
return ch;
@@ -159,9 +159,9 @@ QListViewItem *AccountingSelector::findByName(QString name)
}
-void AccountingSelector::insertDir(QDir d, QListViewItem *root) {
+void AccountingSelector::insertDir(TQDir d, TQListViewItem *root) {
- QListViewItem* tli = 0;
+ TQListViewItem* tli = 0;
// sanity check
if(!d.exists() || !d.isReadable())
@@ -170,45 +170,45 @@ void AccountingSelector::insertDir(QDir d, QListViewItem *root) {
// set up filter
d.setNameFilter("*.rst");
- d.setFilter(QDir::Files);
- d.setSorting(QDir::Name);
+ d.setFilter(TQDir::Files);
+ d.setSorting(TQDir::Name);
// read the list of files
const QFileInfoList *list = d.entryInfoList();
QFileInfoListIterator it( *list );
- QFileInfo *fi;
+ TQFileInfo *fi;
// traverse the list and insert into the widget
while((fi = it.current())) {
++it;
- QString samename = fi->fileName();
+ TQString samename = fi->fileName();
- QListViewItem *i = findByName(samename);
+ TQListViewItem *i = findByName(samename);
// skip this file if already in tree
if(i)
continue;
// check if this is the file we should mark
- QString name = fileNameToName(fi->baseName(true));
+ TQString name = fileNameToName(fi->baseName(true));
if(root)
- tli = new QListViewItem(root, name);
+ tli = new TQListViewItem(root, name);
else
- tli = new QListViewItem(tl, name);
+ tli = new TQListViewItem(tl, name);
tli->setPixmap(0, pmfile);
// check if this is the item we are searching for
// (only in "Edit"-mode, not in "New"-mode
if(!isnewaccount && !edit_s.isEmpty() &&
- (edit_s == QString(fi->filePath()).right(edit_s.length()))) {
+ (edit_s == TQString(fi->filePath()).right(edit_s.length()))) {
edit_item = tli;
}
}
// set up a filter for the directories
- d.setFilter(QDir::Dirs);
+ d.setFilter(TQDir::Dirs);
d.setNameFilter("*");
const QFileInfoList *dlist = d.entryInfoList();
QFileInfoListIterator dit(*dlist);
@@ -217,25 +217,25 @@ void AccountingSelector::insertDir(QDir d, QListViewItem *root) {
// skip "." and ".." directories
if(fi->fileName().left(1) != ".") {
// convert to human-readable name
- QString name = fileNameToName(fi->fileName());
+ TQString name = fileNameToName(fi->fileName());
// if the tree already has an item with this name,
// skip creation and use this one, otherwise
// create a new entry
- QListViewItem *i = findByName(name);
+ TQListViewItem *i = findByName(name);
if(!i) {
- QListViewItem* item;
+ TQListViewItem* item;
if(root)
- item = new QListViewItem(root, name);
+ item = new TQListViewItem(root, name);
else
- item = new QListViewItem(tl, name);
+ item = new TQListViewItem(tl, name);
item->setPixmap(0, pmfolder);
- insertDir(QDir(fi->filePath()), item);
+ insertDir(TQDir(fi->filePath()), item);
} else
- insertDir(QDir(fi->filePath()), i);
+ insertDir(TQDir(fi->filePath()), i);
}
++dit;
}
@@ -256,10 +256,10 @@ void AccountingSelector::setupTreeWidget() {
tl->setRootIsDecorated(true);
// look in ~/.kde/share/apps/kppp/Rules and $KDEDIR/share/apps/kppp/Rules
- QStringList dirs = KGlobal::dirs()->resourceDirs("appdata");
- for (QStringList::ConstIterator it = dirs.begin();
+ TQStringList dirs = KGlobal::dirs()->resourceDirs("appdata");
+ for (TQStringList::ConstIterator it = dirs.begin();
it != dirs.end(); it++) {
- insertDir(QDir((*it) + "Rules"), 0);
+ insertDir(TQDir((*it) + "Rules"), 0);
}
// when mode is "Edit", then hightlight the
@@ -281,8 +281,8 @@ void AccountingSelector::enableItems(bool enabled) {
if(!enabled || (!tl->currentItem()))
selected->setText(i18n("(none)"));
else {
- QListViewItem* i = tl->currentItem();
- QString s;
+ TQListViewItem* i = tl->currentItem();
+ TQString s;
while(i) {
s = "/" + i->text(0) + s;
i = i->parent();
@@ -295,7 +295,7 @@ void AccountingSelector::enableItems(bool enabled) {
}
-void AccountingSelector::slotSelectionChanged(QListViewItem* i) {
+void AccountingSelector::slotSelectionChanged(TQListViewItem* i) {
if(!i || i->childCount())
return;
@@ -322,7 +322,7 @@ bool AccountingSelector::save() {
return true;
}
-void AccountingSelector::openURL(const QString &url) {
+void AccountingSelector::openURL(const TQString &url) {
new KRun( KURL( url ) );
}
diff --git a/kppp/acctselect.h b/kppp/acctselect.h
index 42730dd3..7a4b319a 100644
--- a/kppp/acctselect.h
+++ b/kppp/acctselect.h
@@ -35,9 +35,9 @@
#ifndef __ACCTSELECT__H__
#define __ACCTSELECT__H__
-#include <qwidget.h>
-#include <qpixmap.h>
-#include <qdir.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqdir.h>
class QCheckBox;
class QComboBox;
@@ -45,35 +45,35 @@ class QLabel;
class QListView;
class QListViewItem;
-class AccountingSelector : public QWidget {
+class AccountingSelector : public TQWidget {
Q_OBJECT
public:
- AccountingSelector(QWidget *parent = 0, bool _isnewaccount = false, const char *name = 0);
+ AccountingSelector(TQWidget *parent = 0, bool _isnewaccount = false, const char *name = 0);
~AccountingSelector() {}
bool save();
private:
- QListViewItem *findByName(QString name);
+ TQListViewItem *findByName(TQString name);
void setupTreeWidget();
- void insertDir(QDir, QListViewItem * = 0);
- QString fileNameToName(QString);
- QString nameToFileName(QString);
+ void insertDir(TQDir, TQListViewItem * = 0);
+ TQString fileNameToName(TQString);
+ TQString nameToFileName(TQString);
private slots:
- void openURL(const QString &);
+ void openURL(const TQString &);
void enableItems(bool);
- void slotSelectionChanged(QListViewItem* i);
+ void slotSelectionChanged(TQListViewItem* i);
private:
- QCheckBox *enable_accounting;
- QListView *tl;
- QComboBox *use_vol;
- QPixmap pmfolder, pmfile;
- QLabel *selected;
+ TQCheckBox *enable_accounting;
+ TQListView *tl;
+ TQComboBox *use_vol;
+ TQPixmap pmfolder, pmfile;
+ TQLabel *selected;
- QListViewItem *edit_item;
- QString edit_s;
+ TQListViewItem *edit_item;
+ TQString edit_s;
bool isnewaccount;
};
diff --git a/kppp/connect.cpp b/kppp/connect.cpp
index 01e615cc..0ab7f662 100644
--- a/kppp/connect.cpp
+++ b/kppp/connect.cpp
@@ -26,8 +26,8 @@
#include <config.h>
-#include <qlayout.h>
-#include <qregexp.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -74,12 +74,12 @@
extern KPPPWidget *p_kppp;
-QString old_hostname;
+TQString old_hostname;
bool modified_hostname;
-ConnectWidget::ConnectWidget(QWidget *parent, const char *name, PPPStats *st)
- : QWidget(parent, name),
+ConnectWidget::ConnectWidget(TQWidget *parent, const char *name, PPPStats *st)
+ : TQWidget(parent, name),
// initialize some important variables
myreadbuffer(""),
main_timer_ID(0),
@@ -100,15 +100,15 @@ ConnectWidget::ConnectWidget(QWidget *parent, const char *name, PPPStats *st)
{
modified_hostname = false;
- QVBoxLayout *tl = new QVBoxLayout(this, 8, 10);
- QString tit = i18n("Connecting to: ");
+ TQVBoxLayout *tl = new TQVBoxLayout(this, 8, 10);
+ TQString tit = i18n("Connecting to: ");
setCaption(tit);
- QHBoxLayout *l0 = new QHBoxLayout(10);
+ TQHBoxLayout *l0 = new TQHBoxLayout(10);
tl->addLayout(l0);
l0->addSpacing(10);
- messg = new QLabel(this, "messg");
- messg->setFrameStyle(QFrame::Panel|QFrame::Sunken);
+ messg = new TQLabel(this, "messg");
+ messg->setFrameStyle(TQFrame::Panel|TQFrame::Sunken);
messg->setAlignment(AlignCenter);
messg->setText(i18n("Unable to create modem lock file."));
messg->setMinimumHeight(messg->sizeHint().height() + 5);
@@ -119,17 +119,17 @@ ConnectWidget::ConnectWidget(QWidget *parent, const char *name, PPPStats *st)
l0->addWidget(messg);
l0->addSpacing(10);
- QHBoxLayout *l1 = new QHBoxLayout(10);
+ TQHBoxLayout *l1 = new TQHBoxLayout(10);
tl->addLayout(l1);
l1->addStretch(1);
- debug = new QPushButton(i18n("&Log"), this);
+ debug = new TQPushButton(i18n("&Log"), this);
debug->setToggleButton(true);
- connect(debug, SIGNAL(clicked()), SIGNAL(toggleDebugWindow()));
+ connect(debug, TQT_SIGNAL(clicked()), TQT_SIGNAL(toggleDebugWindow()));
cancel = new KPushButton(KStdGuiItem::cancel(), this);
cancel->setFocus();
- connect(cancel, SIGNAL(clicked()), SLOT(cancelbutton()));
+ connect(cancel, TQT_SIGNAL(clicked()), TQT_SLOT(cancelbutton()));
int maxw = QMAX(cancel->sizeHint().width(),
debug->sizeHint().width());
@@ -142,25 +142,25 @@ ConnectWidget::ConnectWidget(QWidget *parent, const char *name, PPPStats *st)
setFixedSize(sizeHint());
- pausetimer = new QTimer(this);
- connect(pausetimer, SIGNAL(timeout()), SLOT(pause()));
+ pausetimer = new TQTimer(this);
+ connect(pausetimer, TQT_SIGNAL(timeout()), TQT_SLOT(pause()));
kapp->processEvents();
- timeout_timer = new QTimer(this);
- connect(timeout_timer, SIGNAL(timeout()), SLOT(script_timed_out()));
+ timeout_timer = new TQTimer(this);
+ connect(timeout_timer, TQT_SIGNAL(timeout()), TQT_SLOT(script_timed_out()));
- inittimer = new QTimer(this);
- connect(inittimer, SIGNAL(timeout()), SLOT(init()));
+ inittimer = new TQTimer(this);
+ connect(inittimer, TQT_SIGNAL(timeout()), TQT_SLOT(init()));
- if_timeout_timer = new QTimer(this);
- connect(if_timeout_timer, SIGNAL(timeout()), SLOT(if_waiting_timed_out()));
+ if_timeout_timer = new TQTimer(this);
+ connect(if_timeout_timer, TQT_SIGNAL(timeout()), TQT_SLOT(if_waiting_timed_out()));
- connect(this,SIGNAL(if_waiting_signal()),this,SLOT(if_waiting_slot()));
+ connect(this,TQT_SIGNAL(if_waiting_signal()),this,TQT_SLOT(if_waiting_slot()));
prompt = new PWEntry( this, "pw" );
- if_timer = new QTimer(this);
- connect(if_timer,SIGNAL(timeout()), SLOT(if_waiting_slot()));
+ if_timer = new TQTimer(this);
+ connect(if_timer,TQT_SIGNAL(timeout()), TQT_SLOT(if_waiting_slot()));
}
@@ -210,13 +210,13 @@ void ConnectWidget::init() {
comlist = &gpppdata.scriptType();
arglist = &gpppdata.script();
- QString tit = i18n("Connecting to: %1").arg(gpppdata.accname());
+ TQString tit = i18n("Connecting to: %1").arg(gpppdata.accname());
setCaption(tit);
kapp->processEvents();
// signal other applications that we are about to get connected
- kapp->dcopClient()->emitDCOPSignal("KpppIface", "aboutToConnect()", QByteArray());
+ kapp->dcopClient()->emitDCOPSignal("KpppIface", "aboutToConnect()", TQByteArray());
// run the "before-connect" command
if (!gpppdata.command_before_connect().isEmpty()) {
@@ -224,7 +224,7 @@ void ConnectWidget::init() {
emit debugMessage(i18n("Running pre-startup command..."));
kapp->processEvents();
- QApplication::flushX();
+ TQApplication::flushX();
pid_t id = execute_command(gpppdata.command_before_connect());
int i, status;
@@ -259,7 +259,7 @@ void ConnectWidget::init() {
semaphore = false;
Modem::modem->stop();
- Modem::modem->notify(this, SLOT(readChar(unsigned char)));
+ Modem::modem->notify(this, TQT_SLOT(readChar(unsigned char)));
// if we are stuck anywhere we will time out
timeout_timer->start(gpppdata.modemTimeout()*1000);
@@ -278,7 +278,7 @@ void ConnectWidget::init() {
}
-void ConnectWidget::timerEvent(QTimerEvent *) {
+void ConnectWidget::timerEvent(TQTimerEvent *) {
if (semaphore || pausing)
return;
@@ -296,7 +296,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
substate = 0;
}
- QString initStr = gpppdata.modemInitStr(substate);
+ TQString initStr = gpppdata.modemInitStr(substate);
if (!initStr.isEmpty()) {
// send a carriage return and then wait a bit so that the modem will
// let us issue commands.
@@ -328,8 +328,8 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
if (vmain == 5) {
if(!expecting) {
- QString sToneDuration = "ATS11=" + QString::number(gpppdata.modemToneDuration());
- QString msg = i18n("Setting ") + sToneDuration;
+ TQString sToneDuration = "ATS11=" + TQString::number(gpppdata.modemToneDuration());
+ TQString msg = i18n("Setting ") + sToneDuration;
messg->setText(msg);
emit debugMessage(msg);
setExpect(gpppdata.modemInitResp());
@@ -356,7 +356,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
emit debugMessage(i18n("Setting speaker volume..."));
setExpect(gpppdata.modemInitResp());
- QString vol("AT");
+ TQString vol("AT");
vol += gpppdata.volumeInitString();
writeline(vol);
usleep(gpppdata.modemInitDelay() * 10000); // 0.01 - 3.0 sec
@@ -368,7 +368,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
if(vmain == 4) {
if(!expecting) {
if(!gpppdata.waitForDialTone() || gpppdata.waitCallback()) {
- QString msg = i18n("Turning off dial tone waiting...");
+ TQString msg = i18n("Turning off dial tone waiting...");
messg->setText(msg);
emit debugMessage(msg);
setExpect(gpppdata.modemInitResp());
@@ -387,7 +387,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
timeout_timer->start(gpppdata.modemTimeout()*1000);
if(gpppdata.waitCallback()) {
- QString msg = i18n("Waiting for callback...");
+ TQString msg = i18n("Waiting for callback...");
messg->setText(msg);
emit debugMessage(msg);
setExpect(gpppdata.modemRingResp());
@@ -395,14 +395,14 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
return;
}
- QStringList &plist = gpppdata.phonenumbers();
- QString bmarg= gpppdata.dialPrefix();
+ TQStringList &plist = gpppdata.phonenumbers();
+ TQString bmarg= gpppdata.dialPrefix();
bmarg += *plist.at(dialnumber);
- QString bm = i18n("Dialing %1").arg(bmarg);
+ TQString bm = i18n("Dialing %1").arg(bmarg);
messg->setText(bm);
emit debugMessage(bm);
- QString pn = gpppdata.modemDialStr();
+ TQString pn = gpppdata.modemDialStr();
pn += gpppdata.dialPrefix();
pn += *plist.at(dialnumber);
if(++dialnumber >= plist.count())
@@ -434,7 +434,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
Modem::modem->hangup();
if(gpppdata.busyWait() > 0) {
- QString bm = i18n("Line busy. Waiting: %1 seconds").arg(gpppdata.busyWait());
+ TQString bm = i18n("Line busy. Waiting: %1 seconds").arg(gpppdata.busyWait());
messg->setText(bm);
emit debugMessage(bm);
@@ -467,7 +467,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
timeout_timer->start(gpppdata.modemTimeout()*1000);
if(gpppdata.busyWait() > 0) {
- QString bm = i18n("No carrier. Waiting: %1 seconds").arg(gpppdata.busyWait());
+ TQString bm = i18n("No carrier. Waiting: %1 seconds").arg(gpppdata.busyWait());
messg->setText(bm);
emit debugMessage(bm);
@@ -553,7 +553,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
}
if (scriptCommand == "Scan") {
- QString bm = i18n("Scanning %1").arg(scriptArgument);
+ TQString bm = i18n("Scanning %1").arg(scriptArgument);
messg->setText(bm);
emit debugMessage(bm);
@@ -563,7 +563,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
}
if (scriptCommand == "Save") {
- QString bm = i18n("Saving %1").arg(scriptArgument);
+ TQString bm = i18n("Saving %1").arg(scriptArgument);
messg->setText(bm);
emit debugMessage(bm);
@@ -581,12 +581,12 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
if (scriptCommand == "Send" || scriptCommand == "SendNoEcho") {
- QString bm = i18n("Sending %1");
+ TQString bm = i18n("Sending %1");
// replace %USERNAME% and %PASSWORD%
- QString arg = scriptArgument;
- QRegExp re1("%USERNAME%");
- QRegExp re2("%PASSWORD%");
+ TQString arg = scriptArgument;
+ TQRegExp re1("%USERNAME%");
+ TQRegExp re2("%PASSWORD%");
arg = arg.replace(re1, gpppdata.storedUsername());
arg = arg.replace(re2, gpppdata.storedPassword());
@@ -606,7 +606,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
}
if (scriptCommand == "Expect") {
- QString bm = i18n("Expecting %1").arg(scriptArgument);
+ TQString bm = i18n("Expecting %1").arg(scriptArgument);
messg->setText(bm);
emit debugMessage(bm);
@@ -620,7 +620,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
if (scriptCommand == "Pause") {
- QString bm = i18n("Pause %1 seconds").arg(scriptArgument);
+ TQString bm = i18n("Pause %1 seconds").arg(scriptArgument);
messg->setText(bm);
emit debugMessage(bm);
@@ -637,7 +637,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
timeout_timer->stop();
- QString bm = i18n("Timeout %1 seconds").arg(scriptArgument);
+ TQString bm = i18n("Timeout %1 seconds").arg(scriptArgument);
messg->setText(bm);
emit debugMessage(bm);
@@ -672,11 +672,11 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
}
if (scriptCommand == "ID") {
- QString bm = i18n("ID %1").arg(scriptArgument);
+ TQString bm = i18n("ID %1").arg(scriptArgument);
messg->setText(bm);
emit debugMessage(bm);
- QString idstring = gpppdata.storedUsername();
+ TQString idstring = gpppdata.storedUsername();
if(!idstring.isEmpty() && firstrunID) {
// the user entered an Id on the main kppp dialog
@@ -708,11 +708,11 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
}
if (scriptCommand == "Password") {
- QString bm = i18n("Password %1").arg(scriptArgument);
+ TQString bm = i18n("Password %1").arg(scriptArgument);
messg->setText(bm);
emit debugMessage(bm);
- QString pwstring = gpppdata.password();
+ TQString pwstring = gpppdata.password();
if(!pwstring.isEmpty() && firstrunPW) {
// the user entered a password on the main kppp dialog
@@ -745,13 +745,13 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
}
if (scriptCommand == "Prompt") {
- QString bm = i18n("Prompting %1");
+ TQString bm = i18n("Prompting %1");
// if the scriptindex (aka the prompt text) includes a ## marker
// this marker should get substituted with the contents of our stored
// variable (from the subsequent scan).
- QString ts = scriptArgument;
+ TQString ts = scriptArgument;
int vstart = ts.find( "##" );
if( vstart != -1 ) {
ts.remove( vstart, 2 );
@@ -782,7 +782,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
}
if (scriptCommand == "PWPrompt") {
- QString bm = i18n("PW Prompt %1").arg(scriptArgument);
+ TQString bm = i18n("PW Prompt %1").arg(scriptArgument);
messg->setText(bm);
emit debugMessage(bm);
@@ -807,7 +807,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
if (scriptCommand == "LoopStart") {
- QString bm = i18n("Loop Start %1").arg(scriptArgument);
+ TQString bm = i18n("Loop Start %1").arg(scriptArgument);
// The incrementing of the scriptindex MUST be before the
// call to setExpect otherwise the expect will miss a string that is
@@ -832,7 +832,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
}
if (scriptCommand == "LoopEnd") {
- QString bm = i18n("Loop End %1").arg(scriptArgument);
+ TQString bm = i18n("Loop End %1").arg(scriptArgument);
if ( loopnest <= 0 ) {
bm = i18n("LoopEnd without matching Start. Line: %1").arg(bm);
vmain=20;
@@ -902,7 +902,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
}
}
- // Close the tty. This prevents the QTimer::singleShot() in
+ // Close the tty. This prevents the TQTimer::singleShot() in
// Modem::readtty() from re-enabling the socket notifier.
// The port is still held open by the helper process.
Modem::modem->closetty();
@@ -1003,7 +1003,7 @@ void ConnectWidget::checkBuffers() {
scanvar = scanvar.stripWhiteSpace();
// Show the Variabel content in the debug window
- QString sv = i18n("Scan Var: %1").arg(scanvar);
+ TQString sv = i18n("Scan Var: %1").arg(scanvar);
emit debugMessage(sv);
}
@@ -1013,7 +1013,7 @@ void ConnectWidget::checkBuffers() {
// keep everything after the expected string
readbuffer.remove(0, readbuffer.find(expectstr) + expectstr.length());
- QString ts = i18n("Found: %1").arg(expectstr);
+ TQString ts = i18n("Found: %1").arg(expectstr);
emit debugMessage(ts);
if (loopend) {
@@ -1024,7 +1024,7 @@ void ConnectWidget::checkBuffers() {
if (loopend && readbuffer.contains(loopstr[loopnest])) {
expecting = false;
readbuffer = "";
- QString ts = i18n("Looping: %1").arg(loopstr[loopnest]);
+ TQString ts = i18n("Looping: %1").arg(loopstr[loopnest]);
emit debugMessage(ts);
scriptindex = loopstartindex[loopnest];
loopend = false;
@@ -1032,7 +1032,7 @@ void ConnectWidget::checkBuffers() {
}
// notify event loop if expected string was found
if(!expecting)
- timerEvent((QTimerEvent *) 0);
+ timerEvent((TQTimerEvent *) 0);
}
}
@@ -1112,22 +1112,22 @@ void ConnectWidget::script_timed_out() {
}
-void ConnectWidget::setScan(const QString &n) {
+void ConnectWidget::setScan(const TQString &n) {
scanning = true;
scanstr = n;
scanbuffer = "";
- QString ts = i18n("Scanning: %1").arg(n);
+ TQString ts = i18n("Scanning: %1").arg(n);
emit debugMessage(ts);
}
-void ConnectWidget::setExpect(const QString &n) {
+void ConnectWidget::setExpect(const TQString &n) {
expecting = true;
expectstr = n;
- QString ts = i18n("Expecting: %1").arg(n);
- ts.replace(QRegExp("\n"), "<LF>");
+ TQString ts = i18n("Expecting: %1").arg(n);
+ ts.replace(TQRegExp("\n"), "<LF>");
emit debugMessage(ts);
// check if the expected string is in the read buffer already.
@@ -1192,7 +1192,7 @@ void ConnectWidget::if_waiting_slot() {
auto_hostname();
// signal other applications that we are connected now
- kapp->dcopClient()->emitDCOPSignal("KpppIface", "connected()", QByteArray());
+ kapp->dcopClient()->emitDCOPSignal("KpppIface", "connected()", TQByteArray());
if(!gpppdata.command_on_connect().isEmpty()) {
messg->setText(i18n("Running startup command..."));
@@ -1239,7 +1239,7 @@ void ConnectWidget::if_waiting_slot() {
bool ConnectWidget::execppp() {
- QString command;
+ TQString command;
command = "pppd";
@@ -1276,7 +1276,7 @@ bool ConnectWidget::execppp() {
// the english/i18n mix below is ugly but we want to keep working
// after someone changed the code to use i18n'ed config values
- QString flowCtrl = gpppdata.flowcontrol();
+ TQString flowCtrl = gpppdata.flowcontrol();
if(flowCtrl != "None" && flowCtrl != i18n("None")) {
if(flowCtrl == "CRTSCTS" || flowCtrl == "Hardware [CRTSCTS]" ||
flowCtrl == i18n("Hardware [CRTSCTS]"))
@@ -1291,8 +1291,8 @@ bool ConnectWidget::execppp() {
if(gpppdata.autoDNS())
command += " usepeerdns";
- QStringList &arglist = gpppdata.pppdArgument();
- for ( QStringList::Iterator it = arglist.begin();
+ TQStringList &arglist = gpppdata.pppdArgument();
+ for ( TQStringList::Iterator it = arglist.begin();
it != arglist.end();
++it )
{
@@ -1308,7 +1308,7 @@ bool ConnectWidget::execppp() {
} else {
command += " callback ";
command += gpppdata.callbackType() == CBTYPE_ADMIN ?
- QString("0") : gpppdata.callbackPhone();
+ TQString("0") : gpppdata.callbackPhone();
}
} else
gpppdata.setWaitCallback(false);
@@ -1350,17 +1350,17 @@ bool ConnectWidget::execppp() {
}
-void ConnectWidget::closeEvent( QCloseEvent *e ) {
+void ConnectWidget::closeEvent( TQCloseEvent *e ) {
e->ignore();
emit cancelbutton();
}
-void ConnectWidget::setMsg(const QString &msg) {
+void ConnectWidget::setMsg(const TQString &msg) {
messg->setText(msg);
}
-void ConnectWidget::writeline(const QString &s) {
+void ConnectWidget::writeline(const TQString &s) {
Modem::modem->writeLine(s.local8Bit());
}
@@ -1368,7 +1368,7 @@ void ConnectWidget::writeline(const QString &s) {
void auto_hostname() {
struct in_addr local_ip;
struct hostent *hostname_entry;
- QString new_hostname;
+ TQString new_hostname;
int dot;
char tmp_str[100]; // buffer overflow safe
@@ -1398,11 +1398,11 @@ void auto_hostname() {
// Replace the DNS domain entry in the /etc/resolv.conf file and
// disable the nameserver entries if option is enabled
-void add_domain(const QString &domain) {
+void add_domain(const TQString &domain) {
int fd;
char c;
- QString resolv[MAX_RESOLVCONF_LINES];
+ TQString resolv[MAX_RESOLVCONF_LINES];
if (domain.isEmpty())
return;
@@ -1422,7 +1422,7 @@ void add_domain(const QString &domain) {
if ((c != '\n') && (i < MAX_RESOLVCONF_LINES)) i++;
if((fd = Requester::rq->openResolv(O_WRONLY|O_TRUNC)) >= 0) {
- QCString tmp = "domain " + domain.local8Bit() +
+ TQCString tmp = "domain " + domain.local8Bit() +
" \t\t#kppp temp entry\n";
write(fd, tmp.data(), tmp.length());
@@ -1432,12 +1432,12 @@ void add_domain(const QString &domain) {
&& !resolv[j].contains("#kppp temp entry")
&& gpppdata.exDNSDisabled()))
&& !resolv[j].contains("#entry disabled by kppp")) {
- QCString tmp = "# " + resolv[j].local8Bit() +
+ TQCString tmp = "# " + resolv[j].local8Bit() +
" \t#entry disabled by kppp\n";
write(fd, tmp, tmp.length());
}
else {
- QCString tmp = resolv[j].local8Bit() + "\n";
+ TQCString tmp = resolv[j].local8Bit() + "\n";
write(fd, tmp, tmp.length());
}
}
@@ -1453,12 +1453,12 @@ void adddns()
int fd;
if ((fd = Requester::rq->openResolv(O_WRONLY|O_APPEND)) >= 0) {
- QStringList &dnslist = gpppdata.dns();
- for ( QStringList::Iterator it = dnslist.begin();
+ TQStringList &dnslist = gpppdata.dns();
+ for ( TQStringList::Iterator it = dnslist.begin();
it != dnslist.end();
++it )
{
- QCString dns = "nameserver " + (*it).local8Bit() +
+ TQCString dns = "nameserver " + (*it).local8Bit() +
" \t#kppp temp entry\n";
write(fd, dns.data(), dns.length());
}
@@ -1493,7 +1493,7 @@ void removedns() {
int fd;
char c;
- QString resolv[MAX_RESOLVCONF_LINES];
+ TQString resolv[MAX_RESOLVCONF_LINES];
if((fd = Requester::rq->openResolv(O_RDONLY)) >= 0) {
@@ -1512,12 +1512,12 @@ void removedns() {
for(int j=0; j < i; j++) {
if(resolv[j].contains("#kppp temp entry")) continue;
if(resolv[j].contains("#entry disabled by kppp")) {
- QCString tmp = resolv[j].local8Bit();
+ TQCString tmp = resolv[j].local8Bit();
write(fd, tmp.data()+2, tmp.length() - 27);
write(fd, "\n", 1);
}
else {
- QCString tmp = resolv[j].local8Bit() + "\n";
+ TQCString tmp = resolv[j].local8Bit() + "\n";
write(fd, tmp, tmp.length());
}
}
diff --git a/kppp/connect.h b/kppp/connect.h
index d6008c15..c387a84b 100644
--- a/kppp/connect.h
+++ b/kppp/connect.h
@@ -29,10 +29,10 @@
#ifndef _CONNECT_H_
#define _CONNECT_H_
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kpushbutton.h>
-#include <qlabel.h>
-#include <qevent.h>
+#include <tqlabel.h>
+#include <tqevent.h>
#include "kpppconfig.h"
#include "pwentry.h"
@@ -43,15 +43,15 @@
class PPPStats;
-class ConnectWidget : public QWidget {
+class ConnectWidget : public TQWidget {
Q_OBJECT
public:
- ConnectWidget(QWidget *parent, const char *name, PPPStats *st);
+ ConnectWidget(TQWidget *parent, const char *name, PPPStats *st);
~ConnectWidget();
public:
void set_con_speed_string();
- void setMsg(const QString &);
+ void setMsg(const TQString &);
void pppdDied();
// these are only necessary to prevent the user from clicking in the cancel
@@ -60,8 +60,8 @@ public:
void enableButtons();
protected:
- void timerEvent(QTimerEvent *);
- void closeEvent( QCloseEvent *e );
+ void timerEvent(TQTimerEvent *);
+ void closeEvent( TQCloseEvent *e );
private slots:
void readChar(unsigned char);
@@ -77,7 +77,7 @@ public slots:
signals:
void if_waiting_signal();
- void debugMessage(const QString &);
+ void debugMessage(const TQString &);
void toggleDebugWindow();
void closeDebugWindow();
void debugPutChar(unsigned char);
@@ -85,43 +85,43 @@ signals:
void stopAccounting();
public:
- QString myreadbuffer; // we want to keep every thing in order to fish for the
+ TQString myreadbuffer; // we want to keep every thing in order to fish for the
// connection speed later on
- QPushButton *debug;
+ TQPushButton *debug;
int main_timer_ID;
private:
int vmain;
int substate;
int scriptindex;
- QString scriptCommand, scriptArgument;
- QStringList *comlist, *arglist;
+ TQString scriptCommand, scriptArgument;
+ TQStringList *comlist, *arglist;
// static const int maxloopnest=(MAX_SCRIPT_ENTRIES/2);
int loopnest;
int loopstartindex[MAXLOOPNEST];
bool loopend;
- QString loopstr[MAXLOOPNEST];
+ TQString loopstr[MAXLOOPNEST];
bool semaphore;
- QTimer *inittimer;
+ TQTimer *inittimer;
- QTimer *timeout_timer;
+ TQTimer *timeout_timer;
bool execppp();
- void writeline(const QString &);
+ void writeline(const TQString &);
void checkBuffers();
- void setExpect(const QString &);
+ void setExpect(const TQString &);
bool expecting;
- QString expectstr;
+ TQString expectstr;
- QString readbuffer;
+ TQString readbuffer;
- void setScan(const QString &);
- QString scanvar;
- QString scanstr;
- QString scanbuffer;
+ void setScan(const TQString &);
+ TQString scanvar;
+ TQString scanstr;
+ TQString scanbuffer;
bool scanning;
bool pausing;
@@ -129,11 +129,11 @@ private:
LoginTerm *termwindow;
int scriptTimeout;
- QTimer *pausetimer;
- QTimer *if_timer;
- QTimer *if_timeout_timer;
+ TQTimer *pausetimer;
+ TQTimer *if_timer;
+ TQTimer *if_timeout_timer;
- QLabel *messg;
+ TQLabel *messg;
KPushButton *cancel;
bool firstrunID;
@@ -150,7 +150,7 @@ extern void killppp();
void adddns();
void addpeerdns();
void removedns();
-void add_domain(const QString & newdomain);
+void add_domain(const TQString & newdomain);
void auto_hostname();
#endif
diff --git a/kppp/conwindow.cpp b/kppp/conwindow.cpp
index cc287bb9..e485d862 100644
--- a/kppp/conwindow.cpp
+++ b/kppp/conwindow.cpp
@@ -21,7 +21,7 @@
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qtooltip.h>
+#include <tqtooltip.h>
#include "conwindow.h"
#include "docking.h"
#include "pppdata.h"
@@ -31,9 +31,9 @@
extern PPPData gpppdata;
-ConWindow::ConWindow(QWidget *parent, const char *name,QWidget *mainwidget,
+ConWindow::ConWindow(TQWidget *parent, const char *name,TQWidget *mainwidget,
PPPStats *st)
- : QWidget(parent, name, 0),
+ : TQWidget(parent, name, 0),
minutes(0),
seconds(0),
hours(0),
@@ -43,34 +43,34 @@ ConWindow::ConWindow(QWidget *parent, const char *name,QWidget *mainwidget,
accountingEnabled(false),
volumeAccountingEnabled(false)
{
- info1 = new QLabel(i18n("Connected at:"), this);
- info2 = new QLabel("", this);
+ info1 = new TQLabel(i18n("Connected at:"), this);
+ info2 = new TQLabel("", this);
- timelabel1 = new QLabel(i18n("Time connected:"), this);
- timelabel2 = new QLabel("000:00:00", this);
+ timelabel1 = new TQLabel(i18n("Time connected:"), this);
+ timelabel2 = new TQLabel("000:00:00", this);
- vollabel = new QLabel(i18n("Volume:"), this);
- volinfo = new QLabel("", this);
+ vollabel = new TQLabel(i18n("Volume:"), this);
+ volinfo = new TQLabel("", this);
// now the stuff for accounting
- session_bill_l = new QLabel(i18n("Session bill:"), this);
- session_bill = new QLabel("", this);
- total_bill_l = new QLabel(i18n("Total bill:"), this);
- total_bill = new QLabel("", this);
+ session_bill_l = new TQLabel(i18n("Session bill:"), this);
+ session_bill = new TQLabel("", this);
+ total_bill_l = new TQLabel(i18n("Total bill:"), this);
+ total_bill = new TQLabel("", this);
setCaption("kppp");
- cancelbutton = new QPushButton(this);
+ cancelbutton = new TQPushButton(this);
cancelbutton->setText(i18n("&Disconnect"));
- connect(cancelbutton, SIGNAL(clicked()), mainwidget, SLOT(disconnect()));
+ connect(cancelbutton, TQT_SIGNAL(clicked()), mainwidget, TQT_SLOT(disconnect()));
- statsbutton = new QPushButton(this);
+ statsbutton = new TQPushButton(this);
statsbutton->setText(i18n("De&tails"));
statsbutton->setFocus();
- connect(statsbutton, SIGNAL(clicked()), mainwidget, SLOT(showStats()));
+ connect(statsbutton, TQT_SIGNAL(clicked()), mainwidget, TQT_SLOT(showStats()));
- clocktimer = new QTimer(this);
- connect(clocktimer, SIGNAL(timeout()), SLOT(timeclick()));
+ clocktimer = new TQTimer(this);
+ connect(clocktimer, TQT_SIGNAL(timeout()), TQT_SLOT(timeclick()));
// read window position from config file
int p_x, p_y;
@@ -83,20 +83,20 @@ ConWindow::~ConWindow() {
}
// save window position when window was closed
-bool ConWindow::event(QEvent *e) {
- if (e->type() == QEvent::Hide)
+bool ConWindow::event(TQEvent *e) {
+ if (e->type() == TQEvent::Hide)
{
gpppdata.setWinPosConWin(x(), y());
return true;
}
else
- return QWidget::event(e);
+ return TQWidget::event(e);
}
-QString ConWindow::prettyPrintVolume(unsigned int n) {
+TQString ConWindow::prettyPrintVolume(unsigned int n) {
int idx = 0;
- const QString quant[] = {i18n("Byte"), i18n("KB"),
- i18n("MB"), i18n("GB"), QString::null};
+ const TQString quant[] = {i18n("Byte"), i18n("KB"),
+ i18n("MB"), i18n("GB"), TQString::null};
float n1 = n;
while(n >= 1024 && !quant[idx].isNull()) {
@@ -108,7 +108,7 @@ QString ConWindow::prettyPrintVolume(unsigned int n) {
while(i--)
n1 = n1 / 1024.0;
- QString s = KGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 );
+ TQString s = KGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 );
s += " " + quant[idx];
return s;
}
@@ -123,21 +123,21 @@ void ConWindow::accounting(bool on) {
delete tl1;
// add layout now
- tl1 = new QVBoxLayout(this, 10, 10);
+ tl1 = new TQVBoxLayout(this, 10, 10);
tl1->addSpacing(5);
- QHBoxLayout *tl = new QHBoxLayout;
+ TQHBoxLayout *tl = new QHBoxLayout;
tl1->addLayout(tl);
tl->addSpacing(20);
- QGridLayout *l1;
+ TQGridLayout *l1;
int vol_lines = 0;
if(gpppdata.VolAcctEnabled())
vol_lines = 1;
if(accountingEnabled)
- l1 = new QGridLayout(4 + vol_lines, 2, 5);
+ l1 = new TQGridLayout(4 + vol_lines, 2, 5);
else
- l1 = new QGridLayout(2 + vol_lines, 2, 5);
+ l1 = new TQGridLayout(2 + vol_lines, 2, 5);
tl->addLayout(l1);
l1->setColStretch(0, 0);
l1->setColStretch(1, 1);
@@ -148,9 +148,9 @@ void ConWindow::accounting(bool on) {
total_bill->setAlignment(AlignRight|AlignVCenter);
volinfo->setAlignment(AlignRight|AlignVCenter);
// make sure that there's enough space for the bills
- QString s1 = session_bill->text();
- QString s2 = total_bill->text();
- QString s3 = volinfo->text();
+ TQString s1 = session_bill->text();
+ TQString s2 = total_bill->text();
+ TQString s3 = volinfo->text();
session_bill->setText("888888.88 XXX");
total_bill->setText("888888.88 XXX");
@@ -204,7 +204,7 @@ void ConWindow::accounting(bool on) {
}
tl->addSpacing(10);
- QVBoxLayout *l2 = new QVBoxLayout(5);
+ TQVBoxLayout *l2 = new TQVBoxLayout(5);
tl->addLayout(l2);
l2->addStretch(1);
l2->addWidget(statsbutton);
@@ -218,8 +218,8 @@ void ConWindow::accounting(bool on) {
/*
do not overwrite position read from config
// If this gets re-enabled, fix it for Xinerama before committing to CVS.
- setGeometry((QApplication::desktop()->width() - width()) / 2,
- (QApplication::desktop()->height() - height())/2,
+ setGeometry((TQApplication::desktop()->width() - width()) / 2,
+ (TQApplication::desktop()->height() - height())/2,
width(),
height());
*/
@@ -236,7 +236,7 @@ void ConWindow::startClock() {
minutes = 0;
seconds = 0;
hours = 0;
- QString title ;
+ TQString title ;
title = gpppdata.accname();
@@ -250,7 +250,7 @@ void ConWindow::startClock() {
}
-void ConWindow::setConnectionSpeed(const QString &speed) {
+void ConWindow::setConnectionSpeed(const TQString &speed) {
info2->setText(speed);
}
@@ -261,7 +261,7 @@ void ConWindow::stopClock() {
void ConWindow::timeclick() {
- QString tooltip = i18n("Connection: %1\n"
+ TQString tooltip = i18n("Connection: %1\n"
"Connected at: %2\n"
"Time connected: %3")
.arg(gpppdata.accname()).arg(info2->text())
@@ -317,11 +317,11 @@ void ConWindow::timeclick() {
setCaption(caption_string);
}
- QToolTip::add(DockWidget::dock_widget, tooltip);
+ TQToolTip::add(DockWidget::dock_widget, tooltip);
}
-void ConWindow::closeEvent( QCloseEvent *e ){
+void ConWindow::closeEvent( TQCloseEvent *e ){
// we don't want to lose the
// conwindow since this is our last connection kppp.
// if we lost it we could only kill the program by hand to get on with life.
@@ -332,7 +332,7 @@ void ConWindow::closeEvent( QCloseEvent *e ){
}
-void ConWindow::slotAccounting(QString total, QString session) {
+void ConWindow::slotAccounting(TQString total, TQString session) {
total_bill->setText(total);
session_bill->setText(session);
}
diff --git a/kppp/conwindow.h b/kppp/conwindow.h
index d7f0bf43..fd3609de 100644
--- a/kppp/conwindow.h
+++ b/kppp/conwindow.h
@@ -26,62 +26,62 @@
#define _CONWINDOW_H_
-#include <qtimer.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qdialog.h>
-#include <qframe.h>
-#include <qevent.h>
-#include <qlayout.h>
+#include <tqtimer.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqdialog.h>
+#include <tqframe.h>
+#include <tqevent.h>
+#include <tqlayout.h>
class PPPStats;
-class ConWindow : public QWidget {
+class ConWindow : public TQWidget {
Q_OBJECT
public:
- ConWindow(QWidget *parent, const char *name,QWidget *main, PPPStats *st);
+ ConWindow(TQWidget *parent, const char *name,TQWidget *main, PPPStats *st);
~ConWindow();
protected:
- void closeEvent( QCloseEvent *e );
- bool event( QEvent *e );
+ void closeEvent( TQCloseEvent *e );
+ bool event( TQEvent *e );
private slots:
void timeclick();
void dock();
public:
- void setConnectionSpeed(const QString&);
+ void setConnectionSpeed(const TQString&);
void startClock();
void stopClock();
void accounting(bool); // show/ hide accounting info
public slots:
- void slotAccounting(QString, QString);
+ void slotAccounting(TQString, TQString);
private:
- QLabel *info1;
- QLabel *info2;
- QPushButton *cancelbutton;
- QPushButton *statsbutton;
- QString prettyPrintVolume(unsigned int);
+ TQLabel *info1;
+ TQLabel *info2;
+ TQPushButton *cancelbutton;
+ TQPushButton *statsbutton;
+ TQString prettyPrintVolume(unsigned int);
int minutes;
int seconds;
int hours;
int days;
- QFrame *fline;
- QLabel *timelabel1;
- QLabel *timelabel2;
- QLabel *total_bill, *total_bill_l;
- QLabel *session_bill, *session_bill_l;
- QString caption_string;
- QString time_string2;
- QString time_string;
- QTimer *clocktimer;
- QVBoxLayout *tl1;
- QLabel *vollabel;
- QLabel *volinfo;
+ TQFrame *fline;
+ TQLabel *timelabel1;
+ TQLabel *timelabel2;
+ TQLabel *total_bill, *total_bill_l;
+ TQLabel *session_bill, *session_bill_l;
+ TQString caption_string;
+ TQString time_string2;
+ TQString time_string;
+ TQTimer *clocktimer;
+ TQVBoxLayout *tl1;
+ TQLabel *vollabel;
+ TQLabel *volinfo;
PPPStats *stats;
bool accountingEnabled;
bool volumeAccountingEnabled;
diff --git a/kppp/debug.cpp b/kppp/debug.cpp
index e551bdea..3dee5797 100644
--- a/kppp/debug.cpp
+++ b/kppp/debug.cpp
@@ -29,24 +29,24 @@
extern KPPPWidget *p_kppp;
-myMultiEdit::myMultiEdit(QWidget *parent, const char *name)
- : QMultiLineEdit(parent, name)
+myMultiEdit::myMultiEdit(TQWidget *parent, const char *name)
+ : TQMultiLineEdit(parent, name)
{
setReadOnly(true);
}
void myMultiEdit::insertChar(unsigned char c) {
- QMultiLineEdit::insert(QChar(c));
+ TQMultiLineEdit::insert(TQChar(c));
}
void myMultiEdit::newLine() {
- QMultiLineEdit::newLine();
+ TQMultiLineEdit::newLine();
}
-DebugWidget::DebugWidget(QWidget *parent, const char *name)
- : QDialog(parent, name, FALSE)
+DebugWidget::DebugWidget(TQWidget *parent, const char *name)
+ : TQDialog(parent, name, FALSE)
{
setCaption(i18n("Login Script Debug Window"));
@@ -54,29 +54,29 @@ DebugWidget::DebugWidget(QWidget *parent, const char *name)
text_window->setGeometry(2,5,400, 300);
// text_window->setReadOnly(FALSE);
- statuslabel = new QLabel("", this, "statuslabel");
+ statuslabel = new TQLabel("", this, "statuslabel");
- statuslabel->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ statuslabel->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
statuslabel->setAlignment( AlignLeft|AlignVCenter );
statuslabel->setGeometry(2, 307, 400, 20);
//statusPageLabel->setFont( KGlobalSettings::generalFont() );
- dismiss = new QPushButton(this);
+ dismiss = new TQPushButton(this);
dismiss->setGeometry(330,340,70,30);
dismiss->setText(i18n("&Close"));
dismiss->setFocus();
- connect(dismiss, SIGNAL(clicked()), SLOT(hide()));
+ connect(dismiss, TQT_SIGNAL(clicked()), TQT_SLOT(hide()));
- /* fline = new QFrame(this,"line");
- fline->setFrameStyle(QFrame::HLine |QFrame::Sunken);
+ /* fline = new TQFrame(this,"line");
+ fline->setFrameStyle(TQFrame::HLine |TQFrame::Sunken);
fline->setGeometry(2,332,398,5);*/
adjustSize();
setMinimumSize(width(),height());
}
-void DebugWidget::hideEvent(QHideEvent *)
+void DebugWidget::hideEvent(TQHideEvent *)
{
assert(p_kppp);
p_kppp->con->debug->setOn(false);
@@ -88,7 +88,7 @@ void DebugWidget::clear() {
void DebugWidget::addChar(unsigned char c) {
- QString stuff;
+ TQString stuff;
if(c == '\r' || c == '\n') {
if(c == '\n')
@@ -98,17 +98,17 @@ void DebugWidget::addChar(unsigned char c) {
}
-void DebugWidget::statusLabel(const QString &s) {
+void DebugWidget::statusLabel(const TQString &s) {
statuslabel->setText(s);
}
/*
-void DebugWidget::keyPressEvent(QKeyEvent *k) {
+void DebugWidget::keyPressEvent(TQKeyEvent *k) {
}
*/
-void DebugWidget::resizeEvent(QResizeEvent *e){
+void DebugWidget::resizeEvent(TQResizeEvent *e){
int w = width() ;
int h = height();
e = e;
diff --git a/kppp/debug.h b/kppp/debug.h
index 06eeddf6..a1a73be9 100644
--- a/kppp/debug.h
+++ b/kppp/debug.h
@@ -24,46 +24,46 @@
#ifndef _DEBUGWIDGET_
#define _DEBUGWIDGET_
-#include <qdialog.h>
-#include <qstring.h>
-#include <qlabel.h>
-#include <qmultilineedit.h>
-#include <qpushbutton.h>
+#include <tqdialog.h>
+#include <tqstring.h>
+#include <tqlabel.h>
+#include <tqmultilineedit.h>
+#include <tqpushbutton.h>
-class myMultiEdit : public QMultiLineEdit {
+class myMultiEdit : public TQMultiLineEdit {
public:
- myMultiEdit(QWidget *parent=0, const char *name=0);
+ myMultiEdit(TQWidget *parent=0, const char *name=0);
void newLine();
void insertChar(unsigned char c);
};
-class DebugWidget : public QDialog {
+class DebugWidget : public TQDialog {
Q_OBJECT
public:
- DebugWidget(QWidget *parent=0, const char *name=0);
+ DebugWidget(TQWidget *parent=0, const char *name=0);
void clear();
public slots:
- void statusLabel(const QString &);
+ void statusLabel(const TQString &);
void toggleVisibility();
void addChar(unsigned char);
protected:
- virtual void hideEvent(QHideEvent *);
- virtual void resizeEvent(QResizeEvent *e);
+ virtual void hideEvent(TQHideEvent *);
+ virtual void resizeEvent(TQResizeEvent *e);
private:
void enter();
- QFrame *fline;
- QPushButton *dismiss;
+ TQFrame *fline;
+ TQPushButton *dismiss;
myMultiEdit *text_window;
- QLabel *statuslabel;
+ TQLabel *statuslabel;
};
#endif
diff --git a/kppp/docking.cpp b/kppp/docking.cpp
index d3f449a1..e5cd0c5e 100644
--- a/kppp/docking.cpp
+++ b/kppp/docking.cpp
@@ -38,7 +38,7 @@ extern KPPPWidget *p_kppp;
// static member
DockWidget *DockWidget::dock_widget = 0;
-DockWidget::DockWidget(QWidget *parent, const char *name, PPPStats *st)
+DockWidget::DockWidget(TQWidget *parent, const char *name, PPPStats *st)
: KSystemTray(parent, name), stats(st) {
// load pixmaps
@@ -50,12 +50,12 @@ DockWidget::DockWidget(QWidget *parent, const char *name, PPPStats *st)
// popup menu for right mouse button
popup_m = contextMenu();
toggleID = popup_m->insertItem(i18n("Restore"),
- this, SLOT(toggle_window_state()));
- popup_m->insertItem(i18n("Details"), p_kppp, SLOT(showStats()));
+ this, TQT_SLOT(toggle_window_state()));
+ popup_m->insertItem(i18n("Details"), p_kppp, TQT_SLOT(showStats()));
popup_m->insertSeparator();
- popup_m->insertItem(i18n("Disconnect"), p_kppp, SLOT(disconnect()));
+ popup_m->insertItem(i18n("Disconnect"), p_kppp, TQT_SLOT(disconnect()));
// connect to stats for little modem animation
- connect(stats, SIGNAL(statsChanged(int)), SLOT(paintIcon(int)));
+ connect(stats, TQT_SIGNAL(statsChanged(int)), TQT_SLOT(paintIcon(int)));
DockWidget::dock_widget = this;
}
@@ -66,7 +66,7 @@ DockWidget::~DockWidget() {
}
-void DockWidget::paintEvent (QPaintEvent *) {
+void DockWidget::paintEvent (TQPaintEvent *) {
paintIcon(PPPStats::BytesNone);
}
@@ -74,7 +74,7 @@ void DockWidget::paintEvent (QPaintEvent *) {
void DockWidget::paintIcon (int status) {
// animate modem lights
- const QPixmap *pixmap;
+ const TQPixmap *pixmap;
if(isVisible()) {
switch(status)
@@ -112,7 +112,7 @@ void DockWidget::stop_stats() {
}
-void DockWidget::mousePressEvent(QMouseEvent *e) {
+void DockWidget::mousePressEvent(TQMouseEvent *e) {
// open/close connect-window on right mouse button
if ( e->button() == LeftButton ) {
toggle_window_state();
@@ -120,7 +120,7 @@ void DockWidget::mousePressEvent(QMouseEvent *e) {
// open popup menu on left mouse button
if ( e->button() == RightButton ) {
- QString text;
+ TQString text;
if(p_kppp->con_win->isVisible())
text = i18n("Minimize");
else
diff --git a/kppp/docking.h b/kppp/docking.h
index d35e8977..93c6d344 100644
--- a/kppp/docking.h
+++ b/kppp/docking.h
@@ -28,7 +28,7 @@
#ifndef _DOCKING_H_
#define _DOCKING_H_
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <ksystemtray.h>
class PPPStats;
@@ -36,16 +36,16 @@ class PPPStats;
class DockWidget : public KSystemTray {
Q_OBJECT
public:
- DockWidget(QWidget * parent, const char *name, PPPStats *st);
+ DockWidget(TQWidget * parent, const char *name, PPPStats *st);
~DockWidget();
protected:
- void paintEvent(QPaintEvent *e);
- void showEvent(QShowEvent *) { }
+ void paintEvent(TQPaintEvent *e);
+ void showEvent(TQShowEvent *) { }
private slots:
void toggle_window_state();
- void mousePressEvent(QMouseEvent *e);
+ void mousePressEvent(TQMouseEvent *e);
public slots:
void paintIcon(int);
@@ -61,10 +61,10 @@ private:
KPopupMenu *popup_m;
- QPixmap dock_none_pixmap;
- QPixmap dock_left_pixmap;
- QPixmap dock_right_pixmap;
- QPixmap dock_both_pixmap;
+ TQPixmap dock_none_pixmap;
+ TQPixmap dock_left_pixmap;
+ TQPixmap dock_right_pixmap;
+ TQPixmap dock_both_pixmap;
};
#endif
diff --git a/kppp/edit.cpp b/kppp/edit.cpp
index 7b47c1ba..cc26a889 100644
--- a/kppp/edit.cpp
+++ b/kppp/edit.cpp
@@ -25,16 +25,16 @@
#include <string.h>
#include <termios.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kmessagebox.h>
-#include <qwhatsthis.h>
-#include <qregexp.h>
+#include <tqwhatsthis.h>
+#include <tqregexp.h>
#include <kapplication.h>
#include <kiconloader.h>
#include <kbuttonbox.h>
#include <klocale.h>
-#include <qvgroupbox.h>
-#include <qhbox.h>
+#include <tqvgroupbox.h>
+#include <tqhbox.h>
#include <kdialog.h>
#include <kwin.h>
@@ -44,61 +44,61 @@
#include "iplined.h"
#include "auth.h"
-DialWidget::DialWidget( QWidget *parent, bool isnewaccount, const char *name )
- : QWidget(parent, name)
+DialWidget::DialWidget( TQWidget *parent, bool isnewaccount, const char *name )
+ : TQWidget(parent, name)
{
const int GRIDROWS = 8;
- QGridLayout *tl = new QGridLayout(parent, GRIDROWS, 2, 0, KDialog::spacingHint());
+ TQGridLayout *tl = new TQGridLayout(parent, GRIDROWS, 2, 0, KDialog::spacingHint());
- connect_label = new QLabel(i18n("Connection &name:"), parent);
+ connect_label = new TQLabel(i18n("Connection &name:"), parent);
tl->addWidget(connect_label, 0, 0);
- connectname_l = new QLineEdit(parent);
+ connectname_l = new TQLineEdit(parent);
connectname_l->setMaxLength(ACCNAME_SIZE);
connect_label->setBuddy(connectname_l);
tl->addWidget(connectname_l, 0, 1);
- QString tmp = i18n("Type in a unique name for this connection");
+ TQString tmp = i18n("Type in a unique name for this connection");
- QWhatsThis::add(connect_label,tmp);
- QWhatsThis::add(connectname_l,tmp);
+ TQWhatsThis::add(connect_label,tmp);
+ TQWhatsThis::add(connectname_l,tmp);
- number_label = new QLabel(i18n("P&hone number:"), parent);
+ number_label = new TQLabel(i18n("P&hone number:"), parent);
number_label->setAlignment(AlignTop|AlignLeft);
tl->addWidget(number_label, 1, 0);
- QHBoxLayout *lpn = new QHBoxLayout(5);
+ TQHBoxLayout *lpn = new TQHBoxLayout(5);
tl->addLayout(lpn, 1, 1);
- numbers = new QListBox(parent);
+ numbers = new TQListBox(parent);
number_label->setBuddy(numbers);
numbers->setMinimumSize(120, 70);
lpn->addWidget(numbers);
- QVBoxLayout *lpn1 = new QVBoxLayout;
+ TQVBoxLayout *lpn1 = new QVBoxLayout;
lpn->addLayout(lpn1);
- add = new QPushButton(i18n("&Add..."), parent);
- del = new QPushButton(i18n("&Remove"), parent);
+ add = new TQPushButton(i18n("&Add..."), parent);
+ del = new TQPushButton(i18n("&Remove"), parent);
- up = new QPushButton(parent);
+ up = new TQPushButton(parent);
up->setIconSet(BarIconSet("up"));
- down = new QPushButton(parent);
+ down = new TQPushButton(parent);
down->setIconSet(BarIconSet("down"));
lpn1->addWidget(add);
lpn1->addWidget(del);
lpn1->addStretch(1);
lpn1->addWidget(up);
lpn1->addWidget(down);
- connect(add, SIGNAL(clicked()),
- this, SLOT(addNumber()));
- connect(del, SIGNAL(clicked()),
- this, SLOT(delNumber()));
- connect(up, SIGNAL(clicked()),
- this, SLOT(upNumber()));
- connect(down, SIGNAL(clicked()),
- this, SLOT(downNumber()));
- connect(numbers, SIGNAL(highlighted(int)),
- this, SLOT(selectionChanged(int)));
+ connect(add, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(addNumber()));
+ connect(del, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(delNumber()));
+ connect(up, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(upNumber()));
+ connect(down, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(downNumber()));
+ connect(numbers, TQT_SIGNAL(highlighted(int)),
+ this, TQT_SLOT(selectionChanged(int)));
numbersChanged();
tmp = i18n("<p>Specifies the phone numbers to dial. You\n"
@@ -109,13 +109,13 @@ DialWidget::DialWidget( QWidget *parent, bool isnewaccount, const char *name )
"When a number is busy or fails, <i>kppp</i> will \n"
"try the next number and so on");
- QWhatsThis::add(number_label,tmp);
- QWhatsThis::add(numbers,tmp);
+ TQWhatsThis::add(number_label,tmp);
+ TQWhatsThis::add(numbers,tmp);
- auth_l = new QLabel(i18n("A&uthentication:"), parent);
+ auth_l = new TQLabel(i18n("A&uthentication:"), parent);
tl->addWidget(auth_l, 3, 0);
- auth = new QComboBox(parent);
+ auth = new TQComboBox(parent);
auth_l->setBuddy(auth);
auth->insertItem(i18n("Script-based"));
auth->insertItem(i18n("PAP"));
@@ -133,13 +133,13 @@ DialWidget::DialWidget( QWidget *parent, bool isnewaccount, const char *name )
"choose CHAP, because it's much safer. If you don't know\n"
"whether PAP or CHAP is right, choose PAP/CHAP.");
- QWhatsThis::add(auth_l,tmp);
- QWhatsThis::add(auth,tmp);
+ TQWhatsThis::add(auth_l,tmp);
+ TQWhatsThis::add(auth,tmp);
- store_password = new QCheckBox(i18n("Store &password"), parent);
+ store_password = new TQCheckBox(i18n("Store &password"), parent);
store_password->setChecked(true);
tl->addMultiCellWidget(store_password, 4, 4, 0, 1, AlignRight);
- QWhatsThis::add(store_password,
+ TQWhatsThis::add(store_password,
i18n("<p>When this is turned on, your ISP password\n"
"will be saved in <i>kppp</i>'s config file, so\n"
"you do not need to type it in every time.\n"
@@ -149,36 +149,36 @@ DialWidget::DialWidget( QWidget *parent, bool isnewaccount, const char *name )
"readable only to you. Make sure nobody\n"
"gains access to this file!"));
- cbtype_l = new QLabel(i18n("&Callback type:"), parent);
+ cbtype_l = new TQLabel(i18n("&Callback type:"), parent);
tl->addWidget(cbtype_l, 5, 0);
- cbtype = new QComboBox(parent);
+ cbtype = new TQComboBox(parent);
cbtype_l->setBuddy(cbtype);
cbtype->insertItem(i18n("None"));
cbtype->insertItem(i18n("Administrator-defined"));
cbtype->insertItem(i18n("User-defined"));
- connect(cbtype, SIGNAL(highlighted(int)),
- this, SLOT(cbtypeChanged(int)));
+ connect(cbtype, TQT_SIGNAL(highlighted(int)),
+ this, TQT_SLOT(cbtypeChanged(int)));
tl->addWidget(cbtype, 5, 1);
tmp = i18n("Callback type");
- QWhatsThis::add(cbtype_l,tmp);
- QWhatsThis::add(cbtype,tmp);
+ TQWhatsThis::add(cbtype_l,tmp);
+ TQWhatsThis::add(cbtype,tmp);
- cbphone_l = new QLabel(i18n("Call&back number:"), parent);
+ cbphone_l = new TQLabel(i18n("Call&back number:"), parent);
tl->addWidget(cbphone_l, 6, 0);
- cbphone = new QLineEdit(parent);
+ cbphone = new TQLineEdit(parent);
cbphone_l->setBuddy(cbphone);
cbphone->setMaxLength(140);
tl->addWidget(cbphone, 6, 1);
tmp = i18n("Callback phone number");
- QWhatsThis::add(cbphone_l,tmp);
- QWhatsThis::add(cbphone,tmp);
+ TQWhatsThis::add(cbphone_l,tmp);
+ TQWhatsThis::add(cbphone,tmp);
- pppdargs = new QPushButton(i18n("Customize &pppd Arguments..."), parent);
- connect(pppdargs, SIGNAL(clicked()), SLOT(pppdargsbutton()));
+ pppdargs = new TQPushButton(i18n("Customize &pppd Arguments..."), parent);
+ connect(pppdargs, TQT_SIGNAL(clicked()), TQT_SLOT(pppdargsbutton()));
tl->addMultiCellWidget(pppdargs, 7, 7, 0, 1, AlignCenter);
// Set defaults if editing an existing connection
@@ -186,8 +186,8 @@ DialWidget::DialWidget( QWidget *parent, bool isnewaccount, const char *name )
connectname_l->setText(gpppdata.accname());
// insert the phone numbers into the listbox
- QString n = gpppdata.phonenumber();
- QString tmp = "";
+ TQString n = gpppdata.phonenumber();
+ TQString tmp = "";
uint idx = 0;
while(idx != n.length()) {
if(n[idx] == ':') {
@@ -226,7 +226,7 @@ bool DialWidget::save() {
} else {
gpppdata.setAccname(connectname_l->text());
- QString number = "";
+ TQString number = "";
for(uint i = 0; i < numbers->count(); i++) {
if(i != 0)
number += ":";
@@ -281,7 +281,7 @@ void DialWidget::delNumber() {
void DialWidget::upNumber() {
int idx = numbers->currentItem();
if(idx != -1) {
- QString item = numbers->text(idx);
+ TQString item = numbers->text(idx);
numbers->removeItem(idx);
numbers->insertItem(item, idx-1);
numbers->setCurrentItem(idx-1);
@@ -293,7 +293,7 @@ void DialWidget::upNumber() {
void DialWidget::downNumber() {
int idx = numbers->currentItem();
if(idx != -1) {
- QString item = numbers->text(idx);
+ TQString item = numbers->text(idx);
numbers->removeItem(idx);
numbers->insertItem(item, idx+1);
numbers->setCurrentItem(idx+1);
@@ -312,12 +312,12 @@ void DialWidget::pppdargsbutton() {
/////////////////////////////////////////////////////////////////////////////
// ExecWidget
/////////////////////////////////////////////////////////////////////////////
-ExecWidget::ExecWidget(QWidget *parent, bool isnewaccount, const char *name) :
- QWidget(parent, name)
+ExecWidget::ExecWidget(TQWidget *parent, bool isnewaccount, const char *name) :
+ TQWidget(parent, name)
{
- QVBoxLayout *tl = new QVBoxLayout(parent, 0, KDialog::spacingHint());
+ TQVBoxLayout *tl = new TQVBoxLayout(parent, 0, KDialog::spacingHint());
- QLabel *l = new QLabel(\
+ TQLabel *l = new TQLabel(\
i18n("Here you can select commands to run at certain stages of the\n"
"connection. The commands are run with your real user id, so\n"
"you cannot run any commands here requiring root permissions\n"
@@ -328,31 +328,31 @@ i18n("Here you can select commands to run at certain stages of the\n"
tl->addWidget(l);
tl->addStretch(1);
- QGridLayout *l1 = new QGridLayout(4, 2, 10);
+ TQGridLayout *l1 = new TQGridLayout(4, 2, 10);
tl->addLayout(l1);
l1->setColStretch(0, 0);
l1->setColStretch(1, 1);
- before_connect_l = new QLabel(i18n("&Before connect:"), parent);
+ before_connect_l = new TQLabel(i18n("&Before connect:"), parent);
before_connect_l->setAlignment(AlignVCenter);
l1->addWidget(before_connect_l, 0, 0);
- before_connect = new QLineEdit(parent);
+ before_connect = new TQLineEdit(parent);
before_connect_l->setBuddy(before_connect);
before_connect->setMaxLength(COMMAND_SIZE);
l1->addWidget(before_connect, 0, 1);
- QString tmp = i18n("Allows you to run a program <b>before</b> a connection\n"
+ TQString tmp = i18n("Allows you to run a program <b>before</b> a connection\n"
"is established. It is called immediately before\n"
"dialing has begun.\n\n"
"This might be useful, e.g. to stop HylaFAX blocking the\n"
"modem.");
- QWhatsThis::add(before_connect_l,tmp);
- QWhatsThis::add(before_connect,tmp);
+ TQWhatsThis::add(before_connect_l,tmp);
+ TQWhatsThis::add(before_connect,tmp);
- command_label = new QLabel(i18n("&Upon connect:"), parent);
+ command_label = new TQLabel(i18n("&Upon connect:"), parent);
command_label->setAlignment(AlignVCenter);
l1->addWidget(command_label, 1, 0);
- command = new QLineEdit(parent);
+ command = new TQLineEdit(parent);
command_label->setBuddy(command);
command->setMaxLength(COMMAND_SIZE);
l1->addWidget(command, 1, 1);
@@ -362,14 +362,14 @@ i18n("Here you can select commands to run at certain stages of the\n"
"\n"
"Very useful for fetching mail and news");
- QWhatsThis::add(command_label,tmp);
- QWhatsThis::add(command,tmp);
+ TQWhatsThis::add(command_label,tmp);
+ TQWhatsThis::add(command,tmp);
- predisconnect_label = new QLabel(i18n("Before &disconnect:"),
+ predisconnect_label = new TQLabel(i18n("Before &disconnect:"),
parent);
predisconnect_label->setAlignment(AlignVCenter);
l1->addWidget(predisconnect_label, 2, 0);
- predisconnect = new QLineEdit(parent);
+ predisconnect = new TQLineEdit(parent);
predisconnect_label->setBuddy(predisconnect);
predisconnect->setMaxLength(COMMAND_SIZE);
l1->addWidget(predisconnect, 2, 1);
@@ -377,23 +377,23 @@ i18n("Here you can select commands to run at certain stages of the\n"
"is closed. The connection will stay open until\n"
"the program exits.");
- QWhatsThis::add(predisconnect_label,tmp);
- QWhatsThis::add(predisconnect,tmp);
+ TQWhatsThis::add(predisconnect_label,tmp);
+ TQWhatsThis::add(predisconnect,tmp);
- discommand_label = new QLabel(i18n("U&pon disconnect:"),
+ discommand_label = new TQLabel(i18n("U&pon disconnect:"),
parent);
discommand_label->setAlignment(AlignVCenter);
l1->addWidget(discommand_label, 3, 0);
- discommand = new QLineEdit(parent);
+ discommand = new TQLineEdit(parent);
discommand_label->setBuddy(discommand);
discommand->setMaxLength(COMMAND_SIZE);
l1->addWidget(discommand, 3, 1);
tmp = i18n("Allows you to run a program <b>after</b> a connection\n"
"has been closed.");
- QWhatsThis::add(discommand_label,tmp);
- QWhatsThis::add(discommand,tmp);
+ TQWhatsThis::add(discommand_label,tmp);
+ TQWhatsThis::add(discommand,tmp);
// extra space between entries
l1->addRowSpacing(1, 5);
@@ -427,23 +427,23 @@ bool ExecWidget::save() {
// IPWidget
//
/////////////////////////////////////////////////////////////////////////////
-IPWidget::IPWidget( QWidget *parent, bool isnewaccount, const char *name )
- : QWidget(parent, name)
+IPWidget::IPWidget( TQWidget *parent, bool isnewaccount, const char *name )
+ : TQWidget(parent, name)
{
- QVBoxLayout *topLayout = new QVBoxLayout(parent);
+ TQVBoxLayout *topLayout = new TQVBoxLayout(parent);
topLayout->setSpacing(KDialog::spacingHint());
- box = new QVGroupBox(i18n("C&onfiguration"), parent);
+ box = new TQVGroupBox(i18n("C&onfiguration"), parent);
box->setInsideSpacing(KDialog::spacingHint());
- rb = new QButtonGroup(parent);
+ rb = new TQButtonGroup(parent);
rb->hide();
- connect(rb, SIGNAL(clicked(int)),
- SLOT(hitIPSelect(int)));
+ connect(rb, TQT_SIGNAL(clicked(int)),
+ TQT_SLOT(hitIPSelect(int)));
- dynamicadd_rb = new QRadioButton(box);
+ dynamicadd_rb = new TQRadioButton(box);
dynamicadd_rb->setText(i18n("Dynamic IP address"));
- QWhatsThis::add(dynamicadd_rb,
+ TQWhatsThis::add(dynamicadd_rb,
i18n("Select this option when your computer gets an\n"
"internet address (IP) every time a\n"
"connection is made.\n"
@@ -451,23 +451,23 @@ IPWidget::IPWidget( QWidget *parent, bool isnewaccount, const char *name )
"Almost every Internet Service Provider uses\n"
"this method, so this should be turned on."));
- staticadd_rb = new QRadioButton(box);
+ staticadd_rb = new TQRadioButton(box);
staticadd_rb->setText(i18n("Static IP address"));
rb->insert(dynamicadd_rb, 0);
rb->insert(staticadd_rb, 1);
- QWhatsThis::add(staticadd_rb,
+ TQWhatsThis::add(staticadd_rb,
i18n("Select this option when your computer has a\n"
"fixed internet address (IP). Most computers\n"
"don't have this, so you should probably select\n"
"dynamic IP addressing unless you know what you\n"
"are doing."));
- QWidget *ipWidget = new QWidget(box);
- QGridLayout *ipLayout = new QGridLayout(ipWidget, 2, 2);
+ TQWidget *ipWidget = new TQWidget(box);
+ TQGridLayout *ipLayout = new TQGridLayout(ipWidget, 2, 2);
ipLayout->setSpacing(KDialog::spacingHint());
- ipaddress_label = new QLabel(i18n("&IP address:"), ipWidget);
- QString tmp = i18n("If your computer has a permanent internet\n"
+ ipaddress_label = new TQLabel(i18n("&IP address:"), ipWidget);
+ TQString tmp = i18n("If your computer has a permanent internet\n"
"address, you must supply your IP address here.");
ipLayout->addWidget(ipaddress_label, 0, 0);
@@ -475,10 +475,10 @@ IPWidget::IPWidget( QWidget *parent, bool isnewaccount, const char *name )
ipaddress_label->setBuddy(ipaddress_l);
ipLayout->addWidget(ipaddress_l, 0, 1);
- QWhatsThis::add(ipaddress_label,tmp);
- QWhatsThis::add(ipaddress_l,tmp);
+ TQWhatsThis::add(ipaddress_label,tmp);
+ TQWhatsThis::add(ipaddress_l,tmp);
- sub_label = new QLabel(i18n("&Subnet mask:"), ipWidget);
+ sub_label = new TQLabel(i18n("&Subnet mask:"), ipWidget);
tmp = i18n("<p>If your computer has a static Internet address,\n"
"you must supply a network mask here. In almost\n"
"all cases this netmask will be <b>255.255.255.0</b>,\n"
@@ -491,15 +491,15 @@ IPWidget::IPWidget( QWidget *parent, bool isnewaccount, const char *name )
sub_label->setBuddy(subnetmask_l);
ipLayout->addWidget(subnetmask_l, 1, 1);
- QWhatsThis::add(sub_label,tmp);
- QWhatsThis::add(subnetmask_l,tmp);
+ TQWhatsThis::add(sub_label,tmp);
+ TQWhatsThis::add(subnetmask_l,tmp);
- autoname = new QCheckBox(i18n("&Auto-configure hostname from this IP"), parent);
+ autoname = new TQCheckBox(i18n("&Auto-configure hostname from this IP"), parent);
autoname->setChecked(gpppdata.autoname());
- connect(autoname,SIGNAL(toggled(bool)),
- this,SLOT(autoname_t(bool)));
+ connect(autoname,TQT_SIGNAL(toggled(bool)),
+ this,TQT_SLOT(autoname_t(bool)));
- QWhatsThis::add(autoname,
+ TQWhatsThis::add(autoname,
i18n("<p>Whenever you connect, this reconfigures\n"
"your hostname to match the IP address you\n"
"got from the PPP server. This may be useful\n"
@@ -583,20 +583,20 @@ void IPWidget::hitIPSelect( int i ) {
-DNSWidget::DNSWidget( QWidget *parent, bool isnewaccount, const char *name )
- : QWidget(parent, name)
+DNSWidget::DNSWidget( TQWidget *parent, bool isnewaccount, const char *name )
+ : TQWidget(parent, name)
{
- // box = new QGroupBox(parent);
- QGridLayout *tl = new QGridLayout(parent, 7, 2, 0, KDialog::spacingHint());
+ // box = new TQGroupBox(parent);
+ TQGridLayout *tl = new TQGridLayout(parent, 7, 2, 0, KDialog::spacingHint());
- dnsdomain_label = new QLabel(i18n("Domain &name:"), parent);
+ dnsdomain_label = new TQLabel(i18n("Domain &name:"), parent);
tl->addWidget(dnsdomain_label, 0, 0);
- dnsdomain = new QLineEdit(parent);
+ dnsdomain = new TQLineEdit(parent);
dnsdomain_label->setBuddy(dnsdomain);
dnsdomain->setMaxLength(DOMAIN_SIZE);
tl->addWidget(dnsdomain, 0, 1);
- QString tmp = i18n("If you enter a domain name here, this domain\n"
+ TQString tmp = i18n("If you enter a domain name here, this domain\n"
"name is used for your computer while you are\n"
"connected. When the connection is closed, the\n"
"original domain name of your computer is\n"
@@ -605,39 +605,39 @@ DNSWidget::DNSWidget( QWidget *parent, bool isnewaccount, const char *name )
"If you leave this field blank, no changes are\n"
"made to the domain name.");
- QWhatsThis::add(dnsdomain_label,tmp);
- QWhatsThis::add(dnsdomain,tmp);
+ TQWhatsThis::add(dnsdomain_label,tmp);
+ TQWhatsThis::add(dnsdomain,tmp);
- conf_label = new QLabel(i18n("C&onfiguration:"), parent);
+ conf_label = new TQLabel(i18n("C&onfiguration:"), parent);
tl->addWidget(conf_label, 1, 0);
- bg = new QButtonGroup("Group", this);
+ bg = new TQButtonGroup("Group", this);
conf_label->setBuddy(bg);
- connect(bg, SIGNAL(clicked(int)), SLOT(DNS_Mode_Selected(int)));
+ connect(bg, TQT_SIGNAL(clicked(int)), TQT_SLOT(DNS_Mode_Selected(int)));
bg->hide();
- autodns = new QRadioButton(i18n("Automatic"), parent);
+ autodns = new TQRadioButton(i18n("Automatic"), parent);
bg->insert(autodns, 0);
tl->addWidget(autodns, 1, 1);
// no automatic DNS detection for pppd < 2.3.7
if(!gpppdata.pppdVersionMin(2, 3, 7))
autodns->setEnabled(false);
- mandns = new QRadioButton(i18n("Manual"), parent);
+ mandns = new TQRadioButton(i18n("Manual"), parent);
bg->insert(mandns, 1);
tl->addWidget(mandns, 2, 1);
- dns_label = new QLabel(i18n("DNS &IP address:"), parent);
+ dns_label = new TQLabel(i18n("DNS &IP address:"), parent);
tl->addWidget(dns_label, 3, 0);
- QHBoxLayout *l2 = new QHBoxLayout;
+ TQHBoxLayout *l2 = new QHBoxLayout;
tl->addLayout(l2, 3, 1);
dnsipaddr = new IPLineEdit(parent);
dns_label->setBuddy(dnsipaddr);
- connect(dnsipaddr, SIGNAL(returnPressed()),
- SLOT(adddns()));
- connect(dnsipaddr, SIGNAL(textChanged(const QString &)),
- SLOT(DNS_Edit_Changed(const QString &)));
+ connect(dnsipaddr, TQT_SIGNAL(returnPressed()),
+ TQT_SLOT(adddns()));
+ connect(dnsipaddr, TQT_SIGNAL(textChanged(const TQString &)),
+ TQT_SLOT(DNS_Edit_Changed(const TQString &)));
l2->addWidget(dnsipaddr, 1);
l2->addStretch(1);
tmp = i18n("<p>Allows you to specify a new DNS server to be\n"
@@ -648,56 +648,56 @@ DNSWidget::DNSWidget( QWidget *parent, bool isnewaccount, const char *name )
"To add a DNS server, type in the IP address of\n"
"the DNS server here and click on <b>Add</b>");
- QWhatsThis::add(dns_label, tmp);
- QWhatsThis::add(dnsipaddr, tmp);
+ TQWhatsThis::add(dns_label, tmp);
+ TQWhatsThis::add(dnsipaddr, tmp);
- QHBoxLayout *l1 = new QHBoxLayout;
+ TQHBoxLayout *l1 = new QHBoxLayout;
tl->addLayout(l1, 4, 1);
- add = new QPushButton(i18n("&Add"), parent);
- connect(add, SIGNAL(clicked()), SLOT(adddns()));
+ add = new TQPushButton(i18n("&Add"), parent);
+ connect(add, TQT_SIGNAL(clicked()), TQT_SLOT(adddns()));
int width = add->sizeHint().width();
width = QMAX(width,60);
add->setMinimumWidth(width);
l1->addWidget(add);
l1->addStretch(1);
- QWhatsThis::add(add,
+ TQWhatsThis::add(add,
i18n("Click this button to add the DNS server\n"
"specified in the field above. The entry\n"
"will then be added to the list below"));
- remove = new QPushButton(i18n("&Remove"), parent);
- connect(remove, SIGNAL(clicked()), SLOT(removedns()));
+ remove = new TQPushButton(i18n("&Remove"), parent);
+ connect(remove, TQT_SIGNAL(clicked()), TQT_SLOT(removedns()));
width = remove->sizeHint().width();
width = QMAX(width,60);
remove->setMinimumWidth(width);
l1->addWidget(remove);
- QWhatsThis::add(remove,
+ TQWhatsThis::add(remove,
i18n("Click this button to remove the selected DNS\n"
"server entry from the list below"));
- servers_label = new QLabel(i18n("DNS address &list:"), parent);
+ servers_label = new TQLabel(i18n("DNS address &list:"), parent);
servers_label->setAlignment(AlignTop|AlignLeft);
tl->addWidget(servers_label, 5, 0);
- dnsservers = new QListBox(parent);
+ dnsservers = new TQListBox(parent);
servers_label->setBuddy(dnsservers);
dnsservers->setMinimumSize(150, 80);
- connect(dnsservers, SIGNAL(highlighted(int)),
- SLOT(DNS_Entry_Selected(int)));
+ connect(dnsservers, TQT_SIGNAL(highlighted(int)),
+ TQT_SLOT(DNS_Entry_Selected(int)));
tl->addWidget(dnsservers, 5, 1);
tmp = i18n("<p>This shows all defined DNS servers to use\n"
"while you are connected. Use the <b>Add</b> and\n"
"<b>Remove</b> buttons to modify the list");
- QWhatsThis::add(servers_label,tmp);
- QWhatsThis::add(dnsservers,tmp);
+ TQWhatsThis::add(servers_label,tmp);
+ TQWhatsThis::add(dnsservers,tmp);
- exdnsdisabled_toggle = new QCheckBox(i18n( \
+ exdnsdisabled_toggle = new TQCheckBox(i18n( \
"&Disable existing DNS servers during connection"),
parent);
exdnsdisabled_toggle->setChecked(gpppdata.exDNSDisabled());
tl->addMultiCellWidget(exdnsdisabled_toggle, 6, 6, 0, 1, AlignCenter);
- QWhatsThis::add(exdnsdisabled_toggle,
+ TQWhatsThis::add(exdnsdisabled_toggle,
i18n("<p>When this option is selected, all DNS\n"
"servers specified in <tt>/etc/resolv.conf</tt> are\n"
"temporary disabled while the dialup connection\n"
@@ -722,8 +722,8 @@ DNSWidget::DNSWidget( QWidget *parent, bool isnewaccount, const char *name )
tl->activate();
}
-void DNSWidget::DNS_Edit_Changed(const QString &text) {
- QRegExp r("[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+");
+void DNSWidget::DNS_Edit_Changed(const TQString &text) {
+ TQRegExp r("[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+");
add->setEnabled(text.find(r) != -1);
}
@@ -746,13 +746,13 @@ void DNSWidget::DNS_Mode_Selected(int mode) {
void DNSWidget::save() {
gpppdata.setAutoDNS(bg->id(bg->selected()) == 0);
- QStringList serverlist;
+ TQStringList serverlist;
for(uint i=0; i < dnsservers->count(); i++)
serverlist.append(dnsservers->text(i));
gpppdata.setDns(serverlist);
// strip leading dot
- QString s(dnsdomain->text());
+ TQString s(dnsdomain->text());
if(s.left(1) == ".")
gpppdata.setDomain(s.mid(1));
else
@@ -782,23 +782,23 @@ void DNSWidget::removedns() {
//
// GatewayWidget
//
-GatewayWidget::GatewayWidget( QWidget *parent, bool isnewaccount, const char *name )
- : QWidget(parent, name)
+GatewayWidget::GatewayWidget( TQWidget *parent, bool isnewaccount, const char *name )
+ : TQWidget(parent, name)
{
- QVBoxLayout *topLayout = new QVBoxLayout(parent);
+ TQVBoxLayout *topLayout = new TQVBoxLayout(parent);
topLayout->setSpacing(KDialog::spacingHint());
- box = new QVGroupBox(i18n("C&onfiguration"), parent);
+ box = new TQVGroupBox(i18n("C&onfiguration"), parent);
box->setInsideSpacing(KDialog::spacingHint());
- rb = new QButtonGroup(parent);
+ rb = new TQButtonGroup(parent);
rb->hide();
- connect(rb, SIGNAL(clicked(int)), SLOT(hitGatewaySelect(int)));
+ connect(rb, TQT_SIGNAL(clicked(int)), TQT_SLOT(hitGatewaySelect(int)));
- defaultgateway = new QRadioButton(box);
+ defaultgateway = new TQRadioButton(box);
defaultgateway->setText(i18n("Default gateway"));
rb->insert(defaultgateway, 0);
- QWhatsThis::add(defaultgateway,
+ TQWhatsThis::add(defaultgateway,
i18n("This makes the PPP peer computer (the computer\n"
"you are connected to with your modem) to act as\n"
"a gateway. Your computer will send all packets not\n"
@@ -809,21 +809,21 @@ GatewayWidget::GatewayWidget( QWidget *parent, bool isnewaccount, const char *na
"probably leave this option on."));
- staticgateway = new QRadioButton(box);
+ staticgateway = new TQRadioButton(box);
staticgateway->setText(i18n("Static gateway"));
rb->insert(staticgateway, 1);
- QWhatsThis::add(staticgateway,
+ TQWhatsThis::add(staticgateway,
i18n("<p>Allows you to specify which computer you want\n"
"to use as gateway (see <i>Default Gateway</i> above)"));
- QHBox *gateBox = new QHBox(box);
- gate_label = new QLabel(i18n("Gateway &IP address:"), gateBox);
+ TQHBox *gateBox = new TQHBox(box);
+ gate_label = new TQLabel(i18n("Gateway &IP address:"), gateBox);
gatewayaddr = new IPLineEdit(gateBox);
gate_label->setBuddy(gatewayaddr);
- defaultroute = new QCheckBox(i18n("&Assign the default route to this gateway"),
+ defaultroute = new TQCheckBox(i18n("&Assign the default route to this gateway"),
parent);
- QWhatsThis::add(defaultroute,
+ TQWhatsThis::add(defaultroute,
i18n("If this option is enabled, all packets not\n"
"going to the local net are routed through\n"
"the PPP connection.\n"
@@ -874,42 +874,42 @@ void GatewayWidget::hitGatewaySelect( int i ) {
-ScriptWidget::ScriptWidget( QWidget *parent, bool isnewaccount, const char *name )
- : QWidget(parent, name)
+ScriptWidget::ScriptWidget( TQWidget *parent, bool isnewaccount, const char *name )
+ : TQWidget(parent, name)
{
- QVBoxLayout *tl = new QVBoxLayout(parent, 0, KDialog::spacingHint());
+ TQVBoxLayout *tl = new TQVBoxLayout(parent, 0, KDialog::spacingHint());
se = new ScriptEdit(parent);
- connect(se, SIGNAL(returnPressed()), SLOT(addButton()));
+ connect(se, TQT_SIGNAL(returnPressed()), TQT_SLOT(addButton()));
tl->addWidget(se);
// insert equal-sized buttons
KButtonBox *bbox = new KButtonBox(parent);
add = bbox->addButton(i18n("&Add"));
- connect(add, SIGNAL(clicked()), SLOT(addButton()));
+ connect(add, TQT_SIGNAL(clicked()), TQT_SLOT(addButton()));
bbox->addStretch(1);
insert = bbox->addButton(i18n("&Insert"));
- connect(insert, SIGNAL(clicked()), SLOT(insertButton()));
+ connect(insert, TQT_SIGNAL(clicked()), TQT_SLOT(insertButton()));
bbox->addStretch(1);
remove = bbox->addButton(i18n("&Remove"));
- connect(remove, SIGNAL(clicked()), SLOT(removeButton()));
+ connect(remove, TQT_SIGNAL(clicked()), TQT_SLOT(removeButton()));
bbox->layout();
tl->addWidget(bbox);
- QHBoxLayout *l12 = new QHBoxLayout(0);
+ TQHBoxLayout *l12 = new TQHBoxLayout(0);
tl->addLayout(l12);
- stl = new QListBox(parent);
- stl->setVScrollBarMode( QScrollView::AlwaysOff );
- connect(stl, SIGNAL(highlighted(int)), SLOT(stlhighlighted(int)));
- stl->setMinimumSize(QSize(70, 140));
+ stl = new TQListBox(parent);
+ stl->setVScrollBarMode( TQScrollView::AlwaysOff );
+ connect(stl, TQT_SIGNAL(highlighted(int)), TQT_SLOT(stlhighlighted(int)));
+ stl->setMinimumSize(TQSize(70, 140));
- sl = new QListBox(parent);
- sl->setVScrollBarMode( QScrollView::AlwaysOff );
- connect(sl, SIGNAL(highlighted(int)), SLOT(slhighlighted(int)));
- sl->setMinimumSize(QSize(150, 140));
+ sl = new TQListBox(parent);
+ sl->setVScrollBarMode( TQScrollView::AlwaysOff );
+ connect(sl, TQT_SIGNAL(highlighted(int)), TQT_SLOT(slhighlighted(int)));
+ sl->setMinimumSize(TQSize(150, 140));
- slb = new QScrollBar(parent);
+ slb = new TQScrollBar(parent);
slb->setFixedWidth(slb->sizeHint().width());
- connect(slb, SIGNAL(valueChanged(int)), SLOT(scrolling(int)));
+ connect(slb, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(scrolling(int)));
l12->addWidget(stl, 1);
l12->addWidget(sl, 3);
@@ -917,10 +917,10 @@ ScriptWidget::ScriptWidget( QWidget *parent, bool isnewaccount, const char *name
//load data from gpppdata
if(!isnewaccount) {
- QStringList &comlist = gpppdata.scriptType();
- QStringList &arglist = gpppdata.script();
- QStringList::Iterator itcom = comlist.begin();
- QStringList::Iterator itarg = arglist.begin();
+ TQStringList &comlist = gpppdata.scriptType();
+ TQStringList &arglist = gpppdata.script();
+ TQStringList::Iterator itcom = comlist.begin();
+ TQStringList::Iterator itarg = arglist.begin();
for ( ;
itcom != comlist.end() && itarg != arglist.end();
@@ -959,7 +959,7 @@ bool ScriptWidget::check() {
void ScriptWidget::save() {
- QStringList typelist, arglist;
+ TQStringList typelist, arglist;
for(uint i=0; i < sl->count(); i++) {
typelist.append(stl->text(i));
arglist.append(sl->text(i));
@@ -1201,21 +1201,21 @@ void ScriptWidget::removeButton() {
// Used to specify a new phone number
//
/////////////////////////////////////////////////////////////////////////////
-PhoneNumberDialog::PhoneNumberDialog(QWidget *parent) : KDialogBase(parent, 0, true, i18n("Add Phone Number"), Ok|Cancel) {
+PhoneNumberDialog::PhoneNumberDialog(TQWidget *parent) : KDialogBase(parent, 0, true, i18n("Add Phone Number"), Ok|Cancel) {
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
- QHBox *hbox = new QHBox(this);
+ TQHBox *hbox = new TQHBox(this);
setMainWidget(hbox);
hbox->setSpacing(KDialog::spacingHint());
- new QLabel(i18n("Enter a phone number:"), hbox);
+ new TQLabel(i18n("Enter a phone number:"), hbox);
le = newLineEdit(14, hbox);
le->setMinimumWidth(125);
- connect(le, SIGNAL(textChanged(const QString &)),
- this, SLOT(textChanged(const QString &)));
+ connect(le, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(textChanged(const TQString &)));
le->setFocus();
textChanged("");
@@ -1224,14 +1224,14 @@ PhoneNumberDialog::PhoneNumberDialog(QWidget *parent) : KDialogBase(parent, 0, t
}
-QString PhoneNumberDialog::phoneNumber() {
- QString s = le->text();
+TQString PhoneNumberDialog::phoneNumber() {
+ TQString s = le->text();
return s;
}
-void PhoneNumberDialog::textChanged(const QString &s) {
+void PhoneNumberDialog::textChanged(const TQString &s) {
enableButtonOK(s.length() > 0);
}
diff --git a/kppp/edit.h b/kppp/edit.h
index 3b435c0b..b0412079 100644
--- a/kppp/edit.h
+++ b/kppp/edit.h
@@ -29,17 +29,17 @@
#ifndef _EDIT_H_
#define _EDIT_H_
-#include <qdialog.h>
-#include <qpushbutton.h>
-#include <qgroupbox.h>
-#include <qscrollbar.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
+#include <tqdialog.h>
+#include <tqpushbutton.h>
+#include <tqgroupbox.h>
+#include <tqscrollbar.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
#include <kdialogbase.h>
#include "scriptedit.h"
#include "kpppconfig.h"
@@ -47,10 +47,10 @@
class IPLineEdit;
-class DialWidget : public QWidget {
+class DialWidget : public TQWidget {
Q_OBJECT
public:
- DialWidget( QWidget *parent=0, bool isnewaccount = true, const char *name=0 );
+ DialWidget( TQWidget *parent=0, bool isnewaccount = true, const char *name=0 );
~DialWidget() {}
public slots:
@@ -65,22 +65,22 @@ public slots:
void downNumber();
private:
- QLineEdit *connectname_l;
- QLabel *connect_label;
- QLabel *number_label;
- QPushButton *pppdargs;
- QComboBox *auth;
- QLabel *auth_l;
- QCheckBox *store_password;
+ TQLineEdit *connectname_l;
+ TQLabel *connect_label;
+ TQLabel *number_label;
+ TQPushButton *pppdargs;
+ TQComboBox *auth;
+ TQLabel *auth_l;
+ TQCheckBox *store_password;
// callback support
- QComboBox *cbtype;
- QLabel *cbtype_l;
- QLineEdit *cbphone;
- QLabel *cbphone_l;
+ TQComboBox *cbtype;
+ TQLabel *cbtype_l;
+ TQLineEdit *cbphone;
+ TQLabel *cbphone_l;
// for the phonenumber selection
- QPushButton *add, *del, *up, *down;
- QListBox *numbers;
+ TQPushButton *add, *del, *up, *down;
+ TQListBox *numbers;
};
@@ -89,33 +89,33 @@ private:
// tab-window to select what to execute when
//
/////////////////////////////////////////////////////////////////////////////
-class ExecWidget : public QWidget {
+class ExecWidget : public TQWidget {
Q_OBJECT
public:
- ExecWidget(QWidget *parent=0, bool isnewaccount=true, const char *name=0);
+ ExecWidget(TQWidget *parent=0, bool isnewaccount=true, const char *name=0);
public slots:
bool save();
private:
- QLineEdit *before_connect;
- QLabel *before_connect_l;
+ TQLineEdit *before_connect;
+ TQLabel *before_connect_l;
- QLineEdit *command;
- QLabel *command_label;
+ TQLineEdit *command;
+ TQLabel *command_label;
- QLineEdit *predisconnect;
- QLabel *predisconnect_label;
+ TQLineEdit *predisconnect;
+ TQLabel *predisconnect_label;
- QLineEdit *discommand;
- QLabel *discommand_label;
+ TQLineEdit *discommand;
+ TQLabel *discommand_label;
};
-class IPWidget : public QWidget {
+class IPWidget : public TQWidget {
Q_OBJECT
public:
- IPWidget( QWidget *parent=0, bool isnewaccount = true, const char *name=0 );
+ IPWidget( TQWidget *parent=0, bool isnewaccount = true, const char *name=0 );
~IPWidget() {}
public slots:
@@ -126,26 +126,26 @@ protected slots:
void autoname_t(bool on);
private:
- QLabel *ipaddress_label;
- QLabel *sub_label;
- QGroupBox *box1;
- QVGroupBox *box;
+ TQLabel *ipaddress_label;
+ TQLabel *sub_label;
+ TQGroupBox *box1;
+ TQVGroupBox *box;
- QButtonGroup *rb;
- QRadioButton *dynamicadd_rb;
- QRadioButton *staticadd_rb;
+ TQButtonGroup *rb;
+ TQRadioButton *dynamicadd_rb;
+ TQRadioButton *staticadd_rb;
IPLineEdit *ipaddress_l;
IPLineEdit *subnetmask_l;
- QCheckBox *autoname;
+ TQCheckBox *autoname;
};
-class DNSWidget : public QWidget {
+class DNSWidget : public TQWidget {
Q_OBJECT
public:
- DNSWidget( QWidget *parent=0, bool isnewaccount = true, const char *name=0 );
+ DNSWidget( TQWidget *parent=0, bool isnewaccount = true, const char *name=0 );
~DNSWidget() {}
public slots:
@@ -154,30 +154,30 @@ public slots:
protected slots:
void adddns();
void removedns();
- void DNS_Edit_Changed(const QString &);
+ void DNS_Edit_Changed(const TQString &);
void DNS_Entry_Selected(int);
void DNS_Mode_Selected(int);
private:
- QLabel *conf_label;
- QButtonGroup *bg;
- QRadioButton *autodns, *mandns;
- QLabel *dns_label;
- QLabel *servers_label;
+ TQLabel *conf_label;
+ TQButtonGroup *bg;
+ TQRadioButton *autodns, *mandns;
+ TQLabel *dns_label;
+ TQLabel *servers_label;
IPLineEdit *dnsipaddr;
- QPushButton *add;
- QPushButton *remove;
- QListBox *dnsservers;
- QLineEdit *dnsdomain;
- QLabel *dnsdomain_label;
- QCheckBox *exdnsdisabled_toggle;
+ TQPushButton *add;
+ TQPushButton *remove;
+ TQListBox *dnsservers;
+ TQLineEdit *dnsdomain;
+ TQLabel *dnsdomain_label;
+ TQCheckBox *exdnsdisabled_toggle;
};
-class GatewayWidget : public QWidget {
+class GatewayWidget : public TQWidget {
Q_OBJECT
public:
- GatewayWidget( QWidget *parent=0, bool isnewaccount = true, const char *name=0 );
+ GatewayWidget( TQWidget *parent=0, bool isnewaccount = true, const char *name=0 );
~GatewayWidget() {}
public slots:
@@ -187,21 +187,21 @@ private slots:
void hitGatewaySelect( int );
private:
- QGroupBox *box;
- QLabel *gate_label;
- QGroupBox *box1;
- QButtonGroup *rb;
- QRadioButton *defaultgateway;
- QRadioButton *staticgateway;
+ TQGroupBox *box;
+ TQLabel *gate_label;
+ TQGroupBox *box1;
+ TQButtonGroup *rb;
+ TQRadioButton *defaultgateway;
+ TQRadioButton *staticgateway;
IPLineEdit *gatewayaddr;
- QCheckBox *defaultroute;
+ TQCheckBox *defaultroute;
};
-class ScriptWidget : public QWidget {
+class ScriptWidget : public TQWidget {
Q_OBJECT
public:
- ScriptWidget( QWidget *parent=0, bool isnewaccount = true, const char *name=0 );
+ ScriptWidget( TQWidget *parent=0, bool isnewaccount = true, const char *name=0 );
~ScriptWidget() {}
public slots:
@@ -224,12 +224,12 @@ private:
void adjustScrollBar();
ScriptEdit *se;
- QPushButton *add;
- QPushButton *remove;
- QPushButton *insert;
- QListBox *sl, *stl;
+ TQPushButton *add;
+ TQPushButton *remove;
+ TQPushButton *insert;
+ TQListBox *sl, *stl;
- QScrollBar *slb;
+ TQScrollBar *slb;
};
@@ -241,15 +241,15 @@ private:
class PhoneNumberDialog : public KDialogBase {
Q_OBJECT
public:
- PhoneNumberDialog(QWidget *parent = 0);
+ PhoneNumberDialog(TQWidget *parent = 0);
- QString phoneNumber();
+ TQString phoneNumber();
private slots:
- void textChanged(const QString &);
+ void textChanged(const TQString &);
private:
- QLineEdit *le;
+ TQLineEdit *le;
};
diff --git a/kppp/general.cpp b/kppp/general.cpp
index e136a1b5..f6a88bfd 100644
--- a/kppp/general.cpp
+++ b/kppp/general.cpp
@@ -26,10 +26,10 @@
#include <termios.h>
#include <string.h>
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
#include <knuminput.h>
-#include <qslider.h>
+#include <tqslider.h>
#include "general.h"
#include "version.h"
#include "miniterm.h"
@@ -38,49 +38,49 @@
#include "devices.h"
#include "pppdata.h"
#include <klocale.h>
-#include <qlayout.h>
-#include <qgrid.h>
+#include <tqlayout.h>
+#include <tqgrid.h>
/////////////////////////////////////////////////////////////////////////////
//
// Widget containing misc. configuration options
//
/////////////////////////////////////////////////////////////////////////////
-GeneralWidget::GeneralWidget( QWidget *parent, const char *name)
- : QWidget(parent, name)
+GeneralWidget::GeneralWidget( TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
- QVBoxLayout *tl = new QVBoxLayout(parent, 0, KDialog::spacingHint());
+ TQVBoxLayout *tl = new TQVBoxLayout(parent, 0, KDialog::spacingHint());
- QHBoxLayout *hbox = new QHBoxLayout(tl);
- QLabel *label;
- label = new QLabel(i18n("pppd version:"), parent);
+ TQHBoxLayout *hbox = new TQHBoxLayout(tl);
+ TQLabel *label;
+ label = new TQLabel(i18n("pppd version:"), parent);
hbox->addWidget(label);
- QString version = gpppdata.pppdVersion();
+ TQString version = gpppdata.pppdVersion();
if(version == "0.0.0")
version = "unknown";
- label = new QLabel(version, parent);
- label->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
+ label = new TQLabel(version, parent);
+ label->setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken);
hbox->addWidget(label);
KIntNumInput *pppdTimeout = new KIntNumInput(gpppdata.pppdTimeout(), parent);
pppdTimeout->setLabel(i18n("pppd &timeout:"));
pppdTimeout->setRange(1, TIMEOUT_SIZE, 5, true);
pppdTimeout->setSuffix(i18n(" sec"));
- connect(pppdTimeout, SIGNAL(valueChanged(int)),
- SLOT(pppdtimeoutchanged(int)));
+ connect(pppdTimeout, TQT_SIGNAL(valueChanged(int)),
+ TQT_SLOT(pppdtimeoutchanged(int)));
tl->addWidget(pppdTimeout);
- QString tmp = i18n("<i>kppp</i> will wait this number of seconds\n"
+ TQString tmp = i18n("<i>kppp</i> will wait this number of seconds\n"
"to see if a PPP connection is established.\n"
"If no connection is made in this time frame,\n"
"<i>kppp</i> will give up and kill pppd.");
- QWhatsThis::add(pppdTimeout,tmp);
+ TQWhatsThis::add(pppdTimeout,tmp);
label->setBuddy(pppdTimeout);
tl->addSpacing(10);
- QCheckBox *chkBox;
- chkBox = new QCheckBox(i18n("Doc&k into panel on connect"), parent);
- QWhatsThis::add(chkBox,
+ TQCheckBox *chkBox;
+ chkBox = new TQCheckBox(i18n("Doc&k into panel on connect"), parent);
+ TQWhatsThis::add(chkBox,
i18n("<p>After a connection is established, the\n"
"window is minimized and a small icon\n"
"in the KDE panel represents this window.\n"
@@ -90,50 +90,50 @@ GeneralWidget::GeneralWidget( QWidget *parent, const char *name)
"size."));
chkBox->setChecked(gpppdata.get_dock_into_panel());
- connect(chkBox,SIGNAL(toggled(bool)),
- this, SLOT(docking_toggled(bool)));
+ connect(chkBox,TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(docking_toggled(bool)));
tl->addWidget(chkBox);
- chkBox = new QCheckBox(i18n("A&utomatic redial on disconnect"), parent);
+ chkBox = new TQCheckBox(i18n("A&utomatic redial on disconnect"), parent);
chkBox->setChecked(gpppdata.automatic_redial());
- connect(chkBox,SIGNAL(toggled(bool)),
- this, SLOT(redial_toggled(bool)));
+ connect(chkBox,TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(redial_toggled(bool)));
tl->addWidget(chkBox);
- QWhatsThis::add(chkBox,
+ TQWhatsThis::add(chkBox,
i18n("<p>When a connection is established and\n"
"it somehow gets disconnected, <i>kppp</i>\n"
"will try to reconnect to the same account.\n"
"\n"
"See <a href=\"#redial\">here</a> for more on this topic."));
- chkBox = new QCheckBox(i18n("Automatic redial on NO &CARRIER"), parent);
+ chkBox = new TQCheckBox(i18n("Automatic redial on NO &CARRIER"), parent);
chkBox->setChecked(gpppdata.get_redial_on_nocarrier());
- connect(chkBox,SIGNAL(toggled(bool)),
- this, SLOT(nocarrier_toggled(bool)));
+ connect(chkBox,TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(nocarrier_toggled(bool)));
tl->addWidget(chkBox);
- QWhatsThis::add(chkBox,
+ TQWhatsThis::add(chkBox,
i18n("<p>When dialing if modem returns NO CARRIER\n"
"the program will make a new attempt to redial\n"
"instead of waiting for user to click <CANCEL>\n"
"button."));
- chkBox = new QCheckBox(i18n("&Show clock on caption"), parent);
+ chkBox = new TQCheckBox(i18n("&Show clock on caption"), parent);
chkBox->setChecked(gpppdata.get_show_clock_on_caption());
- connect(chkBox, SIGNAL(toggled(bool)),
- this, SLOT(caption_toggled(bool)));
+ connect(chkBox, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(caption_toggled(bool)));
tl->addWidget(chkBox);
- QWhatsThis::add(chkBox,
+ TQWhatsThis::add(chkBox,
i18n("When this option is checked, the window\n"
"title shows the time since a connection\n"
"was established. Very useful, so you \n"
"should turn this on"));
- chkBox = new QCheckBox(i18n("Disco&nnect on X server shutdown"), parent);
+ chkBox = new TQCheckBox(i18n("Disco&nnect on X server shutdown"), parent);
chkBox->setChecked(gpppdata.get_xserver_exit_disconnect());
- connect(chkBox, SIGNAL(toggled(bool)),
- this, SLOT(xserver_toggled(bool)));
+ connect(chkBox, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(xserver_toggled(bool)));
tl->addWidget(chkBox);
- QWhatsThis::add(chkBox,
+ TQWhatsThis::add(chkBox,
i18n("<p>Checking this option will close any\n"
"open connection when the X-server is\n"
"shut down. You should enable this option\n"
@@ -141,21 +141,21 @@ GeneralWidget::GeneralWidget( QWidget *parent, const char *name)
"\n"
"See <a href=\"#disxserver\">here</a> for more on this."));
- chkBox = new QCheckBox(i18n("&Quit on disconnect"), parent);
+ chkBox = new TQCheckBox(i18n("&Quit on disconnect"), parent);
chkBox->setChecked(gpppdata.quit_on_disconnect());
- connect(chkBox, SIGNAL(toggled(bool)),
- this, SLOT(quit_toggled(bool)));
+ connect(chkBox, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(quit_toggled(bool)));
tl->addWidget(chkBox);
- QWhatsThis::add(chkBox,
+ TQWhatsThis::add(chkBox,
i18n("When this option is turned on, <i>kppp</i>\n"
"will be closed when you disconnect"));
- chkBox = new QCheckBox(i18n("Minimi&ze window on connect"), parent);
+ chkBox = new TQCheckBox(i18n("Minimi&ze window on connect"), parent);
chkBox->setChecked(gpppdata.get_iconify_on_connect());
- connect(chkBox,SIGNAL(toggled(bool)),
- this,SLOT(iconify_toggled(bool)));
+ connect(chkBox,TQT_SIGNAL(toggled(bool)),
+ this,TQT_SLOT(iconify_toggled(bool)));
tl->addWidget(chkBox);
- QWhatsThis::add(chkBox,
+ TQWhatsThis::add(chkBox,
i18n("Iconifies <i>kppp</i>'s window when a\n"
"connection is established"));
@@ -203,28 +203,28 @@ void GeneralWidget::pppdtimeoutchanged(int n) {
}
-ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name)
- : QWidget(parent, name)
+ModemWidget::ModemWidget(TQWidget *parent, bool isnewmodem, const char *name)
+ : TQWidget(parent, name)
{
- QGridLayout *tl = new QGridLayout(parent, 9, 2, 0, KDialog::spacingHint());
+ TQGridLayout *tl = new TQGridLayout(parent, 9, 2, 0, KDialog::spacingHint());
- connect_label = new QLabel(i18n("Modem &name:"), parent);
+ connect_label = new TQLabel(i18n("Modem &name:"), parent);
tl->addWidget(connect_label, 0, 0);
- connectname_l = new QLineEdit(parent);
+ connectname_l = new TQLineEdit(parent);
connectname_l->setMaxLength(ACCNAME_SIZE);
connect_label->setBuddy(connectname_l);
tl->addWidget(connectname_l, 0, 1);
- QString tmp = i18n("Type in a unique name for this modem");
+ TQString tmp = i18n("Type in a unique name for this modem");
- QWhatsThis::add(connect_label,tmp);
- QWhatsThis::add(connectname_l,tmp);
+ TQWhatsThis::add(connect_label,tmp);
+ TQWhatsThis::add(connectname_l,tmp);
- label1 = new QLabel(i18n("Modem de&vice:"), parent);
+ label1 = new TQLabel(i18n("Modem de&vice:"), parent);
tl->addWidget(label1, 1, 0);
- modemdevice = new QComboBox(false, parent);
+ modemdevice = new TQComboBox(false, parent);
label1->setBuddy(modemdevice);
// ### deviceExist mechanism not functional right now
bool deviceExist = false;
@@ -238,8 +238,8 @@ ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name)
modemdevice->insertItem(gpppdata.modemDevice());
tl->addWidget(modemdevice, 1, 1);
-/* connect(modemdevice, SIGNAL(activated(int)),
- SLOT(setmodemdc(int)));*/
+/* connect(modemdevice, TQT_SIGNAL(activated(int)),
+ TQT_SLOT(setmodemdc(int)));*/
tmp = i18n("This specifies the serial port your modem is attached \n"
"to. On Linux/x86, typically this is either /dev/ttyS0 \n"
"(COM1 under DOS) or /dev/ttyS1 (COM2 under DOS).\n"
@@ -248,14 +248,14 @@ ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name)
"emulation (most cards under Linux support this), you\n"
"should select one of the /dev/ttyIx devices.");
- QWhatsThis::add(label1,tmp);
- QWhatsThis::add(modemdevice,tmp);
+ TQWhatsThis::add(label1,tmp);
+ TQWhatsThis::add(modemdevice,tmp);
- label2 = new QLabel(i18n("&Flow control:"), parent);
+ label2 = new TQLabel(i18n("&Flow control:"), parent);
tl->addWidget(label2, 2, 0);
- flowcontrol = new QComboBox(false, parent);
+ flowcontrol = new TQComboBox(false, parent);
label2->setBuddy(flowcontrol);
flowcontrol->insertItem(i18n("Hardware [CRTSCTS]")); // sync with pppdata.cpp
flowcontrol->insertItem(i18n("Software [XON/XOFF]"));
@@ -266,8 +266,8 @@ ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name)
flowListItem << "None";
tl->addWidget(flowcontrol, 2, 1);
- /*connect(flowcontrol, SIGNAL(activated(int)),
- SLOT(setflowcontrol(int)));*/
+ /*connect(flowcontrol, TQT_SIGNAL(activated(int)),
+ TQT_SLOT(setflowcontrol(int)));*/
tmp = i18n("<p>Specifies how the serial port and modem\n"
"communicate. You should not change this unless\n"
@@ -275,19 +275,19 @@ ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name)
"\n"
"<b>Default</b>: CRTSCTS");
- QWhatsThis::add(label2,tmp);
- QWhatsThis::add(flowcontrol,tmp);
+ TQWhatsThis::add(label2,tmp);
+ TQWhatsThis::add(flowcontrol,tmp);
- labelenter = new QLabel(i18n("&Line termination:"), parent);
+ labelenter = new TQLabel(i18n("&Line termination:"), parent);
tl->addWidget(labelenter, 3, 0);
- enter = new QComboBox(false, parent);
+ enter = new TQComboBox(false, parent);
labelenter->setBuddy(enter);
enter->insertItem("CR");
enter->insertItem("LF");
enter->insertItem("CR/LF");
tl->addWidget(enter, 3, 1);
- /* connect(enter, SIGNAL(activated(int)), SLOT(setenter(int)));*/
+ /* connect(enter, TQT_SIGNAL(activated(int)), TQT_SLOT(setenter(int)));*/
tmp = i18n("<p>Specifies how AT commands are sent to your\n"
"modem. Most modems will work fine with the\n"
"default <i>CR/LF</i>. If your modem does not react\n"
@@ -296,12 +296,12 @@ ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name)
"\n"
"<b>Default</b>: CR/LF");
- QWhatsThis::add(labelenter,tmp);
- QWhatsThis::add(enter, tmp);
+ TQWhatsThis::add(labelenter,tmp);
+ TQWhatsThis::add(enter, tmp);
- baud_label = new QLabel(i18n("Co&nnection speed:"), parent);
+ baud_label = new TQLabel(i18n("Co&nnection speed:"), parent);
tl->addWidget(baud_label, 4, 0);
- baud_c = new QComboBox(parent);
+ baud_c = new TQComboBox(parent);
baud_label->setBuddy(baud_c);
static const char *baudrates[] = {
@@ -336,8 +336,8 @@ ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name)
baud_c->insertItem(baudrates[k]);
baud_c->setCurrentItem(3);
- /*connect(baud_c, SIGNAL(activated(int)),
- this, SLOT(speed_selection(int)));*/
+ /*connect(baud_c, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(speed_selection(int)));*/
tl->addWidget(baud_c, 4, 1);
tmp = i18n("Specifies the speed your modem and the serial\n"
@@ -347,8 +347,8 @@ ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name)
"If you have connection problems, try to reduce\n"
"this value.");
- QWhatsThis::add(baud_label,tmp);
- QWhatsThis::add(baud_c,tmp);
+ TQWhatsThis::add(baud_label,tmp);
+ TQWhatsThis::add(baud_c,tmp);
for(int i=0; i <= enter->count()-1; i++) {
if(gpppdata.enter() == enter->text(i))
@@ -358,14 +358,14 @@ ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name)
tl->addRowSpacing(4, 10);
//Modem Lock File
- modemlockfile = new QCheckBox(i18n("&Use lock file"), parent);
+ modemlockfile = new TQCheckBox(i18n("&Use lock file"), parent);
modemlockfile->setChecked(gpppdata.modemLockFile());
-/* connect(modemlockfile, SIGNAL(toggled(bool)),
- SLOT(modemlockfilechanged(bool)));*/
+/* connect(modemlockfile, TQT_SIGNAL(toggled(bool)),
+ TQT_SLOT(modemlockfilechanged(bool)));*/
tl->addMultiCellWidget(modemlockfile, 5, 5, 0, 1);
// l12->addStretch(1);
- QWhatsThis::add(modemlockfile,
+ TQWhatsThis::add(modemlockfile,
i18n("<p>To prevent other programs from accessing the\n"
"modem while a connection is established, a\n"
"file can be created to indicate that the modem\n"
@@ -382,11 +382,11 @@ ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name)
modemtimeout->setLabel(i18n("Modem &timeout:"));
modemtimeout->setRange(1, 120, 1);
modemtimeout->setSuffix(i18n(" sec"));
-/* connect(modemtimeout, SIGNAL(valueChanged(int)),
- SLOT(modemtimeoutchanged(int)));*/
+/* connect(modemtimeout, TQT_SIGNAL(valueChanged(int)),
+ TQT_SLOT(modemtimeoutchanged(int)));*/
tl->addMultiCellWidget(modemtimeout, 6, 6, 0, 1);
- QWhatsThis::add(modemtimeout,
+ TQWhatsThis::add(modemtimeout,
i18n("This specifies how long <i>kppp</i> waits for a\n"
"<i>CONNECT</i> response from your modem. The\n"
"recommended value is 30 seconds."));
@@ -445,17 +445,17 @@ bool ModemWidget::save()
}
-ModemWidget2::ModemWidget2(QWidget *parent, const char *name)
- : QWidget(parent, name)
+ModemWidget2::ModemWidget2(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
- QVBoxLayout *l1 = new QVBoxLayout(parent, 0, KDialog::spacingHint());
+ TQVBoxLayout *l1 = new TQVBoxLayout(parent, 0, KDialog::spacingHint());
- waitfordt = new QCheckBox(i18n("&Wait for dial tone before dialing"), parent);
+ waitfordt = new TQCheckBox(i18n("&Wait for dial tone before dialing"), parent);
waitfordt->setChecked(gpppdata.waitForDialTone());
- // connect(waitfordt, SIGNAL(toggled(bool)), SLOT(waitfordtchanged(bool)));
+ // connect(waitfordt, TQT_SIGNAL(toggled(bool)), TQT_SLOT(waitfordtchanged(bool)));
l1->addWidget(waitfordt);
- QWhatsThis::add(waitfordt,
+ TQWhatsThis::add(waitfordt,
i18n("<p>Normally the modem waits for a dial tone\n"
"from your phone line, indicating that it can\n"
"start to dial a number. If your modem does not\n"
@@ -468,10 +468,10 @@ ModemWidget2::ModemWidget2(QWidget *parent, const char *name)
busywait->setLabel(i18n("B&usy wait:"));
busywait->setRange(0, 300, 5, true);
busywait->setSuffix(i18n(" sec"));
- // connect(busywait, SIGNAL(valueChanged(int)), SLOT(busywaitchanged(int)));
+ // connect(busywait, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(busywaitchanged(int)));
l1->addWidget(busywait);
- QWhatsThis::add(busywait,
+ TQWhatsThis::add(busywait,
i18n("Specifies the number of seconds to wait before\n"
"redial if all dialed numbers are busy. This is\n"
"necessary because some modems get stuck if the\n"
@@ -482,21 +482,21 @@ ModemWidget2::ModemWidget2(QWidget *parent, const char *name)
l1->addSpacing(10);
- QHBoxLayout *hbl = new QHBoxLayout;
+ TQHBoxLayout *hbl = new QHBoxLayout;
hbl->setSpacing(KDialog::spacingHint());
- QLabel *volumeLabel = new QLabel(i18n("Modem &volume:"), parent);
+ TQLabel *volumeLabel = new TQLabel(i18n("Modem &volume:"), parent);
hbl->addWidget(volumeLabel);
- volume = new QSlider(0, 2, 1, gpppdata.volume(), QSlider::Horizontal, parent);
+ volume = new TQSlider(0, 2, 1, gpppdata.volume(), TQSlider::Horizontal, parent);
volumeLabel->setBuddy(volume);
- volume->setTickmarks(QSlider::Below);
+ volume->setTickmarks(TQSlider::Below);
hbl->addWidget(volume);
l1->addLayout(hbl);
- /* connect(volume, SIGNAL(valueChanged(int)),
- this, SLOT(volumeChanged(int)));*/
- QString tmp = i18n("Most modems have a speaker which makes\n"
+ /* connect(volume, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(volumeChanged(int)));*/
+ TQString tmp = i18n("Most modems have a speaker which makes\n"
"a lot of noise when dialing. Here you can\n"
"either turn this completely off or select a\n"
"lower volume.\n"
@@ -504,20 +504,20 @@ ModemWidget2::ModemWidget2(QWidget *parent, const char *name)
"If this does not work for your modem,\n"
"you must modify the modem volume command.");
- QWhatsThis::add(volumeLabel,tmp);
- QWhatsThis::add(volume, tmp);
+ TQWhatsThis::add(volumeLabel,tmp);
+ TQWhatsThis::add(volume, tmp);
l1->addSpacing(20);
#if 0
- chkbox1 = new QCheckBox(i18n("Modem asserts CD line"), parent);
+ chkbox1 = new TQCheckBox(i18n("Modem asserts CD line"), parent);
chkbox1->setChecked(gpppdata.UseCDLine());
- connect(chkbox1,SIGNAL(toggled(bool)),
- this,SLOT(use_cdline_toggled(bool)));
+ connect(chkbox1,TQT_SIGNAL(toggled(bool)),
+ this,TQT_SLOT(use_cdline_toggled(bool)));
l12->addWidget(chkbox1);
l12->addStretch(1);
l1->addStretch(1);
- QWhatsThis::add(chkbox1,
+ TQWhatsThis::add(chkbox1,
i18n("This controls how <i>kppp</i> detects that the modem\n"
"is not responding. Unless you are having\n"
"problems with this, do not modify this setting.\n"
@@ -525,13 +525,13 @@ ModemWidget2::ModemWidget2(QWidget *parent, const char *name)
"<b>Default</b>: Off"));
#endif
- modemcmds = new QPushButton(i18n("Mod&em Commands..."), parent);
- QWhatsThis::add(modemcmds,
+ modemcmds = new TQPushButton(i18n("Mod&em Commands..."), parent);
+ TQWhatsThis::add(modemcmds,
i18n("Allows you to change the AT command for\n"
"your modem."));
- modeminfo_button = new QPushButton(i18n("&Query Modem..."), parent);
- QWhatsThis::add(modeminfo_button,
+ modeminfo_button = new TQPushButton(i18n("&Query Modem..."), parent);
+ TQWhatsThis::add(modeminfo_button,
i18n("Most modems support the ATI command set to\n"
"find out vendor and revision of your modem.\n"
"\n"
@@ -539,16 +539,16 @@ ModemWidget2::ModemWidget2(QWidget *parent, const char *name)
"this information. It can be useful to help\n"
"you set up the modem"));
- terminal_button = new QPushButton(i18n("&Terminal..."), parent);
- QWhatsThis::add(terminal_button,
+ terminal_button = new TQPushButton(i18n("&Terminal..."), parent);
+ TQWhatsThis::add(terminal_button,
i18n("Opens the built-in terminal program. You\n"
"can use this if you want to play around\n"
"with your modem's AT command set"));
- QHBoxLayout *hbox = new QHBoxLayout();
+ TQHBoxLayout *hbox = new TQHBoxLayout();
l1->addLayout(hbox);
hbox->addStretch(1);
- QVBoxLayout *vbox = new QVBoxLayout();
+ TQVBoxLayout *vbox = new TQVBoxLayout();
hbox->addLayout(vbox);
vbox->addWidget(modemcmds);
@@ -558,12 +558,12 @@ ModemWidget2::ModemWidget2(QWidget *parent, const char *name)
hbox->addStretch(1);
l1->addStretch(1);
- connect(modemcmds, SIGNAL(clicked()),
- SLOT(modemcmdsbutton()));
- connect(modeminfo_button, SIGNAL(clicked()),
- SLOT(query_modem()));
- connect(terminal_button, SIGNAL(clicked()),
- SLOT(terminal()));
+ connect(modemcmds, TQT_SIGNAL(clicked()),
+ TQT_SLOT(modemcmdsbutton()));
+ connect(modeminfo_button, TQT_SIGNAL(clicked()),
+ TQT_SLOT(query_modem()));
+ connect(terminal_button, TQT_SIGNAL(clicked()),
+ TQT_SLOT(terminal()));
// Create the Modem Command so if the window is not opened they are autosaved anyway
mc = new ModemCommands(this);
@@ -607,55 +607,55 @@ bool ModemWidget2::save()
// Setup widget for the graph
//
/////////////////////////////////////////////////////////////////////////////
-GraphSetup::GraphSetup(QWidget *parent, const char *name) :
- QWidget(parent, name)
+GraphSetup::GraphSetup(TQWidget *parent, const char *name) :
+ TQWidget(parent, name)
{
- QVBoxLayout *tl = new QVBoxLayout(parent);
+ TQVBoxLayout *tl = new TQVBoxLayout(parent);
bool enable;
- QColor bg, text, in, out;
+ TQColor bg, text, in, out;
gpppdata.graphingOptions(enable, bg, text, in, out);
- enable_check = new QCheckBox(i18n("&Enable throughput graph"), parent);
+ enable_check = new TQCheckBox(i18n("&Enable throughput graph"), parent);
tl->addWidget(enable_check);
- grpColor = new QGroupBox(2, Qt::Horizontal,
+ grpColor = new TQGroupBox(2, Qt::Horizontal,
i18n("Graph Colors"), parent);
tl->addWidget(grpColor);
- QLabel *label;
+ TQLabel *label;
- label = new QLabel(i18n("Bac&kground:"), grpColor);
+ label = new TQLabel(i18n("Bac&kground:"), grpColor);
bg_color = new KColorButton(bg, grpColor);
bg_color->setFixedSize(80, 24);
label->setBuddy(bg_color);
- label = new QLabel(i18n("&Text:"), grpColor);
+ label = new TQLabel(i18n("&Text:"), grpColor);
text_color = new KColorButton(text, grpColor);
text_color->setFixedSize(80, 24);
label->setBuddy(text_color);
- label = new QLabel(i18n("I&nput bytes:"), grpColor);
+ label = new TQLabel(i18n("I&nput bytes:"), grpColor);
in_color = new KColorButton(in, grpColor);
in_color->setFixedSize(80, 24);
label->setBuddy(in_color);
- label = new QLabel(i18n("O&utput bytes:"), grpColor);
+ label = new TQLabel(i18n("O&utput bytes:"), grpColor);
out_color = new KColorButton(out, grpColor);
out_color->setFixedSize(80, 24);
label->setBuddy(out_color);
tl->addStretch();
- connect(enable_check, SIGNAL(toggled(bool)), this, SLOT(enableToggled(bool)));
- connect(bg_color, SIGNAL(changed(const QColor &)),
- SLOT(colorChanged(const QColor&)));
- connect(text_color, SIGNAL(changed(const QColor &)),
- SLOT(colorChanged(const QColor&)));
- connect(in_color, SIGNAL(changed(const QColor &)),
- SLOT(colorChanged(const QColor&)));
- connect(out_color, SIGNAL(changed(const QColor &)),
- SLOT(colorChanged(const QColor&)));
+ connect(enable_check, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(enableToggled(bool)));
+ connect(bg_color, TQT_SIGNAL(changed(const TQColor &)),
+ TQT_SLOT(colorChanged(const TQColor&)));
+ connect(text_color, TQT_SIGNAL(changed(const TQColor &)),
+ TQT_SLOT(colorChanged(const TQColor&)));
+ connect(in_color, TQT_SIGNAL(changed(const TQColor &)),
+ TQT_SLOT(colorChanged(const TQColor&)));
+ connect(out_color, TQT_SIGNAL(changed(const TQColor &)),
+ TQT_SLOT(colorChanged(const TQColor&)));
tl->activate();
@@ -669,7 +669,7 @@ void GraphSetup::enableToggled(bool b) {
}
-void GraphSetup::colorChanged(const QColor &) {
+void GraphSetup::colorChanged(const TQColor &) {
save();
}
diff --git a/kppp/general.h b/kppp/general.h
index 9fc22105..29d77738 100644
--- a/kppp/general.h
+++ b/kppp/general.h
@@ -25,22 +25,22 @@
#ifndef _GENERAL_H_
#define _GENERAL_H_
-#include <qwidget.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qpushbutton.h>
+#include <tqwidget.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqpushbutton.h>
#include <kcolorbutton.h>
class QSlider;
class KIntNumInput;
class ModemCommands;
-class GeneralWidget : public QWidget {
+class GeneralWidget : public TQWidget {
Q_OBJECT
public:
- GeneralWidget( QWidget *parent=0, const char *name=0 );
+ GeneralWidget( TQWidget *parent=0, const char *name=0 );
private slots:
void pppdtimeoutchanged(int);
@@ -55,39 +55,39 @@ private slots:
};
-class ModemWidget : public QWidget {
+class ModemWidget : public TQWidget {
Q_OBJECT
public:
- ModemWidget(QWidget *parent=0, bool isnewmodem=true, const char *name=0);
+ ModemWidget(TQWidget *parent=0, bool isnewmodem=true, const char *name=0);
bool save();
- QLineEdit *connectName() { return connectname_l;}
+ TQLineEdit *connectName() { return connectname_l;}
private slots:
private:
- QLineEdit *connectname_l;
- QLabel *connect_label;
+ TQLineEdit *connectname_l;
+ TQLabel *connect_label;
- QComboBox *enter;
- QLabel *label1;
- QLabel *label2;
- QLabel *labeltmp;
- QLabel *labelenter;
- QComboBox *modemdevice;
- QComboBox *flowcontrol;
+ TQComboBox *enter;
+ TQLabel *label1;
+ TQLabel *label2;
+ TQLabel *labeltmp;
+ TQLabel *labelenter;
+ TQComboBox *modemdevice;
+ TQComboBox *flowcontrol;
- QComboBox *baud_c;
- QLabel *baud_label;
+ TQComboBox *baud_c;
+ TQLabel *baud_label;
KIntNumInput *modemtimeout;
- QCheckBox *modemlockfile;
- QStringList flowListItem;
+ TQCheckBox *modemlockfile;
+ TQStringList flowListItem;
};
-class ModemWidget2 : public QWidget {
+class ModemWidget2 : public TQWidget {
Q_OBJECT
public:
- ModemWidget2(QWidget *parent=0, const char *name=0);
+ ModemWidget2(TQWidget *parent=0, const char *name=0);
bool save();
private slots:
@@ -97,33 +97,33 @@ private slots:
void query_modem();
private:
- QLabel *labeltmp;
- QPushButton *modemcmds;
- QPushButton *modeminfo_button;
- QPushButton *terminal_button;
- QFrame *fline;
- QCheckBox *waitfordt;
+ TQLabel *labeltmp;
+ TQPushButton *modemcmds;
+ TQPushButton *modeminfo_button;
+ TQPushButton *terminal_button;
+ TQFrame *fline;
+ TQCheckBox *waitfordt;
KIntNumInput *busywait;
- QCheckBox *chkbox1;
- QSlider *volume;
+ TQCheckBox *chkbox1;
+ TQSlider *volume;
ModemCommands* mc;
};
-class GraphSetup : public QWidget {
+class GraphSetup : public TQWidget {
Q_OBJECT
public:
- GraphSetup(QWidget *parent = 0, const char *name = 0);
+ GraphSetup(TQWidget *parent = 0, const char *name = 0);
private slots:
void enableToggled(bool);
- void colorChanged(const QColor &);
+ void colorChanged(const TQColor &);
private:
void save();
- QGroupBox *grpColor;
- QCheckBox *enable_check;
+ TQGroupBox *grpColor;
+ TQCheckBox *enable_check;
KColorButton *bg_color;
KColorButton *text_color;
diff --git a/kppp/iplined.cpp b/kppp/iplined.cpp
index f63c446f..197b13a6 100644
--- a/kppp/iplined.cpp
+++ b/kppp/iplined.cpp
@@ -26,17 +26,17 @@
#include "iplined.h"
-IPLineEdit::IPLineEdit( QWidget *parent, const char *name )
+IPLineEdit::IPLineEdit( TQWidget *parent, const char *name )
: KRestrictedLine(parent, name, "0123456789.")
{
setMaxLength(3 * 4 + 1 * 3);
}
-QSize IPLineEdit::sizeHint() const {
- QFontMetrics fm = fontMetrics();
+TQSize IPLineEdit::sizeHint() const {
+ TQFontMetrics fm = fontMetrics();
- QSize s;
- s.setHeight(QLineEdit::sizeHint().height());
+ TQSize s;
+ s.setHeight(TQLineEdit::sizeHint().height());
s.setWidth(fm.boundingRect("888.888.888.888XX").width());
return s;
}
diff --git a/kppp/iplined.h b/kppp/iplined.h
index 24517e46..b978b6f5 100644
--- a/kppp/iplined.h
+++ b/kppp/iplined.h
@@ -31,10 +31,10 @@
class IPLineEdit : public KRestrictedLine {
public:
- IPLineEdit( QWidget *parent=0, const char *name=0 );
+ IPLineEdit( TQWidget *parent=0, const char *name=0 );
~IPLineEdit() {}
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
};
#endif
diff --git a/kppp/kpppwidget.cpp b/kppp/kpppwidget.cpp
index 9572efbf..2006489e 100644
--- a/kppp/kpppwidget.cpp
+++ b/kppp/kpppwidget.cpp
@@ -24,16 +24,16 @@
#include "kpppwidget.h"
-#include <qapplication.h>
-#include <qcombobox.h>
-#include <qdir.h>
-#include <qevent.h>
-#include <qdialog.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
+#include <tqapplication.h>
+#include <tqcombobox.h>
+#include <tqdir.h>
+#include <tqevent.h>
+#include <tqdialog.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqregexp.h>
#include <kdialogbase.h>
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -74,8 +74,8 @@
extern KPPPWidget *p_kppp;
-KPPPWidget::KPPPWidget( QWidget *parent, const char *name )
- : DCOPObject( "KpppIface" ), QWidget(parent, name)
+KPPPWidget::KPPPWidget( TQWidget *parent, const char *name )
+ : DCOPObject( "KpppIface" ), TQWidget(parent, name)
, acct(0)
, m_bCmdlAccount (false)
, m_bCmdlModem (false)
@@ -90,45 +90,45 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name )
installEventFilter(this);
- QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
+ TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10);
- l1 = new QGridLayout(4, 4);
+ l1 = new TQGridLayout(4, 4);
tl->addLayout(l1);
l1->addColSpacing(0, 10);
l1->addColSpacing(3, 10);
l1->setColStretch(1, 3);
l1->setColStretch(2, 4);
- label1 = new QLabel(i18n("C&onnect to: "), this);
+ label1 = new TQLabel(i18n("C&onnect to: "), this);
l1->addWidget(label1, 0, 1);
- connectto_c = new QComboBox(false, this);
+ connectto_c = new TQComboBox(false, this);
label1->setBuddy(connectto_c);
- connect(connectto_c, SIGNAL(activated(int)),
- SLOT(newdefaultaccount(int)));
+ connect(connectto_c, TQT_SIGNAL(activated(int)),
+ TQT_SLOT(newdefaultaccount(int)));
l1->addWidget(connectto_c, 0, 2);
- label7 = new QLabel(i18n("Use &modem: "), this);
+ label7 = new TQLabel(i18n("Use &modem: "), this);
// l1->addWidget(label7, 1, 1); (done in resetmodems())
- modem_c = new QComboBox(false, this);
+ modem_c = new TQComboBox(false, this);
label7->setBuddy(connectto_c);
m_bModemCShown = false;
- connect(modem_c, SIGNAL(activated(int)),
- SLOT(newdefaultmodem(int)));
+ connect(modem_c, TQT_SIGNAL(activated(int)),
+ TQT_SLOT(newdefaultmodem(int)));
// l1->addWidget(modem_c, 1, 2); (done in resetmodems())
- ID_Label = new QLabel(i18n("&Login ID:"), this);
+ ID_Label = new TQLabel(i18n("&Login ID:"), this);
l1->addWidget(ID_Label, 2, 1);
// the entry line for usernames
- ID_Edit = new QLineEdit(this);
+ ID_Edit = new TQLineEdit(this);
ID_Label->setBuddy(ID_Edit);
l1->addWidget(ID_Edit, 2, 2);
- connect(ID_Edit, SIGNAL(returnPressed()),
- this, SLOT(enterPressedInID()));
- QString tmp = i18n("<p>Type in the username that you got from your\n"
+ connect(ID_Edit, TQT_SIGNAL(returnPressed()),
+ this, TQT_SLOT(enterPressedInID()));
+ TQString tmp = i18n("<p>Type in the username that you got from your\n"
"ISP. This is especially important for PAP\n"
"and CHAP. You may omit this when you use\n"
"terminal-based or script-based authentication.\n"
@@ -136,18 +136,18 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name )
"<b>Important</b>: case is important here:\n"
"<i>myusername</i> is not the same as <i>MyUserName</i>.");
- QWhatsThis::add(ID_Label,tmp);
- QWhatsThis::add(ID_Edit,tmp);
+ TQWhatsThis::add(ID_Label,tmp);
+ TQWhatsThis::add(ID_Edit,tmp);
- PW_Label = new QLabel(i18n("&Password:"), this);
+ PW_Label = new TQLabel(i18n("&Password:"), this);
l1->addWidget(PW_Label, 3, 1);
- PW_Edit= new QLineEdit(this);
+ PW_Edit= new TQLineEdit(this);
PW_Label->setBuddy(PW_Edit);
- PW_Edit->setEchoMode(QLineEdit::Password);
+ PW_Edit->setEchoMode(TQLineEdit::Password);
l1->addWidget(PW_Edit, 3, 2);
- connect(PW_Edit, SIGNAL(returnPressed()),
- this, SLOT(enterPressedInPW()));
+ connect(PW_Edit, TQT_SIGNAL(returnPressed()),
+ this, TQT_SLOT(enterPressedInPW()));
tmp = i18n("<p>Type in the password that you got from your\n"
"ISP. This is especially important for PAP\n"
@@ -157,21 +157,21 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name )
"<b>Important</b>: case is important here:\n"
"<i>mypassword</i> is not the same as <i>MyPassword</i>.");
- QWhatsThis::add(PW_Label,tmp);
- QWhatsThis::add(PW_Edit,tmp);
+ TQWhatsThis::add(PW_Label,tmp);
+ TQWhatsThis::add(PW_Edit,tmp);
- QHBoxLayout *l3 = new QHBoxLayout;
+ TQHBoxLayout *l3 = new QHBoxLayout;
tl->addSpacing(5);
tl->addLayout(l3);
tl->addSpacing(5);
l3->addSpacing(10);
- log = new QCheckBox(i18n("Show lo&g window"), this);
- connect(log, SIGNAL(toggled(bool)),
- this, SLOT(log_window_toggled(bool)));
+ log = new TQCheckBox(i18n("Show lo&g window"), this);
+ connect(log, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(log_window_toggled(bool)));
log->setChecked(gpppdata.get_show_log_window());
l3->addWidget(log);
- QWhatsThis::add(log,
+ TQWhatsThis::add(log,
i18n("<p>This controls whether a log window is shown.\n"
"A log window shows the communication between\n"
"<i>kppp</i> and your modem. This will help you\n"
@@ -183,17 +183,17 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name )
fline = new KSeparator( KSeparator::HLine, this);
tl->addWidget(fline);
- QHBoxLayout *l2 = new QHBoxLayout;
+ TQHBoxLayout *l2 = new QHBoxLayout;
tl->addLayout(l2);
int minw = 0;
quit_b = new KPushButton(KStdGuiItem::quit(), this);
- connect( quit_b, SIGNAL(clicked()), SLOT(quitbutton()));
+ connect( quit_b, TQT_SIGNAL(clicked()), TQT_SLOT(quitbutton()));
if(quit_b->sizeHint().width() > minw)
minw = quit_b->sizeHint().width();
setup_b = new KPushButton(KGuiItem(i18n("Co&nfigure..."), "configure"), this);
- connect( setup_b, SIGNAL(clicked()), SLOT(expandbutton()));
+ connect( setup_b, TQT_SIGNAL(clicked()), TQT_SLOT(expandbutton()));
if(setup_b->sizeHint().width() > minw)
minw = setup_b->sizeHint().width();
@@ -201,18 +201,18 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name )
setup_b->setEnabled(false);
help_b = new KPushButton(KStdGuiItem::help(), this);
- connect( help_b, SIGNAL(clicked()), SLOT(helpbutton()));
+ connect( help_b, TQT_SIGNAL(clicked()), TQT_SLOT(helpbutton()));
KHelpMenu *helpMenu = new KHelpMenu(this, KGlobal::instance()->aboutData(), true);
- help_b->setPopup((QPopupMenu*)helpMenu->menu());
+ help_b->setPopup((TQPopupMenu*)helpMenu->menu());
if(help_b->sizeHint().width() > minw)
minw = help_b->sizeHint().width();
- connect_b = new QPushButton(i18n("&Connect"), this);
+ connect_b = new TQPushButton(i18n("&Connect"), this);
connect_b->setDefault(true);
connect_b->setFocus();
- connect(connect_b, SIGNAL(clicked()), SLOT(beginConnect()));
+ connect(connect_b, TQT_SIGNAL(clicked()), TQT_SLOT(beginConnect()));
if(connect_b->sizeHint().width() > minw)
minw = connect_b->sizeHint().width();
@@ -233,7 +233,7 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name )
// we also connect cmld_start to the beginConnect so that I can run
// the dialer through a command line argument
- connect(this,SIGNAL(cmdl_start()),this,SLOT(beginConnect()));
+ connect(this,TQT_SIGNAL(cmdl_start()),this,TQT_SLOT(beginConnect()));
stats = new PPPStats;
@@ -256,28 +256,28 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name )
resetmodems();
con = new ConnectWidget(0, "con", stats);
KWin::setIcons(con->winId(), kapp->icon(), kapp->miniIcon() );
- connect(this, SIGNAL(begin_connect()),con, SLOT(preinit()));
+ connect(this, TQT_SIGNAL(begin_connect()),con, TQT_SLOT(preinit()));
- QRect desk = KGlobalSettings::desktopGeometry(topLevelWidget());
+ TQRect desk = KGlobalSettings::desktopGeometry(topLevelWidget());
con->setGeometry(desk.center().x()-175, desk.center().y()-55, 350,110);
// connect the ConnectWidgets various signals
- connect(con, SIGNAL(closeDebugWindow()),
- debugwindow, SLOT(hide()));
- connect(con, SIGNAL(debugMessage(const QString &)),
- debugwindow, SLOT(statusLabel(const QString &)));
- connect(con, SIGNAL(toggleDebugWindow()),
- debugwindow, SLOT(toggleVisibility()));
- connect(con, SIGNAL(debugPutChar(unsigned char)),
- debugwindow, SLOT(addChar(unsigned char)));
- connect(con, SIGNAL(startAccounting()),
- this, SLOT(startAccounting()));
- connect(con, SIGNAL(stopAccounting()),
- this, SLOT(stopAccounting()));
- connect(KApplication::kApplication(), SIGNAL(saveYourself()),
- this, SLOT(saveMyself()));
- connect(KApplication::kApplication(), SIGNAL(shutDown()),
- this, SLOT(shutDown()));
+ connect(con, TQT_SIGNAL(closeDebugWindow()),
+ debugwindow, TQT_SLOT(hide()));
+ connect(con, TQT_SIGNAL(debugMessage(const TQString &)),
+ debugwindow, TQT_SLOT(statusLabel(const TQString &)));
+ connect(con, TQT_SIGNAL(toggleDebugWindow()),
+ debugwindow, TQT_SLOT(toggleVisibility()));
+ connect(con, TQT_SIGNAL(debugPutChar(unsigned char)),
+ debugwindow, TQT_SLOT(addChar(unsigned char)));
+ connect(con, TQT_SIGNAL(startAccounting()),
+ this, TQT_SLOT(startAccounting()));
+ connect(con, TQT_SIGNAL(stopAccounting()),
+ this, TQT_SLOT(stopAccounting()));
+ connect(KApplication::kApplication(), TQT_SIGNAL(saveYourself()),
+ this, TQT_SLOT(saveMyself()));
+ connect(KApplication::kApplication(), TQT_SIGNAL(shutDown()),
+ this, TQT_SLOT(shutDown()));
debugwindow->setGeometry(desk.center().x()+190, desk.center().y()-55,
debugwindow->width(),debugwindow->height());
@@ -304,7 +304,7 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name )
if(m_bCmdlModem){
bool result = gpppdata.setModem(m_strCmdlModem);
if (!result){
- QString string;
+ TQString string;
string = i18n("No such Modem:\n%1\nFalling back to default").arg(m_strCmdlModem);
KMessageBox::error(this, string);
m_bCmdlModem = false;
@@ -314,7 +314,7 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name )
if(m_bCmdlAccount){
bool result = gpppdata.setAccount(m_strCmdlAccount);
if (!result){
- QString string;
+ TQString string;
string = i18n("No such Account:\n%1").arg(m_strCmdlAccount);
KMessageBox::error(this, string);
m_bCmdlAccount = false;
@@ -341,8 +341,8 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name )
// this timer will delay the actual disconnection DISCONNECTION_DELAY ms
// to give applications time to shutdown, logout, whatever..
- disconnectTimer = new QTimer(this);
- connect(disconnectTimer, SIGNAL(timeout()), this, SLOT(delayedDisconnect()));
+ disconnectTimer = new TQTimer(this);
+ connect(disconnectTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(delayedDisconnect()));
}
KPPPWidget::~KPPPWidget()
@@ -350,8 +350,8 @@ KPPPWidget::~KPPPWidget()
delete stats;
}
-bool KPPPWidget::eventFilter(QObject *o, QEvent *e) {
- if(e->type() == QEvent::User) {
+bool KPPPWidget::eventFilter(TQObject *o, TQEvent *e) {
+ if(e->type() == TQEvent::User) {
switch(((SignalEvent*)e)->sigType()) {
case SIGINT:
kdDebug(5002) << "Received a SIGINT" << endl;
@@ -368,8 +368,8 @@ bool KPPPWidget::eventFilter(QObject *o, QEvent *e) {
}
if(o == connect_b) {
- if(e->type() == QEvent::KeyPress) {
- if(connect_b->hasFocus() && ((QKeyEvent *)e)->key() == Qt::Key_Return) {
+ if(e->type() == TQEvent::KeyPress) {
+ if(connect_b->hasFocus() && ((TQKeyEvent *)e)->key() == Qt::Key_Return) {
beginConnect();
return true;
}
@@ -391,16 +391,16 @@ void KPPPWidget::prepareSetupDialog() {
// tabWindow->setFixedSize( 365, 375 );
accounts = new AccountWidget(tabWindow->addPage( i18n("&Accounts"), i18n("Account Setup") ) );
- connect(accounts, SIGNAL(resetaccounts()),
- this, SLOT(resetaccounts()));
- connect(accounts, SIGNAL(resetCosts(const QString &)),
- this, SLOT(resetCosts(const QString &)));
- connect(accounts, SIGNAL(resetVolume(const QString &)),
- this, SLOT(resetVolume(const QString &)));
+ connect(accounts, TQT_SIGNAL(resetaccounts()),
+ this, TQT_SLOT(resetaccounts()));
+ connect(accounts, TQT_SIGNAL(resetCosts(const TQString &)),
+ this, TQT_SLOT(resetCosts(const TQString &)));
+ connect(accounts, TQT_SIGNAL(resetVolume(const TQString &)),
+ this, TQT_SLOT(resetVolume(const TQString &)));
modems = new ModemsWidget(tabWindow->addPage( i18n("&Modems"), i18n("Modems Setup") ) );
- connect(modems, SIGNAL(resetmodems()),
- this, SLOT(resetmodems()));
+ connect(modems, TQT_SIGNAL(resetmodems()),
+ this, TQT_SLOT(resetmodems()));
graph = new GraphSetup( tabWindow->addPage( i18n("&Graph"), i18n("Throughput Graph" ) ) );
general = new GeneralWidget( tabWindow->addPage( i18n("M&isc"), i18n("Miscellaneous Settings") ) );
@@ -476,11 +476,11 @@ void KPPPWidget::resetaccounts() {
PW_Edit->setText(gpppdata.storedPassword());
}
- connect(ID_Edit, SIGNAL(textChanged(const QString &)),
- this, SLOT(usernameChanged(const QString &)));
+ connect(ID_Edit, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(usernameChanged(const TQString &)));
- connect(PW_Edit, SIGNAL(textChanged(const QString &)),
- this, SLOT(passwordChanged(const QString &)));
+ connect(PW_Edit, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(passwordChanged(const TQString &)));
if (ID_Edit->text().isEmpty())
ID_Edit->setFocus();
@@ -580,10 +580,10 @@ void KPPPWidget::sigPPPDDied() {
// stop the disconnect timer (just in case)
disconnectTimer->stop();
// signal other applications that we are disconnected now
- kapp->dcopClient()->emitDCOPSignal("KpppIface", "disconnected()", QByteArray());
+ kapp->dcopClient()->emitDCOPSignal("KpppIface", "disconnected()", TQByteArray());
kdDebug(5002) << "Executing command on disconnect since pppd has died." << endl;
- QApplication::flushX();
+ TQApplication::flushX();
execute_command(gpppdata.command_on_disconnect());
stopAccounting();
@@ -611,7 +611,7 @@ void KPPPWidget::sigPPPDDied() {
gpppdata.setpppdRunning(false);
// // not in a signal handler !!! KNotifyClient::beep();
- QString msg;
+ TQString msg;
if (gpppdata.pppdError() == E_IF_TIMEOUT)
msg = i18n("Timeout expired while waiting for the PPP interface "
"to come up.");
@@ -661,7 +661,7 @@ void KPPPWidget::sigChld() {
// if(id == helperPid && helperPid != -1) {
// kdDebug(5002) << "It was the setuid child that died" << endl;
// helperPid = -1;
- QString msg = i18n("kppp's helper process just died.\n"
+ TQString msg = i18n("kppp's helper process just died.\n"
"Since further execution would be pointless, "
"kppp will shut down now.");
KMessageBox::error(0L, msg);
@@ -700,7 +700,7 @@ void KPPPWidget::beginConnect() {
gpppdata.setPassword(gpppdata.storedPassword());
}
- QFileInfo info(pppdPath());
+ TQFileInfo info(pppdPath());
if(!info.exists()){
KMessageBox::error(this, i18n("Cannot find the PPP daemon!\n"
@@ -711,7 +711,7 @@ void KPPPWidget::beginConnect() {
#if 0
if(!info.isExecutable()){
- QString string;
+ TQString string;
string = i18n("kppp cannot execute:\n %1\n"
"Please make sure that you have given kppp "
"setuid permission and that "
@@ -723,16 +723,16 @@ void KPPPWidget::beginConnect() {
#endif
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- QString device = "";
+ TQString device = "";
if (args->isSet("dev"))
device = args->getOption("dev");
else
device = gpppdata.modemDevice();
- QFileInfo info2(device);
+ TQFileInfo info2(device);
if(!info2.exists()){
- QString string;
+ TQString string;
string = i18n("kppp can not find:\n %1\nPlease make sure you have setup "
"your modem device properly "
"and/or adjust the location of the modem device on "
@@ -758,7 +758,7 @@ void KPPPWidget::beginConnect() {
if(!Requester::rq->setSecret(gpppdata.authMethod(),
encodeWord(gpppdata.storedUsername()),
encodeWord(gpppdata.password()))) {
- QString s;
+ TQString s;
s = i18n("Cannot create PAP/CHAP authentication\n"
"file \"%1\"").arg(PAP_AUTH_FILE);
KMessageBox::error(this, s);
@@ -768,14 +768,14 @@ void KPPPWidget::beginConnect() {
}
if (gpppdata.phonenumber().isEmpty()) {
- QString s = i18n("You must specify a telephone number.");
+ TQString s = i18n("You must specify a telephone number.");
KMessageBox::error(this, s);
return;
}
hide();
- QString tit = i18n("Connecting to: %1").arg(gpppdata.accname());
+ TQString tit = i18n("Connecting to: %1").arg(gpppdata.accname());
con->setCaption(tit);
con->enableButtons();
con->show();
@@ -797,7 +797,7 @@ void KPPPWidget::disconnect() {
if (disconnectTimer->isActive()) return; // you had already pressed disconnect before
// signal other applications that we are about to go offline now
- kapp->dcopClient()->emitDCOPSignal("KpppIface", "aboutToDisconnect()", QByteArray());
+ kapp->dcopClient()->emitDCOPSignal("KpppIface", "aboutToDisconnect()", TQByteArray());
con_win->hide();
con->show();
con->disableButtons(); // will reenable them later in delayedDisconnect()
@@ -807,7 +807,7 @@ void KPPPWidget::disconnect() {
con->setMsg(i18n("Executing command before disconnection."));
kapp->processEvents();
- QApplication::flushX();
+ TQApplication::flushX();
pid_t id = execute_command(gpppdata.command_before_disconnect());
int i, status;
@@ -835,9 +835,9 @@ void KPPPWidget::delayedDisconnect() {
Requester::rq->killPPPDaemon();
// signal other applications that we are disconnected now
- kapp->dcopClient()->emitDCOPSignal("KpppIface", "disconnected()", QByteArray());
+ kapp->dcopClient()->emitDCOPSignal("KpppIface", "disconnected()", TQByteArray());
- QApplication::flushX();
+ TQApplication::flushX();
execute_command(gpppdata.command_on_disconnect());
Requester::rq->removeSecret(AUTH_PAP);
@@ -879,9 +879,9 @@ void KPPPWidget::quitbutton() {
disconnectTimer->stop();
// signal other applications that we are disconnected now
- kapp->dcopClient()->emitDCOPSignal("KpppIface", "disconnected()", QByteArray());
+ kapp->dcopClient()->emitDCOPSignal("KpppIface", "disconnected()", TQByteArray());
- QApplication::flushX();
+ TQApplication::flushX();
execute_command(gpppdata.command_on_disconnect());
removedns();
Modem::modem->unlockdevice();
@@ -910,24 +910,24 @@ void KPPPWidget::startAccounting() {
if(!gpppdata.AcctEnabled())
return;
- QString d = AccountingBase::getAccountingFile(gpppdata.accountingFile());
+ TQString d = AccountingBase::getAccountingFile(gpppdata.accountingFile());
// if(::access(d.data(), X_OK) != 0)
acct = new Accounting(this, stats);
// else
// acct = new ExecutableAccounting(this);
// connect to the accounting object
- connect(acct, SIGNAL(changed(QString, QString)),
- con_win, SLOT(slotAccounting(QString, QString)));
+ connect(acct, TQT_SIGNAL(changed(TQString, TQString)),
+ con_win, TQT_SLOT(slotAccounting(TQString, TQString)));
if(!acct->loadRuleSet(gpppdata.accountingFile())) {
- QString s= i18n("Can not load the accounting "
+ TQString s= i18n("Can not load the accounting "
"ruleset \"%1\".").arg(gpppdata.accountingFile());
// starting the messagebox with a timer will prevent us
// from blocking the calling function ConnectWidget::timerEvent
ruleset_load_errmsg = s;
- QTimer::singleShot(0, this, SLOT(rulesetLoadError()));
+ TQTimer::singleShot(0, this, TQT_SLOT(rulesetLoadError()));
return;
} else
acct->slotStart();
@@ -958,13 +958,13 @@ void KPPPWidget::showStats() {
}
-void KPPPWidget::usernameChanged(const QString &) {
+void KPPPWidget::usernameChanged(const TQString &) {
// store username for later use
gpppdata.setStoredUsername(ID_Edit->text());
}
-void KPPPWidget::passwordChanged(const QString &) {
+void KPPPWidget::passwordChanged(const TQString &) {
// store the password if so requested
if(gpppdata.storePassword())
gpppdata.setStoredPassword(PW_Edit->text());
@@ -973,17 +973,17 @@ void KPPPWidget::passwordChanged(const QString &) {
}
-void KPPPWidget::setPW_Edit(const QString &pw) {
+void KPPPWidget::setPW_Edit(const TQString &pw) {
PW_Edit->setText(pw);
}
-void KPPPWidget::resetCosts(const QString &s) {
+void KPPPWidget::resetCosts(const TQString &s) {
AccountingBase::resetCosts(s);
}
-void KPPPWidget::resetVolume(const QString &s) {
+void KPPPWidget::resetVolume(const TQString &s) {
AccountingBase::resetVolume(s);
}
@@ -992,9 +992,9 @@ void KPPPWidget::resetVolume(const QString &s) {
* If we write the username and password to the secrets file
* we'll therefore have to escape back slashes.
*/
-QString KPPPWidget::encodeWord(const QString &s) {
- QString r = s;
- r.replace(QRegExp("\\"), "\\\\");
+TQString KPPPWidget::encodeWord(const TQString &s) {
+ TQString r = s;
+ r.replace(TQRegExp("\\"), "\\\\");
return r;
}
@@ -1010,21 +1010,21 @@ void KPPPWidget::showNews() {
*/
#define QUICKHELP_HINT "Hint_QuickHelp"
if(gpppdata.readNumConfig(GENERAL_GRP, QUICKHELP_HINT, 0) == 0) {
- QDialog dlg(0, 0, true);
+ TQDialog dlg(0, 0, true);
dlg.setCaption(i18n("Recent Changes in KPPP"));
- QVBoxLayout *tl = new QVBoxLayout(&dlg, 10, 10);
- QHBoxLayout *l1 = new QHBoxLayout(10);
- QVBoxLayout *l2 = new QVBoxLayout(10);
+ TQVBoxLayout *tl = new TQVBoxLayout(&dlg, 10, 10);
+ TQHBoxLayout *l1 = new TQHBoxLayout(10);
+ TQVBoxLayout *l2 = new TQVBoxLayout(10);
tl->addLayout(l1);
- QLabel *icon = new QLabel(&dlg);
+ TQLabel *icon = new TQLabel(&dlg);
icon->setPixmap(BarIcon("exclamation"));
icon->setFixedSize(icon->sizeHint());
l1->addWidget(icon);
l1->addLayout(l2);
- QLabel *l = new QLabel(i18n("From version 1.4.8 on, kppp has a new feature\n"
+ TQLabel *l = new TQLabel(i18n("From version 1.4.8 on, kppp has a new feature\n"
"called \"Quickhelp\". It's similar to a tooltip,\n"
"but you can activate it whenever you want.\n"
"\n"
@@ -1036,15 +1036,15 @@ void KPPPWidget::showNews() {
"To test it, right-click somewhere in this text."),
&dlg);
- QCheckBox *cb = new QCheckBox(i18n("Don't show this hint again"), &dlg);
+ TQCheckBox *cb = new TQCheckBox(i18n("Don't show this hint again"), &dlg);
cb->setFixedSize(cb->sizeHint());
KButtonBox *bbox = new KButtonBox(&dlg);
bbox->addStretch(1);
- QPushButton *ok = bbox->addButton(KStdGuiItem::ok());
+ TQPushButton *ok = bbox->addButton(KStdGuiItem::ok());
ok->setDefault(true);
- dlg.connect(ok, SIGNAL(clicked()),
- &dlg, SLOT(accept()));
+ dlg.connect(ok, TQT_SIGNAL(clicked()),
+ &dlg, TQT_SLOT(accept()));
bbox->addStretch(1);
bbox->layout();
@@ -1052,12 +1052,12 @@ void KPPPWidget::showNews() {
l2->addWidget(cb);
tl->addWidget(bbox);
- QString tmp = i18n("This is an example of <b>QuickHelp</b>.\n"
+ TQString tmp = i18n("This is an example of <b>QuickHelp</b>.\n"
"This window will stay open until you\n"
"click a mouse button or a press a key.\n");
- QWhatsThis::add(cb,tmp);
- QWhatsThis::add(l, tmp);
+ TQWhatsThis::add(cb,tmp);
+ TQWhatsThis::add(l, tmp);
dlg.exec();
if(cb->isChecked()) {
diff --git a/kppp/kpppwidget.h b/kppp/kpppwidget.h
index 9ca88990..55f5b84a 100644
--- a/kppp/kpppwidget.h
+++ b/kppp/kpppwidget.h
@@ -27,7 +27,7 @@
#ifndef __KPPPWIDGET_H__
#define __KPPPWIDGET_H__
-#include <qstring.h>
+#include <tqstring.h>
#include <dcopclient.h>
@@ -50,24 +50,24 @@ class PPPStats;
class KDialogBase;
class KPushButton;
-class SignalEvent : public QEvent {
+class SignalEvent : public TQEvent {
public:
- SignalEvent(int s) : QEvent(User), sig(s) { }
+ SignalEvent(int s) : TQEvent(User), sig(s) { }
int sigType() const { return sig; }
private:
int sig;
};
-class KPPPWidget : public QWidget, virtual public KpppIface {
+class KPPPWidget : public TQWidget, virtual public KpppIface {
Q_OBJECT
public:
- KPPPWidget( QWidget *parent=0, const char *name=0 );
+ KPPPWidget( TQWidget *parent=0, const char *name=0 );
~KPPPWidget();
- void setPW_Edit(const QString &);
- virtual bool eventFilter(QObject *, QEvent *);
+ void setPW_Edit(const TQString &);
+ virtual bool eventFilter(TQObject *, TQEvent *);
void setQuitOnDisconnect (bool b);
bool quitOnDisconnect () {return m_bQuitOnDisconnect;};
@@ -80,8 +80,8 @@ private slots:
void helpbutton();
void setup();
void rulesetLoadError();
- void usernameChanged(const QString &);
- void passwordChanged(const QString &);
+ void usernameChanged(const TQString &);
+ void passwordChanged(const TQString &);
void enterPressedInID();
void enterPressedInPW();
void saveMyself();
@@ -93,8 +93,8 @@ public slots:
void beginConnect();
void resetaccounts();
void resetmodems();
- void resetCosts(const QString &);
- void resetVolume(const QString &);
+ void resetCosts(const TQString &);
+ void resetVolume(const TQString &);
void disconnect();
void log_window_toggled(bool on);
void startAccounting();
@@ -106,10 +106,10 @@ signals:
void cmdl_start();
public:
- QCheckBox *log;
+ TQCheckBox *log;
bool connected;
DebugWidget *debugwindow;
- QString con_speed;
+ TQString con_speed;
ConnectWidget *con;
ConWindow *con_win;
PPPStatsDlg *statdlg;
@@ -122,32 +122,32 @@ private:
void interruptConnection();
void sigChld();
void sigPPPDDied();
- QString encodeWord(const QString &s);
+ TQString encodeWord(const TQString &s);
void showNews ();
void setButtons();
- QString ruleset_load_errmsg;
+ TQString ruleset_load_errmsg;
- QGridLayout *l1;
+ TQGridLayout *l1;
KPushButton *help_b;
KPushButton *setup_b;
- QFrame *fline;
- QFrame *fline1;
- QPushButton *connect_b;
- QComboBox *connectto_c;
- QComboBox *modem_c;
- QLabel *ID_Label;
- QLabel *PW_Label;
- QLineEdit *ID_Edit;
- QLineEdit *PW_Edit;
- QLabel *label1;
- QLabel *label2;
- QLabel *label3;
- QLabel *label4;
- QLabel *label5;
- QLabel *label6;
- QLabel *label7;
- QLabel *radio_label;
+ TQFrame *fline;
+ TQFrame *fline1;
+ TQPushButton *connect_b;
+ TQComboBox *connectto_c;
+ TQComboBox *modem_c;
+ TQLabel *ID_Label;
+ TQLabel *PW_Label;
+ TQLineEdit *ID_Edit;
+ TQLineEdit *PW_Edit;
+ TQLabel *label1;
+ TQLabel *label2;
+ TQLabel *label3;
+ TQLabel *label4;
+ TQLabel *label5;
+ TQLabel *label6;
+ TQLabel *label7;
+ TQLabel *radio_label;
KDialogBase *tabWindow;
@@ -158,15 +158,15 @@ private:
AboutWidget *about;
- QString m_strCmdlAccount;
- QString m_strCmdlModem;
+ TQString m_strCmdlAccount;
+ TQString m_strCmdlModem;
bool m_bQuitOnDisconnect;
bool m_bCmdlAccount;
bool m_bCmdlModem;
bool m_bModemCShown;
- QTimer *disconnectTimer;
+ TQTimer *disconnectTimer;
};
diff --git a/kppp/loginterm.cpp b/kppp/loginterm.cpp
index a0dbd2e2..2aeed5e4 100644
--- a/kppp/loginterm.cpp
+++ b/kppp/loginterm.cpp
@@ -35,8 +35,8 @@
extern KPPPWidget *p_kppp;
-LoginMultiLineEdit::LoginMultiLineEdit(QWidget *parent, const char *name)
- : QMultiLineEdit(parent, name)
+LoginMultiLineEdit::LoginMultiLineEdit(TQWidget *parent, const char *name)
+ : TQMultiLineEdit(parent, name)
{
}
@@ -47,25 +47,25 @@ LoginMultiLineEdit::~LoginMultiLineEdit() {
void LoginMultiLineEdit::insertChar(unsigned char c) {
- QMultiLineEdit::insert(QChar(c));
+ TQMultiLineEdit::insert(TQChar(c));
p_kppp->debugwindow->addChar(c);
}
void LoginMultiLineEdit::myreturn() {
- QMultiLineEdit::home();
+ TQMultiLineEdit::home();
}
void LoginMultiLineEdit::mynewline() {
- QMultiLineEdit::end(FALSE);
- QMultiLineEdit::newLine();
+ TQMultiLineEdit::end(FALSE);
+ TQMultiLineEdit::newLine();
p_kppp->debugwindow->addChar('\n');
}
-void LoginMultiLineEdit::keyPressEvent(QKeyEvent *k) {
+void LoginMultiLineEdit::keyPressEvent(TQKeyEvent *k) {
unsigned char c = (unsigned char) k->ascii();
if ((int)c == 0) return;
@@ -93,17 +93,17 @@ void LoginMultiLineEdit::readChar(unsigned char c) {
}
-LoginTerm::LoginTerm (QWidget *parent, const char *name)
- : QDialog(parent, name, FALSE)
+LoginTerm::LoginTerm (TQWidget *parent, const char *name)
+ : TQDialog(parent, name, FALSE)
{
setCaption(i18n("Login Terminal Window"));
setMinimumSize(300, 200);
setMaximumSize(600, 400);
resize(400, 300);
- QVBoxLayout *tl = new QVBoxLayout(this, 2);
- QGridLayout *vgr = new QGridLayout(2, 1);
- QGridLayout *hgr = new QGridLayout(1, 2, 30);
+ TQVBoxLayout *tl = new TQVBoxLayout(this, 2);
+ TQGridLayout *vgr = new TQGridLayout(2, 1);
+ TQGridLayout *hgr = new TQGridLayout(1, 2, 30);
tl->addLayout(vgr);
vgr->addLayout(hgr, 1, 0);
@@ -116,11 +116,11 @@ LoginTerm::LoginTerm (QWidget *parent, const char *name)
cancel_b = new KPushButton(KStdGuiItem::cancel(), this, "cancel");
cancel_b->setFixedHeight(25);
- connect(cancel_b, SIGNAL(clicked()), SLOT(cancelbutton()));
+ connect(cancel_b, TQT_SIGNAL(clicked()), TQT_SLOT(cancelbutton()));
continue_b = new KPushButton(KStdGuiItem::cont(), this, "continue");
continue_b->setFixedHeight(25);
- connect(continue_b, SIGNAL(clicked()), SLOT(continuebutton()));
+ connect(continue_b, TQT_SIGNAL(clicked()), TQT_SLOT(continuebutton()));
int mwidth;
if (cancel_b->sizeHint().width() > continue_b->sizeHint().width())
@@ -136,7 +136,7 @@ LoginTerm::LoginTerm (QWidget *parent, const char *name)
cont = false;
- Modem::modem->notify(text_window, SLOT(readChar(unsigned char)));
+ Modem::modem->notify(text_window, TQT_SLOT(readChar(unsigned char)));
}
diff --git a/kppp/loginterm.h b/kppp/loginterm.h
index 1fa3f05d..1b8a0cc3 100644
--- a/kppp/loginterm.h
+++ b/kppp/loginterm.h
@@ -1,21 +1,21 @@
#ifndef _LOGINTERM_H_
#define _LOGINTERM_H_
-#include <qdialog.h>
-#include <qmultilineedit.h>
-#include <qapplication.h>
-#include <qtimer.h>
+#include <tqdialog.h>
+#include <tqmultilineedit.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
-class LoginMultiLineEdit : public QMultiLineEdit {
+class LoginMultiLineEdit : public TQMultiLineEdit {
Q_OBJECT
public:
- LoginMultiLineEdit(QWidget *parent, const char *name);
+ LoginMultiLineEdit(TQWidget *parent, const char *name);
~LoginMultiLineEdit();
- void keyPressEvent(QKeyEvent *k);
+ void keyPressEvent(TQKeyEvent *k);
void insertChar(unsigned char c);
void myreturn();
void mynewline();
@@ -25,10 +25,10 @@ public slots:
};
-class LoginTerm : public QDialog {
+class LoginTerm : public TQDialog {
Q_OBJECT
public:
- LoginTerm(QWidget *parent, const char *name);
+ LoginTerm(TQWidget *parent, const char *name);
bool pressedContinue();
@@ -38,8 +38,8 @@ public slots:
private:
LoginMultiLineEdit *text_window;
- QPushButton *cancel_b;
- QPushButton *continue_b;
+ TQPushButton *cancel_b;
+ TQPushButton *continue_b;
bool cont;
};
diff --git a/kppp/logview/export.cpp b/kppp/logview/export.cpp
index 7f810a6a..14c614c4 100644
--- a/kppp/logview/export.cpp
+++ b/kppp/logview/export.cpp
@@ -22,17 +22,17 @@
#include "export.h"
-#include <qpushbutton.h>
-#include <qtextcodec.h>
+#include <tqpushbutton.h>
+#include <tqtextcodec.h>
class Export;
/***** ExportFormats *****/
static struct {
int id;
- QString name;
- QString desc;
- QString ext;
+ TQString name;
+ TQString desc;
+ TQString ext;
}
ExportFormats [] = {
@@ -47,7 +47,7 @@ ExportFormats [] = {
/***** ExportWizard *****/
-ExportWizard::ExportWizard(QWidget *parent, const QString &_date)
+ExportWizard::ExportWizard(TQWidget *parent, const TQString &_date)
: KWizard(parent, "", true) {
date = _date;
@@ -56,13 +56,13 @@ ExportWizard::ExportWizard(QWidget *parent, const QString &_date)
setCaption(i18n("Export Wizard for kPPP Logs"));
/* format-page */
- formatPage = new QWidget();
- QHBoxLayout *formatLayout = new QHBoxLayout(formatPage);
+ formatPage = new TQWidget();
+ TQHBoxLayout *formatLayout = new TQHBoxLayout(formatPage);
- typeList = new QListBox(formatPage);
- connect(typeList, SIGNAL(highlighted(int)), SLOT (typeHighlighted(int)));
+ typeList = new TQListBox(formatPage);
+ connect(typeList, TQT_SIGNAL(highlighted(int)), TQT_SLOT (typeHighlighted(int)));
typeList->setMinimumSize(50, 200);
- QToolTip::add(typeList, i18n("List with possible output formats"));
+ TQToolTip::add(typeList, i18n("List with possible output formats"));
int i=0;
while (ExportFormats[i].id) { // add each format to the list
typeList->insertItem(i18n(ExportFormats[i].name.utf8()));
@@ -72,7 +72,7 @@ ExportWizard::ExportWizard(QWidget *parent, const QString &_date)
formatLayout->addWidget(typeList);
formatLayout->addSpacing(10);
- typeInfo = new QLabel(formatPage);
+ typeInfo = new TQLabel(formatPage);
typeInfo->setAlignment(Qt::AlignTop | Qt::WordBreak);
typeInfo->setText(i18n("<qt><b>Please choose the output format on the left side.</b></qt>"));
typeInfo->setMinimumSize(350, 200);
@@ -82,25 +82,25 @@ ExportWizard::ExportWizard(QWidget *parent, const QString &_date)
/* filename-page */
- filenamePage = new QWidget();
- QVBoxLayout *filenameLayout = new QVBoxLayout( filenamePage );
+ filenamePage = new TQWidget();
+ TQVBoxLayout *filenameLayout = new TQVBoxLayout( filenamePage );
- QLabel *fnLbl = new QLabel(filenamePage);
+ TQLabel *fnLbl = new TQLabel(filenamePage);
fnLbl->setText(i18n("Filename:"));
filenameLayout->addWidget(fnLbl);
- fnLine = new QLineEdit(filenamePage);
+ fnLine = new TQLineEdit(filenamePage);
fnLine->setText(i18n("[No file selected]"));
fnLine->setReadOnly(true);
filenameLayout->addWidget(fnLine);
filenameLayout->addStretch(1);
- fnGet = new QPushButton(filenamePage);
+ fnGet = new TQPushButton(filenamePage);
fnGet->setText(i18n("&Select File..."));
fnGet->setMaximumWidth(200);
- QToolTip::add(fnGet, i18n("Select the filename of the exported output file"));
+ TQToolTip::add(fnGet, i18n("Select the filename of the exported output file"));
filenameLayout->addWidget(fnGet);
- connect(fnGet, SIGNAL(clicked()), SLOT(getFilename()));
+ connect(fnGet, TQT_SIGNAL(clicked()), TQT_SLOT(getFilename()));
filenameLayout->addStretch(2);
addPage(filenamePage, i18n("Selection of Filename"));
@@ -131,7 +131,7 @@ void ExportWizard::getFilename() {
if ( i == -1 )
return;
// prepare filter: e.g.: HTML (*.html *.HTML)
- QString filter = "*." + ExportFormats[i].ext + " *." + ExportFormats[i].ext.upper() + "|" +
+ TQString filter = "*." + ExportFormats[i].ext + " *." + ExportFormats[i].ext.upper() + "|" +
i18n(ExportFormats[i].name.utf8()) + " (*." + ExportFormats[i].ext + " *." +
ExportFormats[i].ext.upper() + ")";
@@ -144,7 +144,7 @@ void ExportWizard::getFilename() {
void ExportWizard::reject() {
hide();
- filename = QString::null;
+ filename = TQString::null;
}
void ExportWizard::accept() {
@@ -154,7 +154,7 @@ void ExportWizard::accept() {
/***** Export *****/
-Export::Export(const QString &_filename)
+Export::Export(const TQString &_filename)
: filename(_filename),
buffer("")
{
@@ -179,24 +179,24 @@ bool Export::closeFile() {
/***** CSVExport *****/
-CSVExport::CSVExport(const QString &filename, const QString &_separator)
+CSVExport::CSVExport(const TQString &filename, const TQString &_separator)
: Export(filename),
separator(_separator)
{
}
-void CSVExport::addHeadline(const QString &a, const QString &b,
- const QString &c, const QString &d,
- const QString &e, const QString &f,
- const QString &g, const QString &h) {
+void CSVExport::addHeadline(const TQString &a, const TQString &b,
+ const TQString &c, const TQString &d,
+ const TQString &e, const TQString &f,
+ const TQString &g, const TQString &h) {
// no especially style
addDataline(a, b, c, d, e, f, g, h);
}
-void CSVExport::addDataline(const QString &a, const QString &b,
- const QString &c, const QString &d,
- const QString &e, const QString &f,
- const QString &g, const QString &h) {
+void CSVExport::addDataline(const TQString &a, const TQString &b,
+ const TQString &c, const TQString &d,
+ const TQString &e, const TQString &f,
+ const TQString &g, const TQString &h) {
buffer+=a + separator +
b + separator +
c + separator +
@@ -217,14 +217,14 @@ void CSVExport::setFinishCode() {
/***** HTMLExport *****/
-HTMLExport::HTMLExport(const QString &filename, const QString &date)
+HTMLExport::HTMLExport(const TQString &filename, const TQString &date)
: Export(filename) {
- QString title = i18n("Connection log for %1").arg(date);
+ TQString title = i18n("Connection log for %1").arg(date);
buffer = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
buffer.append("<html>\n<head>\n <title>"+title+"</title>\n");
- buffer.append(QString::fromLatin1(" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=")
- + QTextCodec::codecForLocale()->mimeName() +
- QString::fromLatin1("\">"));
+ buffer.append(TQString::fromLatin1(" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=")
+ + TQTextCodec::codecForLocale()->mimeName() +
+ TQString::fromLatin1("\">"));
buffer.append("\n</head>\n<body>\n<h1>"+title+"</h1>\n\n");
buffer.append("<table width=\"100%\" border=\"1\">\n");
@@ -234,13 +234,13 @@ HTMLExport::HTMLExport(const QString &filename, const QString &date)
tdEndCode = "</td>";
}
-void HTMLExport::addHeadline(const QString &a, const QString &b,
- const QString &c, const QString &d,
- const QString &e, const QString &f,
- const QString &g, const QString &h) {
+void HTMLExport::addHeadline(const TQString &a, const TQString &b,
+ const TQString &c, const TQString &d,
+ const TQString &e, const TQString &f,
+ const TQString &g, const TQString &h) {
// simply bold font
- QString bak1 = tdStartCode; tdStartCode.append("<b>");
- QString bak2 = tdEndCode; tdEndCode.prepend("</b>");
+ TQString bak1 = tdStartCode; tdStartCode.append("<b>");
+ TQString bak2 = tdEndCode; tdEndCode.prepend("</b>");
addDataline(a, b, c, d, e, f, g, h);
@@ -249,10 +249,10 @@ void HTMLExport::addHeadline(const QString &a, const QString &b,
tdEndCode = bak2;
}
-void HTMLExport::addDataline(const QString &a, const QString &b,
- const QString &c, const QString &d,
- const QString &e, const QString &f,
- const QString &g, const QString &h) {
+void HTMLExport::addDataline(const TQString &a, const TQString &b,
+ const TQString &c, const TQString &d,
+ const TQString &e, const TQString &f,
+ const TQString &g, const TQString &h) {
buffer+= trStartCode +
tdStartCode + a + tdEndCode +
tdStartCode + b + tdEndCode +
diff --git a/kppp/logview/export.h b/kppp/logview/export.h
index f192e7d5..3c601e96 100644
--- a/kppp/logview/export.h
+++ b/kppp/logview/export.h
@@ -23,13 +23,13 @@
#ifndef KPPPEXPORT_H
#define KPPPEXPORT_H
-#include <qwidget.h>
-#include <qfile.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qlistbox.h>
-#include <qlineedit.h>
-#include <qtooltip.h>
+#include <tqwidget.h>
+#include <tqfile.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqlistbox.h>
+#include <tqlineedit.h>
+#include <tqtooltip.h>
#include <kwizard.h>
#include <klocale.h>
@@ -41,11 +41,11 @@ class Export;
class ExportWizard : public KWizard {
Q_OBJECT
public:
- ExportWizard(QWidget *parent, const QString &_date);
+ ExportWizard(TQWidget *parent, const TQString &_date);
Export *createExportFilter();
int filterID;
- QString filename;
+ TQString filename;
public slots:
void typeHighlighted(int);
@@ -55,15 +55,15 @@ public slots:
void reject();
private:
- QWidget *formatPage;
- QListBox *typeList;
- QLabel *typeInfo;
+ TQWidget *formatPage;
+ TQListBox *typeList;
+ TQLabel *typeInfo;
- QWidget *filenamePage;
- QLineEdit *fnLine;
- QPushButton *fnGet;
+ TQWidget *filenamePage;
+ TQLineEdit *fnLine;
+ TQPushButton *fnGet;
- QString date;
+ TQString date;
};
@@ -71,68 +71,68 @@ private:
class Export {
public:
Export();
- Export(const QString &filename);
+ Export(const TQString &filename);
virtual ~Export();
bool openFile();
bool closeFile();
- virtual void addHeadline(const QString &a, const QString &b,
- const QString &c, const QString &d,
- const QString &e, const QString &f,
- const QString &g, const QString &h) = 0;
- virtual void addDataline(const QString &a, const QString &b,
- const QString &c, const QString &d,
- const QString &e, const QString &f,
- const QString &g, const QString &h) = 0;
+ virtual void addHeadline(const TQString &a, const TQString &b,
+ const TQString &c, const TQString &d,
+ const TQString &e, const TQString &f,
+ const TQString &g, const TQString &h) = 0;
+ virtual void addDataline(const TQString &a, const TQString &b,
+ const TQString &c, const TQString &d,
+ const TQString &e, const TQString &f,
+ const TQString &g, const TQString &h) = 0;
virtual void addEmptyLine() = 0;
virtual void setFinishCode() = 0;
protected:
- QFile file;
- QString filename;
- QString buffer;
+ TQFile file;
+ TQString filename;
+ TQString buffer;
};
/***** CSVExport *****/
class CSVExport : public Export {
public:
- CSVExport(const QString &filename, const QString &separator);
- virtual void addHeadline(const QString &a, const QString &b,
- const QString &c, const QString &d,
- const QString &e, const QString &f,
- const QString &g, const QString &h);
- virtual void addDataline(const QString &a, const QString &b,
- const QString &c, const QString &d,
- const QString &e, const QString &f,
- const QString &g, const QString &h);
+ CSVExport(const TQString &filename, const TQString &separator);
+ virtual void addHeadline(const TQString &a, const TQString &b,
+ const TQString &c, const TQString &d,
+ const TQString &e, const TQString &f,
+ const TQString &g, const TQString &h);
+ virtual void addDataline(const TQString &a, const TQString &b,
+ const TQString &c, const TQString &d,
+ const TQString &e, const TQString &f,
+ const TQString &g, const TQString &h);
virtual void addEmptyLine();
virtual void setFinishCode();
private:
- QString separator;
+ TQString separator;
};
/***** HTMLExport *****/
class HTMLExport : public Export {
public:
- HTMLExport(const QString &filename, const QString &date);
- virtual void addHeadline(const QString &a, const QString &b,
- const QString &c, const QString &d,
- const QString &e, const QString &f,
- const QString &g, const QString &h);
- virtual void addDataline(const QString &a, const QString &b,
- const QString &c, const QString &d,
- const QString &e, const QString &f,
- const QString &g, const QString &h);
+ HTMLExport(const TQString &filename, const TQString &date);
+ virtual void addHeadline(const TQString &a, const TQString &b,
+ const TQString &c, const TQString &d,
+ const TQString &e, const TQString &f,
+ const TQString &g, const TQString &h);
+ virtual void addDataline(const TQString &a, const TQString &b,
+ const TQString &c, const TQString &d,
+ const TQString &e, const TQString &f,
+ const TQString &g, const TQString &h);
virtual void addEmptyLine();
virtual void setFinishCode();
private:
- QString trStartCode;
- QString trEndCode;
- QString tdStartCode;
- QString tdEndCode;
+ TQString trStartCode;
+ TQString trEndCode;
+ TQString tdStartCode;
+ TQString tdEndCode;
};
#endif
diff --git a/kppp/logview/log.cpp b/kppp/logview/log.cpp
index b0251d53..93be0098 100644
--- a/kppp/logview/log.cpp
+++ b/kppp/logview/log.cpp
@@ -23,37 +23,37 @@
#include <stdlib.h>
#include <stdio.h>
-#include <qprogressdialog.h>
-#include <qdir.h>
+#include <tqprogressdialog.h>
+#include <tqdir.h>
#include <kapplication.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include <kdebug.h>
-QPtrList<LogInfo> logList;
-QProgressDialog *dlg;
+TQPtrList<LogInfo> logList;
+TQProgressDialog *dlg;
int loadLogs() {
int logsize = 0;
- QString logdirname = locateLocal("data", "kppp/Log/");
- QDir logdir(logdirname, "*.log");
+ TQString logdirname = locateLocal("data", "kppp/Log/");
+ TQDir logdir(logdirname, "*.log");
kdDebug(5002) << "logdirname: " << logdirname << endl;
// get log file size
const QFileInfoList *list = logdir.entryInfoList();
QFileInfoListIterator it( *list );
- QFileInfo *fi;
+ TQFileInfo *fi;
while ((fi = it.current()) != 0) {
logsize += fi->size();
++it;
}
- dlg = new QProgressDialog(i18n("Loading log files"),
- QString::null,
+ dlg = new TQProgressDialog(i18n("Loading log files"),
+ TQString::null,
logsize);
dlg->setProgress(0);
@@ -71,11 +71,11 @@ int loadLogs() {
return retval;
}
-int loadLog(QString fname) {
+int loadLog(TQString fname) {
FILE *f;
int warning=0;
- f = fopen(QFile::encodeName(fname), "r");
+ f = fopen(TQFile::encodeName(fname), "r");
if(f == NULL)
return 1;
diff --git a/kppp/logview/log.h b/kppp/logview/log.h
index 2297bd63..d8fa15cd 100644
--- a/kppp/logview/log.h
+++ b/kppp/logview/log.h
@@ -22,19 +22,19 @@
#define __LOG__H__
#include "loginfo.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
-typedef QPtrList<LogInfo> QLogInfoBase;
-typedef QPtrListIterator<LogInfo> QLogInfoIterator;
+typedef TQPtrList<LogInfo> QLogInfoBase;
+typedef TQPtrListIterator<LogInfo> QLogInfoIterator;
class QLogList : public QLogInfoBase {
public:
virtual int compareItems(Item, Item);
};
-extern QPtrList<LogInfo> logList;
+extern TQPtrList<LogInfo> logList;
int loadLogs();
-int loadLog(QString);
+int loadLog(TQString);
#endif
diff --git a/kppp/logview/loginfo.cpp b/kppp/logview/loginfo.cpp
index 9544f389..321ce7c5 100644
--- a/kppp/logview/loginfo.cpp
+++ b/kppp/logview/loginfo.cpp
@@ -33,27 +33,27 @@
char *mystrsep (char **stringp, const char *delim);
-LogInfo::LogInfo(QCString data) {
+LogInfo::LogInfo(TQCString data) {
parse(data);
}
-QDateTime LogInfo::from() const {
- QDateTime tm;
+TQDateTime LogInfo::from() const {
+ TQDateTime tm;
tm.setTime_t(_from);
return tm;
}
-QDateTime LogInfo::until() const {
- QDateTime tm;
+TQDateTime LogInfo::until() const {
+ TQDateTime tm;
tm.setTime_t(_until);
return tm;
}
-QString LogInfo::connectionName() const {
+TQString LogInfo::connectionName() const {
return _conname;
}
-QString LogInfo::currency() const {
+TQString LogInfo::currency() const {
return _currency;
}
@@ -84,7 +84,7 @@ int LogInfo::error() const {
return errorfield;
}
-void LogInfo::parse(QCString s) {
+void LogInfo::parse(TQCString s) {
errorfield = 0;
char *c = (char *)malloc(s.length() + 1), *csep;
strcpy(c, s);
@@ -101,7 +101,7 @@ void LogInfo::parse(QCString s) {
char *p = mystrsep(&csep, ":");
int i = 0;
while(i < 8 && p != 0) {
- QString token = QString::fromLocal8Bit(p);
+ TQString token = TQString::fromLocal8Bit(p);
switch(i) {
case 0:
diff --git a/kppp/logview/loginfo.h b/kppp/logview/loginfo.h
index 6e1fa7fc..de4b79fc 100644
--- a/kppp/logview/loginfo.h
+++ b/kppp/logview/loginfo.h
@@ -22,22 +22,22 @@
#define __LOGINFO__H__
#define MYDEBUG
-#include <qdatetime.h>
-#include <qstring.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
#include <time.h>
class LogInfo {
public:
- LogInfo(QCString data);
+ LogInfo(TQCString data);
int error() const;
- QDateTime from() const;
+ TQDateTime from() const;
time_t from_t() const { return _from; }
- QDateTime until() const;
+ TQDateTime until() const;
int duration() const;
- QString connectionName() const;
- QString currency() const;
+ TQString connectionName() const;
+ TQString currency() const;
double sessionCosts() const;
double totalCosts() const;
double bytesIn() const;
@@ -49,12 +49,12 @@ public:
#endif
private:
- void parse(QCString );
+ void parse(TQCString );
int errorfield;
time_t _from, _until;
- QString _conname, _currency;
+ TQString _conname, _currency;
double _session_cost, _total_cost;
double _bytes_in, _bytes_out;
};
diff --git a/kppp/logview/main.cpp b/kppp/logview/main.cpp
index ae877158..a533da38 100644
--- a/kppp/logview/main.cpp
+++ b/kppp/logview/main.cpp
@@ -55,11 +55,11 @@ TopWidget::TopWidget() : KMainWindow(0, "") {
setCaption(i18n("KPPP Log Viewer"));
- w = new QWidget(this);
+ w = new TQWidget(this);
- QBoxLayout *l = new QVBoxLayout(w, 5);
+ TQBoxLayout *l = new TQVBoxLayout(w, 5);
- td = new QTabWidget(w, "");
+ td = new TQTabWidget(w, "");
mw = new MonthlyWidget(td);
td->addTab(mw, i18n("Monthly Log"));
l->addWidget(td);
@@ -68,22 +68,22 @@ TopWidget::TopWidget() : KMainWindow(0, "") {
if(!kpppmode) {
// create menu
mb = new KMenuBar(this);
- QPopupMenu *fm = new QPopupMenu;
+ TQPopupMenu *fm = new QPopupMenu;
fm->insertItem(SmallIcon("exit"),KStdGuiItem::quit().text(), F_EXIT);
mb->insertItem(i18n("&File"), fm);
mb->setAccel(CTRL + Key_Q, F_EXIT);
- connect(mb, SIGNAL(activated(int)),
- this, SLOT(menuCallback(int)));
+ connect(mb, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(menuCallback(int)));
} else {
mb = 0;
- QPushButton *but = new KPushButton(KStdGuiItem::close(),w);
- QHBoxLayout *lh = new QHBoxLayout(l);
+ TQPushButton *but = new KPushButton(KStdGuiItem::close(),w);
+ TQHBoxLayout *lh = new TQHBoxLayout(l);
lh->addStretch(10);
lh->addWidget(but);
- connect(but, SIGNAL(clicked()),
- kapp, SLOT(quit()));
+ connect(but, TQT_SIGNAL(clicked()),
+ kapp, TQT_SLOT(quit()));
}
setMinimumSize(mw->sizeHint().width() + 15,
diff --git a/kppp/logview/main.h b/kppp/logview/main.h
index bb833a0f..db7ca8da 100644
--- a/kppp/logview/main.h
+++ b/kppp/logview/main.h
@@ -22,7 +22,7 @@
#define __MAIN__H__
#include <kmainwindow.h>
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#include <kmenubar.h>
#include "monthly.h"
@@ -38,8 +38,8 @@ private slots:
private:
MonthlyWidget *mw;
KMenuBar *mb;
- QWidget *w;
- QTabWidget *td;
+ TQWidget *w;
+ TQTabWidget *td;
};
#endif
diff --git a/kppp/logview/monthly.cpp b/kppp/logview/monthly.cpp
index b9aac7d3..904f2800 100644
--- a/kppp/logview/monthly.cpp
+++ b/kppp/logview/monthly.cpp
@@ -18,10 +18,10 @@
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qpainter.h>
-#include <qcombobox.h>
-#include <qfile.h>
-#include <qheader.h>
+#include <tqpainter.h>
+#include <tqcombobox.h>
+#include <tqfile.h>
+#include <tqheader.h>
#include <kcalendarsystem.h>
#include <klocale.h>
@@ -32,9 +32,9 @@
#include "monthly.h"
#include "export.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
-static void formatBytes(double bytes, QString &result) {
+static void formatBytes(double bytes, TQString &result) {
if(bytes < 1024)
result.setNum(bytes);
else if(bytes < 1024*1024)
@@ -43,11 +43,11 @@ static void formatBytes(double bytes, QString &result) {
result = i18n("%1 MB").arg(KGlobal::locale()->formatNumber((float)bytes / 1024.0 / 1024.0, 1));
}
-static void formatBytesMonth(double bytes, QString &result) {
+static void formatBytesMonth(double bytes, TQString &result) {
int day, days;
- day = QDate::currentDate().day();
- days = QDate::currentDate().daysInMonth();
+ day = TQDate::currentDate().day();
+ days = TQDate::currentDate().daysInMonth();
bytes = (bytes / day) * days;
@@ -59,8 +59,8 @@ static void formatBytesMonth(double bytes, QString &result) {
result = i18n("%1 MB").arg(KGlobal::locale()->formatNumber((float)bytes / 1024.0 / 1024.0, 1));
}
-static void formatDuration(int seconds, QString &result) {
- QString sec;
+static void formatDuration(int seconds, TQString &result) {
+ TQString sec;
sec.sprintf("%02d", seconds%60);
if(seconds < 60)
result = i18n("%1s").arg(sec);
@@ -73,15 +73,15 @@ static void formatDuration(int seconds, QString &result) {
.arg(sec);
}
-static void formatDurationMonth(int seconds, QString &result) {
+static void formatDurationMonth(int seconds, TQString &result) {
int day, days;
- day = QDate::currentDate().day();
- days = QDate::currentDate().daysInMonth();
+ day = TQDate::currentDate().day();
+ days = TQDate::currentDate().daysInMonth();
seconds = (seconds / day) * days;
- QString sec;
+ TQString sec;
sec.sprintf("%02d", seconds%60);
if(seconds < 60)
result = i18n("%1s").arg(sec);
@@ -97,37 +97,37 @@ static void formatDurationMonth(int seconds, QString &result) {
static void costsMonth(double costs, double &result) {
int day, days;
- day = QDate::currentDate().day();
- days = QDate::currentDate().daysInMonth();
+ day = TQDate::currentDate().day();
+ days = TQDate::currentDate().daysInMonth();
result = (costs / day) * days;
}
-class LogListItem : public QListViewItem {
+class LogListItem : public TQListViewItem {
public:
LogListItem(LogInfo *l,
- QListView * parent,
- QString s1, QString s2,
- QString s3, QString s4,
- QString s5, QString s6,
- QString s7, QString s8)
- : QListViewItem(parent, s1, s2, s3, s4, s5, s6, s7, s8),
+ TQListView * parent,
+ TQString s1, TQString s2,
+ TQString s3, TQString s4,
+ TQString s5, TQString s6,
+ TQString s7, TQString s8)
+ : TQListViewItem(parent, s1, s2, s3, s4, s5, s6, s7, s8),
li(l)
{
}
- virtual void paintCell( QPainter *p, const QColorGroup & cg,
+ virtual void paintCell( TQPainter *p, const TQColorGroup & cg,
int column, int width, int alignment );
- virtual QString key(int, bool) const;
+ virtual TQString key(int, bool) const;
LogInfo *li;
};
-void LogListItem::paintCell( QPainter *p, const QColorGroup & cg,
+void LogListItem::paintCell( TQPainter *p, const TQColorGroup & cg,
int column, int width, int alignment )
{
- QListViewItem::paintCell(p, cg, column, width, alignment);
+ TQListViewItem::paintCell(p, cg, column, width, alignment);
// double line above sum
//if(!li) {
@@ -136,12 +136,12 @@ void LogListItem::paintCell( QPainter *p, const QColorGroup & cg,
//}
}
-QString LogListItem::key(int c, bool ascending) const
+TQString LogListItem::key(int c, bool ascending) const
{
if (!li) // we want the sum to be always at the bottom
return ascending ? "z" : " ";
- QString k;
+ TQString k;
switch (c) {
case 0:
k = li->connectionName();
@@ -167,8 +167,8 @@ QString LogListItem::key(int c, bool ascending) const
return k;
}
-MonthlyWidget::MonthlyWidget(QWidget *parent) :
- QWidget(parent)
+MonthlyWidget::MonthlyWidget(TQWidget *parent) :
+ TQWidget(parent)
{
tl = 0;
@@ -194,9 +194,9 @@ MonthlyWidget::MonthlyWidget(QWidget *parent) :
lv->setSorting(1);
lv->setMinimumWidth(180);
lv->setMinimumHeight(280);
- lv->setSelectionMode(QListView::Extended);
+ lv->setSelectionMode(TQListView::Extended);
selectionItem = 0L;
- connect(lv, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged()));
+ connect(lv, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelectionChanged()));
lv2 = new KListView(this);
lv2->addColumn(i18n("Connection"));
@@ -212,21 +212,21 @@ MonthlyWidget::MonthlyWidget(QWidget *parent) :
lv2->setSorting(-1);
lv2->setItemMargin(2);
lv2->setMaximumHeight(100);
- lv2->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
- lv2->setSelectionMode(QListView::NoSelection);
+ lv2->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum);
+ lv2->setSelectionMode(TQListView::NoSelection);
- title = new QLabel("X", this);
- QFont f = title->font();
+ title = new TQLabel("X", this);
+ TQFont f = title->font();
f.setPointSize(f.pointSize() + 2);
f.setBold(TRUE);
title->setFont(f);
title->setFixedHeight(title->sizeHint().height()*2);
- cboConnections = new QComboBox(false, this); // add a combo box to select connections
+ cboConnections = new TQComboBox(false, this); // add a combo box to select connections
cboConnections->setMaximumWidth(200); // a resonable size
cboConnections->insertItem(i18n("All Connections")); // default to all connections
- connect(cboConnections, SIGNAL(activated(int)),
- this, SLOT(slotConnections(int)));
+ connect(cboConnections, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotConnections(int)));
bbox = new KButtonBox(this, Qt::Vertical);
prev = bbox->addButton(i18n("&Prev Month"));
@@ -236,14 +236,14 @@ MonthlyWidget::MonthlyWidget(QWidget *parent) :
bbox->addStretch(1);
exportBttn = bbox->addButton(i18n("&Export..."));
- connect(prev, SIGNAL(released()),
- this, SLOT(prevMonth()));
- connect(next, SIGNAL(released()),
- this, SLOT(nextMonth()));
- connect(today, SIGNAL(released()),
- this, SLOT(currentMonth()));
- connect(exportBttn, SIGNAL(clicked()),
- this, SLOT(exportWizard()));
+ connect(prev, TQT_SIGNAL(released()),
+ this, TQT_SLOT(prevMonth()));
+ connect(next, TQT_SIGNAL(released()),
+ this, TQT_SLOT(nextMonth()));
+ connect(today, TQT_SIGNAL(released()),
+ this, TQT_SLOT(currentMonth()));
+ connect(exportBttn, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(exportWizard()));
bbox->addStretch(8);
bbox->layout();
@@ -256,12 +256,12 @@ void MonthlyWidget::layoutWidget() {
if(tl)
delete tl;
- tl = new QGridLayout(this, 1, 1, 11, 16, "MainLayout");
+ tl = new TQGridLayout(this, 1, 1, 11, 16, "MainLayout");
tl->addWidget(title, 0, 0);
tl->addWidget(cboConnections, 0, 1);
- QLabel *l = new QLabel(this);
+ TQLabel *l = new TQLabel(this);
l->setText(i18n("Statistics:"));
- QFont f2 = l->font();
+ TQFont f2 = l->font();
f2.setPointSize(f2.pointSize() + 1);
f2.setBold(TRUE);
l->setFont(f2);
@@ -275,13 +275,13 @@ void MonthlyWidget::layoutWidget() {
tl->activate();
}
-int bestlen(QWidget *w, const char *s) {
+int bestlen(TQWidget *w, const char *s) {
return w->fontMetrics().boundingRect(s).width() + 8;
}
void MonthlyWidget::plotMonth() {
// name of the current connection
- QString con;
+ TQString con;
// for collecting monthly statistics
int count = 0;
@@ -293,12 +293,12 @@ void MonthlyWidget::plotMonth() {
lv2->clear();
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
- QDate startDate = periodeFirst();
+ TQDate startDate = periodeFirst();
for(int i = 0; i < (int)logList.count(); i++) {
LogInfo *li = logList.at(i);
- QDate logDate = li->from().date();
+ TQDate logDate = li->from().date();
if ( periodeFirst() <= logDate && periodeLast() >= logDate ) {
// get connection name for this line
con = li->connectionName();
@@ -330,7 +330,7 @@ void MonthlyWidget::plotMonth() {
duration += li->from().secsTo(li->until());
- QString _bin, _bout, b;
+ TQString _bin, _bout, b;
if(li->bytesIn() >= 0)
formatBytes(li->bytesIn(), _bin);
else
@@ -346,14 +346,14 @@ void MonthlyWidget::plotMonth() {
else
b = i18n("n/a");
- QString day;
+ TQString day;
day.sprintf("%2d", li->from().date().day());
- QString s_duration;
+ TQString s_duration;
formatDuration(li->from().secsTo(li->until()),
s_duration);
- QString s_lifrom, s_liuntil, s_costs;
+ TQString s_lifrom, s_liuntil, s_costs;
s_lifrom = KGlobal::locale()->formatTime(li->from().time(), false);
s_liuntil = KGlobal::locale()->formatTime(li->until().time(), false);
s_costs = KGlobal::locale()->formatMoney(li->sessionCosts());
@@ -363,7 +363,7 @@ void MonthlyWidget::plotMonth() {
}
if(count) {
- QString _bin, _bout, _b;
+ TQString _bin, _bout, _b;
if(bin < 0)
_bin = i18n("n/a");
@@ -380,25 +380,25 @@ void MonthlyWidget::plotMonth() {
else
formatBytes(bout + bin, _b);
- QString s_duration;
+ TQString s_duration;
formatDuration(duration,
s_duration);
- QString s_costs(KGlobal::locale()->formatMoney(costs, QString::null, 2));
+ TQString s_costs(KGlobal::locale()->formatMoney(costs, TQString::null, 2));
selectionItem = new LogListItem(0, lv2,
i18n("Selection (%n connection)", "Selection (%n connections)", 0),
- QString::null, QString::null, QString::null,
- QString::null, QString::null, QString::null, QString::null);
+ TQString::null, TQString::null, TQString::null,
+ TQString::null, TQString::null, TQString::null, TQString::null);
(void) new LogListItem(0, lv2,
i18n("%n connection", "%n connections", count),
- s_duration, s_costs, _bin, _bout, QString::null, QString::null, QString::null);
+ s_duration, s_costs, _bin, _bout, TQString::null, TQString::null, TQString::null);
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
- if(calendar->month(periodeFirst()) == calendar->month(QDate::currentDate())) {
+ if(calendar->month(periodeFirst()) == calendar->month(TQDate::currentDate())) {
- QString m_bin, m_bout;
+ TQString m_bin, m_bout;
if(bin < 0)
_bin = i18n("n/a");
@@ -410,19 +410,19 @@ void MonthlyWidget::plotMonth() {
else
formatBytesMonth(bout, m_bout);
- QString m_duration;
+ TQString m_duration;
formatDurationMonth(duration, m_duration);
costsMonth(costs, costs);
- QString m_costs(KGlobal::locale()->formatMoney(costs, QString::null, 2));
+ TQString m_costs(KGlobal::locale()->formatMoney(costs, TQString::null, 2));
- (void) new QListViewItem(lv2, selectionItem,
+ (void) new TQListViewItem(lv2, selectionItem,
i18n("Monthly estimates"), m_duration, m_costs, m_bin, m_bout,
- QString::null, QString::null, QString::null);
+ TQString::null, TQString::null, TQString::null);
}
}
- QString t;
+ TQString t;
if(lv->childCount() > 0) {
exportBttn->setEnabled(true); // export possibility
t = i18n("Connection log for %1 %2")
@@ -456,7 +456,7 @@ void MonthlyWidget::prevMonth() {
void MonthlyWidget::currentMonth() {
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
- QDate dt = QDate::currentDate();
+ TQDate dt = TQDate::currentDate();
calendar->setYMD(m_periodeFirst, calendar->year(dt), calendar->month(dt), 1);
plotMonth();
@@ -464,7 +464,7 @@ void MonthlyWidget::currentMonth() {
void MonthlyWidget::exportWizard() {
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
- QString date = QString::fromLatin1("%1-%2") // e.g.: June-2001
+ TQString date = TQString::fromLatin1("%1-%2") // e.g.: June-2001
.arg(calendar->monthName(periodeFirst()))
.arg(calendar->year(periodeFirst()));
@@ -473,7 +473,7 @@ void MonthlyWidget::exportWizard() {
if (wizard->filename.isEmpty()) { // wizard aborted...
return;
}
- if (QFile::exists(wizard->filename)) { // overwrite?
+ if (TQFile::exists(wizard->filename)) { // overwrite?
if (KMessageBox::Continue!=KMessageBox::warningContinueCancel(0, i18n("A document with this name already exists."), i18n("Overwrite file?"), i18n("&Overwrite") /*, true*/)) { // no
return;
}
@@ -496,7 +496,7 @@ void MonthlyWidget::exportWizard() {
i18n("Duration"), i18n("Costs"), i18n("Bytes In"), i18n("Bytes Out") );
// name of the current connection
- QString con;
+ TQString con;
// for collecting monthly statistics
int count = 0;
@@ -507,7 +507,7 @@ void MonthlyWidget::exportWizard() {
for(int i = 0; i < (int)logList.count(); i++) {
LogInfo *li = logList.at(i);
- QDate logDate = li->from().date();
+ TQDate logDate = li->from().date();
if (periodeFirst() <= logDate && periodeLast() >= logDate ) {
// get connection name for this line
con = li->connectionName();
@@ -540,7 +540,7 @@ void MonthlyWidget::exportWizard() {
duration += li->from().secsTo(li->until());
- QString _bin, _bout, b;
+ TQString _bin, _bout, b;
if(li->bytesIn() >= 0)
formatBytes(li->bytesIn(), _bin);
else
@@ -556,15 +556,15 @@ void MonthlyWidget::exportWizard() {
else
b = i18n("n/a");
- QString day;
+ TQString day;
day.sprintf("%2d", li->from().date().day());
- QString con = li->connectionName();
+ TQString con = li->connectionName();
- QString s_duration;
+ TQString s_duration;
formatDuration(li->from().secsTo(li->until()),
s_duration);
- QString s_lifrom, s_liuntil, s_costs;
+ TQString s_lifrom, s_liuntil, s_costs;
s_lifrom = KGlobal::locale()->formatTime(li->from().time(), false);
s_liuntil = KGlobal::locale()->formatTime(li->until().time(), false);
s_costs = KGlobal::locale()->formatMoney(li->sessionCosts());
@@ -576,9 +576,9 @@ void MonthlyWidget::exportWizard() {
}
}
- if(calendar->month(periodeFirst()) == calendar->month(QDate::currentDate())) {
+ if(calendar->month(periodeFirst()) == calendar->month(TQDate::currentDate())) {
- QString m_bin, m_bout;
+ TQString m_bin, m_bout;
if(bin < 0)
m_bin = i18n("n/a");
else
@@ -589,21 +589,21 @@ void MonthlyWidget::exportWizard() {
else
formatBytesMonth(bout, m_bout);
- QString m_duration;
+ TQString m_duration;
formatDurationMonth(duration, m_duration);
costsMonth(costs, costs);
- QString m_costs(KGlobal::locale()->formatMoney(costs, QString::null, 2));
+ TQString m_costs(KGlobal::locale()->formatMoney(costs, TQString::null, 2));
- QString datetime = KGlobal::locale()->formatDateTime( QDateTime::currentDateTime(), true);
+ TQString datetime = KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), true);
exportIFace->addEmptyLine();
exportIFace->addDataline(i18n("Monthly estimates (%1)").arg(datetime),
- QString::null, QString::null, QString::null, m_duration, m_costs, m_bin, m_bout);
+ TQString::null, TQString::null, TQString::null, m_duration, m_costs, m_bin, m_bout);
}
if(count) {
- QString _bin, _bout, _b;
+ TQString _bin, _bout, _b;
if(bin < 0)
_bin = i18n("n/a");
@@ -620,15 +620,15 @@ void MonthlyWidget::exportWizard() {
else
formatBytes(bout + bin, _b);
- QString s_duration;
+ TQString s_duration;
formatDuration(duration,
s_duration);
- QString s_costs(KGlobal::locale()->formatMoney(costs, QString::null, 2));
+ TQString s_costs(KGlobal::locale()->formatMoney(costs, TQString::null, 2));
// call export methods
exportIFace->addEmptyLine();
- exportIFace->addDataline(i18n("%n connection", "%n connections", count), QString::null, QString::null, QString::null, s_duration,
+ exportIFace->addDataline(i18n("%n connection", "%n connections", count), TQString::null, TQString::null, TQString::null, s_duration,
s_costs, _bin, _bout);
exportIFace->setFinishCode();
@@ -643,12 +643,12 @@ void MonthlyWidget::exportWizard() {
delete exportIFace;
}
-QDate MonthlyWidget::periodeFirst() const
+TQDate MonthlyWidget::periodeFirst() const
{
return m_periodeFirst;
}
-QDate MonthlyWidget::periodeLast() const
+TQDate MonthlyWidget::periodeLast() const
{
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
@@ -666,7 +666,7 @@ void MonthlyWidget::slotSelectionChanged()
int duration = 0;
LogListItem *item;
LogInfo *li;
- QListViewItemIterator it(lv);
+ TQListViewItemIterator it(lv);
while ( it.current() )
{
item = dynamic_cast<LogListItem*>(it.current());
@@ -695,7 +695,7 @@ void MonthlyWidget::slotSelectionChanged()
}
if(count)
{
- QString _bin, _bout, _b;
+ TQString _bin, _bout, _b;
if(bin < 0)
_bin = i18n("n/a");
@@ -712,11 +712,11 @@ void MonthlyWidget::slotSelectionChanged()
else
formatBytes(bout + bin, _b);
- QString s_duration;
+ TQString s_duration;
formatDuration(duration,
s_duration);
- QString s_costs(KGlobal::locale()->formatMoney(costs, QString::null, 2));
+ TQString s_costs(KGlobal::locale()->formatMoney(costs, TQString::null, 2));
selectionItem->setText(0, i18n("Selection (%n connection)", "Selection (%n connections)", count));
selectionItem->setText(1, s_duration);
selectionItem->setText(2, s_costs);
diff --git a/kppp/logview/monthly.h b/kppp/logview/monthly.h
index a77f7bfe..bfe5407e 100644
--- a/kppp/logview/monthly.h
+++ b/kppp/logview/monthly.h
@@ -23,12 +23,12 @@
#define __MONTHLY__H__
#include "log.h"
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qvaluelist.h>
-#include <qdatetime.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqvaluelist.h>
+#include <tqdatetime.h>
#include <kbuttonbox.h>
@@ -36,10 +36,10 @@ class KListView;
class QComboBox;
class LogListItem;
-class MonthlyWidget : public QWidget {
+class MonthlyWidget : public TQWidget {
Q_OBJECT
public:
- MonthlyWidget(QWidget *parent = 0);
+ MonthlyWidget(TQWidget *parent = 0);
private slots:
void prevMonth();
@@ -56,25 +56,25 @@ private:
/**
* Returns the first day in the period
*/
- QDate periodeFirst() const;
+ TQDate periodeFirst() const;
/**
* Returns the last day in the period
*/
- QDate periodeLast() const;
+ TQDate periodeLast() const;
- QDate m_periodeFirst; // First day in month
+ TQDate m_periodeFirst; // First day in month
//int _month, _year;
- QComboBox *cboConnections;
+ TQComboBox *cboConnections;
KButtonBox *bbox;
KListView *lv;
KListView *lv2;
LogListItem* selectionItem;
- QLabel *title;
- QPushButton *next, *prev, *today, *exportBttn;
- QValueList<QString> lstConnections;
- QGridLayout *tl;
- QDateTime *dt;
+ TQLabel *title;
+ TQPushButton *next, *prev, *today, *exportBttn;
+ TQValueList<TQString> lstConnections;
+ TQGridLayout *tl;
+ TQDateTime *dt;
};
#endif
diff --git a/kppp/macros.h b/kppp/macros.h
index 134ec2cf..6f541b76 100644
--- a/kppp/macros.h
+++ b/kppp/macros.h
@@ -3,7 +3,7 @@
#ifndef __MACROS__H__
#define __MACROS__H__
-#include <qlayout.h>
+#include <tqlayout.h>
#define MIN_WIDTH(w) w->setMinimumWidth(w->sizeHint().width());
#define MIN_HEIGHT(w) w->setMinimumHeight(w->sizeHint().height());
diff --git a/kppp/main.cpp b/kppp/main.cpp
index 65548d17..753291ba 100644
--- a/kppp/main.cpp
+++ b/kppp/main.cpp
@@ -88,9 +88,9 @@ uid_t euid;
// helper process' pid
pid_t helperPid = -1;
-QString local_ip_address;
-QString remote_ip_address;
-QString pidfile;
+TQString local_ip_address;
+TQString remote_ip_address;
+TQString pidfile;
#if 0
extern "C" {
@@ -232,16 +232,16 @@ int main( int argc, char **argv ) {
// make sure that nobody can read the password from the
// config file
- QString configFile = KGlobal::dirs()->saveLocation("config")
- + QString(kapp->name()) + "rc";
- if(access(QFile::encodeName(configFile), F_OK) == 0)
- chmod(QFile::encodeName(configFile), S_IRUSR | S_IWUSR);
+ TQString configFile = KGlobal::dirs()->saveLocation("config")
+ + TQString(kapp->name()) + "rc";
+ if(access(TQFile::encodeName(configFile), F_OK) == 0)
+ chmod(TQFile::encodeName(configFile), S_IRUSR | S_IWUSR);
// do we really need to generate an empty directory structure here ?
KGlobal::dirs()->saveLocation("appdata", "Rules");
int pid = create_pidfile();
- QString err_msg = i18n("kppp can't create or read from\n%1.").arg(pidfile);
+ TQString err_msg = i18n("kppp can't create or read from\n%1.").arg(pidfile);
if(pid < 0) {
KMessageBox::error(0L, err_msg);
@@ -263,7 +263,7 @@ int main( int argc, char **argv ) {
gpppdata.open();
gpppdata.setAccountByIndex(0);
- QString s = argv[2];
+ TQString s = argv[2];
urlEncode(s);
kdDebug(5002) << s << endl;
@@ -272,7 +272,7 @@ int main( int argc, char **argv ) {
}
if (pid > 0) {
- QString msg = i18n("kppp has detected a %1 file.\n"
+ TQString msg = i18n("kppp has detected a %1 file.\n"
"Another instance of kppp seems to be "
"running under process-ID %2.\n"
"Please click Exit, make sure that you are "
@@ -322,8 +322,8 @@ int main( int argc, char **argv ) {
}
-pid_t execute_command (const QString & cmd) {
- QCString command = QFile::encodeName(cmd);
+pid_t execute_command (const TQString & cmd) {
+ TQCString command = TQFile::encodeName(cmd);
if (command.isEmpty() || command.length() > COMMAND_SIZE)
return (pid_t) -1;
@@ -331,7 +331,7 @@ pid_t execute_command (const QString & cmd) {
kdDebug(5002) << "Executing command: " << command << endl;
- QApplication::flushX();
+ TQApplication::flushX();
if((id = fork()) == 0) {
// don't bother dieppp()
signal(SIGCHLD, SIG_IGN);
@@ -361,10 +361,10 @@ pid_t create_pidfile() {
pidfile = KGlobal::dirs()->saveLocation("appdata") + "kppp.pid";
- if(access(QFile::encodeName(pidfile), F_OK) == 0) {
+ if(access(TQFile::encodeName(pidfile), F_OK) == 0) {
- if((access(QFile::encodeName(pidfile), R_OK) < 0) ||
- (fd = open(QFile::encodeName(pidfile), O_RDONLY)) < 0)
+ if((access(TQFile::encodeName(pidfile), R_OK) < 0) ||
+ (fd = open(TQFile::encodeName(pidfile), O_RDONLY)) < 0)
return -1;
int sz = read(fd, &pidstr, 32);
@@ -393,7 +393,7 @@ pid_t create_pidfile() {
remove_pidfile();
}
- if((fd = open(QFile::encodeName(pidfile), O_WRONLY | O_CREAT | O_EXCL,
+ if((fd = open(TQFile::encodeName(pidfile), O_WRONLY | O_CREAT | O_EXCL,
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) == -1)
return -1;
@@ -411,9 +411,9 @@ bool remove_pidfile() {
struct stat st;
// only remove regular files with user write permissions
- if(stat(QFile::encodeName(pidfile), &st) == 0 )
- if(S_ISREG(st.st_mode) && (access(QFile::encodeName(pidfile), W_OK) == 0)) {
- unlink(QFile::encodeName(pidfile));
+ if(stat(TQFile::encodeName(pidfile), &st) == 0 )
+ if(S_ISREG(st.st_mode) && (access(TQFile::encodeName(pidfile), W_OK) == 0)) {
+ unlink(TQFile::encodeName(pidfile));
return true;
}
@@ -436,7 +436,7 @@ void myShutDown() {
}
void sighandler(int sig) {
- QEvent *e = 0L;
+ TQEvent *e = 0L;
if(sig == SIGCHLD) {
pid_t id = wait(0L);
if(id >= 0 && id == helperPid) // helper process died
@@ -446,7 +446,7 @@ void sighandler(int sig) {
// let eventFilter() deal with this when we're back in the loop
if (e)
- QApplication::postEvent(p_kppp, e);
+ TQApplication::postEvent(p_kppp, e);
signal(sig, sighandler); // reinstall signal handler
}
diff --git a/kppp/main.h b/kppp/main.h
index a114f983..6551348d 100644
--- a/kppp/main.h
+++ b/kppp/main.h
@@ -38,7 +38,7 @@
void killpppd();
void sighandler(int);
-pid_t execute_command(const QString &);
+pid_t execute_command(const TQString &);
pid_t create_pidfile();
bool remove_pidfile();
void myShutDown();
diff --git a/kppp/miniterm.cpp b/kppp/miniterm.cpp
index 94b342d5..06c01194 100644
--- a/kppp/miniterm.cpp
+++ b/kppp/miniterm.cpp
@@ -39,24 +39,24 @@
#include <kmenubar.h>
#include <kstdguiitem.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtimer.h>
-#include <qpopupmenu.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtimer.h>
+#include <tqpopupmenu.h>
extern PPPData gpppdata;
-MiniTerm::MiniTerm(QWidget *parent, const char *name)
- : QDialog(parent, name, true)
+MiniTerm::MiniTerm(TQWidget *parent, const char *name)
+ : TQDialog(parent, name, true)
{
setCaption(i18n("Kppp Mini-Terminal"));
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
- m_file = new QPopupMenu(this);
- m_file->insertItem( SmallIcon("fileclose"), i18n("&Close"), this, SLOT(cancelbutton()) );
- m_options = new QPopupMenu(this);
- m_options->insertItem(i18n("&Reset Modem"),this,SLOT(resetModem()));
+ m_file = new TQPopupMenu(this);
+ m_file->insertItem( SmallIcon("fileclose"), i18n("&Close"), this, TQT_SLOT(cancelbutton()) );
+ m_options = new TQPopupMenu(this);
+ m_options->insertItem(i18n("&Reset Modem"),this,TQT_SLOT(resetModem()));
m_help =
new KHelpMenu(this,
i18n("MiniTerm - A terminal emulation for KPPP\n\n"
@@ -72,21 +72,21 @@ MiniTerm::MiniTerm(QWidget *parent, const char *name)
menubar->insertItem( i18n("&Modem"), m_options );
menubar->insertItem( KStdGuiItem::help().text(), m_help->menu());
- statusbar = new QLabel(this);
- statusbar->setFrameStyle(QFrame::Panel | QFrame::Sunken);
+ statusbar = new TQLabel(this);
+ statusbar->setFrameStyle(TQFrame::Panel | TQFrame::Sunken);
terminal = new MyTerm(this, "term");
setupToolbar();
- QVBoxLayout *layout=new QVBoxLayout(this);
+ TQVBoxLayout *layout=new TQVBoxLayout(this);
layout->addWidget(menubar);
layout->addWidget(toolbar);
layout->addWidget(terminal);
layout->addWidget(statusbar);
- inittimer = new QTimer(this);
- connect(inittimer,SIGNAL(timeout()),this,SLOT(init()));
+ inittimer = new TQTimer(this);
+ connect(inittimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(init()));
inittimer->start(500);
resize(550,400);
@@ -103,16 +103,16 @@ void MiniTerm::setupToolbar() {
toolbar = new KToolBar( this );
toolbar->insertButton("exit", 0,
- SIGNAL(clicked()), this,
- SLOT(cancelbutton()), TRUE, i18n("Close MiniTerm"));
+ TQT_SIGNAL(clicked()), this,
+ TQT_SLOT(cancelbutton()), TRUE, i18n("Close MiniTerm"));
toolbar->insertButton("back", 0,
- SIGNAL(clicked()), this,
- SLOT(resetModem()), TRUE, i18n("Reset Modem"));
+ TQT_SIGNAL(clicked()), this,
+ TQT_SLOT(resetModem()), TRUE, i18n("Reset Modem"));
toolbar->insertButton("help", 0,
- SIGNAL(clicked()), this,
- SLOT(help()), TRUE, i18n("Help"));
+ TQT_SIGNAL(clicked()), this,
+ TQT_SLOT(help()), TRUE, i18n("Help"));
toolbar->setBarPos( KToolBar::Top );
toolbar->setMovingEnabled(false);
@@ -154,7 +154,7 @@ void MiniTerm::init() {
kapp->processEvents();
kapp->processEvents();
- Modem::modem->notify(this, SLOT(readChar(unsigned char)));
+ Modem::modem->notify(this, TQT_SLOT(readChar(unsigned char)));
return;
}
}
@@ -214,7 +214,7 @@ void MiniTerm::resetModem() {
}
-void MiniTerm::closeEvent( QCloseEvent *e ) {
+void MiniTerm::closeEvent( TQCloseEvent *e ) {
cancelbutton();
e->accept();
}
@@ -225,13 +225,13 @@ void MiniTerm::help() {
}
-MyTerm::MyTerm(QWidget *parent, const char* name)
- : QMultiLineEdit(parent, name)
+MyTerm::MyTerm(TQWidget *parent, const char* name)
+ : TQMultiLineEdit(parent, name)
{
setFont(KGlobalSettings::fixedFont());
}
-void MyTerm::keyPressEvent(QKeyEvent *k) {
+void MyTerm::keyPressEvent(TQKeyEvent *k) {
// ignore meta keys
if (k->ascii() == 0)
return;
@@ -244,22 +244,22 @@ void MyTerm::keyPressEvent(QKeyEvent *k) {
void MyTerm::insertChar(unsigned char c) {
- QMultiLineEdit::insert(QChar(c));
+ TQMultiLineEdit::insert(TQChar(c));
}
void MyTerm::newLine() {
- QMultiLineEdit::newLine();
+ TQMultiLineEdit::newLine();
}
void MyTerm::del() {
- QMultiLineEdit::del();
+ TQMultiLineEdit::del();
}
void MyTerm::backspace() {
- QMultiLineEdit::backspace();
+ TQMultiLineEdit::backspace();
}
@@ -269,13 +269,13 @@ void MyTerm::myreturn() {
getCursorPosition(&line,&column);
for (int i = 0; i < column;i++)
- QMultiLineEdit::cursorLeft();
+ TQMultiLineEdit::cursorLeft();
}
void MyTerm::mynewline() {
- QMultiLineEdit::end(FALSE);
- QMultiLineEdit::newLine();
+ TQMultiLineEdit::end(FALSE);
+ TQMultiLineEdit::newLine();
}
#include "miniterm.moc"
diff --git a/kppp/miniterm.h b/kppp/miniterm.h
index f6d66549..c1d93bcf 100644
--- a/kppp/miniterm.h
+++ b/kppp/miniterm.h
@@ -28,10 +28,10 @@
#ifndef _MINITERM_H_
#define _MINITERM_H_
-#include <qdialog.h>
-#include <qpixmap.h>
-#include <qevent.h>
-#include <qmultilineedit.h>
+#include <tqdialog.h>
+#include <tqpixmap.h>
+#include <tqevent.h>
+#include <tqmultilineedit.h>
#include <ktoolbar.h>
class KHelpMenu;
@@ -43,12 +43,12 @@ class KHelpMenu;
class QPushButton;
class QLabel;
-class MyTerm : public QMultiLineEdit {
+class MyTerm : public TQMultiLineEdit {
Q_OBJECT
public:
- MyTerm(QWidget *parent=0, const char *name=0);
+ MyTerm(TQWidget *parent=0, const char *name=0);
- void keyPressEvent (QKeyEvent*);
+ void keyPressEvent (TQKeyEvent*);
void insertChar(unsigned char c);
void newLine();
void backspace();
@@ -58,14 +58,14 @@ public:
};
-class MiniTerm : public QDialog {
+class MiniTerm : public TQDialog {
Q_OBJECT
public:
- MiniTerm(QWidget *parent=0, const char *name=0);
+ MiniTerm(TQWidget *parent=0, const char *name=0);
~MiniTerm();
- void closeEvent( QCloseEvent *e );
+ void closeEvent( TQCloseEvent *e );
public slots:
void cancelbutton();
@@ -77,26 +77,26 @@ public slots:
protected:
void setupToolbar();
- QPushButton *cancel;
+ TQPushButton *cancel;
MyTerm *terminal;
- QTimer *inittimer;
+ TQTimer *inittimer;
- QMenuBar * menubar;
+ TQMenuBar * menubar;
KToolBar * toolbar;
- QPopupMenu * m_file;
- QPopupMenu * m_edit;
- QPopupMenu * m_options;
+ TQPopupMenu * m_file;
+ TQPopupMenu * m_edit;
+ TQPopupMenu * m_options;
KHelpMenu * m_help;
- QLabel * statusbar;
- QPushButton *pb1;
- QPushButton *pb2;
- QPushButton *pb3;
- QPushButton *pb4;
-
- QPixmap pb1_pixmap;
- QPixmap pb2_pixmap;
- QPixmap pb3_pixmap;
- QPixmap pb4_pixmap;
+ TQLabel * statusbar;
+ TQPushButton *pb1;
+ TQPushButton *pb2;
+ TQPushButton *pb3;
+ TQPushButton *pb4;
+
+ TQPixmap pb1_pixmap;
+ TQPixmap pb2_pixmap;
+ TQPixmap pb3_pixmap;
+ TQPixmap pb4_pixmap;
};
diff --git a/kppp/modem.cpp b/kppp/modem.cpp
index 86ac3169..4d31fe59 100644
--- a/kppp/modem.cpp
+++ b/kppp/modem.cpp
@@ -30,7 +30,7 @@
#include <signal.h>
#include <sys/ioctl.h>
#include <setjmp.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <assert.h>
#include "modem.h"
@@ -120,7 +120,7 @@ speed_t Modem::modemspeed() {
bool Modem::opentty() {
// int flags;
- QString device = "";
+ TQString device = "";
if (args->isSet("dev"))
device = args->getOption("dev");
else
@@ -183,7 +183,7 @@ bool Modem::opentty() {
// the english/i18n mix below is ugly but we want to keep working
// after someone changed the code to use i18n'ed config values
- QString flowCtrl = gpppdata.flowcontrol();
+ TQString flowCtrl = gpppdata.flowcontrol();
if(flowCtrl != "None" && flowCtrl != i18n("None")) {
if(flowCtrl == "CRTSCTS" || flowCtrl == i18n("Hardware [CRTSCTS]")) {
tty.c_cflag |= CRTSCTS;
@@ -252,14 +252,14 @@ void Modem::readtty(int) {
}
-void Modem::notify(const QObject *receiver, const char *member) {
- connect(this, SIGNAL(charWaiting(unsigned char)), receiver, member);
+void Modem::notify(const TQObject *receiver, const char *member) {
+ connect(this, TQT_SIGNAL(charWaiting(unsigned char)), receiver, member);
startNotifier();
}
void Modem::stop() {
- disconnect(SIGNAL(charWaiting(unsigned char)));
+ disconnect(TQT_SIGNAL(charWaiting(unsigned char)));
stopNotifier();
}
@@ -267,11 +267,11 @@ void Modem::stop() {
void Modem::startNotifier() {
if(modemfd >= 0) {
if(sn == 0) {
- sn = new QSocketNotifier(modemfd, QSocketNotifier::Read, this);
- connect(sn, SIGNAL(activated(int)), SLOT(readtty(int)));
- kdDebug(5002) << "QSocketNotifier started!" << endl;
+ sn = new TQSocketNotifier(modemfd, TQSocketNotifier::Read, this);
+ connect(sn, TQT_SIGNAL(activated(int)), TQT_SLOT(readtty(int)));
+ kdDebug(5002) << "TQSocketNotifier started!" << endl;
} else {
- // Debug("QSocketNotifier re-enabled!");
+ // Debug("TQSocketNotifier re-enabled!");
sn->setEnabled(true);
}
}
@@ -284,7 +284,7 @@ void Modem::stopNotifier() {
disconnect(sn);
delete sn;
sn = 0;
- kdDebug(5002) << "QSocketNotifier stopped!" << endl;
+ kdDebug(5002) << "TQSocketNotifier stopped!" << endl;
}
}
@@ -314,7 +314,7 @@ bool Modem::writeLine(const char *buf) {
char *b = new char[len+2];
memcpy(b, buf, len);
// different modems seem to need different line terminations
- QString term = gpppdata.enter();
+ TQString term = gpppdata.enter();
if(term == "LF")
b[len++]='\n';
else if(term == "CR")
@@ -422,7 +422,7 @@ void Modem::escape_to_command_mode() {
// +3 because quiet time must be greater than guard time.
usleep((gpppdata.modemEscapeGuardTime()+3)*20000);
- QCString tmp = gpppdata.modemEscapeStr().local8Bit();
+ TQCString tmp = gpppdata.modemEscapeStr().local8Bit();
write(modemfd, tmp.data(), tmp.length());
tcflush(modemfd, TCIOFLUSH);
usleep((gpppdata.modemEscapeGuardTime()+3)*20000);
@@ -431,35 +431,35 @@ void Modem::escape_to_command_mode() {
}
-const QString Modem::modemMessage() {
+const TQString Modem::modemMessage() {
return errmsg;
}
-QString Modem::parseModemSpeed(const QString &s) {
+TQString Modem::parseModemSpeed(const TQString &s) {
// this is a small (and bad) parser for modem speeds
int rx = -1;
int tx = -1;
int i;
- QString result;
+ TQString result;
kdDebug(5002) << "Modem reported result string: " << s << endl;
const int RXMAX = 7;
const int TXMAX = 2;
- QRegExp rrx[RXMAX] = {
- QRegExp("[0-9]+[:/ ]RX", false),
- QRegExp("[0-9]+RX", false),
- QRegExp("[/: -][0-9]+[/: ]", false),
- QRegExp("[/: -][0-9]+$", false),
- QRegExp("CARRIER [^0-9]*[0-9]+", false),
- QRegExp("CONNECT [^0-9]*[0-9]+", false),
- QRegExp("[0-9]+") // panic mode
+ TQRegExp rrx[RXMAX] = {
+ TQRegExp("[0-9]+[:/ ]RX", false),
+ TQRegExp("[0-9]+RX", false),
+ TQRegExp("[/: -][0-9]+[/: ]", false),
+ TQRegExp("[/: -][0-9]+$", false),
+ TQRegExp("CARRIER [^0-9]*[0-9]+", false),
+ TQRegExp("CONNECT [^0-9]*[0-9]+", false),
+ TQRegExp("[0-9]+") // panic mode
};
- QRegExp trx[TXMAX] = {
- QRegExp("[0-9]+[:/ ]TX", false),
- QRegExp("[0-9]+TX", false)
+ TQRegExp trx[TXMAX] = {
+ TQRegExp("[0-9]+[:/ ]TX", false),
+ TQRegExp("[0-9]+TX", false)
};
for(i = 0; i < RXMAX; i++) {
@@ -471,7 +471,7 @@ QString Modem::parseModemSpeed(const QString &s) {
// rrx[i] has been matched, idx contains the start of the match
// and len contains how long the match is. Extract the match.
//
- QString sub = s.mid(idx, len);
+ TQString sub = s.mid(idx, len);
//
// Now extract the digits only from the match, which will
@@ -498,7 +498,7 @@ QString Modem::parseModemSpeed(const QString &s) {
// trx[i] has been matched, idx contains the start of the match
// and len contains how long the match is. Extract the match.
//
- QString sub = s.mid(idx, len);
+ TQString sub = s.mid(idx, len);
//
// Now extract the digits only from the match, which will then
@@ -545,17 +545,17 @@ int Modem::lockdevice() {
if (modem_is_locked)
return 1;
- QString device = "";
+ TQString device = "";
if (args->isSet("dev"))
device = args->getOption("dev");
else
device = gpppdata.modemDevice();
- QString lockfile = LOCK_DIR"/LCK..";
+ TQString lockfile = LOCK_DIR"/LCK..";
lockfile += device.mid(5); // append everything after /dev/
- if(access(QFile::encodeName(lockfile), F_OK) == 0) {
- if ((fd = Requester::rq->openLockfile(QFile::encodeName(lockfile), O_RDONLY)) >= 0) {
+ if(access(TQFile::encodeName(lockfile), F_OK) == 0) {
+ if ((fd = Requester::rq->openLockfile(TQFile::encodeName(lockfile), O_RDONLY)) >= 0) {
// Mario: it's not necessary to read more than lets say 32 bytes. If
// file has more than 32 bytes, skip the rest
char oldlock[33]; // safe
diff --git a/kppp/modem.h b/kppp/modem.h
index 6999263d..7e8f2376 100644
--- a/kppp/modem.h
+++ b/kppp/modem.h
@@ -27,13 +27,13 @@
#ifndef _MODEM_H_
#define _MODEM_H_
-#include <qdir.h>
+#include <tqdir.h>
#include <sys/types.h>
#include <termios.h>
#include <unistd.h>
-#include <qsocketnotifier.h>
+#include <tqsocketnotifier.h>
#include <config.h>
@@ -41,7 +41,7 @@ class KCmdLineArgs;
void alarm_handler(int);
-class Modem : public QObject {
+class Modem : public TQObject {
Q_OBJECT
public:
Modem();
@@ -54,10 +54,10 @@ public:
bool writeLine(const char *);
bool dataMode() const { return data_mode; }
void setDataMode(bool set) { data_mode = set; }
- const QString modemMessage();
+ const TQString modemMessage();
speed_t modemspeed();
- static QString parseModemSpeed(const QString &);
- void notify(const QObject *, const char *);
+ static TQString parseModemSpeed(const TQString &);
+ void notify(const TQObject *, const char *);
void stop();
void flush();
@@ -81,9 +81,9 @@ private:
private:
int modemfd;
- QSocketNotifier *sn;
+ TQSocketNotifier *sn;
bool data_mode;
- QString errmsg;
+ TQString errmsg;
struct termios initial_tty;
struct termios tty;
bool modem_is_locked;
diff --git a/kppp/modemcmds.cpp b/kppp/modemcmds.cpp
index 3a34bb4d..04767ede 100644
--- a/kppp/modemcmds.cpp
+++ b/kppp/modemcmds.cpp
@@ -24,8 +24,8 @@
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qslider.h>
+#include <tqlayout.h>
+#include <tqslider.h>
#include <kbuttonbox.h>
#include <stdlib.h>
#include <kapplication.h> // for getMiniIcon()
@@ -34,220 +34,220 @@
#include "pppdata.h"
#include <kwin.h>
-#include <qgroupbox.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
+#include <tqgroupbox.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
#define ADJUSTEDIT(e) e->setText("XXXXXXXXqy"); e->setMinimumSize(e->sizeHint()); e->setFixedHeight(e->sizeHint().height()); e->setText(""); e->setMaxLength(MODEMSTR_SIZE);
// a little trick to make the label look like a disabled lineedit
-#define FORMATSLIDERLABEL(l) l->setFixedWidth(l->sizeHint().width()); l->setFixedHeight(QLineEdit(dummyWidget).sizeHint().height()); l->setAlignment(AlignCenter); l->setFrameStyle(QFrame::WinPanel|QFrame::Sunken); l->setLineWidth(2);
+#define FORMATSLIDERLABEL(l) l->setFixedWidth(l->sizeHint().width()); l->setFixedHeight(TQLineEdit(dummyWidget).sizeHint().height()); l->setAlignment(AlignCenter); l->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken); l->setLineWidth(2);
-ModemCommands::ModemCommands(QWidget *parent, const char *name)
+ModemCommands::ModemCommands(TQWidget *parent, const char *name)
: KDialogBase(parent, name, true, i18n("Edit Modem Commands"), Ok|Cancel)
{
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
- QWidget *dummyWidget = new QWidget(this);
+ TQWidget *dummyWidget = new TQWidget(this);
setMainWidget(dummyWidget);
const int GRIDROWS = 22;
int row = 0;
// toplevel layout
- QVBoxLayout *tl = new QVBoxLayout(dummyWidget, 10, 4);
+ TQVBoxLayout *tl = new TQVBoxLayout(dummyWidget, 10, 4);
// add grid + frame
- QGridLayout *l1 = new QGridLayout(GRIDROWS, 4);
+ TQGridLayout *l1 = new TQGridLayout(GRIDROWS, 4);
tl->addLayout(l1);
- box = new QGroupBox(dummyWidget, "box");
+ box = new TQGroupBox(dummyWidget, "box");
l1->addMultiCellWidget(box, row++, GRIDROWS, 0, 3);
// put slider and label into a separate H-Box
- QHBoxLayout *l2 = new QHBoxLayout;
+ TQHBoxLayout *l2 = new QHBoxLayout;
l1->addLayout(l2, row, 2);
- lpreinitslider = new QLabel("MMMM", dummyWidget);
+ lpreinitslider = new TQLabel("MMMM", dummyWidget);
FORMATSLIDERLABEL(lpreinitslider);
- preinitslider = new QSlider(0, 300, 1, 0,
- QSlider::Horizontal, dummyWidget);
+ preinitslider = new TQSlider(0, 300, 1, 0,
+ TQSlider::Horizontal, dummyWidget);
preinitslider->setFixedHeight(preinitslider->sizeHint().height());
- connect(preinitslider, SIGNAL(valueChanged(int)),
- lpreinitslider, SLOT(setNum(int)));
+ connect(preinitslider, TQT_SIGNAL(valueChanged(int)),
+ lpreinitslider, TQT_SLOT(setNum(int)));
l2->addWidget(lpreinitslider, 0);
l2->addWidget(preinitslider, 1);
- lpreinit = new QLabel(i18n("Pre-init delay (sec/100):"), dummyWidget);
+ lpreinit = new TQLabel(i18n("Pre-init delay (sec/100):"), dummyWidget);
l1->addWidget(lpreinit, row++, 1);
for(int i = 0; i < PPPData::NumInitStrings; i++) {
- initstr[i] = new QLineEdit(dummyWidget);
- QLabel *initLabel = new QLabel(i18n("Initialization string %1:").arg(i + 1),
+ initstr[i] = new TQLineEdit(dummyWidget);
+ TQLabel *initLabel = new TQLabel(i18n("Initialization string %1:").arg(i + 1),
dummyWidget);
ADJUSTEDIT(initstr[i]);
l1->addWidget(initLabel, row, 1);
l1->addWidget(initstr[i], row++, 2);
}
- QHBoxLayout *l3 = new QHBoxLayout;
+ TQHBoxLayout *l3 = new QHBoxLayout;
l1->addLayout(l3, row, 2);
- linitslider = new QLabel("MMMM", dummyWidget);
+ linitslider = new TQLabel("MMMM", dummyWidget);
FORMATSLIDERLABEL(linitslider);
- initslider = new QSlider(1, 300, 1, 0,
- QSlider::Horizontal, dummyWidget);
+ initslider = new TQSlider(1, 300, 1, 0,
+ TQSlider::Horizontal, dummyWidget);
initslider->setFixedHeight(initslider->sizeHint().height());
- connect(initslider, SIGNAL(valueChanged(int)),
- linitslider, SLOT(setNum(int)));
+ connect(initslider, TQT_SIGNAL(valueChanged(int)),
+ linitslider, TQT_SLOT(setNum(int)));
l3->addWidget(linitslider, 0);
l3->addWidget(initslider, 1);
- label3 = new QLabel(i18n("Post-init delay (sec/100):"), dummyWidget);
+ label3 = new TQLabel(i18n("Post-init delay (sec/100):"), dummyWidget);
l1->addWidget(label3, row++, 1);
/* Set ATS11 (Dial tone duration) between 0-255 (Default ~ 70) */
- QHBoxLayout *l4 = new QHBoxLayout;
+ TQHBoxLayout *l4 = new QHBoxLayout;
l1->addLayout(l4, row, 2);
- ldurationslider = new QLabel("MMMM", dummyWidget);
+ ldurationslider = new TQLabel("MMMM", dummyWidget);
FORMATSLIDERLABEL(ldurationslider);
- durationslider = new QSlider(1, 255, 1, 0,
- QSlider::Horizontal, dummyWidget);
+ durationslider = new TQSlider(1, 255, 1, 0,
+ TQSlider::Horizontal, dummyWidget);
durationslider->setFixedHeight(durationslider->sizeHint().height());
- connect(durationslider, SIGNAL(valueChanged(int)),
- ldurationslider, SLOT(setNum(int)));
+ connect(durationslider, TQT_SIGNAL(valueChanged(int)),
+ ldurationslider, TQT_SLOT(setNum(int)));
l4->addWidget(ldurationslider, 0);
l4->addWidget(durationslider, 1);
- lduration = new QLabel(i18n("Dialing speed (sec/100):"), dummyWidget);
+ lduration = new TQLabel(i18n("Dialing speed (sec/100):"), dummyWidget);
l1->addWidget(lduration, row++, 1);
- initresp = new QLineEdit(dummyWidget);
- label2 = new QLabel(i18n("Init &response:"), dummyWidget);
+ initresp = new TQLineEdit(dummyWidget);
+ label2 = new TQLabel(i18n("Init &response:"), dummyWidget);
label2->setBuddy(initresp);
ADJUSTEDIT(initresp);
l1->addWidget(label2, row, 1);
l1->addWidget(initresp, row++, 2);
- nodetectdialtone = new QLineEdit(dummyWidget);
- lnodetectdialtone = new QLabel(i18n("No di&al tone detection:"), dummyWidget);
+ nodetectdialtone = new TQLineEdit(dummyWidget);
+ lnodetectdialtone = new TQLabel(i18n("No di&al tone detection:"), dummyWidget);
lnodetectdialtone->setBuddy(nodetectdialtone);
ADJUSTEDIT(nodetectdialtone);
l1->addWidget(lnodetectdialtone, row, 1);
l1->addWidget(nodetectdialtone, row++, 2);
- dialstr = new QLineEdit(dummyWidget);
- label4 = new QLabel(i18n("Dial &string:"),dummyWidget);
+ dialstr = new TQLineEdit(dummyWidget);
+ label4 = new TQLabel(i18n("Dial &string:"),dummyWidget);
label4->setBuddy(dialstr);
ADJUSTEDIT(dialstr);
l1->addWidget(label4, row, 1);
l1->addWidget(dialstr, row++, 2);
- connectresp = new QLineEdit(dummyWidget);
- label5 = new QLabel(i18n("Co&nnect response:"), dummyWidget);
+ connectresp = new TQLineEdit(dummyWidget);
+ label5 = new TQLabel(i18n("Co&nnect response:"), dummyWidget);
label5->setBuddy(connectresp);
ADJUSTEDIT(connectresp);
l1->addWidget(label5, row, 1);
l1->addWidget(connectresp, row++, 2);
- busyresp = new QLineEdit(dummyWidget);
- label6 = new QLabel(i18n("Busy response:"), dummyWidget);
+ busyresp = new TQLineEdit(dummyWidget);
+ label6 = new TQLabel(i18n("Busy response:"), dummyWidget);
ADJUSTEDIT(busyresp);
l1->addWidget(label6, row, 1);
l1->addWidget(busyresp, row++, 2);
- nocarrierresp = new QLineEdit(dummyWidget);
- label7 = new QLabel(i18n("No carr&ier response:"), dummyWidget);
+ nocarrierresp = new TQLineEdit(dummyWidget);
+ label7 = new TQLabel(i18n("No carr&ier response:"), dummyWidget);
label7->setBuddy(nocarrierresp);
ADJUSTEDIT(nocarrierresp);
l1->addWidget(label7, row, 1);
l1->addWidget(nocarrierresp, row++, 2);
- nodialtoneresp = new QLineEdit(dummyWidget);
- label8 = new QLabel(i18n("No dial tone response:"), dummyWidget);
+ nodialtoneresp = new TQLineEdit(dummyWidget);
+ label8 = new TQLabel(i18n("No dial tone response:"), dummyWidget);
ADJUSTEDIT(nodialtoneresp);
l1->addWidget(label8, row, 1);
l1->addWidget(nodialtoneresp, row++, 2);
- hangupstr = new QLineEdit(dummyWidget);
- label9 = new QLabel(i18n("&Hangup string:"), dummyWidget);
+ hangupstr = new TQLineEdit(dummyWidget);
+ label9 = new TQLabel(i18n("&Hangup string:"), dummyWidget);
label9->setBuddy(hangupstr);
ADJUSTEDIT(hangupstr);
l1->addWidget(label9, row, 1);
l1->addWidget(hangupstr, row++, 2);
- hangupresp = new QLineEdit(dummyWidget);
- label10 = new QLabel(i18n("Hangup response:"), dummyWidget);
+ hangupresp = new TQLineEdit(dummyWidget);
+ label10 = new TQLabel(i18n("Hangup response:"), dummyWidget);
ADJUSTEDIT(hangupresp);
l1->addWidget(label10, row, 1);
l1->addWidget(hangupresp, row++, 2);
- answerstr = new QLineEdit(dummyWidget);
- label11 = new QLabel(i18n("Answ&er string:"), dummyWidget);
+ answerstr = new TQLineEdit(dummyWidget);
+ label11 = new TQLabel(i18n("Answ&er string:"), dummyWidget);
label11->setBuddy(answerstr);
ADJUSTEDIT(answerstr);
l1->addWidget(label11, row, 1);
l1->addWidget(answerstr, row++, 2);
- ringresp = new QLineEdit(dummyWidget);
- label12 = new QLabel(i18n("Ring response:"), dummyWidget);
+ ringresp = new TQLineEdit(dummyWidget);
+ label12 = new TQLabel(i18n("Ring response:"), dummyWidget);
ADJUSTEDIT(ringresp);
l1->addWidget(label12, row, 1);
l1->addWidget(ringresp, row++, 2);
- answerresp = new QLineEdit(dummyWidget);
- label13 = new QLabel(i18n("Ans&wer response:"), dummyWidget);
+ answerresp = new TQLineEdit(dummyWidget);
+ label13 = new TQLabel(i18n("Ans&wer response:"), dummyWidget);
label13->setBuddy(answerresp);
ADJUSTEDIT(answerresp);
l1->addWidget(label13, row, 1);
l1->addWidget(answerresp, row++, 2);
- dlpresp = new QLineEdit(dummyWidget);
- label17 = new QLabel(i18n("DLP response:"), dummyWidget);
+ dlpresp = new TQLineEdit(dummyWidget);
+ label17 = new TQLabel(i18n("DLP response:"), dummyWidget);
ADJUSTEDIT(dlpresp);
l1->addWidget(label17, row, 1);
l1->addWidget(dlpresp, row++, 2);
- escapestr = new QLineEdit(dummyWidget);
- label14 = new QLabel(i18n("Escape strin&g:"), dummyWidget);
+ escapestr = new TQLineEdit(dummyWidget);
+ label14 = new TQLabel(i18n("Escape strin&g:"), dummyWidget);
label14->setBuddy(escapestr);
ADJUSTEDIT(escapestr);
l1->addWidget(label14, row, 1);
l1->addWidget(escapestr, row++, 2);
- escaperesp = new QLineEdit(dummyWidget);
- label15 = new QLabel(i18n("Escape response:"), dummyWidget);
+ escaperesp = new TQLineEdit(dummyWidget);
+ label15 = new TQLabel(i18n("Escape response:"), dummyWidget);
ADJUSTEDIT(escaperesp);
l1->addWidget(label15, row, 1);
l1->addWidget(escaperesp, row++, 2);
- QHBoxLayout *l5 = new QHBoxLayout;
+ TQHBoxLayout *l5 = new QHBoxLayout;
l1->addLayout(l5, row, 2);
- lslider = new QLabel("MMMM", dummyWidget);
+ lslider = new TQLabel("MMMM", dummyWidget);
FORMATSLIDERLABEL(lslider);
- slider = new QSlider(0, 255, 1, 0,
- QSlider::Horizontal, dummyWidget);
+ slider = new TQSlider(0, 255, 1, 0,
+ TQSlider::Horizontal, dummyWidget);
slider->setFixedHeight(slider->sizeHint().height());
- connect(slider, SIGNAL(valueChanged(int)),
- lslider, SLOT(setNum(int)));
+ connect(slider, TQT_SIGNAL(valueChanged(int)),
+ lslider, TQT_SLOT(setNum(int)));
l5->addWidget(lslider, 0);
l5->addWidget(slider, 1);
- label16 = new QLabel(i18n("Guard time (sec/50):"), dummyWidget);
+ label16 = new TQLabel(i18n("Guard time (sec/50):"), dummyWidget);
l1->addWidget(label16, row++, 1);
- QLabel *l = new QLabel(i18n("Volume off/low/high:"), dummyWidget);
+ TQLabel *l = new TQLabel(i18n("Volume off/low/high:"), dummyWidget);
l1->addWidget(l, row, 1);
- QHBoxLayout *l6 = new QHBoxLayout;
+ TQHBoxLayout *l6 = new QHBoxLayout;
l1->addLayout(l6, row++, 2);
- volume_off = new QLineEdit(dummyWidget);
+ volume_off = new TQLineEdit(dummyWidget);
volume_off->setFixedHeight(volume_off->sizeHint().height());
volume_off->setMinimumWidth((int)(volume_off->sizeHint().width() / 2));
- volume_medium = new QLineEdit(dummyWidget);
+ volume_medium = new TQLineEdit(dummyWidget);
volume_medium->setFixedHeight(volume_medium->sizeHint().height());
volume_medium->setMinimumWidth((int)(volume_medium->sizeHint().width() / 2));
- volume_high = new QLineEdit(dummyWidget);
+ volume_high = new TQLineEdit(dummyWidget);
volume_high->setFixedHeight(volume_high->sizeHint().height());
volume_high->setMinimumWidth((int)(volume_high->sizeHint().width() / 2));
l6->addWidget(volume_off);
diff --git a/kppp/modemcmds.h b/kppp/modemcmds.h
index 72f66895..7779471b 100644
--- a/kppp/modemcmds.h
+++ b/kppp/modemcmds.h
@@ -31,11 +31,11 @@
#ifndef _MODEMCMDS_H_
#define _MODEMCMDS_H_
-#include <qgroupbox.h>
+#include <tqgroupbox.h>
#include <kdialogbase.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
#include <pppdata.h>
class QLineEdit;
@@ -49,7 +49,7 @@ Q_OBJECT
public:
- ModemCommands(QWidget *parent=0, const char *name=0);
+ ModemCommands(TQWidget *parent=0, const char *name=0);
~ModemCommands() {}
private slots:
@@ -58,72 +58,72 @@ private slots:
private:
- QGroupBox *box;
+ TQGroupBox *box;
- QLineEdit *initstr[int(PPPData::NumInitStrings)];
+ TQLineEdit *initstr[int(PPPData::NumInitStrings)];
- QLineEdit *initresp;
- QLabel *label2;
+ TQLineEdit *initresp;
+ TQLabel *label2;
- QSlider *preinitslider;
- QLabel *lpreinitslider;
- QLabel *lpreinit;
+ TQSlider *preinitslider;
+ TQLabel *lpreinitslider;
+ TQLabel *lpreinit;
- QSlider *initslider;
- QLabel *linitslider;
- QLabel *label3;
+ TQSlider *initslider;
+ TQLabel *linitslider;
+ TQLabel *label3;
- QSlider *durationslider;
- QLabel *ldurationslider;
- QLabel *lduration;
+ TQSlider *durationslider;
+ TQLabel *ldurationslider;
+ TQLabel *lduration;
- QLineEdit *nodetectdialtone;
- QLabel *lnodetectdialtone;
+ TQLineEdit *nodetectdialtone;
+ TQLabel *lnodetectdialtone;
- QLineEdit *dialstr;
- QLabel *label4;
+ TQLineEdit *dialstr;
+ TQLabel *label4;
- QLineEdit *connectresp;
- QLabel *label5;
+ TQLineEdit *connectresp;
+ TQLabel *label5;
- QLineEdit *busyresp;
- QLabel *label6;
+ TQLineEdit *busyresp;
+ TQLabel *label6;
- QLineEdit *nocarrierresp;
- QLabel *label7;
+ TQLineEdit *nocarrierresp;
+ TQLabel *label7;
- QLineEdit *nodialtoneresp;
- QLabel *label8;
+ TQLineEdit *nodialtoneresp;
+ TQLabel *label8;
- QLineEdit *hangupstr;
- QLabel *label9;
+ TQLineEdit *hangupstr;
+ TQLabel *label9;
- QLineEdit *hangupresp;
- QLabel *label10;
+ TQLineEdit *hangupresp;
+ TQLabel *label10;
- QLineEdit *answerstr;
- QLabel *label11;
+ TQLineEdit *answerstr;
+ TQLabel *label11;
- QLineEdit *ringresp;
- QLabel *label12;
+ TQLineEdit *ringresp;
+ TQLabel *label12;
- QLineEdit *answerresp;
- QLabel *label13;
+ TQLineEdit *answerresp;
+ TQLabel *label13;
- QLineEdit *escapestr;
- QLabel *label14;
+ TQLineEdit *escapestr;
+ TQLabel *label14;
- QLineEdit *escaperesp;
- QLineEdit *dlpresp;
- QLabel *label17;
+ TQLineEdit *escaperesp;
+ TQLineEdit *dlpresp;
+ TQLabel *label17;
- QLabel *label15;
+ TQLabel *label15;
- QSlider *slider;
- QLabel *lslider;
- QLabel *label16;
+ TQSlider *slider;
+ TQLabel *lslider;
+ TQLabel *label16;
- QLineEdit *volume_off, *volume_medium, *volume_high;
+ TQLineEdit *volume_off, *volume_medium, *volume_high;
};
#endif
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);
}
diff --git a/kppp/modemdb.h b/kppp/modemdb.h
index 92606697..35ddbcff 100644
--- a/kppp/modemdb.h
+++ b/kppp/modemdb.h
@@ -35,40 +35,40 @@
#ifndef __MODEMDB__H__
#define __MODEMDB__H__
-#include <qdialog.h>
-#include <qstringlist.h>
-#include <qdict.h>
-#include <qptrlist.h>
+#include <tqdialog.h>
+#include <tqstringlist.h>
+#include <tqdict.h>
+#include <tqptrlist.h>
class KConfig;
class QListBox;
-typedef QDict<QString> CharDict;
+typedef TQDict<TQString> CharDict;
class ModemDatabase {
public:
ModemDatabase();
~ModemDatabase();
- const QStringList *vendors();
- QStringList *models(QString vendor);
+ const TQStringList *vendors();
+ TQStringList *models(TQString vendor);
void save(KConfig *);
private:
void load();
- void loadModem(const QString & key, CharDict &dict);
- QPtrList<CharDict> modems;
+ void loadModem(const TQString & key, CharDict &dict);
+ TQPtrList<CharDict> modems;
- QStringList *lvendors;
+ TQStringList *lvendors;
KConfig *modemDB;
};
-class ModemSelector : public QDialog {
+class ModemSelector : public TQDialog {
Q_OBJECT
public:
- ModemSelector(QWidget *parent = 0);
+ ModemSelector(TQWidget *parent = 0);
~ModemSelector();
private slots:
@@ -77,8 +77,8 @@ private slots:
void selected(int idx);
private:
- QPushButton *ok, *cancel;
- QListBox *vendor, *model;
+ TQPushButton *ok, *cancel;
+ TQListBox *vendor, *model;
ModemDatabase *db;
};
diff --git a/kppp/modeminfo.cpp b/kppp/modeminfo.cpp
index bf7ed8dd..9e6668d8 100644
--- a/kppp/modeminfo.cpp
+++ b/kppp/modeminfo.cpp
@@ -25,8 +25,8 @@
*/
#include <unistd.h>
-#include <qregexp.h>
-#include <qlayout.h>
+#include <tqregexp.h>
+#include <tqlayout.h>
#include <kwin.h>
#include <kmessagebox.h>
#include <kapplication.h>
@@ -35,19 +35,19 @@
#include "modem.h"
#include <klocale.h>
-ModemTransfer::ModemTransfer(QWidget *parent, const char *name)
- : QDialog(parent, name,TRUE, WStyle_Customize|WStyle_NormalBorder)
+ModemTransfer::ModemTransfer(TQWidget *parent, const char *name)
+ : TQDialog(parent, name,TRUE, WStyle_Customize|WStyle_NormalBorder)
{
setCaption(i18n("ATI Query"));
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
- QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
+ TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10);
progressBar = new KProgress(this, "bar");
progressBar->setTotalSteps(8);
- statusBar = new QLabel(this,"sBar");
- statusBar->setFrameStyle(QFrame::Panel|QFrame::Sunken);
+ statusBar = new TQLabel(this,"sBar");
+ statusBar->setFrameStyle(TQFrame::Panel|TQFrame::Sunken);
statusBar->setAlignment(AlignCenter);
// This is a rather complicated case. Since we do not know which
@@ -67,9 +67,9 @@ ModemTransfer::ModemTransfer(QWidget *parent, const char *name)
cancel = new KPushButton(KStdGuiItem::cancel(), this);
cancel->setFocus();
- connect(cancel, SIGNAL(clicked()), SLOT(cancelbutton()));
+ connect(cancel, TQT_SIGNAL(clicked()), TQT_SLOT(cancelbutton()));
- QHBoxLayout *l1 = new QHBoxLayout;
+ TQHBoxLayout *l1 = new QHBoxLayout;
tl->addLayout(l1);
l1->addStretch(1);
l1->addWidget(cancel);
@@ -80,14 +80,14 @@ ModemTransfer::ModemTransfer(QWidget *parent, const char *name)
////////////////////////////////////////////////
- timeout_timer = new QTimer(this);
- connect(timeout_timer, SIGNAL(timeout()), SLOT(time_out_slot()));
+ timeout_timer = new TQTimer(this);
+ connect(timeout_timer, TQT_SIGNAL(timeout()), TQT_SLOT(time_out_slot()));
- scripttimer = new QTimer(this);
- connect(scripttimer, SIGNAL(timeout()), SLOT(do_script()));
+ scripttimer = new TQTimer(this);
+ connect(scripttimer, TQT_SIGNAL(timeout()), TQT_SLOT(do_script()));
timeout_timer->start(15000,TRUE); // 15 secs single shot
- QTimer::singleShot(500, this, SLOT(init()));
+ TQTimer::singleShot(500, this, TQT_SLOT(init()));
}
@@ -151,7 +151,7 @@ void ModemTransfer::init() {
// clear modem buffer
Modem::modem->flush();
- Modem::modem->notify(this, SLOT(readChar(unsigned char)));
+ Modem::modem->notify(this, TQT_SLOT(readChar(unsigned char)));
return;
}
}
@@ -164,8 +164,8 @@ void ModemTransfer::init() {
void ModemTransfer::do_script() {
- QString msg;
- QString query;
+ TQString msg;
+ TQString query;
switch(step) {
case 0:
@@ -207,7 +207,7 @@ void ModemTransfer::readtty() {
if (step == 0)
return;
- readbuffer.replace(QRegExp("[\n\r]")," "); // remove stray \n and \r
+ readbuffer.replace(TQRegExp("[\n\r]")," "); // remove stray \n and \r
readbuffer = readbuffer.stripWhiteSpace(); // strip of leading or trailing white
// space
@@ -234,23 +234,23 @@ void ModemTransfer::cancelbutton() {
}
-void ModemTransfer::closeEvent( QCloseEvent *e ) {
+void ModemTransfer::closeEvent( TQCloseEvent *e ) {
cancelbutton();
e->accept();
}
-ModemInfo::ModemInfo(QWidget *parent, const char* name)
- : QDialog(parent, name, TRUE, WStyle_Customize|WStyle_NormalBorder)
+ModemInfo::ModemInfo(TQWidget *parent, const char* name)
+ : TQDialog(parent, name, TRUE, WStyle_Customize|WStyle_NormalBorder)
{
- QString label_text;
+ TQString label_text;
setCaption(i18n("Modem Query Results"));
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
- QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
+ TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10);
- QGridLayout *l1 = new QGridLayout(NUM_OF_ATI, 2, 5);
+ TQGridLayout *l1 = new TQGridLayout(NUM_OF_ATI, 2, 5);
tl->addLayout(l1, 1);
for(int i = 0 ; i < NUM_OF_ATI ; i++) {
@@ -260,31 +260,31 @@ ModemInfo::ModemInfo(QWidget *parent, const char* name)
else
label_text.sprintf("ATI %d:", i );
- ati_label[i] = new QLabel(label_text, this);
+ ati_label[i] = new TQLabel(label_text, this);
l1->addWidget(ati_label[i], i, 0);
- ati_label_result[i] = new QLineEdit(this);
+ ati_label_result[i] = new TQLineEdit(this);
ati_label_result[i]->setMinimumWidth(fontMetrics().width('H') * 24);
l1->addWidget(ati_label_result[i], i, 1);
}
//tl->addSpacing(1);
- QHBoxLayout *l2 = new QHBoxLayout;
- QPushButton *ok = new KPushButton(KStdGuiItem::close(), this);
+ TQHBoxLayout *l2 = new QHBoxLayout;
+ TQPushButton *ok = new KPushButton(KStdGuiItem::close(), this);
ok->setDefault(TRUE);
ok->setFocus();
tl->addLayout(l2);
l2->addStretch(1);
- connect(ok, SIGNAL(clicked()), SLOT(accept()));
+ connect(ok, TQT_SIGNAL(clicked()), TQT_SLOT(accept()));
l2->addWidget(ok);
setMinimumSize(sizeHint());
}
-void ModemInfo::setAtiString(int i, QString s) {
+void ModemInfo::setAtiString(int i, TQString s) {
if(i < NUM_OF_ATI)
ati_label_result[i]->setText(s);
}
diff --git a/kppp/modeminfo.h b/kppp/modeminfo.h
index dae93161..0298ecdd 100644
--- a/kppp/modeminfo.h
+++ b/kppp/modeminfo.h
@@ -28,21 +28,21 @@
#ifndef _MODEMINFO_H_
#define _MODEMINFO_H_
-#include <qdialog.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qevent.h>
-#include <qtimer.h>
+#include <tqdialog.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqevent.h>
+#include <tqtimer.h>
#include <kprogress.h>
const int NUM_OF_ATI = 8;
-class ModemTransfer : public QDialog {
+class ModemTransfer : public TQDialog {
Q_OBJECT
public:
- ModemTransfer(QWidget *parent=0, const char *name=0);
+ ModemTransfer(TQWidget *parent=0, const char *name=0);
public slots:
void init();
@@ -56,33 +56,33 @@ private:
void ati_done();
protected:
- void closeEvent(QCloseEvent *e);
+ void closeEvent(TQCloseEvent *e);
private:
int step;
- QString readbuffer;
+ TQString readbuffer;
- QPushButton *cancel;
+ TQPushButton *cancel;
KProgress *progressBar;
- QLabel *statusBar;
+ TQLabel *statusBar;
- QTimer *timeout_timer;
- QTimer *scripttimer;
- QString ati_query_strings[NUM_OF_ATI];
+ TQTimer *timeout_timer;
+ TQTimer *scripttimer;
+ TQString ati_query_strings[NUM_OF_ATI];
};
-class ModemInfo : public QDialog {
+class ModemInfo : public TQDialog {
Q_OBJECT
public:
- ModemInfo(QWidget *parent=0, const char *name=0);
+ ModemInfo(TQWidget *parent=0, const char *name=0);
public:
- void setAtiString(int num, QString s);
+ void setAtiString(int num, TQString s);
private:
- QLabel *ati_label[NUM_OF_ATI];
- QLineEdit *ati_label_result[NUM_OF_ATI];
+ TQLabel *ati_label[NUM_OF_ATI];
+ TQLineEdit *ati_label_result[NUM_OF_ATI];
};
#endif
diff --git a/kppp/modems.cpp b/kppp/modems.cpp
index f6970cc1..379b3c96 100644
--- a/kppp/modems.cpp
+++ b/kppp/modems.cpp
@@ -25,12 +25,12 @@
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qdir.h>
+#include <tqdir.h>
#include <stdlib.h>
-#include <qlayout.h>
-#include <qtabdialog.h>
-#include <qwhatsthis.h>
-#include <qmessagebox.h>
+#include <tqlayout.h>
+#include <tqtabdialog.h>
+#include <tqwhatsthis.h>
+#include <tqmessagebox.h>
#include <kapplication.h>
#include <kbuttonbox.h>
@@ -39,7 +39,7 @@
#include <kglobal.h>
#include <kwin.h>
#include <kdialogbase.h>
-#include <qvgroupbox.h>
+#include <tqvgroupbox.h>
#include "general.h"
#include "pppdata.h"
@@ -50,29 +50,29 @@
void parseargs(char* buf, char** args);
-ModemsWidget::ModemsWidget( QWidget *parent, const char *name )
- : QWidget( parent, name )
+ModemsWidget::ModemsWidget( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
int min = 0;
- QVBoxLayout *l1 = new QVBoxLayout(parent, 10, 10);
+ TQVBoxLayout *l1 = new TQVBoxLayout(parent, 10, 10);
// add a hbox
- QHBoxLayout *l11 = new QHBoxLayout;
+ TQHBoxLayout *l11 = new QHBoxLayout;
l1->addLayout(l11);
- modemlist_l = new QListBox(parent);
+ modemlist_l = new TQListBox(parent);
modemlist_l->setMinimumSize(160, 128);
- connect(modemlist_l, SIGNAL(highlighted(int)),
- this, SLOT(slotListBoxSelect(int)));
- connect(modemlist_l, SIGNAL(selected(int)),
- this, SLOT(editmodem()));
+ connect(modemlist_l, TQT_SIGNAL(highlighted(int)),
+ this, TQT_SLOT(slotListBoxSelect(int)));
+ connect(modemlist_l, TQT_SIGNAL(selected(int)),
+ this, TQT_SLOT(editmodem()));
l11->addWidget(modemlist_l, 10);
- QVBoxLayout *l111 = new QVBoxLayout;
+ TQVBoxLayout *l111 = new QVBoxLayout;
l11->addLayout(l111, 1);
- edit_b = new QPushButton(i18n("&Edit..."), parent);
- connect(edit_b, SIGNAL(clicked()), SLOT(editmodem()));
- QWhatsThis::add(edit_b, i18n("Allows you to modify the selected account"));
+ edit_b = new TQPushButton(i18n("&Edit..."), parent);
+ connect(edit_b, TQT_SIGNAL(clicked()), TQT_SLOT(editmodem()));
+ TQWhatsThis::add(edit_b, i18n("Allows you to modify the selected account"));
min = edit_b->sizeHint().width();
min = QMAX(70,min);
@@ -80,32 +80,32 @@ ModemsWidget::ModemsWidget( QWidget *parent, const char *name )
l111->addWidget(edit_b);
- new_b = new QPushButton(i18n("&New..."), parent);
- connect(new_b, SIGNAL(clicked()), SLOT(newmodem()));
+ new_b = new TQPushButton(i18n("&New..."), parent);
+ connect(new_b, TQT_SIGNAL(clicked()), TQT_SLOT(newmodem()));
l111->addWidget(new_b);
- QWhatsThis::add(new_b, i18n("Create a new dialup connection\n"
+ TQWhatsThis::add(new_b, i18n("Create a new dialup connection\n"
"to the Internet"));
- copy_b = new QPushButton(i18n("Co&py"), parent);
- connect(copy_b, SIGNAL(clicked()), SLOT(copymodem()));
+ copy_b = new TQPushButton(i18n("Co&py"), parent);
+ connect(copy_b, TQT_SIGNAL(clicked()), TQT_SLOT(copymodem()));
l111->addWidget(copy_b);
- QWhatsThis::add(copy_b,
+ TQWhatsThis::add(copy_b,
i18n("Makes a copy of the selected account. All\n"
"settings of the selected account are copied\n"
"to a new account that you can modify to fit your\n"
"needs"));
- delete_b = new QPushButton(i18n("De&lete"), parent);
- connect(delete_b, SIGNAL(clicked()), SLOT(deletemodem()));
+ delete_b = new TQPushButton(i18n("De&lete"), parent);
+ connect(delete_b, TQT_SIGNAL(clicked()), TQT_SLOT(deletemodem()));
l111->addWidget(delete_b);
- QWhatsThis::add(delete_b,
+ TQWhatsThis::add(delete_b,
i18n("<p>Deletes the selected account\n\n"
"<font color=\"red\"><b>Use with care!</b></font>"));
//load up account list from gppdata to the list box
// but keep the current one selected in gpppdata
if(gpppdata.modemCount() > 0) {
- const QString currentmodem = gpppdata.modname();
+ const TQString currentmodem = gpppdata.modname();
for(int i=0; i <= gpppdata.modemCount()-1; i++) {
gpppdata.setModemByIndex(i);
modemlist_l->insertItem(gpppdata.modname());
@@ -125,7 +125,7 @@ void ModemsWidget::slotListBoxSelect(int idx) {
edit_b->setEnabled((bool)(idx != -1));
copy_b->setEnabled((bool)(idx != -1));
if(idx!=-1) {
- QString modem = gpppdata.modname();
+ TQString modem = gpppdata.modname();
gpppdata.setModemByIndex(modemlist_l->currentItem());
gpppdata.setModem(modem);
}
@@ -136,7 +136,7 @@ void ModemsWidget::editmodem() {
int result = doTab();
- if(result == QDialog::Accepted) {
+ if(result == TQDialog::Accepted) {
modemlist_l->changeItem(gpppdata.modname(),modemlist_l->currentItem());
emit resetmodems();
gpppdata.save();
@@ -157,7 +157,7 @@ void ModemsWidget::newmodem() {
result = doTab();
- if(result == QDialog::Accepted) {
+ if(result == TQDialog::Accepted) {
modemlist_l->insertItem(gpppdata.modname());
modemlist_l->setSelected(modemlist_l->findItem(gpppdata.modname()),
true);
@@ -189,7 +189,7 @@ void ModemsWidget::copymodem() {
void ModemsWidget::deletemodem() {
- QString s = i18n("Are you sure you want to delete\nthe modem \"%1\"?")
+ TQString s = i18n("Are you sure you want to delete\nthe modem \"%1\"?")
.arg(modemlist_l->text(modemlist_l->currentItem()));
if(KMessageBox::warningContinueCancel(this, s, i18n("Confirm"), KStdGuiItem::del()) != KMessageBox::Continue)
@@ -207,7 +207,7 @@ void ModemsWidget::deletemodem() {
int ModemsWidget::doTab(){
- tabWindow = new KDialogBase( KDialogBase::Tabbed, QString::null,
+ tabWindow = new KDialogBase( KDialogBase::Tabbed, TQString::null,
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok,
0, 0, true);
KWin::setIcons(tabWindow->winId(), kapp->icon(), kapp->miniIcon());
@@ -217,14 +217,14 @@ int ModemsWidget::doTab(){
tabWindow->setCaption(i18n("New Modem"));
isnewmodem = true;
} else {
- QString tit = i18n("Edit Modem: ");
+ TQString tit = i18n("Edit Modem: ");
tit += gpppdata.modname();
tabWindow->setCaption(tit);
isnewmodem = false;
}
modem1 = new ModemWidget(tabWindow->addPage( i18n("&Device"), i18n("Serial Device")), isnewmodem );
modem2 = new ModemWidget2(tabWindow->addPage( i18n("&Modem"), i18n("Modem Settings")));
- connect ( modem1->connectName(), SIGNAL(textChanged ( const QString & )), this, SLOT(modemNameChanged(const QString & )));
+ connect ( modem1->connectName(), TQT_SIGNAL(textChanged ( const TQString & )), this, TQT_SLOT(modemNameChanged(const TQString & )));
modemNameChanged(modem1->connectName()->text());
int result = 0;
@@ -234,7 +234,7 @@ int ModemsWidget::doTab(){
result = tabWindow->exec();
ok = true;
- if(result == QDialog::Accepted) {
+ if(result == TQDialog::Accepted) {
if(modem1->save()) {
modem2->save();
} else {
@@ -249,15 +249,15 @@ int ModemsWidget::doTab(){
return result;
}
-void ModemsWidget::modemNameChanged(const QString & text)
+void ModemsWidget::modemNameChanged(const TQString & text)
{
tabWindow->enableButtonOK( !text.isEmpty() );
}
-QString ModemsWidget::prettyPrintVolume(unsigned int n) {
+TQString ModemsWidget::prettyPrintVolume(unsigned int n) {
int idx = 0;
- const QString quant[] = {i18n("Byte"), i18n("KB"),
- i18n("MB"), i18n("GB"), QString::null};
+ const TQString quant[] = {i18n("Byte"), i18n("KB"),
+ i18n("MB"), i18n("GB"), TQString::null};
float n1 = n;
while(n >= 1024 && !quant[idx].isNull()) {
@@ -269,7 +269,7 @@ QString ModemsWidget::prettyPrintVolume(unsigned int n) {
while(i--)
n1 = n1 / 1024.0;
- QString s = KGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 );
+ TQString s = KGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 );
s += " " + quant[idx];
return s;
}
diff --git a/kppp/modems.h b/kppp/modems.h
index 6676b7be..b197980e 100644
--- a/kppp/modems.h
+++ b/kppp/modems.h
@@ -28,9 +28,9 @@
#ifndef _MODEMS_H_
#define _MODEMS_H_
-#include <qwidget.h>
-#include <qpushbutton.h>
-#include <qlistbox.h>
+#include <tqwidget.h>
+#include <tqpushbutton.h>
+#include <tqlistbox.h>
#include "acctselect.h"
class KDialogBase;
@@ -43,10 +43,10 @@ class IPWidget;
class DNSWidget;
class GatewayWidget;
-class ModemsWidget : public QWidget {
+class ModemsWidget : public TQWidget {
Q_OBJECT
public:
- ModemsWidget( QWidget *parent=0, const char *name=0 );
+ ModemsWidget( TQWidget *parent=0, const char *name=0 );
~ModemsWidget() {}
private slots:
@@ -55,7 +55,7 @@ private slots:
void newmodem();
void deletemodem();
void slotListBoxSelect(int);
- void modemNameChanged(const QString &);
+ void modemNameChanged(const TQString &);
private:
int doTab();
@@ -64,7 +64,7 @@ signals:
void resetmodems();
private:
- QString prettyPrintVolume(unsigned int);
+ TQString prettyPrintVolume(unsigned int);
KDialogBase *tabWindow;
ModemWidget *modem1;
@@ -76,16 +76,16 @@ private:
GatewayWidget *gateway_w;
ScriptWidget *script_w;*/
- QLabel *costlabel;
- QLineEdit *costedit;
- QLabel *vollabel;
- QLineEdit *voledit;
+ TQLabel *costlabel;
+ TQLineEdit *costedit;
+ TQLabel *vollabel;
+ TQLineEdit *voledit;
- QListBox *modemlist_l;
- QPushButton *edit_b;
- QPushButton *copy_b;
- QPushButton *new_b;
- QPushButton *delete_b;
+ TQListBox *modemlist_l;
+ TQPushButton *edit_b;
+ TQPushButton *copy_b;
+ TQPushButton *new_b;
+ TQPushButton *delete_b;
};
#endif
diff --git a/kppp/newwidget.cpp b/kppp/newwidget.cpp
index d2182fba..ba8508e5 100644
--- a/kppp/newwidget.cpp
+++ b/kppp/newwidget.cpp
@@ -6,8 +6,8 @@
#include "newwidget.h"
-QLineEdit *newLineEdit(int visiblewidth, QWidget *parent) {
- QLineEdit *l = new QLineEdit(parent);
+TQLineEdit *newLineEdit(int visiblewidth, TQWidget *parent) {
+ TQLineEdit *l = new TQLineEdit(parent);
if(visiblewidth == 0)
l->setMinimumWidth(l->sizeHint().width());
else
diff --git a/kppp/newwidget.h b/kppp/newwidget.h
index 52f2ec76..2cb2e717 100644
--- a/kppp/newwidget.h
+++ b/kppp/newwidget.h
@@ -7,13 +7,13 @@
#ifndef __NEWWIDGET__H__
#define __NEWWIDGET__H__
-#include <qwidget.h>
-#include <qlineedit.h>
+#include <tqwidget.h>
+#include <tqlineedit.h>
#define L_FIXEDW 1
#define L_FIXEDH 2
#define L_FIXED (L_FIXEDW | L_FIXEDH)
-QLineEdit *newLineEdit(int visiblewidth, QWidget *parent);
+TQLineEdit *newLineEdit(int visiblewidth, TQWidget *parent);
#endif
diff --git a/kppp/pppdargs.cpp b/kppp/pppdargs.cpp
index ca235c6e..f03103bb 100644
--- a/kppp/pppdargs.cpp
+++ b/kppp/pppdargs.cpp
@@ -25,65 +25,65 @@
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kbuttonbox.h>
#include <kwin.h>
#include <kapplication.h>
#include "pppdargs.h"
#include "pppdata.h"
#include <klocale.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlistbox.h>
-#include <qlabel.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqlistbox.h>
+#include <tqlabel.h>
#include <kstdguiitem.h>
#include <kpushbutton.h>
#include <kstdguiitem.h>
-PPPdArguments::PPPdArguments(QWidget *parent, const char *name)
- : QDialog(parent, name, TRUE)
+PPPdArguments::PPPdArguments(TQWidget *parent, const char *name)
+ : TQDialog(parent, name, TRUE)
{
setCaption(i18n("Customize pppd Arguments"));
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
- QVBoxLayout *l = new QVBoxLayout(this, 10, 10);
- QHBoxLayout *tl = new QHBoxLayout(10);
+ TQVBoxLayout *l = new TQVBoxLayout(this, 10, 10);
+ TQHBoxLayout *tl = new TQHBoxLayout(10);
l->addLayout(tl);
- QVBoxLayout *l1 = new QVBoxLayout();
- QVBoxLayout *l2 = new QVBoxLayout();
+ TQVBoxLayout *l1 = new TQVBoxLayout();
+ TQVBoxLayout *l2 = new TQVBoxLayout();
tl->addLayout(l1, 1);
tl->addLayout(l2, 0);
- QHBoxLayout *l11 = new QHBoxLayout(10);
+ TQHBoxLayout *l11 = new TQHBoxLayout(10);
l1->addLayout(l11);
- argument_label = new QLabel(i18n("Arg&ument:"), this);
+ argument_label = new TQLabel(i18n("Arg&ument:"), this);
l11->addWidget(argument_label);
- argument = new QLineEdit(this);
+ argument = new TQLineEdit(this);
argument_label->setBuddy(argument);
- connect(argument, SIGNAL(returnPressed()),
- SLOT(addbutton()));
+ connect(argument, TQT_SIGNAL(returnPressed()),
+ TQT_SLOT(addbutton()));
l11->addWidget(argument);
- connect(argument, SIGNAL(textChanged(const QString &)),
- this, SLOT(textChanged(const QString &)));
+ connect(argument, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(textChanged(const TQString &)));
- arguments = new QListBox(this);
+ arguments = new TQListBox(this);
arguments->setMinimumSize(1, fontMetrics().lineSpacing()*10);
- connect(arguments, SIGNAL(highlighted(int)),
- this, SLOT(itemSelected(int)));
+ connect(arguments, TQT_SIGNAL(highlighted(int)),
+ this, TQT_SLOT(itemSelected(int)));
l1->addWidget(arguments, 1);
- add = new QPushButton(i18n("&Add"), this);
- connect(add, SIGNAL(clicked()), SLOT(addbutton()));
+ add = new TQPushButton(i18n("&Add"), this);
+ connect(add, TQT_SIGNAL(clicked()), TQT_SLOT(addbutton()));
l2->addWidget(add);
l2->addStretch(1);
- remove = new QPushButton(i18n("&Remove"), this);
- connect(remove, SIGNAL(clicked()), SLOT(removebutton()));
+ remove = new TQPushButton(i18n("&Remove"), this);
+ connect(remove, TQT_SIGNAL(clicked()), TQT_SLOT(removebutton()));
l2->addWidget(remove);
defaults = new KPushButton(KStdGuiItem::defaults(), this);
- connect(defaults, SIGNAL(clicked()), SLOT(defaultsbutton()));
+ connect(defaults, TQT_SIGNAL(clicked()), TQT_SLOT(defaultsbutton()));
l2->addWidget(defaults);
l->addSpacing(5);
@@ -91,10 +91,10 @@ PPPdArguments::PPPdArguments(QWidget *parent, const char *name)
KButtonBox *bbox = new KButtonBox(this);
bbox->addStretch(1);
closebtn = bbox->addButton(KStdGuiItem::ok());
- connect(closebtn, SIGNAL(clicked()), SLOT(closebutton()));
- QPushButton *cancel = bbox->addButton(KStdGuiItem::cancel());
- connect(cancel, SIGNAL(clicked()),
- this, SLOT(reject()));
+ connect(closebtn, TQT_SIGNAL(clicked()), TQT_SLOT(closebutton()));
+ TQPushButton *cancel = bbox->addButton(KStdGuiItem::cancel());
+ connect(cancel, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(reject()));
bbox->layout();
l->addWidget(bbox);
@@ -126,7 +126,7 @@ void PPPdArguments::removebutton() {
void PPPdArguments::defaultsbutton() {
// all of this is a hack
// save current list
- QStringList arglist(gpppdata.pppdArgument());
+ TQStringList arglist(gpppdata.pppdArgument());
// get defaults
gpppdata.setpppdArgumentDefaults();
@@ -138,7 +138,7 @@ void PPPdArguments::defaultsbutton() {
void PPPdArguments::closebutton() {
- QStringList arglist;
+ TQStringList arglist;
for(uint i=0; i < arguments->count(); i++)
arglist.append(arguments->text(i));
gpppdata.setpppdArgument(arglist);
@@ -151,15 +151,15 @@ void PPPdArguments::init() {
while(arguments->count())
arguments->removeItem(0);
- QStringList &arglist = gpppdata.pppdArgument();
- for ( QStringList::Iterator it = arglist.begin();
+ TQStringList &arglist = gpppdata.pppdArgument();
+ for ( TQStringList::Iterator it = arglist.begin();
it != arglist.end();
++it )
arguments->insertItem(*it);
}
-void PPPdArguments::textChanged(const QString &s) {
+void PPPdArguments::textChanged(const TQString &s) {
add->setEnabled(s.length() > 0);
}
diff --git a/kppp/pppdargs.h b/kppp/pppdargs.h
index 4c98b487..9e60764e 100644
--- a/kppp/pppdargs.h
+++ b/kppp/pppdargs.h
@@ -28,7 +28,7 @@
#ifndef _PPPDARGS_H_
#define _PPPDARGS_H_
-#include <qdialog.h>
+#include <tqdialog.h>
class QListBox;
class QLabel;
@@ -37,10 +37,10 @@ class QLineEdit;
class KPushButton;
-class PPPdArguments : public QDialog {
+class PPPdArguments : public TQDialog {
Q_OBJECT
public:
- PPPdArguments(QWidget *parent=0, const char *name=0);
+ PPPdArguments(TQWidget *parent=0, const char *name=0);
~PPPdArguments() {}
private slots:
@@ -48,23 +48,23 @@ private slots:
void removebutton();
void defaultsbutton();
void closebutton();
- void textChanged(const QString &);
+ void textChanged(const TQString &);
void itemSelected(int);
private:
void init();
- QLabel *argument_label;
+ TQLabel *argument_label;
- QLineEdit *argument;
+ TQLineEdit *argument;
- QPushButton *add;
- QPushButton *remove;
+ TQPushButton *add;
+ TQPushButton *remove;
KPushButton *defaults;
- QListBox *arguments;
+ TQListBox *arguments;
- QPushButton *closebtn;
+ TQPushButton *closebtn;
};
#endif
diff --git a/kppp/pppdata.cpp b/kppp/pppdata.cpp
index 56b2c580..2c43d7f7 100644
--- a/kppp/pppdata.cpp
+++ b/kppp/pppdata.cpp
@@ -96,8 +96,8 @@ bool PPPData::open() {
{
config->setGroup("Modem");
- QMap <QString, QString> map = config->entryMap("Modem");
- QMap <QString, QString>::ConstIterator it = map.begin();
+ TQMap <TQString, TQString> map = config->entryMap("Modem");
+ TQMap <TQString, TQString>::ConstIterator it = map.begin();
newmodem();
@@ -107,7 +107,7 @@ bool PPPData::open() {
it++;
}
- QString newname("Modem0");
+ TQString newname("Modem0");
setModname(newname);
}
@@ -163,8 +163,8 @@ int PPPData::access() const {
// functions to read/write date to configuration file
-QString PPPData::readConfig(const QString &group, const QString &key,
- const QString &defvalue = "")
+TQString PPPData::readConfig(const TQString &group, const TQString &key,
+ const TQString &defvalue = "")
{
if (config) {
config->setGroup(group);
@@ -174,7 +174,7 @@ QString PPPData::readConfig(const QString &group, const QString &key,
}
-int PPPData::readNumConfig(const QString &group, const QString &key,
+int PPPData::readNumConfig(const TQString &group, const TQString &key,
int defvalue) {
if (config) {
config->setGroup(group);
@@ -185,8 +185,8 @@ int PPPData::readNumConfig(const QString &group, const QString &key,
}
-bool PPPData::readListConfig(const QString &group, const QString &key,
- QStringList &list, char sep) {
+bool PPPData::readListConfig(const TQString &group, const TQString &key,
+ TQStringList &list, char sep) {
list.clear();
if (config) {
config->setGroup(group);
@@ -197,8 +197,8 @@ bool PPPData::readListConfig(const QString &group, const QString &key,
}
-void PPPData::writeConfig(const QString &group, const QString &key,
- const QString &value) {
+void PPPData::writeConfig(const TQString &group, const TQString &key,
+ const TQString &value) {
if (config) {
config->setGroup(group);
config->writeEntry(key, value);
@@ -206,7 +206,7 @@ void PPPData::writeConfig(const QString &group, const QString &key,
}
-void PPPData::writeConfig(const QString &group, const QString &key, int value) {
+void PPPData::writeConfig(const TQString &group, const TQString &key, int value) {
if (config) {
config->setGroup(group);
config->writeEntry(key, value);
@@ -214,8 +214,8 @@ void PPPData::writeConfig(const QString &group, const QString &key, int value) {
}
-void PPPData::writeListConfig(const QString &group, const QString &key,
- QStringList &list, char sep) {
+void PPPData::writeListConfig(const TQString &group, const TQString &key,
+ TQStringList &list, char sep) {
if (config) {
config->setGroup(group);
config->writeEntry(key, list, sep);
@@ -226,22 +226,22 @@ void PPPData::writeListConfig(const QString &group, const QString &key,
//
// functions to set/return general information
//
-QString PPPData::password() const {
+TQString PPPData::password() const {
return passwd;
}
-void PPPData::setPassword(const QString &pw) {
+void PPPData::setPassword(const TQString &pw) {
passwd = pw;
}
-const QString PPPData::defaultAccount() {
+const TQString PPPData::defaultAccount() {
return readConfig(GENERAL_GRP, DEFAULTACCOUNT_KEY);
}
-void PPPData::setDefaultAccount(const QString &n) {
+void PPPData::setDefaultAccount(const TQString &n) {
writeConfig(GENERAL_GRP, DEFAULTACCOUNT_KEY, n);
//now set the current account index to the default account
@@ -249,12 +249,12 @@ void PPPData::setDefaultAccount(const QString &n) {
}
-const QString PPPData::defaultModem() {
+const TQString PPPData::defaultModem() {
return readConfig(GENERAL_GRP, DEFAULTMODEM_KEY);
}
-void PPPData::setDefaultModem(const QString &n) {
+void PPPData::setDefaultModem(const TQString &n) {
writeConfig(GENERAL_GRP, DEFAULTMODEM_KEY, n);
//now set the current modem index to the default modem
@@ -349,8 +349,8 @@ void PPPData::set_dock_into_panel(bool set) {
}
-QString PPPData::pppdVersion() {
- return QString("%1.%2.%3").arg(pppdVer).arg(pppdMod).arg(pppdPatch);
+TQString PPPData::pppdVersion() {
+ return TQString("%1.%2.%3").arg(pppdVer).arg(pppdMod).arg(pppdPatch);
}
bool PPPData::pppdVersionMin(int ver, int mod, int patch) {
@@ -380,7 +380,7 @@ int PPPData::modemCount() const {
}
-bool PPPData::setModem(const QString &mname) {
+bool PPPData::setModem(const TQString &mname) {
for(int i = 0; i <= modemhighcount; i++) {
setModemByIndex(i);
if(modname() == mname) {
@@ -402,7 +402,7 @@ bool PPPData::setModemByIndex(int i) {
}
-bool PPPData::isUniqueModname(const QString &n) {
+bool PPPData::isUniqueModname(const TQString &n) {
int current = cmodem;
for(int i=0; i <= modemhighcount; i++) {
setModemByIndex(i);
@@ -420,8 +420,8 @@ bool PPPData::deleteModem() {
if(cmodem < 0)
return false;
- QMap <QString, QString> map;
- QMap <QString, QString>::Iterator it;
+ TQMap <TQString, TQString> map;
+ TQMap <TQString, TQString>::Iterator it;
// set all entries of the current modem to ""
map = config->entryMap(cmodemgroup);
@@ -463,7 +463,7 @@ bool PPPData::deleteModem() {
return true;
}
-bool PPPData::deleteModem(const QString &mname) {
+bool PPPData::deleteModem(const TQString &mname) {
if(!setModem(mname))
return false;
@@ -495,10 +495,10 @@ int PPPData::copymodem(int i) {
setModemByIndex(i);
- QMap <QString, QString> map = config->entryMap(cmodemgroup);
- QMap <QString, QString>::ConstIterator it = map.begin();
+ TQMap <TQString, TQString> map = config->entryMap(cmodemgroup);
+ TQMap <TQString, TQString>::ConstIterator it = map.begin();
- QString newname = i18n("%1_copy").arg(modname());
+ TQString newname = i18n("%1_copy").arg(modname());
newmodem();
@@ -514,11 +514,11 @@ int PPPData::copymodem(int i) {
}
-const QString PPPData::modname() {
+const TQString PPPData::modname() {
return readConfig(cmodemgroup, MOD_NAME_KEY);
}
-void PPPData::setModname(const QString &n) {
+void PPPData::setModname(const TQString &n) {
if(!cmodemgroup.isNull()) {
// are we manipulating the default modem's name ? then change it, too.
bool def = modname() == defaultModem();
@@ -531,29 +531,29 @@ void PPPData::setModname(const QString &n) {
-const QString PPPData::modemDevice() {
+const TQString PPPData::modemDevice() {
return readConfig (cmodemgroup, MODEMDEV_KEY, devices[DEV_DEFAULT]);
}
-void PPPData::setModemDevice(const QString &n) {
+void PPPData::setModemDevice(const TQString &n) {
writeConfig(cmodemgroup, MODEMDEV_KEY, n);
}
-QString PPPData::flowcontrol() {
+TQString PPPData::flowcontrol() {
// keep default value in sync with general.cpp
return readConfig(cmodemgroup, FLOWCONTROL_KEY, i18n("Hardware [CRTSCTS]"));
}
-void PPPData::setFlowcontrol(const QString &n) {
+void PPPData::setFlowcontrol(const TQString &n) {
writeConfig(cmodemgroup, FLOWCONTROL_KEY, n);
}
-const QString PPPData::speed() {
- QString s = readConfig(cmodemgroup, SPEED_KEY, "57600");
+const TQString PPPData::speed() {
+ TQString s = readConfig(cmodemgroup, SPEED_KEY, "57600");
// undo the damage of a bug in former versions. It left an empty Speed=
// entry in kppprc. kppp did set the serial port to 57600 as default but
// pppd wouldn't receive the speed via the command line.
@@ -563,7 +563,7 @@ const QString PPPData::speed() {
}
-void PPPData::setSpeed(const QString &n) {
+void PPPData::setSpeed(const TQString &n) {
writeConfig(cmodemgroup, SPEED_KEY, n);
}
@@ -579,22 +579,22 @@ int PPPData::UseCDLine() {
}
#endif
-const QString PPPData::modemEscapeStr() {
+const TQString PPPData::modemEscapeStr() {
return readConfig(cmodemgroup,ESCAPESTR_KEY,"+++");
}
-void PPPData::setModemEscapeStr(const QString &n) {
+void PPPData::setModemEscapeStr(const TQString &n) {
writeConfig(cmodemgroup,ESCAPESTR_KEY,n);
}
-const QString PPPData::modemEscapeResp() {
+const TQString PPPData::modemEscapeResp() {
return readConfig(cmodemgroup,ESCAPERESP_KEY,"OK");
}
-void PPPData::setModemEscapeResp(const QString &n) {
+void PPPData::setModemEscapeResp(const TQString &n) {
writeConfig(cmodemgroup,ESCAPERESP_KEY,n);
}
@@ -653,28 +653,28 @@ void PPPData::setbusyWait(int n) {
//Advanced "Modem" dialog
//
// defaults: InitString=ATZ, InitString1="" etc.
-const QString PPPData::modemInitStr(int i) {
+const TQString PPPData::modemInitStr(int i) {
assert(i >= 0 && i < NumInitStrings);
if(i == 0)
return readConfig(cmodemgroup, INITSTR_KEY, "ATZ");
else
- return readConfig(cmodemgroup, INITSTR_KEY + QString::number(i), "");
+ return readConfig(cmodemgroup, INITSTR_KEY + TQString::number(i), "");
}
-void PPPData::setModemInitStr(int i, const QString &n) {
+void PPPData::setModemInitStr(int i, const TQString &n) {
assert(i >= 0 && i < NumInitStrings);
- QString k = INITSTR_KEY + (i > 0 ? QString::number(i) : "");
+ TQString k = INITSTR_KEY + (i > 0 ? TQString::number(i) : "");
writeConfig(cmodemgroup, k, n);
}
-const QString PPPData::modemInitResp() {
+const TQString PPPData::modemInitResp() {
return readConfig(cmodemgroup, INITRESP_KEY, "OK");
}
-void PPPData::setModemInitResp(const QString &n) {
+void PPPData::setModemInitResp(const TQString &n) {
writeConfig(cmodemgroup, INITRESP_KEY, n);
}
@@ -698,133 +698,133 @@ void PPPData::setModemInitDelay(int n) {
writeConfig(cmodemgroup, INITDELAY_KEY, n);
}
-QString PPPData::modemNoDialToneDetectionStr() {
+TQString PPPData::modemNoDialToneDetectionStr() {
return readConfig(cmodemgroup, NODTDETECT_KEY, "ATX3");
}
-void PPPData::setModemNoDialToneDetectionStr(const QString &n) {
+void PPPData::setModemNoDialToneDetectionStr(const TQString &n) {
writeConfig(cmodemgroup, NODTDETECT_KEY, n);
}
-const QString PPPData::modemDialStr() {
+const TQString PPPData::modemDialStr() {
return readConfig(cmodemgroup, DIALSTR_KEY, "ATDT");
}
-void PPPData::setModemDialStr(const QString &n) {
+void PPPData::setModemDialStr(const TQString &n) {
writeConfig(cmodemgroup, DIALSTR_KEY, n);
}
-const QString PPPData::modemConnectResp() {
+const TQString PPPData::modemConnectResp() {
return readConfig(cmodemgroup, CONNECTRESP_KEY, "CONNECT");
}
-void PPPData::setModemConnectResp(const QString &n) {
+void PPPData::setModemConnectResp(const TQString &n) {
writeConfig(cmodemgroup, CONNECTRESP_KEY, n);
}
-const QString PPPData::modemBusyResp() {
+const TQString PPPData::modemBusyResp() {
return readConfig(cmodemgroup, BUSYRESP_KEY, "BUSY");
}
-void PPPData::setModemBusyResp(const QString &n) {
+void PPPData::setModemBusyResp(const TQString &n) {
writeConfig(cmodemgroup, BUSYRESP_KEY, n);
}
-const QString PPPData::modemNoCarrierResp() {
+const TQString PPPData::modemNoCarrierResp() {
return readConfig(cmodemgroup, NOCARRIERRESP_KEY, "NO CARRIER");
}
-void PPPData::setModemNoCarrierResp(const QString &n) {
+void PPPData::setModemNoCarrierResp(const TQString &n) {
writeConfig(cmodemgroup, NOCARRIERRESP_KEY, n);
}
-const QString PPPData::modemNoDialtoneResp() {
+const TQString PPPData::modemNoDialtoneResp() {
return readConfig(cmodemgroup, NODIALTONERESP_KEY, "NO DIALTONE");
}
-void PPPData::setModemNoDialtoneResp(const QString &n) {
+void PPPData::setModemNoDialtoneResp(const TQString &n) {
writeConfig(cmodemgroup, NODIALTONERESP_KEY, n);
}
-const QString PPPData::modemHangupStr() {
+const TQString PPPData::modemHangupStr() {
return readConfig(cmodemgroup, HANGUPSTR_KEY, "+++ATH");
}
-void PPPData::setModemHangupStr(const QString &n) {
+void PPPData::setModemHangupStr(const TQString &n) {
writeConfig(cmodemgroup, HANGUPSTR_KEY, n);
}
-const QString PPPData::modemHangupResp() {
+const TQString PPPData::modemHangupResp() {
return readConfig(cmodemgroup, HANGUPRESP_KEY, "OK");
}
-void PPPData::setModemHangupResp(const QString &n) {
+void PPPData::setModemHangupResp(const TQString &n) {
writeConfig(cmodemgroup, HANGUPRESP_KEY, n);
}
-QString PPPData::modemDLPResp() {
+TQString PPPData::modemDLPResp() {
return readConfig(cmodemgroup, DLPRESP_KEY, "DIGITAL LINE DETECTED");
}
-void PPPData::setModemDLPResp(const QString &n) {
+void PPPData::setModemDLPResp(const TQString &n) {
writeConfig(cmodemgroup, DLPRESP_KEY, n);
}
-const QString PPPData::modemAnswerStr() {
+const TQString PPPData::modemAnswerStr() {
return readConfig(cmodemgroup, ANSWERSTR_KEY, "ATA");
}
-QString PPPData::volumeOff() {
+TQString PPPData::volumeOff() {
return readConfig(cmodemgroup, VOLUME_OFF, "M0L0");
}
-void PPPData::setVolumeOff(const QString &s) {
+void PPPData::setVolumeOff(const TQString &s) {
writeConfig(cmodemgroup, VOLUME_OFF, s);
}
-QString PPPData::volumeMedium() {
+TQString PPPData::volumeMedium() {
return readConfig(cmodemgroup, VOLUME_MEDIUM, "M1L1");
}
-void PPPData::setVolumeMedium(const QString &s) {
+void PPPData::setVolumeMedium(const TQString &s) {
writeConfig(cmodemgroup, VOLUME_MEDIUM, s);
}
-QString PPPData::volumeHigh() {
- QString tmp = readConfig(cmodemgroup, VOLUME_HIGH, "M1L3");
+TQString PPPData::volumeHigh() {
+ TQString tmp = readConfig(cmodemgroup, VOLUME_HIGH, "M1L3");
if(tmp == "M1L4")
tmp = "M1L3";
return tmp;
}
-void PPPData::setVolumeHigh(const QString &s) {
+void PPPData::setVolumeHigh(const TQString &s) {
writeConfig(cmodemgroup, VOLUME_HIGH, s);
}
-QString PPPData::volumeInitString() {
- QString s;
+TQString PPPData::volumeInitString() {
+ TQString s;
switch(volume()) {
case 0:
@@ -861,37 +861,37 @@ void PPPData::setWaitForDialTone(int i) {
writeConfig(cmodemgroup, DIALTONEWAIT_KEY, i);
}
-void PPPData::setModemAnswerStr(const QString &n) {
+void PPPData::setModemAnswerStr(const TQString &n) {
writeConfig(cmodemgroup, ANSWERSTR_KEY, n);
}
-const QString PPPData::modemRingResp() {
+const TQString PPPData::modemRingResp() {
return readConfig(cmodemgroup, RINGRESP_KEY, "RING");
}
-void PPPData::setModemRingResp(const QString &n) {
+void PPPData::setModemRingResp(const TQString &n) {
writeConfig(cmodemgroup, RINGRESP_KEY, n);
}
-const QString PPPData::modemAnswerResp() {
+const TQString PPPData::modemAnswerResp() {
return readConfig(cmodemgroup, ANSWERRESP_KEY, "CONNECT");
}
-void PPPData::setModemAnswerResp(const QString &n) {
+void PPPData::setModemAnswerResp(const TQString &n) {
writeConfig(cmodemgroup, ANSWERRESP_KEY, n);
}
-const QString PPPData::enter() {
+const TQString PPPData::enter() {
return readConfig(cmodemgroup, ENTER_KEY, "CR");
}
-void PPPData::setEnter(const QString &n) {
+void PPPData::setEnter(const TQString &n) {
writeConfig(cmodemgroup, ENTER_KEY, n);
}
@@ -906,7 +906,7 @@ int PPPData::accountCount() const {
}
-bool PPPData::setAccount(const QString &aname) {
+bool PPPData::setAccount(const TQString &aname) {
for(int i = 0; i <= accounthighcount; i++) {
setAccountByIndex(i);
if(accname() == aname) {
@@ -928,7 +928,7 @@ bool PPPData::setAccountByIndex(int i) {
}
-bool PPPData::isUniqueAccname(const QString &n) {
+bool PPPData::isUniqueAccname(const TQString &n) {
if(n.contains(':'))
return false;
int current = caccount;
@@ -948,8 +948,8 @@ bool PPPData::deleteAccount() {
if(caccount < 0)
return false;
- QMap <QString, QString> map;
- QMap <QString, QString>::Iterator it;
+ TQMap <TQString, TQString> map;
+ TQMap <TQString, TQString>::Iterator it;
// set all entries of the current account to ""
map = config->entryMap(caccountgroup);
@@ -991,7 +991,7 @@ bool PPPData::deleteAccount() {
return true;
}
-bool PPPData::deleteAccount(const QString &aname) {
+bool PPPData::deleteAccount(const TQString &aname) {
if(!setAccount(aname))
return false;
@@ -1023,10 +1023,10 @@ int PPPData::copyaccount(int i) {
setAccountByIndex(i);
- QMap <QString, QString> map = config->entryMap(caccountgroup);
- QMap <QString, QString>::ConstIterator it = map.begin();
+ TQMap <TQString, TQString> map = config->entryMap(caccountgroup);
+ TQMap <TQString, TQString>::ConstIterator it = map.begin();
- QString newname = i18n("%1_copy").arg(accname());
+ TQString newname = i18n("%1_copy").arg(accname());
newaccount();
@@ -1042,11 +1042,11 @@ int PPPData::copyaccount(int i) {
}
-const QString PPPData::accname() {
+const TQString PPPData::accname() {
return readConfig(caccountgroup, ACC_NAME_KEY);
}
-void PPPData::setAccname(const QString &n) {
+void PPPData::setAccname(const TQString &n) {
if(!caccountgroup.isNull()) {
// are we manipulating the default account's name ? then change it, too.
bool def = accname() == defaultAccount();
@@ -1058,7 +1058,7 @@ void PPPData::setAccname(const QString &n) {
#define SEPARATOR_CHAR ':'
-QStringList &PPPData::phonenumbers() {
+TQStringList &PPPData::phonenumbers() {
readListConfig(caccountgroup, PHONENUMBER_KEY, phonelist, SEPARATOR_CHAR);
return phonelist;
@@ -1066,22 +1066,22 @@ QStringList &PPPData::phonenumbers() {
}
-const QString PPPData::phonenumber() {
+const TQString PPPData::phonenumber() {
return readConfig(caccountgroup, PHONENUMBER_KEY);
}
-void PPPData::setPhonenumber(const QString &n) {
+void PPPData::setPhonenumber(const TQString &n) {
writeConfig(caccountgroup, PHONENUMBER_KEY, n);
}
-const QString PPPData::dialPrefix() {
+const TQString PPPData::dialPrefix() {
return readConfig(caccountgroup, DIAL_PREFIX_KEY, "");
}
-void PPPData::setDialPrefix(const QString &s) {
+void PPPData::setDialPrefix(const TQString &s) {
writeConfig(caccountgroup, DIAL_PREFIX_KEY, s);
}
@@ -1096,22 +1096,22 @@ void PPPData::setAuthMethod(int value) {
}
-const QString PPPData::storedUsername() {
+const TQString PPPData::storedUsername() {
return readConfig(caccountgroup, STORED_USERNAME_KEY, "");
}
-void PPPData::setStoredUsername(const QString &b) {
+void PPPData::setStoredUsername(const TQString &b) {
writeConfig(caccountgroup, STORED_USERNAME_KEY, b);
}
-const QString PPPData::storedPassword() {
+const TQString PPPData::storedPassword() {
return readConfig(caccountgroup, STORED_PASSWORD_KEY, "");
}
-void PPPData::setStoredPassword(const QString &b) {
+void PPPData::setStoredPassword(const TQString &b) {
writeConfig(caccountgroup, STORED_PASSWORD_KEY, b);
}
@@ -1128,11 +1128,11 @@ void PPPData::setCallbackType(int value) {
writeConfig(caccountgroup, CALLBACK_TYPE_KEY, value);
}
-QString PPPData::callbackPhone() {
+TQString PPPData::callbackPhone() {
return readConfig(caccountgroup, CALLBACK_PHONE_KEY, "");
}
-void PPPData::setCallbackPhone(const QString &b) {
+void PPPData::setCallbackPhone(const TQString &b) {
writeConfig(caccountgroup, CALLBACK_PHONE_KEY, b);
}
@@ -1144,12 +1144,12 @@ void PPPData::setWaitCallback(bool value) {
waitcallback = value;
}
-const QString PPPData::command_before_connect() {
+const TQString PPPData::command_before_connect() {
return readConfig(caccountgroup, BEFORE_CONNECT_KEY);
}
-void PPPData::setCommand_before_connect(const QString &n) {
+void PPPData::setCommand_before_connect(const TQString &n) {
writeConfig(caccountgroup, BEFORE_CONNECT_KEY, n);
}
@@ -1159,52 +1159,52 @@ void PPPData::setStorePassword(bool b) {
}
-const QString PPPData::command_on_connect() {
+const TQString PPPData::command_on_connect() {
return readConfig(caccountgroup, COMMAND_KEY);
}
-void PPPData::setCommand_on_connect(const QString &n) {
+void PPPData::setCommand_on_connect(const TQString &n) {
writeConfig(caccountgroup, COMMAND_KEY, n);
}
-const QString PPPData::command_on_disconnect() {
+const TQString PPPData::command_on_disconnect() {
return readConfig(caccountgroup, DISCONNECT_COMMAND_KEY);
}
-void PPPData::setCommand_on_disconnect(const QString &n) {
+void PPPData::setCommand_on_disconnect(const TQString &n) {
writeConfig(caccountgroup, DISCONNECT_COMMAND_KEY, n);
}
-const QString PPPData::command_before_disconnect() {
+const TQString PPPData::command_before_disconnect() {
return readConfig(caccountgroup, BEFORE_DISCONNECT_KEY);
}
-void PPPData::setCommand_before_disconnect(const QString &n) {
+void PPPData::setCommand_before_disconnect(const TQString &n) {
writeConfig(caccountgroup, BEFORE_DISCONNECT_KEY, n);
}
-const QString PPPData::ipaddr() {
+const TQString PPPData::ipaddr() {
return readConfig(caccountgroup, IPADDR_KEY);
}
-void PPPData::setIpaddr(const QString &n) {
+void PPPData::setIpaddr(const TQString &n) {
writeConfig(caccountgroup, IPADDR_KEY, n);
}
-const QString PPPData::subnetmask() {
+const TQString PPPData::subnetmask() {
return readConfig(caccountgroup, SUBNETMASK_KEY);
}
-void PPPData::setSubnetmask(const QString &n) {
+void PPPData::setSubnetmask(const TQString &n) {
writeConfig(caccountgroup, SUBNETMASK_KEY, n);
}
@@ -1239,12 +1239,12 @@ void PPPData::setVolAcctEnabled(int set) {
}
-const QString PPPData::gateway() {
+const TQString PPPData::gateway() {
return readConfig(caccountgroup, GATEWAY_KEY);
}
-void PPPData::setGateway(const QString &n ) {
+void PPPData::setGateway(const TQString &n ) {
writeConfig(caccountgroup, GATEWAY_KEY, n);
}
@@ -1281,8 +1281,8 @@ bool PPPData::exDNSDisabled() {
}
-QStringList &PPPData::dns() {
- static QStringList dnslist;
+TQStringList &PPPData::dns() {
+ static TQStringList dnslist;
readListConfig(caccountgroup, DNS_KEY, dnslist);
while(dnslist.count() > MAX_DNS_ENTRIES)
@@ -1292,23 +1292,23 @@ QStringList &PPPData::dns() {
}
-void PPPData::setDns(QStringList &list) {
+void PPPData::setDns(TQStringList &list) {
writeListConfig(caccountgroup, DNS_KEY, list);
}
-const QString PPPData::domain() {
+const TQString PPPData::domain() {
return readConfig(caccountgroup, DOMAIN_KEY);
}
-void PPPData::setDomain(const QString &n ) {
+void PPPData::setDomain(const TQString &n ) {
writeConfig(caccountgroup, DOMAIN_KEY, n);
}
-QStringList &PPPData::scriptType() {
- static QStringList typelist;
+TQStringList &PPPData::scriptType() {
+ static TQStringList typelist;
readListConfig(caccountgroup, SCRIPTCOM_KEY, typelist);
while(typelist.count() > MAX_SCRIPT_ENTRIES)
@@ -1318,13 +1318,13 @@ QStringList &PPPData::scriptType() {
}
-void PPPData::setScriptType(QStringList &list) {
+void PPPData::setScriptType(TQStringList &list) {
writeListConfig(caccountgroup, SCRIPTCOM_KEY, list);
}
-QStringList &PPPData::script() {
- static QStringList scriptlist;
+TQStringList &PPPData::script() {
+ static TQStringList scriptlist;
readListConfig(caccountgroup, SCRIPTARG_KEY, scriptlist);
while(scriptlist.count() > MAX_SCRIPT_ENTRIES)
@@ -1334,27 +1334,27 @@ QStringList &PPPData::script() {
}
-void PPPData::setScript(QStringList &list) {
+void PPPData::setScript(TQStringList &list) {
writeListConfig(caccountgroup, SCRIPTARG_KEY, list);
}
-const QString PPPData::accountingFile() {
+const TQString PPPData::accountingFile() {
return readConfig(caccountgroup, ACCTFILE_KEY);
}
-void PPPData::setAccountingFile(const QString &n) {
+void PPPData::setAccountingFile(const TQString &n) {
writeConfig(caccountgroup, ACCTFILE_KEY, n);
}
-const QString PPPData::totalCosts() {
+const TQString PPPData::totalCosts() {
return readConfig(caccountgroup, TOTALCOSTS_KEY);
}
-void PPPData::setTotalCosts(const QString &n) {
+void PPPData::setTotalCosts(const TQString &n) {
writeConfig(caccountgroup, TOTALCOSTS_KEY, n);
}
@@ -1368,8 +1368,8 @@ void PPPData::setTotalBytes(int n) {
}
-QStringList &PPPData::pppdArgument() {
- static QStringList arglist;
+TQStringList &PPPData::pppdArgument() {
+ static TQStringList arglist;
while(arglist.count() > MAX_PPPD_ARGUMENTS)
arglist.remove(arglist.last());
@@ -1379,23 +1379,23 @@ QStringList &PPPData::pppdArgument() {
}
-void PPPData::setpppdArgument(QStringList &args) {
+void PPPData::setpppdArgument(TQStringList &args) {
writeListConfig(caccountgroup, PPPDARG_KEY, args);
}
void PPPData::setpppdArgumentDefaults() {
- QStringList arg;
+ TQStringList arg;
setpppdArgument(arg);
}
// graphing widget
void PPPData::setGraphingOptions(bool enable,
- QColor bg,
- QColor text,
- QColor in,
- QColor out)
+ TQColor bg,
+ TQColor text,
+ TQColor in,
+ TQColor out)
{
if(config) {
config->setGroup(GRAPH_GRP);
@@ -1408,12 +1408,12 @@ void PPPData::setGraphingOptions(bool enable,
}
void PPPData::graphingOptions(bool &enable,
- QColor &bg,
- QColor &text,
- QColor &in,
- QColor &out)
+ TQColor &bg,
+ TQColor &text,
+ TQColor &in,
+ TQColor &out)
{
- QColor c;
+ TQColor c;
if(config) {
config->setGroup(GRAPH_GRP);
@@ -1464,7 +1464,7 @@ void PPPData::setpppdError(int err) {
// window position
//
void PPPData::winPosConWin(int& p_x, int& p_y) {
- QRect desk = KGlobalSettings::splashScreenDesktopGeometry();
+ TQRect desk = KGlobalSettings::splashScreenDesktopGeometry();
p_x = readNumConfig(WINPOS_GRP, WINPOS_CONWIN_X, desk.center().x()-160);
p_y = readNumConfig(WINPOS_GRP, WINPOS_CONWIN_Y, desk.center().y()-55);
}
@@ -1475,7 +1475,7 @@ void PPPData::setWinPosConWin(int p_x, int p_y) {
}
void PPPData::winPosStatWin(int& p_x, int& p_y) {
- QRect desk = KGlobalSettings::splashScreenDesktopGeometry();
+ TQRect desk = KGlobalSettings::splashScreenDesktopGeometry();
p_x = readNumConfig(WINPOS_GRP, WINPOS_STATWIN_X, desk.center().x()-160);
p_y = readNumConfig(WINPOS_GRP, WINPOS_STATWIN_Y, desk.center().y()-55);
}
diff --git a/kppp/pppdata.h b/kppp/pppdata.h
index ac50a315..7879d1fa 100644
--- a/kppp/pppdata.h
+++ b/kppp/pppdata.h
@@ -31,9 +31,9 @@
#include <unistd.h>
#include <sys/types.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qcolor.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqcolor.h>
#include "kpppconfig.h"
@@ -179,29 +179,29 @@ public:
int access() const; // read/write access
// function to read/write date to configuration file
- QString readConfig(const QString &, const QString &, const QString &);
- int readNumConfig(const QString &, const QString &, int);
- bool readListConfig(const QString &, const QString &,
- QStringList &, char sep = ',');
- void writeConfig(const QString &, const QString &, const QString &);
- void writeConfig(const QString &, const QString &, int);
- void writeListConfig(const QString &, const QString &,
- QStringList &, char sep = ',');
+ TQString readConfig(const TQString &, const TQString &, const TQString &);
+ int readNumConfig(const TQString &, const TQString &, int);
+ bool readListConfig(const TQString &, const TQString &,
+ TQStringList &, char sep = ',');
+ void writeConfig(const TQString &, const TQString &, const TQString &);
+ void writeConfig(const TQString &, const TQString &, int);
+ void writeListConfig(const TQString &, const TQString &,
+ TQStringList &, char sep = ',');
// return the current account group
- QString currentAccountGroup() { return caccountgroup; }
+ TQString currentAccountGroup() { return caccountgroup; }
// return the current modem group
- QString currentModemGroup() { return cmodemgroup; }
+ TQString currentModemGroup() { return cmodemgroup; }
// functions to set/get general kppp info
- QString password() const;
- void setPassword(const QString &);
+ TQString password() const;
+ void setPassword(const TQString &);
- const QString defaultAccount();
- void setDefaultAccount(const QString &);
+ const TQString defaultAccount();
+ void setDefaultAccount(const TQString &);
- const QString defaultModem();
- void setDefaultModem(const QString &);
+ const TQString defaultModem();
+ void setDefaultModem(const TQString &);
void set_xserver_exit_disconnect(bool set);
bool get_xserver_exit_disconnect();
@@ -230,10 +230,10 @@ public:
void set_dock_into_panel(bool set);
bool get_dock_into_panel();
- const QString enter();
- void setEnter(const QString &);
+ const TQString enter();
+ void setEnter(const TQString &);
- QString pppdVersion();
+ TQString pppdVersion();
bool pppdVersionMin(int ver, int mod, int patch);
int pppdTimeout();
@@ -241,18 +241,18 @@ public:
// functions to set/get account information
int modemCount() const;
- bool setModem(const QString &);
+ bool setModem(const TQString &);
bool setModemByIndex(int);
- bool isUniqueModname(const QString &);
+ bool isUniqueModname(const TQString &);
bool deleteModem();
- bool deleteModem(const QString &);
+ bool deleteModem(const TQString &);
int newmodem();
int copymodem(int i);
- const QString modname();
- void setModname(const QString &);
+ const TQString modname();
+ void setModname(const TQString &);
int busyWait();
@@ -264,17 +264,17 @@ public:
int modemEscapeGuardTime();
void setModemEscapeGuardTime(int i);
- void setModemEscapeStr(const QString &);
- const QString modemEscapeStr();
+ void setModemEscapeStr(const TQString &);
+ const TQString modemEscapeStr();
- void setModemEscapeResp(const QString &);
- const QString modemEscapeResp();
+ void setModemEscapeResp(const TQString &);
+ const TQString modemEscapeResp();
- const QString modemDevice();
- void setModemDevice(const QString &);
+ const TQString modemDevice();
+ void setModemDevice(const TQString &);
- QString flowcontrol();
- void setFlowcontrol(const QString &);
+ TQString flowcontrol();
+ void setFlowcontrol(const TQString &);
int modemTimeout();
void setModemTimeout(int);
@@ -282,7 +282,7 @@ public:
int modemToneDuration();
void setModemToneDuration(int);
- QString volumeInitString();
+ TQString volumeInitString();
int volume();
void setVolume(int);
@@ -290,11 +290,11 @@ public:
void setWaitForDialTone(int i);
// modem command strings/responses
- const QString modemInitStr(int i);
- void setModemInitStr(int i, const QString &);
+ const TQString modemInitStr(int i);
+ void setModemInitStr(int i, const TQString &);
- const QString modemInitResp();
- void setModemInitResp(const QString &);
+ const TQString modemInitResp();
+ void setModemInitResp(const TQString &);
int modemPreInitDelay();
void setModemPreInitDelay(int);
@@ -302,50 +302,50 @@ public:
int modemInitDelay();
void setModemInitDelay(int);
- QString modemNoDialToneDetectionStr();
- void setModemNoDialToneDetectionStr(const QString &);
+ TQString modemNoDialToneDetectionStr();
+ void setModemNoDialToneDetectionStr(const TQString &);
- const QString modemDialStr();
- void setModemDialStr(const QString &);
+ const TQString modemDialStr();
+ void setModemDialStr(const TQString &);
- const QString modemConnectResp();
- void setModemConnectResp(const QString &);
+ const TQString modemConnectResp();
+ void setModemConnectResp(const TQString &);
- const QString modemBusyResp();
- void setModemBusyResp(const QString &);
+ const TQString modemBusyResp();
+ void setModemBusyResp(const TQString &);
- const QString modemNoCarrierResp();
- void setModemNoCarrierResp(const QString &);
+ const TQString modemNoCarrierResp();
+ void setModemNoCarrierResp(const TQString &);
- const QString modemNoDialtoneResp();
- void setModemNoDialtoneResp(const QString &);
+ const TQString modemNoDialtoneResp();
+ void setModemNoDialtoneResp(const TQString &);
- const QString modemHangupStr();
- void setModemHangupStr(const QString &);
+ const TQString modemHangupStr();
+ void setModemHangupStr(const TQString &);
- const QString modemHangupResp();
- void setModemHangupResp(const QString &);
+ const TQString modemHangupResp();
+ void setModemHangupResp(const TQString &);
- QString modemDLPResp();
- void setModemDLPResp(const QString &);
+ TQString modemDLPResp();
+ void setModemDLPResp(const TQString &);
- const QString modemAnswerStr();
- void setModemAnswerStr(const QString &);
+ const TQString modemAnswerStr();
+ void setModemAnswerStr(const TQString &);
- const QString modemRingResp();
- void setModemRingResp(const QString &);
+ const TQString modemRingResp();
+ void setModemRingResp(const TQString &);
- const QString modemAnswerResp();
- void setModemAnswerResp(const QString &);
+ const TQString modemAnswerResp();
+ void setModemAnswerResp(const TQString &);
- QString volumeOff();
- void setVolumeOff(const QString &);
+ TQString volumeOff();
+ void setVolumeOff(const TQString &);
- QString volumeMedium();
- void setVolumeMedium(const QString &);
+ TQString volumeMedium();
+ void setVolumeMedium(const TQString &);
- QString volumeHigh();
- void setVolumeHigh(const QString &);
+ TQString volumeHigh();
+ void setVolumeHigh(const TQString &);
#if 0
void setUseCDLine(const int n);
@@ -354,34 +354,34 @@ public:
// functions to set/get account information
int accountCount() const;
- bool setAccount(const QString &);
+ bool setAccount(const TQString &);
bool setAccountByIndex(int);
- bool isUniqueAccname(const QString &);
+ bool isUniqueAccname(const TQString &);
bool deleteAccount();
- bool deleteAccount(const QString &);
+ bool deleteAccount(const TQString &);
int newaccount();
int copyaccount(int i);
- const QString accname();
- void setAccname(const QString &);
+ const TQString accname();
+ void setAccname(const TQString &);
- QStringList &phonenumbers();
- const QString phonenumber();
- void setPhonenumber(const QString &);
+ TQStringList &phonenumbers();
+ const TQString phonenumber();
+ void setPhonenumber(const TQString &);
- const QString dialPrefix();
- void setDialPrefix(const QString &);
+ const TQString dialPrefix();
+ void setDialPrefix(const TQString &);
int authMethod();
void setAuthMethod(int);
- const QString storedUsername();
- void setStoredUsername(const QString &);
+ const TQString storedUsername();
+ void setStoredUsername(const TQString &);
- const QString storedPassword();
- void setStoredPassword(const QString &);
+ const TQString storedPassword();
+ void setStoredPassword(const TQString &);
bool storePassword();
void setStorePassword(bool);
@@ -389,32 +389,32 @@ public:
int callbackType();
void setCallbackType(int);
- QString callbackPhone();
- void setCallbackPhone(const QString &);
+ TQString callbackPhone();
+ void setCallbackPhone(const TQString &);
bool waitCallback();
void setWaitCallback(bool);
- const QString speed();
- void setSpeed(const QString &);
+ const TQString speed();
+ void setSpeed(const TQString &);
- const QString command_before_connect();
- void setCommand_before_connect(const QString &);
+ const TQString command_before_connect();
+ void setCommand_before_connect(const TQString &);
- const QString command_on_connect();
- void setCommand_on_connect(const QString &);
+ const TQString command_on_connect();
+ void setCommand_on_connect(const TQString &);
- const QString command_on_disconnect();
- void setCommand_on_disconnect(const QString &);
+ const TQString command_on_disconnect();
+ void setCommand_on_disconnect(const TQString &);
- const QString command_before_disconnect();
- void setCommand_before_disconnect(const QString &);
+ const TQString command_before_disconnect();
+ void setCommand_before_disconnect(const TQString &);
- const QString ipaddr();
- void setIpaddr(const QString &);
+ const TQString ipaddr();
+ void setIpaddr(const TQString &);
- const QString subnetmask();
- void setSubnetmask(const QString &);
+ const TQString subnetmask();
+ void setSubnetmask(const TQString &);
bool AcctEnabled();
void setAcctEnabled(bool set);
@@ -431,27 +431,27 @@ public:
bool autoname();
void setAutoname(bool set);
- const QString gateway();
- void setGateway(const QString &);
+ const TQString gateway();
+ void setGateway(const TQString &);
bool defaultroute();
void setDefaultroute(bool set);
- QStringList &dns();
- void setDns(QStringList &);
+ TQStringList &dns();
+ void setDns(TQStringList &);
- const QString domain();
- void setDomain(const QString &);
+ const TQString domain();
+ void setDomain(const TQString &);
- QStringList &scriptType();
- void setScriptType(QStringList &);
+ TQStringList &scriptType();
+ void setScriptType(TQStringList &);
- QStringList &script();
- void setScript(QStringList &);
+ TQStringList &script();
+ void setScript(TQStringList &);
- QStringList &pppdArgument();
+ TQStringList &pppdArgument();
void setpppdArgumentDefaults();
- void setpppdArgument(QStringList &);
+ void setpppdArgument(TQStringList &);
//functions to change/set the child pppd process info
bool pppdRunning() const;
@@ -461,26 +461,26 @@ public:
void setpppdError(int err);
// functions to set/query the accounting info
- const QString accountingFile();
- void setAccountingFile(const QString &);
+ const TQString accountingFile();
+ void setAccountingFile(const TQString &);
- const QString totalCosts();
- void setTotalCosts(const QString &);
+ const TQString totalCosts();
+ void setTotalCosts(const TQString &);
int totalBytes();
void setTotalBytes(int);
// graphing widget
void setGraphingOptions(bool enabled,
- QColor bg,
- QColor text,
- QColor in,
- QColor out);
+ TQColor bg,
+ TQColor text,
+ TQColor in,
+ TQColor out);
void graphingOptions(bool &enabled,
- QColor &bg,
- QColor &text,
- QColor &in,
- QColor &out);
+ TQColor &bg,
+ TQColor &text,
+ TQColor &in,
+ TQColor &out);
bool graphingEnabled();
// window positions
@@ -490,14 +490,14 @@ public:
void setWinPosStatWin(int, int);
private:
- QString passwd;
+ TQString passwd;
KConfig* config; // configuration object
int accounthighcount; // index of highest account
int caccount; // index of the current account
int modemhighcount; // index of highest modem
int cmodem; // index of the current modem
- QString cmodemgroup; // name of current modem group
- QString caccountgroup; // name of current account group
+ TQString cmodemgroup; // name of current modem group
+ TQString caccountgroup; // name of current account group
pid_t suidprocessid; // process ID of setuid child
bool pppdisrunning; // pppd process
// daemon
@@ -505,7 +505,7 @@ private:
int pppdVer, pppdMod, pppdPatch; // pppd version
bool waitcallback; // callback waiting flag
- QStringList phonelist;
+ TQStringList phonelist;
};
extern PPPData gpppdata;
diff --git a/kppp/ppplog.cpp b/kppp/ppplog.cpp
index f759377a..96ccaa34 100644
--- a/kppp/ppplog.cpp
+++ b/kppp/ppplog.cpp
@@ -27,9 +27,9 @@
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qdir.h>
-#include <qpushbutton.h>
+#include <tqlabel.h>
+#include <tqdir.h>
+#include <tqpushbutton.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -37,10 +37,10 @@
#include <unistd.h>
#include <sys/stat.h>
-#include <qdialog.h>
-#include <qregexp.h>
-#include <qmultilineedit.h>
-#include <qlayout.h>
+#include <tqdialog.h>
+#include <tqregexp.h>
+#include <tqmultilineedit.h>
+#include <tqlayout.h>
#include <kbuttonbox.h>
#include <kmessagebox.h>
@@ -50,7 +50,7 @@
#include <klocale.h>
-int PPPL_MakeLog(QStringList &list) {
+int PPPL_MakeLog(TQStringList &list) {
int pid = -1, newpid;
char buffer[1024], *p;
const char *pidp;
@@ -101,9 +101,9 @@ int PPPL_MakeLog(QStringList &list) {
"password=\"",
0};
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
- QCString tmp = (*it).local8Bit();
+ TQCString tmp = (*it).local8Bit();
for(int j = 0; keyword[j] != 0; j++) {
char *p;
@@ -120,8 +120,8 @@ int PPPL_MakeLog(QStringList &list) {
}
-void PPPL_AnalyseLog(QStringList &list, QStringList &result) {
- QString msg;
+void PPPL_AnalyseLog(TQStringList &list, TQStringList &result) {
+ TQString msg;
const char *rmsg = "Remote message: ";
result.clear();
@@ -160,13 +160,13 @@ void PPPL_AnalyseLog(QStringList &list, QStringList &result) {
// scan the log for keywords and try to offer any help
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
// look for remote message
int pos = (*it).find(rmsg);
if (pos != -1)
{
- QString str = (*it);
+ TQString str = (*it);
str.remove(0, pos + strlen(rmsg));
if(!str.isEmpty()) {
msg = i18n("Notice that the remote system has sent the following"
@@ -178,8 +178,8 @@ void PPPL_AnalyseLog(QStringList &list, QStringList &result) {
// check in the hint database
for(uint k = 0; hints[k].regexp != 0; k++) {
- QRegExp rx(hints[k].regexp);
- QString l(*it);
+ TQRegExp rx(hints[k].regexp);
+ TQString l(*it);
if(l.contains(rx)) {
result.append(i18n(hints[k].answer));
break;
@@ -196,15 +196,15 @@ void PPPL_AnalyseLog(QStringList &list, QStringList &result) {
void PPPL_ShowLog() {
- QStringList sl, result;
+ TQStringList sl, result;
PPPL_MakeLog(sl);
bool foundConnect = false;
bool foundLCP = gpppdata.getPPPDebug();
- QString lcp = QString::fromLatin1("[LCP");
- QString conn = QString::fromLatin1("Connect:");
- QStringList::ConstIterator it = sl.begin();
+ TQString lcp = TQString::fromLatin1("[LCP");
+ TQString conn = TQString::fromLatin1("Connect:");
+ TQStringList::ConstIterator it = sl.begin();
for( ; it != sl.end(); it++) {
if((*it).find(lcp) >= 0) {
foundLCP = true;
@@ -219,7 +219,7 @@ void PPPL_ShowLog() {
"that pppd was started without the \"debug\" option.\n"
"Without this option it's difficult to find out PPP "
"problems, so you should turn on the debug option.\n"
- "Shall I turn it on now?"), QString::null, i18n("Restart pppd"), i18n("Do Not Restart"));
+ "Shall I turn it on now?"), TQString::null, i18n("Restart pppd"), i18n("Do Not Restart"));
if(result == KMessageBox::Yes) {
gpppdata.setPPPDebug(TRUE);
@@ -236,19 +236,19 @@ void PPPL_ShowLog() {
PPPL_AnalyseLog(sl, result);
- QDialog *dlg = new QDialog(0, "", TRUE);
+ TQDialog *dlg = new TQDialog(0, "", TRUE);
dlg->setCaption(i18n("PPP Log"));
- QVBoxLayout *tl = new QVBoxLayout(dlg, 10, 10);
- QMultiLineEdit *edit = new QMultiLineEdit(dlg);
+ TQVBoxLayout *tl = new TQVBoxLayout(dlg, 10, 10);
+ TQMultiLineEdit *edit = new TQMultiLineEdit(dlg);
edit->setReadOnly(TRUE);
- QLabel *label = new QLabel(i18n("kppp's diagnosis (just guessing):"), dlg);
- QMultiLineEdit *diagnosis = new QMultiLineEdit(dlg);
+ TQLabel *label = new TQLabel(i18n("kppp's diagnosis (just guessing):"), dlg);
+ TQMultiLineEdit *diagnosis = new TQMultiLineEdit(dlg);
diagnosis->setReadOnly(TRUE);
KButtonBox *bbox = new KButtonBox(dlg);
bbox->addStretch(1);
- QPushButton *write = bbox->addButton(i18n("Write to File"));
- QPushButton *close = bbox->addButton(KStdGuiItem::close());
+ TQPushButton *write = bbox->addButton(i18n("Write to File"));
+ TQPushButton *close = bbox->addButton(KStdGuiItem::close());
bbox->layout();
edit->setMinimumSize(600, 250);
label->setMinimumSize(600, 15);
@@ -265,23 +265,23 @@ void PPPL_ShowLog() {
for(uint i = 0; i < result.count(); i++)
diagnosis->append(*result.at(i));
- dlg->connect(close, SIGNAL(clicked()),
- dlg, SLOT(reject()));
- dlg->connect(write, SIGNAL(clicked()),
- dlg, SLOT(accept()));
+ dlg->connect(close, TQT_SIGNAL(clicked()),
+ dlg, TQT_SLOT(reject()));
+ dlg->connect(write, TQT_SIGNAL(clicked()),
+ dlg, TQT_SLOT(accept()));
if(dlg->exec()) {
- QDir d = QDir::home();
- QString s = d.absPath() + "/PPP-logfile";
+ TQDir d = TQDir::home();
+ TQString s = d.absPath() + "/PPP-logfile";
int old_umask = umask(0077);
- FILE *f = fopen(QFile::encodeName(s), "w");
+ FILE *f = fopen(TQFile::encodeName(s), "w");
for(uint i = 0; i < sl.count(); i++)
fprintf(f, "%s\n", (*sl.at(i)).local8Bit().data());
fclose(f);
umask(old_umask);
- QString msg = i18n("The PPP log has been saved\nas \"%1\"!\n\nIf you want to send a bug report, or have\nproblems connecting to the Internet, please\nattach this file. It will help the maintainers\nto find the bug and to improve KPPP").arg(s);
+ TQString msg = i18n("The PPP log has been saved\nas \"%1\"!\n\nIf you want to send a bug report, or have\nproblems connecting to the Internet, please\nattach this file. It will help the maintainers\nto find the bug and to improve KPPP").arg(s);
KMessageBox::information(0, msg);
}
delete dlg;
diff --git a/kppp/ppplog.h b/kppp/ppplog.h
index 04d09b9f..bb752caf 100644
--- a/kppp/ppplog.h
+++ b/kppp/ppplog.h
@@ -32,8 +32,8 @@
class QStringList;
-int PPPL_MakeLog(QStringList &list);
-void PPPL_AnalyseLog(QStringList &list, QStringList &result);
+int PPPL_MakeLog(TQStringList &list);
+void PPPL_AnalyseLog(TQStringList &list, TQStringList &result);
void PPPL_ShowLog();
#endif
diff --git a/kppp/pppstatdlg.cpp b/kppp/pppstatdlg.cpp
index 8f3910a1..b991da27 100644
--- a/kppp/pppstatdlg.cpp
+++ b/kppp/pppstatdlg.cpp
@@ -23,17 +23,17 @@
*/
-#include <qlayout.h>
-#include <qpainter.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
#include <kwin.h>
#include <kiconloader.h>
#include <kapplication.h>
#include <klocale.h>
-#include <qlabel.h>
-#include <qframe.h>
-#include <qgroupbox.h>
-#include <qlineedit.h>
-#include <qtimer.h>
+#include <tqlabel.h>
+#include <tqframe.h>
+#include <tqgroupbox.h>
+#include <tqlineedit.h>
+#include <tqtimer.h>
#include <kpushbutton.h>
#include <kstdguiitem.h>
@@ -44,9 +44,9 @@
extern PPPData gpppdata;
-PPPStatsDlg::PPPStatsDlg(QWidget *parent, const char *name, QWidget *,
+PPPStatsDlg::PPPStatsDlg(TQWidget *parent, const char *name, TQWidget *,
PPPStats *st)
- : QWidget(parent, name, 0),
+ : TQWidget(parent, name, 0),
stats(st)
{
int i;
@@ -55,21 +55,21 @@ PPPStatsDlg::PPPStatsDlg(QWidget *parent, const char *name, QWidget *,
setCaption(i18n("kppp Statistics"));
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
- QVBoxLayout *tl = new QVBoxLayout(this, 10);
- QGridLayout *l1 = new QGridLayout(4, 4);
+ TQVBoxLayout *tl = new TQVBoxLayout(this, 10);
+ TQGridLayout *l1 = new TQGridLayout(4, 4);
tl->addLayout(l1, 1);
- box = new QGroupBox(i18n("Statistics"), this);
+ box = new TQGroupBox(i18n("Statistics"), this);
l1->addMultiCellWidget(box, 0, 3, 0, 3);
l1->addRowSpacing(0, fontMetrics().lineSpacing() - 10);
l1->setRowStretch(1, 1);
l1->setColStretch(1, 1);
// inner part of the grid
- QVBoxLayout *l11 = new QVBoxLayout;
+ TQVBoxLayout *l11 = new QVBoxLayout;
l1->addLayout(l11, 1, 1);
// modem pixmap and IP labels
- QHBoxLayout *l111 = new QHBoxLayout;
+ TQHBoxLayout *l111 = new QHBoxLayout;
l11->addLayout(l111);
big_modem_both_pixmap = UserIcon("modemboth");
@@ -77,25 +77,25 @@ PPPStatsDlg::PPPStatsDlg(QWidget *parent, const char *name, QWidget *,
big_modem_right_pixmap = UserIcon("modemright");
big_modem_none_pixmap = UserIcon("modemnone");
- pixmap_l = new QLabel(this);
+ pixmap_l = new TQLabel(this);
pixmap_l->setMinimumSize(big_modem_both_pixmap.size());
l111->addWidget(pixmap_l, 1);
pixmap_l->setAlignment(AlignVCenter|AlignLeft);
- QGridLayout *l1112 = new QGridLayout(3, 2);
+ TQGridLayout *l1112 = new TQGridLayout(3, 2);
l111->addLayout(l1112);
- ip_address_label1 = new QLabel(this);
+ ip_address_label1 = new TQLabel(this);
ip_address_label1->setText(i18n("Local Addr:"));
ip_address_label2 = new IPLineEdit(this);
- ip_address_label2->setFocusPolicy(QWidget::NoFocus);
+ ip_address_label2->setFocusPolicy(TQWidget::NoFocus);
- ip_address_label3 = new QLabel(this);
+ ip_address_label3 = new TQLabel(this);
ip_address_label3->setText(i18n("Remote Addr:"));
ip_address_label4 = new IPLineEdit(this);
- ip_address_label4->setFocusPolicy(QWidget::NoFocus);
+ ip_address_label4->setFocusPolicy(TQWidget::NoFocus);
l1112->addWidget(ip_address_label1, 0, 0);
l1112->addWidget(ip_address_label2, 0, 1);
@@ -105,18 +105,18 @@ PPPStatsDlg::PPPStatsDlg(QWidget *parent, const char *name, QWidget *,
// consumes space on bottom
l1112->setRowStretch(2, 1);
- QGridLayout *l112 = new QGridLayout(5, 4);
+ TQGridLayout *l112 = new TQGridLayout(5, 4);
l11->addLayout(l112);
for(i =0 ; i < 5; i++) {
- labela1[i] = new QLabel(this);
+ labela1[i] = new TQLabel(this);
- labela2[i] = new QLabel(this);
- labela2[i]->setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
+ labela2[i] = new TQLabel(this);
+ labela2[i]->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
- labelb1[i] = new QLabel(this);
+ labelb1[i] = new TQLabel(this);
- labelb2[i] = new QLabel(this);
- labelb2[i]->setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
+ labelb2[i] = new TQLabel(this);
+ labelb2[i]->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
}
labela1[0]->setText(i18n("bytes in"));
@@ -155,7 +155,7 @@ PPPStatsDlg::PPPStatsDlg(QWidget *parent, const char *name, QWidget *,
l112->setColStretch(3, 1);
tl->addSpacing(5);
- QHBoxLayout *l12 = new QHBoxLayout;
+ TQHBoxLayout *l12 = new QHBoxLayout;
tl->addLayout(l12);
l12->addStretch(1);
@@ -164,8 +164,8 @@ PPPStatsDlg::PPPStatsDlg(QWidget *parent, const char *name, QWidget *,
gpppdata.graphingOptions(dummy, bg, text, in, out);
- graph = new QFrame(this);
- graph->setFrameStyle(QFrame::Box | QFrame::Sunken);
+ graph = new TQFrame(this);
+ graph->setFrameStyle(TQFrame::Box | TQFrame::Sunken);
l1->addMultiCellWidget(graph, 2, 2, 1, 2);
graph->setMinimumWidth(300);
graph->setFixedHeight(76+4);
@@ -174,19 +174,19 @@ PPPStatsDlg::PPPStatsDlg(QWidget *parent, const char *name, QWidget *,
cancelbutton = new KPushButton(KStdGuiItem::close(),this, "cancelbutton");
cancelbutton->setFocus();
- connect(cancelbutton, SIGNAL(clicked()), this,SLOT(cancel()));
+ connect(cancelbutton, TQT_SIGNAL(clicked()), this,TQT_SLOT(cancel()));
cancelbutton->setFixedHeight(cancelbutton->sizeHint().height());
cancelbutton->setMinimumWidth(QMAX(cancelbutton->sizeHint().width(), 70));
l12->addWidget(cancelbutton);
if(gpppdata.graphingEnabled()) {
- graphTimer = new QTimer(this);
- connect(graphTimer, SIGNAL(timeout()), SLOT(updateGraph()));
+ graphTimer = new TQTimer(this);
+ connect(graphTimer, TQT_SIGNAL(timeout()), TQT_SLOT(updateGraph()));
}
setFixedSize(sizeHint());
- connect(stats, SIGNAL(statsChanged(int)), SLOT(paintIcon(int)));
+ connect(stats, TQT_SIGNAL(statsChanged(int)), TQT_SLOT(paintIcon(int)));
// read window position from config file
int p_x, p_y;
@@ -200,14 +200,14 @@ PPPStatsDlg::~PPPStatsDlg() {
// save window position when window was closed
-bool PPPStatsDlg::event(QEvent *e) {
- if (e->type() == QEvent::Hide)
+bool PPPStatsDlg::event(TQEvent *e) {
+ if (e->type() == TQEvent::Hide)
{
gpppdata.setWinPosStatWin(x(), y());
return true;
}
else
- return QWidget::event(e);
+ return TQWidget::event(e);
}
void PPPStatsDlg::cancel() {
@@ -244,8 +244,8 @@ void PPPStatsDlg::paintGraph() {
if(!isVisible())
return;
- QPixmap pm(graph->width() - 4, graph->height() - 4);
- QPainter p;
+ TQPixmap pm(graph->width() - 4, graph->height() - 4);
+ TQPainter p;
pm.fill(graph->backgroundColor());
p.begin(&pm);
@@ -286,10 +286,10 @@ void PPPStatsDlg::paintGraph() {
// plot scale line
p.setPen(text);
- p.setFont(QFont(KGlobalSettings::fixedFont().family(), 8));
+ p.setFont(TQFont(KGlobalSettings::fixedFont().family(), 8));
- QRect r;
- QString s = i18n("%1 (max. %2) kb/sec")
+ TQRect r;
+ TQString s = i18n("%1 (max. %2) kb/sec")
.arg(KGlobal::locale()->formatNumber((float)last_max / 1024.0, 1))
.arg(KGlobal::locale()->formatNumber((float)max / 1024.0, 1));
p.drawText(0, 0, pm.width(), 2*8, AlignRight|AlignVCenter, s, -1, &r);
@@ -315,7 +315,7 @@ void PPPStatsDlg::updateGraph() {
}
-void PPPStatsDlg::paintEvent (QPaintEvent *) {
+void PPPStatsDlg::paintEvent (TQPaintEvent *) {
paintIcon(PPPStats::BytesNone); // correct ?
if(gpppdata.graphingEnabled())
paintGraph();
@@ -324,7 +324,7 @@ void PPPStatsDlg::paintEvent (QPaintEvent *) {
void PPPStatsDlg::paintIcon(int status) {
- const QPixmap *pixmap;
+ const TQPixmap *pixmap;
switch(status)
{
@@ -370,7 +370,7 @@ void PPPStatsDlg::timeclick() {
}
-void PPPStatsDlg::closeEvent(QCloseEvent *) {
+void PPPStatsDlg::closeEvent(TQCloseEvent *) {
emit cancel();
}
@@ -404,14 +404,14 @@ void PPPStatsDlg::update_data() {
// if I don't resort to this trick it is imposible to
// copy/paste the ip out of the lineedits due to
// reset of cursor position on setText()
- QString local_addr = ( stats->local_ip_address.isEmpty() ?
+ TQString local_addr = ( stats->local_ip_address.isEmpty() ?
i18n("unavailable") :
stats->local_ip_address );
if( ip_address_label2->text() != local_addr )
ip_address_label2->setText(local_addr);
- QString remote_addr = ( stats->remote_ip_address.isEmpty() ?
+ TQString remote_addr = ( stats->remote_ip_address.isEmpty() ?
i18n("unavailable") :
stats->remote_ip_address );
diff --git a/kppp/pppstatdlg.h b/kppp/pppstatdlg.h
index 32808962..800438ee 100644
--- a/kppp/pppstatdlg.h
+++ b/kppp/pppstatdlg.h
@@ -26,9 +26,9 @@
#define _PPPSTATSDLG_H_
-#include <qdialog.h>
-#include <qevent.h>
-#include <qpixmap.h>
+#include <tqdialog.h>
+#include <tqevent.h>
+#include <tqpixmap.h>
class QLabel;
class QFrame;
@@ -42,21 +42,21 @@ const int GRAPH_UPDATE_TIME = 1000;
class PPPStats;
-class PPPStatsDlg : public QWidget {
+class PPPStatsDlg : public TQWidget {
Q_OBJECT
public:
- PPPStatsDlg(QWidget *parent, const char *name,QWidget *main,
+ PPPStatsDlg(TQWidget *parent, const char *name,TQWidget *main,
PPPStats *st);
~PPPStatsDlg();
protected:
- void closeEvent( QCloseEvent *e );
- void paintEvent (QPaintEvent *e) ;
- bool event( QEvent *e );
+ void closeEvent( TQCloseEvent *e );
+ void paintEvent (TQPaintEvent *e) ;
+ bool event( TQEvent *e );
public slots:
@@ -76,56 +76,56 @@ private:
void paintGraph();
PPPStats *stats;
- QLabel *pixmap_l;
- QWidget *main;
- QPushButton *cancelbutton;
-
- QLabel *labela1[5];
- QLabel *labela2[5];
- QLabel *labelb1[5];
- QLabel *labelb2[5];
-
- QLabel *ip_address_label1;
- QLineEdit *ip_address_label2;
- QLabel *ip_address_label3;
- QLineEdit *ip_address_label4;
-
- QLabel *modem_pic_label;
- QPixmap modem_pixmap;
- QPixmap modem_left_pixmap;
- QPixmap modem_right_pixmap;
- QPixmap modem_both_pixmap;
- QPixmap big_modem_both_pixmap;
- QPixmap big_modem_left_pixmap;
- QPixmap big_modem_right_pixmap;
- QPixmap big_modem_none_pixmap;
+ TQLabel *pixmap_l;
+ TQWidget *main;
+ TQPushButton *cancelbutton;
+
+ TQLabel *labela1[5];
+ TQLabel *labela2[5];
+ TQLabel *labelb1[5];
+ TQLabel *labelb2[5];
+
+ TQLabel *ip_address_label1;
+ TQLineEdit *ip_address_label2;
+ TQLabel *ip_address_label3;
+ TQLineEdit *ip_address_label4;
+
+ TQLabel *modem_pic_label;
+ TQPixmap modem_pixmap;
+ TQPixmap modem_left_pixmap;
+ TQPixmap modem_right_pixmap;
+ TQPixmap modem_both_pixmap;
+ TQPixmap big_modem_both_pixmap;
+ TQPixmap big_modem_left_pixmap;
+ TQPixmap big_modem_right_pixmap;
+ TQPixmap big_modem_none_pixmap;
int ibytes_last;
int obytes_last;
bool need_to_paint;
- QString ibytes_string;
- QString ipackets_string;
- QString compressedin_string;
- QString uncompressedin_string;
- QString errorin_string;
- QString obytes_string;
+ TQString ibytes_string;
+ TQString ipackets_string;
+ TQString compressedin_string;
+ TQString uncompressedin_string;
+ TQString errorin_string;
+ TQString obytes_string;
QString opackets_string;
QString compressed_string;
- QString packetsunc_string;
- QString packetsoutunc_string;
- QGroupBox *box;
+ TQString packetsunc_string;
+ TQString packetsoutunc_string;
+ TQGroupBox *box;
// graph widget
- QFrame *graph;
+ TQFrame *graph;
int bin[MAX_GRAPH_WIDTH];
int bout[MAX_GRAPH_WIDTH];
int bin_last;
int bout_last;
int ringIdx;
int max;
- QTimer *graphTimer;
- QColor bg, text, in, out;
+ TQTimer *graphTimer;
+ TQColor bg, text, in, out;
};
#endif
diff --git a/kppp/pppstats.cpp b/kppp/pppstats.cpp
index 8063d618..c9f153d8 100644
--- a/kppp/pppstats.cpp
+++ b/kppp/pppstats.cpp
@@ -90,14 +90,14 @@
#endif /* STREAMS */
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kdebug.h>
PPPStats::PPPStats()
{
clear();
timer = new QTimer;
- connect(timer, SIGNAL(timeout()), SLOT(timerClick()));
+ connect(timer, TQT_SIGNAL(timeout()), TQT_SLOT(timerClick()));
}
diff --git a/kppp/pppstats.h b/kppp/pppstats.h
index a1a0eaef..7e19f8e9 100644
--- a/kppp/pppstats.h
+++ b/kppp/pppstats.h
@@ -28,11 +28,11 @@
#include "kpppconfig.h"
-#include <qobject.h>
+#include <tqobject.h>
class QTimer;
-class PPPStats : public QObject {
+class PPPStats : public TQObject {
Q_OBJECT
public:
PPPStats();
@@ -61,8 +61,8 @@ public:
int errorin;
int packetsunc, packetsoutunc;
- QString local_ip_address;
- QString remote_ip_address;
+ TQString local_ip_address;
+ TQString remote_ip_address;
enum IOStatus { BytesNone = 0, BytesIn, BytesOut, BytesBoth };
@@ -78,7 +78,7 @@ private:
int unit;
char unitName[5];
enum IOStatus ioStatus;
- QTimer *timer;
+ TQTimer *timer;
};
#endif
diff --git a/kppp/providerdb.cpp b/kppp/providerdb.cpp
index 614816d0..867ffd8c 100644
--- a/kppp/providerdb.cpp
+++ b/kppp/providerdb.cpp
@@ -29,26 +29,26 @@
//---------------------------------------------------------------------------
-#include <qdir.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include <kdebug.h>
#include "providerdb.h"
#include "newwidget.h"
#include "pppdata.h"
-#include <qlistbox.h>
-#include <qlineedit.h>
+#include <tqlistbox.h>
+#include <tqlineedit.h>
#include <ksimpleconfig.h>
#define UNENCODED_CHARS "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_"
-QWizard* ProviderDB::wiz = 0L;
+TQWizard* ProviderDB::wiz = 0L;
-ProviderDB::ProviderDB(QWidget *parent) :
+ProviderDB::ProviderDB(TQWidget *parent) :
KWizard(parent, "", true),
cfg(0)
{
@@ -83,10 +83,10 @@ ProviderDB::ProviderDB(QWidget *parent) :
setFinish(page9, true);
setFinishEnabled(page9, true);
- connect((const QObject *)nextButton(), SIGNAL(clicked()),
- this, SLOT(pageSelected()));
- connect((const QObject *)backButton(), SIGNAL(clicked()),
- this, SLOT(pageSelected()));
+ connect((const TQObject *)nextButton(), TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(pageSelected()));
+ connect((const TQObject *)backButton(), TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(pageSelected()));
// resize(minimumSize());
adjustSize();
@@ -102,7 +102,7 @@ void ProviderDB::pageSelected() {
bool prev = true;
bool next = true;
- QWidget *page = currentPage();
+ TQWidget *page = currentPage();
if(page == page2) {
next = page2->lb->currentItem() != -1;
} else if(page == page3) {
@@ -122,12 +122,12 @@ void ProviderDB::pageSelected() {
void ProviderDB::loadProviderInfo() {
delete cfg;
- QString loc = *page2->list->at(page2->lb->currentItem());
- QString provider = page3->lb->text(page3->lb->currentItem());
+ TQString loc = *page2->list->at(page2->lb->currentItem());
+ TQString provider = page3->lb->text(page3->lb->currentItem());
urlEncode(provider);
- QString prov = "Provider/" + loc;
+ TQString prov = "Provider/" + loc;
prov += "/" + provider;
- QString fname = locate("appdata", prov);
+ TQString fname = locate("appdata", prov);
kdDebug(5002) << "Providerfile=" << fname << endl;
cfg = new KSimpleConfig(fname, true);
@@ -135,14 +135,14 @@ void ProviderDB::loadProviderInfo() {
void ProviderDB::accept() {
- QRegExp re_username("%USERNAME%");
- QRegExp re_password("%PASSWORD%");
+ TQRegExp re_username("%USERNAME%");
+ TQRegExp re_password("%PASSWORD%");
- QMap <QString, QString> map(cfg->entryMap("<default>"));
- QMap <QString, QString>::Iterator it(map.begin());
+ TQMap <TQString, TQString> map(cfg->entryMap("<default>"));
+ TQMap <TQString, TQString>::Iterator it(map.begin());
while(it != map.end()) {
- QString key = it.key();
- QString value = *it;
+ TQString key = it.key();
+ TQString value = *it;
if(value.contains(re_username))
value.replace(re_username, page4->username());
@@ -164,8 +164,8 @@ void ProviderDB::accept() {
/////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////
-PDB_Intro::PDB_Intro(QWidget *parent) : QWidget(parent) {
- QLabel *l = new QLabel(i18n("You will be asked a few questions on information\n"
+PDB_Intro::PDB_Intro(TQWidget *parent) : TQWidget(parent) {
+ TQLabel *l = new TQLabel(i18n("You will be asked a few questions on information\n"
"which is needed to establish an Internet connection\n"
"with your Internet Service Provider (ISP).\n\n"
"Make sure you have the registration form from your\n"
@@ -173,7 +173,7 @@ PDB_Intro::PDB_Intro(QWidget *parent) : QWidget(parent) {
"help first. If any information is missing, contact\n"
"your ISP."),
this);
- QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
+ TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10);
tl->addWidget(l);
tl->activate();
}
@@ -182,24 +182,24 @@ PDB_Intro::PDB_Intro(QWidget *parent) : QWidget(parent) {
/////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////
-PDB_Country::PDB_Country(QWidget *parent) : QWidget(parent) {
- QLabel *l = new QLabel(i18n("Select the location where you plan to use this\n"
+PDB_Country::PDB_Country(TQWidget *parent) : TQWidget(parent) {
+ TQLabel *l = new TQLabel(i18n("Select the location where you plan to use this\n"
"account from the list below. If your country or\n"
"location is not listed, you have to create the\n"
"account with the normal, dialog based setup.\n\n"
"If you click \"Cancel\", the dialog based setup\n"
"will start."),
this);
- QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
+ TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10);
tl->addWidget(l);
- QHBoxLayout *l1 = new QHBoxLayout;
+ TQHBoxLayout *l1 = new QHBoxLayout;
tl->addLayout(l1);
l1->addStretch(1);
- lb = new QListBox(this);
- connect(lb, SIGNAL(highlighted(int)),
- this, SLOT(selectionChanged(int)));
+ lb = new TQListBox(this);
+ connect(lb, TQT_SIGNAL(highlighted(int)),
+ this, TQT_SLOT(selectionChanged(int)));
lb->setMinimumSize(220, 100);
l1->addWidget(lb, 2);
l1->addStretch(1);
@@ -208,22 +208,22 @@ PDB_Country::PDB_Country(QWidget *parent) : QWidget(parent) {
// fill the listbox
// set up filter
- QDir d(KGlobal::dirs()->findDirs("appdata", "Provider").first());
- d.setFilter(QDir::Dirs);
- d.setSorting(QDir::Name);
+ TQDir d(KGlobal::dirs()->findDirs("appdata", "Provider").first());
+ d.setFilter(TQDir::Dirs);
+ d.setSorting(TQDir::Name);
// read the list of files
const QFileInfoList *flist = d.entryInfoList();
if(flist) {
QFileInfoListIterator it( *flist );
- QFileInfo *fi;
+ TQFileInfo *fi;
// traverse the flist and insert into a map for sorting
- QMap<QString, QString> countries;
+ TQMap<TQString, TQString> countries;
for(; (fi = it.current()) != 0; ++it) {
if(fi->fileName() != "." && fi->fileName() != "..") {
- QString dirFile(fi->absFilePath()+"/.directory");
- QString entryName;
- if(QFile::exists(dirFile)){
+ TQString dirFile(fi->absFilePath()+"/.directory");
+ TQString entryName;
+ if(TQFile::exists(dirFile)){
KSimpleConfig config(dirFile);
config.setDesktopGroup();
entryName = config.readEntry("Name");
@@ -233,8 +233,8 @@ PDB_Country::PDB_Country(QWidget *parent) : QWidget(parent) {
}
}
// insert sorted entries into list box and string list
- QMap<QString, QString>::const_iterator mit = countries.begin();
- QMap<QString, QString>::const_iterator mend = countries.end();
+ TQMap<TQString, TQString>::const_iterator mit = countries.begin();
+ TQMap<TQString, TQString>::const_iterator mend = countries.end();
while(mit != mend) {
lb->insertItem(mit.key());
list->append(*mit);
@@ -251,7 +251,7 @@ PDB_Country::~PDB_Country()
}
void PDB_Country::selectionChanged(int idx) {
- // QWizard *wizard = (QWizard *)parent(); Why doesn't this work ?
+ // TQWizard *wizard = (TQWizard *)parent(); Why doesn't this work ?
ProviderDB::wiz->setNextEnabled(this, (idx != -1));
}
@@ -259,9 +259,9 @@ void PDB_Country::selectionChanged(int idx) {
/////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////
-PDB_Provider::PDB_Provider(QWidget *parent) : QWidget(parent) {
- QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
- QLabel *l = new QLabel(i18n("Select your Internet Service Provider (ISP) from\n"
+PDB_Provider::PDB_Provider(TQWidget *parent) : TQWidget(parent) {
+ TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10);
+ TQLabel *l = new TQLabel(i18n("Select your Internet Service Provider (ISP) from\n"
"the list below. If the ISP is not in this list,\n"
"you have to click on \"Cancel\" and create this\n"
"account using the normal, dialog-based setup.\n\n"
@@ -269,13 +269,13 @@ PDB_Provider::PDB_Provider(QWidget *parent) : QWidget(parent) {
"selection."), this);
tl->addWidget(l);
- QHBoxLayout *l1 = new QHBoxLayout;
+ TQHBoxLayout *l1 = new QHBoxLayout;
tl->addLayout(l1);
l1->addStretch(1);
- lb = new QListBox(this);
- connect(lb, SIGNAL(highlighted(int)),
- this, SLOT(selectionChanged(int)));
+ lb = new TQListBox(this);
+ connect(lb, TQT_SIGNAL(highlighted(int)),
+ this, TQT_SLOT(selectionChanged(int)));
lb->setMinimumSize(220, 100);
l1->addWidget(lb, 2);
l1->addStretch(1);
@@ -286,7 +286,7 @@ void PDB_Provider::selectionChanged(int idx) {
}
-void PDB_Provider::setDir(const QString &_dir) {
+void PDB_Provider::setDir(const TQString &_dir) {
if(dir != _dir) {
lb->clear();
@@ -294,24 +294,24 @@ void PDB_Provider::setDir(const QString &_dir) {
// set up filter
dir = _dir;
- QString dir1 = KGlobal::dirs()->findDirs("appdata", "Provider").first();
- QRegExp re1(" ");
+ TQString dir1 = KGlobal::dirs()->findDirs("appdata", "Provider").first();
+ TQRegExp re1(" ");
dir = dir.replace(re1, "_");
dir1 += dir;
- QDir d(dir1);
- d.setFilter(QDir::Files);
- d.setSorting(QDir::Name);
+ TQDir d(dir1);
+ d.setFilter(TQDir::Files);
+ d.setSorting(TQDir::Name);
// read the list of files
const QFileInfoList *list = d.entryInfoList();
QFileInfoListIterator it( *list );
- QFileInfo *fi;
+ TQFileInfo *fi;
// traverse the list and insert into the widget
- QRegExp re("_");
+ TQRegExp re("_");
while((fi = it.current()) != NULL) {
- QString fname = fi->fileName();
+ TQString fname = fi->fileName();
if(fname.length() && fname[0] != '.') {
urlDecode(fname);
lb->insertItem(fname);
@@ -325,7 +325,7 @@ void PDB_Provider::setDir(const QString &_dir) {
}
-QString PDB_Provider::getDir() {
+TQString PDB_Provider::getDir() {
return dir;
}
@@ -334,48 +334,48 @@ QString PDB_Provider::getDir() {
/////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////
-PDB_UserInfo::PDB_UserInfo(QWidget *parent) : QWidget(parent) {
- QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
- QLabel *l = new QLabel(i18n("To log on to your ISP, kppp needs the username\n"
+PDB_UserInfo::PDB_UserInfo(TQWidget *parent) : TQWidget(parent) {
+ TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10);
+ TQLabel *l = new TQLabel(i18n("To log on to your ISP, kppp needs the username\n"
"and the password you got from your ISP. Type\n"
"in this information in the fields below.\n\n"
"Word case is important here."),
this);
tl->addWidget(l);
- QGridLayout *l1 = new QGridLayout(2, 2);
+ TQGridLayout *l1 = new TQGridLayout(2, 2);
tl->addLayout(l1);
- l = new QLabel(i18n("Username:"), this);
+ l = new TQLabel(i18n("Username:"), this);
l1->addWidget(l, 0, 0);
- l = new QLabel(i18n("Password:"), this);
+ l = new TQLabel(i18n("Password:"), this);
l1->addWidget(l, 1, 0);
_username = newLineEdit(24, this);
- connect(_username, SIGNAL(textChanged(const QString &)),
- this, SLOT(textChanged(const QString &)));
+ connect(_username, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(textChanged(const TQString &)));
l1->addWidget(_username, 0, 1);
_password = newLineEdit(24, this);
- _password->setEchoMode(QLineEdit::Password);
- connect(_password, SIGNAL(textChanged(const QString &)),
- this, SLOT(textChanged(const QString &)));
+ _password->setEchoMode(TQLineEdit::Password);
+ connect(_password, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(textChanged(const TQString &)));
l1->addWidget(_password, 1, 1);
tl->activate();
}
-void PDB_UserInfo::textChanged(const QString &) {
+void PDB_UserInfo::textChanged(const TQString &) {
ProviderDB::wiz->setNextEnabled(this, !_password->text().isEmpty() &&
!_username->text().isEmpty());
}
-QString PDB_UserInfo::username() {
- QString s = _username->text();
+TQString PDB_UserInfo::username() {
+ TQString s = _username->text();
return s;
}
-QString PDB_UserInfo::password() {
- QString s = _password->text();
+TQString PDB_UserInfo::password() {
+ TQString s = _password->text();
return s;
}
@@ -388,9 +388,9 @@ void PDB_UserInfo::activate() {
/////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////
-PDB_DialPrefix::PDB_DialPrefix(QWidget *parent) : QWidget(parent) {
- QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
- QLabel *l = new QLabel(i18n("If you need a special dial prefix (e.g. if you\n"
+PDB_DialPrefix::PDB_DialPrefix(TQWidget *parent) : TQWidget(parent) {
+ TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10);
+ TQLabel *l = new TQLabel(i18n("If you need a special dial prefix (e.g. if you\n"
"are using a telephone switch) you can specify\n"
"it here. This prefix is dialed just before the\n"
"phone number.\n\n"
@@ -399,9 +399,9 @@ PDB_DialPrefix::PDB_DialPrefix(QWidget *parent) : QWidget(parent) {
this);
tl->addWidget(l);
- QGridLayout *l1 = new QGridLayout(1, 2);
+ TQGridLayout *l1 = new TQGridLayout(1, 2);
tl->addLayout(l1);
- l = new QLabel(i18n("Dial prefix:"), this);
+ l = new TQLabel(i18n("Dial prefix:"), this);
l1->addWidget(l, 0, 0);
_prefix = newLineEdit(24, this);
l1->addWidget(_prefix, 0, 1);
@@ -409,8 +409,8 @@ PDB_DialPrefix::PDB_DialPrefix(QWidget *parent) : QWidget(parent) {
}
-QString PDB_DialPrefix::prefix() {
- QString s = _prefix->text();
+TQString PDB_DialPrefix::prefix() {
+ TQString s = _prefix->text();
return s;
}
@@ -424,9 +424,9 @@ void PDB_DialPrefix::activate() {
/////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////
-PDB_Finished::PDB_Finished(QWidget *parent) : QWidget(parent) {
- QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
- QLabel *l = new QLabel(i18n("Finished!\n\n"
+PDB_Finished::PDB_Finished(TQWidget *parent) : TQWidget(parent) {
+ TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10);
+ TQLabel *l = new TQLabel(i18n("Finished!\n\n"
"A new account has been created. Click \"Finish\" to\n"
"go back to the setup dialog. If you want to\n"
"check the settings of the newly created account,\n"
@@ -437,8 +437,8 @@ PDB_Finished::PDB_Finished(QWidget *parent) : QWidget(parent) {
}
-void urlDecode(QString &s) {
- QString s1;
+void urlDecode(TQString &s) {
+ TQString s1;
for(uint i = 0; i < s.length(); i++) {
if(s[i] == '%') {
@@ -454,11 +454,11 @@ void urlDecode(QString &s) {
}
-void urlEncode(QString &s) {
- QString s1, tmp;
+void urlEncode(TQString &s) {
+ TQString s1, tmp;
for(uint i = 0; i < s.length(); i++) {
- if(QString(UNENCODED_CHARS).find(s[i]) >= 0)
+ if(TQString(UNENCODED_CHARS).find(s[i]) >= 0)
s1 += s[i];
else {
tmp.sprintf("%%%03i", s[i].unicode());
diff --git a/kppp/providerdb.h b/kppp/providerdb.h
index 37a737fc..cfeb785f 100644
--- a/kppp/providerdb.h
+++ b/kppp/providerdb.h
@@ -36,92 +36,92 @@
#define PROVIDER_DB
#include <kwizard.h>
-#include <qwidget.h>
+#include <tqwidget.h>
class QLineEdit;
class QListBox;
class KSimpleConfig;
-class PDB_Intro : public QWidget {
+class PDB_Intro : public TQWidget {
Q_OBJECT
public:
- PDB_Intro(QWidget *parent);
+ PDB_Intro(TQWidget *parent);
};
-class PDB_Country : public QWidget {
+class PDB_Country : public TQWidget {
Q_OBJECT
public:
- PDB_Country(QWidget *parent);
+ PDB_Country(TQWidget *parent);
~PDB_Country();
- QListBox *lb;
- QStringList *list;
+ TQListBox *lb;
+ TQStringList *list;
public slots:
void selectionChanged(int);
};
-class PDB_Provider : public QWidget {
+class PDB_Provider : public TQWidget {
Q_OBJECT
public:
- PDB_Provider(QWidget *parent);
+ PDB_Provider(TQWidget *parent);
- void setDir(const QString &d);
- QString getDir();
+ void setDir(const TQString &d);
+ TQString getDir();
- QListBox *lb;
+ TQListBox *lb;
public slots:
void selectionChanged(int);
private:
- QString dir;
+ TQString dir;
};
-class PDB_UserInfo : public QWidget {
+class PDB_UserInfo : public TQWidget {
Q_OBJECT
public:
- PDB_UserInfo(QWidget *parent);
- QString username();
- QString password();
+ PDB_UserInfo(TQWidget *parent);
+ TQString username();
+ TQString password();
void activate();
public slots:
- void textChanged(const QString &);
+ void textChanged(const TQString &);
private:
- QLineEdit *_username;
- QLineEdit *_password;
+ TQLineEdit *_username;
+ TQLineEdit *_password;
};
-class PDB_DialPrefix : public QWidget {
+class PDB_DialPrefix : public TQWidget {
Q_OBJECT
public:
- PDB_DialPrefix(QWidget *parent);
- QString prefix();
+ PDB_DialPrefix(TQWidget *parent);
+ TQString prefix();
void activate();
private:
- QLineEdit *_prefix;
+ TQLineEdit *_prefix;
};
-class PDB_Finished : public QWidget {
+class PDB_Finished : public TQWidget {
Q_OBJECT
public:
- PDB_Finished(QWidget *parent);
+ PDB_Finished(TQWidget *parent);
};
class ProviderDB : public KWizard {
Q_OBJECT
public:
- ProviderDB(QWidget *parent);
+ ProviderDB(TQWidget *parent);
~ProviderDB();
- static QWizard *wiz;
+ static TQWizard *wiz;
public slots:
void pageSelected();
@@ -142,11 +142,11 @@ private:
// Decodes a (some sort of)URL-encoded filename to a human-readable name.
// This is used for the provider database
-void urlDecode(QString &);
+void urlDecode(TQString &);
// Encodes a (some sort of)URL-encoded filename from a human-readable name.
// This is used for the provider database
-void urlEncode(QString &);
+void urlEncode(TQString &);
#endif
diff --git a/kppp/pwentry.cpp b/kppp/pwentry.cpp
index aef02aa7..5e6397a5 100644
--- a/kppp/pwentry.cpp
+++ b/kppp/pwentry.cpp
@@ -26,41 +26,41 @@
#include <stdio.h>
-#include <qapplication.h>
+#include <tqapplication.h>
#include <kglobalsettings.h>
#include "pwentry.h"
-PWEntry::PWEntry( QWidget *parent, const char *name )
- : QWidget(NULL, name) {
+PWEntry::PWEntry( TQWidget *parent, const char *name )
+ : TQWidget(NULL, name) {
if(parent){
- QPoint point = mapToGlobal (QPoint (0,0));
- QRect pos = geometry();
+ TQPoint point = mapToGlobal (TQPoint (0,0));
+ TQRect pos = geometry();
setGeometry(point.x() + pos.width()/2 - 300/2,
point.y() + pos.height()/2 - 90/2,
300,
90);
} else {
- QRect desk = KGlobalSettings::desktopGeometry(parent);
+ TQRect desk = KGlobalSettings::desktopGeometry(parent);
setGeometry( desk.center().x() - 150, desk.center().y() - 50, 300, 90 );
}
- frame = new QGroupBox(name, this );
+ frame = new TQGroupBox(name, this );
- setFocusPolicy( QWidget::StrongFocus );
+ setFocusPolicy( TQWidget::StrongFocus );
- pw = new QLineEdit( this, "le" );
- pw->setEchoMode( QLineEdit::Password );
- connect( pw, SIGNAL(returnPressed()), this, SLOT(hide()) );
+ pw = new TQLineEdit( this, "le" );
+ pw->setEchoMode( TQLineEdit::Password );
+ connect( pw, TQT_SIGNAL(returnPressed()), this, TQT_SLOT(hide()) );
isconsumed = TRUE;
}
-QString PWEntry::text() { return (pw->text()); }
+TQString PWEntry::text() { return (pw->text()); }
-void PWEntry::focusInEvent( QFocusEvent *){
+void PWEntry::focusInEvent( TQFocusEvent *){
pw->setFocus();
@@ -68,23 +68,23 @@ void PWEntry::focusInEvent( QFocusEvent *){
void PWEntry::setEchoModeNormal() {
- pw->setEchoMode(QLineEdit::Normal);
+ pw->setEchoMode(TQLineEdit::Normal);
}
void PWEntry::setEchoModePassword() {
- pw->setEchoMode(QLineEdit::Password);
+ pw->setEchoMode(TQLineEdit::Password);
}
-void PWEntry::setPrompt(const QString &p) {
+void PWEntry::setPrompt(const TQString &p) {
frame->setTitle(p);
}
-void PWEntry::resizeEvent(QResizeEvent* ){
+void PWEntry::resizeEvent(TQResizeEvent* ){
pw->setGeometry( 15,35, width() - 30, 25 );
frame->setGeometry(5,5, width() - 10, height() - 10 );
@@ -96,7 +96,7 @@ void PWEntry::show() {
pw->setText("");
isconsumed = FALSE;
- QWidget::show();
+ TQWidget::show();
}
bool PWEntry::Consumed() {
@@ -108,7 +108,7 @@ void PWEntry::setConsumed() {
}
void PWEntry::hide() {
- QWidget::hide();
+ TQWidget::hide();
return;
}
diff --git a/kppp/pwentry.h b/kppp/pwentry.h
index 7906dbaf..b812bb16 100644
--- a/kppp/pwentry.h
+++ b/kppp/pwentry.h
@@ -27,22 +27,22 @@
#ifndef PWENTRY_H
#define PWENTRY_H
-#include <qwidget.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qgroupbox.h>
+#include <tqwidget.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
-class PWEntry : public QWidget {
+class PWEntry : public TQWidget {
Q_OBJECT
public:
- PWEntry( QWidget *parent=0, const char *name=0 );
+ PWEntry( TQWidget *parent=0, const char *name=0 );
bool Consumed();
void setConsumed();
- QString text();
- void setPrompt(const QString &);
+ TQString text();
+ void setPrompt(const TQString &);
public slots:
@@ -57,14 +57,14 @@ signals:
protected:
- void resizeEvent(QResizeEvent* qre);
- void focusInEvent( QFocusEvent *);
+ void resizeEvent(TQResizeEvent* qre);
+ void focusInEvent( TQFocusEvent *);
private:
- QGroupBox *frame;
- QLineEdit *pw;
- QLabel *pl;
+ TQGroupBox *frame;
+ TQLineEdit *pw;
+ TQLabel *pl;
bool isconsumed;
};
diff --git a/kppp/requester.cpp b/kppp/requester.cpp
index b3b1df82..b5450929 100644
--- a/kppp/requester.cpp
+++ b/kppp/requester.cpp
@@ -57,7 +57,7 @@ extern "C" {
#endif
#include <kdebug.h>
-#include <qfile.h>
+#include <tqfile.h>
#include "auth.h"
#include "pppdata.h"
@@ -171,7 +171,7 @@ bool Requester::recvResponse() {
return (response.status == 0);
}
-int Requester::openModem(const QString & dev) {
+int Requester::openModem(const TQString & dev) {
struct OpenModemRequest req;
req.header.type = Opener::OpenDevice;
@@ -183,7 +183,7 @@ int Requester::openModem(const QString & dev) {
}
-int Requester::openLockfile(const QString &dev, int flags) {
+int Requester::openLockfile(const TQString &dev, int flags) {
struct OpenLockRequest req;
@@ -229,7 +229,7 @@ int Requester::openSysLog() {
}
-bool Requester::setSecret(int method, const QString &name, const QString &password) {
+bool Requester::setSecret(int method, const TQString &name, const TQString &password) {
assert(name!=0);
assert(password!=0);
@@ -249,9 +249,9 @@ bool Requester::setSecret(int method, const QString &name, const QString &passwo
default:
return false;
}
- strncpy(req.username, QFile::encodeName(name), Opener::MaxStrLen);
+ strncpy(req.username, TQFile::encodeName(name), Opener::MaxStrLen);
req.username[Opener::MaxStrLen] = '\0';
- strncpy(req.password, QFile::encodeName(password), Opener::MaxStrLen);
+ strncpy(req.password, TQFile::encodeName(password), Opener::MaxStrLen);
req.password[Opener::MaxStrLen] = '\0';
sendRequest((struct RequestHeader *) &req, sizeof(req));
return recvResponse();
@@ -272,22 +272,22 @@ bool Requester::removeSecret(int authMethod) {
return recvResponse();
}
-bool Requester::setHostname(const QString &name) {
+bool Requester::setHostname(const TQString &name) {
if (name.isEmpty())
return false;
struct SetHostnameRequest req;
req.header.type = Opener::SetHostname;
- strncpy(req.name, QFile::encodeName(name), Opener::MaxStrLen);
+ strncpy(req.name, TQFile::encodeName(name), Opener::MaxStrLen);
req.name[Opener::MaxStrLen] = '\0';
sendRequest((struct RequestHeader *) &req, sizeof(req));
return recvResponse();
}
-bool Requester::execPPPDaemon(const QString &arguments) {
+bool Requester::execPPPDaemon(const TQString &arguments) {
struct ExecDaemonRequest req;
req.header.type = Opener::ExecPPPDaemon;
- strncpy(req.arguments, QFile::encodeName(arguments), MAX_CMDLEN);
+ strncpy(req.arguments, TQFile::encodeName(arguments), MAX_CMDLEN);
req.arguments[MAX_CMDLEN] = '\0';
sendRequest((struct RequestHeader *) &req, sizeof(req));
if(recvResponse()==0) {
@@ -349,7 +349,7 @@ bool Requester::sendRequest(struct RequestHeader *request, int len) {
}
-int Requester::indexDevice(const QString &dev) {
+int Requester::indexDevice(const TQString &dev) {
int index = -1;
diff --git a/kppp/requester.h b/kppp/requester.h
index cb2d0e04..ea415df0 100644
--- a/kppp/requester.h
+++ b/kppp/requester.h
@@ -7,15 +7,15 @@ public:
Requester(int);
~Requester();
- int openModem(const QString & dev);
- int openLockfile(const QString & dev, int flags = 0);
+ int openModem(const TQString & dev);
+ int openLockfile(const TQString & dev, int flags = 0);
bool removeLockfile();
int openResolv(int flags);
int openSysLog();
- bool setSecret(int method, const QString & name, const QString & password);
+ bool setSecret(int method, const TQString & name, const TQString & password);
bool removeSecret(int authMethode);
- bool setHostname(const QString & name);
- bool execPPPDaemon(const QString & arguments);
+ bool setHostname(const TQString & name);
+ bool execPPPDaemon(const TQString & arguments);
bool killPPPDaemon();
int pppdExitStatus();
bool stop();
@@ -28,7 +28,7 @@ private:
bool sendRequest(struct RequestHeader *request, int len);
bool recvResponse();
int recvFD();
- int indexDevice(const QString & dev);
+ int indexDevice(const TQString & dev);
int socket;
bool expect_alarm;
};
diff --git a/kppp/ruleset.cpp b/kppp/ruleset.cpp
index 8366131b..723d5f2b 100644
--- a/kppp/ruleset.cpp
+++ b/kppp/ruleset.cpp
@@ -29,8 +29,8 @@
#include <math.h>
#include "ruleset.h"
-#include <qregexp.h>
-#include <qfile.h>
+#include <tqregexp.h>
+#include <tqfile.h>
#include <klocale.h>
#include <kglobal.h>
@@ -51,7 +51,7 @@ RuleSet::RuleSet() {
// this function is shamelessly stolen from pppcosts 0.5 :-)
/* calculates the easter sunday in day_of_year style */
-QDate RuleSet::get_easter(int year) {
+TQDate RuleSet::get_easter(int year) {
/* not optimized, I took the original names */
signed int a,b,m,q,w,p,n,tt,mm;
@@ -71,7 +71,7 @@ QDate RuleSet::get_easter(int year) {
{tt=p+31;
mm=3;}
- return QDate(year, mm, tt);
+ return TQDate(year, mm, tt);
}
int RuleSet::dayNameToInt(const char *s) {
@@ -86,13 +86,13 @@ int RuleSet::dayNameToInt(const char *s) {
return -1;
}
-int RuleSet::load(const QString &filename) {
+int RuleSet::load(const TQString &filename) {
flat_init_costs = 0.0;
flat_init_duration = 0;
have_flat_init_costs = false;
- QFile f(filename);
+ TQFile f(filename);
// delete old rules
rules.resize(0);
@@ -113,7 +113,7 @@ int RuleSet::load(const QString &filename) {
while(!f.atEnd()) {
// read continued lines
- QString line;
+ TQString line;
bool backslashed;
do {
int br = f.readLine(buffer, sizeof(buffer));
@@ -122,12 +122,12 @@ int RuleSet::load(const QString &filename) {
else
buffer[br] = 0;
lineno++;
- line.append(QString::fromUtf8(buffer));
+ line.append(TQString::fromUtf8(buffer));
backslashed = (line.right(1) == "\\");
} while(!f.atEnd() && backslashed);
// strip whitespace
- line = line.replace(QRegExp("[ \t\r]"), "");
+ line = line.replace(TQRegExp("[ \t\r]"), "");
// skip comment lines
if((line.left(1) == "#") || line.isEmpty())
continue;
@@ -182,22 +182,22 @@ void RuleSet::addRule(RULE r) {
}
}
-bool RuleSet::parseEntry(RULE &ret, QString s, int year) {
- if(s.contains(QRegExp("^[0-9]+/[0-9]+$"))) {
+bool RuleSet::parseEntry(RULE &ret, TQString s, int year) {
+ if(s.contains(TQRegExp("^[0-9]+/[0-9]+$"))) {
int d, m;
sscanf(s.ascii(), "%d/%d", &m, &d);
ret.type = 1;
- ret.date.from = QDate(year, m, d);
- ret.date.until = QDate(year, m, d);
+ ret.date.from = TQDate(year, m, d);
+ ret.date.until = TQDate(year, m, d);
return TRUE;
}
- if(s.contains(QRegExp("^[0-9]+\\.[0-9]+$"))) {
+ if(s.contains(TQRegExp("^[0-9]+\\.[0-9]+$"))) {
int d, m;
sscanf(s.ascii(), "%d.%d", &d, &m);
ret.type = 1;
- ret.date.from = QDate(year, m, d);
- ret.date.until = QDate(year, m, d);
+ ret.date.from = TQDate(year, m, d);
+ ret.date.until = TQDate(year, m, d);
return TRUE;
}
@@ -212,10 +212,10 @@ bool RuleSet::parseEntry(RULE &ret, QString s, int year) {
}
if(s.left(6) == "easter") {
- QDate d = get_easter(year);
+ TQDate d = get_easter(year);
int off;
bool ok = TRUE;
- QString val = s.mid(6, 1000);
+ TQString val = s.mid(6, 1000);
if(val.isEmpty())
off = 0;
else
@@ -236,8 +236,8 @@ bool RuleSet::parseEntry(RULE &ret, QString s, int year) {
-bool RuleSet::parseEntries(QString s, int year,
- QTime t1, QTime t2,
+bool RuleSet::parseEntries(TQString s, int year,
+ TQTime t1, TQTime t2,
double costs, double len, double after)
{
// special rule: on() is the same as on(monday..sunday)
@@ -246,7 +246,7 @@ bool RuleSet::parseEntries(QString s, int year,
while(s.length()) {
int pos = s.find(',');
- QString token;
+ TQString token;
if(pos == -1) {
token = s;
s = "";
@@ -259,7 +259,7 @@ bool RuleSet::parseEntries(QString s, int year,
// range
RULE r;
if(token.contains("..")) {
- QString left, right;
+ TQString left, right;
left = token.left(token.find(".."));
right = token.right(token.length()-2-left.length());
RULE lr, rr;
@@ -293,7 +293,7 @@ bool RuleSet::parseEntries(QString s, int year,
return TRUE;
}
-bool RuleSet::parseTime(QTime &t1, QTime &t2, QString s) {
+bool RuleSet::parseTime(TQTime &t1, TQTime &t2, TQString s) {
if(s.isEmpty()) {
t1 = midnight();
t2 = beforeMidnight();
@@ -309,20 +309,20 @@ bool RuleSet::parseTime(QTime &t1, QTime &t2, QString s) {
}
}
-bool RuleSet::parseRate(double &costs, double &len, double &after, QString s) {
+bool RuleSet::parseRate(double &costs, double &len, double &after, TQString s) {
after = 0;
int fields = sscanf(s.ascii(), "%lf,%lf,%lf", &costs, &len, &after);
return (fields == 2) || (fields == 3);
}
-bool RuleSet::parseLine(const QString &s) {
+bool RuleSet::parseLine(const TQString &s) {
- // ### use QRegExp::cap() instead of mid() and find()
+ // ### use TQRegExp::cap() instead of mid() and find()
// for our french friends -- Bernd
- if(s.contains(QRegExp("flat_init_costs=\\(.*"))) {
+ if(s.contains(TQRegExp("flat_init_costs=\\(.*"))) {
// parse the time fields
- QString token = s.mid(s.find("flat_init_costs=(") + 17,
+ TQString token = s.mid(s.find("flat_init_costs=(") + 17,
s.find(")")-s.find("flat_init_costs=(") - 17);
// printf("TOKEN=%s\n",token.ascii());
@@ -342,11 +342,11 @@ bool RuleSet::parseLine(const QString &s) {
}
- if(s.contains(QRegExp("on\\(.*\\)between\\(.*\\)use\\(.*\\)"))) {
+ if(s.contains(TQRegExp("on\\(.*\\)between\\(.*\\)use\\(.*\\)"))) {
// parse the time fields
- QString token = s.mid(s.find("between(") + 8,
+ TQString token = s.mid(s.find("between(") + 8,
s.find(")use")-s.find("between(") - 8);
- QTime t1, t2;
+ TQTime t1, t2;
if(!parseTime(t1, t2, token))
return FALSE;
@@ -362,7 +362,7 @@ bool RuleSet::parseLine(const QString &s) {
// parse the days
token = s.mid(s.find("on(") + 3,
s.find(")betw")-s.find("on(") - 3);
- if(!parseEntries(token, QDate::currentDate().year(),
+ if(!parseEntries(token, TQDate::currentDate().year(),
t1, t2, costs, len, after))
return FALSE;
@@ -370,23 +370,23 @@ bool RuleSet::parseLine(const QString &s) {
}
// check for the name
- if(s.contains(QRegExp("name=.*"))) {
+ if(s.contains(TQRegExp("name=.*"))) {
_name = s.right(s.length()-5);
return !_name.isEmpty();
}
// check default entry
- if(s.contains(QRegExp("default=\\(.*\\)"))) {
- QString token = s.mid(9, s.length() - 10);
+ if(s.contains(TQRegExp("default=\\(.*\\)"))) {
+ TQString token = s.mid(9, s.length() - 10);
double after;
if(parseRate(default_costs, default_len, after, token))
return TRUE;
}
// check for "minimum costs"
- if(s.contains(QRegExp("minimum_costs=.*"))) {
- QString token = s.right(s.length() - strlen("minimum_costs="));
+ if(s.contains(TQRegExp("minimum_costs=.*"))) {
+ TQString token = s.right(s.length() - strlen("minimum_costs="));
bool ok;
_minimum_costs = token.toDouble(&ok);
return ok;
@@ -398,20 +398,20 @@ bool RuleSet::parseLine(const QString &s) {
return TRUE;
}
- if(s.contains(QRegExp("currency_digits=.*"))) {
- QString token = s.mid(16, s.length() - 16);
+ if(s.contains(TQRegExp("currency_digits=.*"))) {
+ TQString token = s.mid(16, s.length() - 16);
bool ok;
_currency_digits = token.toInt(&ok);
return ok && (_currency_digits >= 0);
}
// "currency_position" is deprecated so we'll simply ignore it
- if(s.contains(QRegExp("currency_position=.*")))
+ if(s.contains(TQRegExp("currency_position=.*")))
return TRUE;
// check per connection fee
- if(s.contains(QRegExp("per_connection="))) {
- QString token = s.mid(15, s.length()-15);
+ if(s.contains(TQRegExp("per_connection="))) {
+ TQString token = s.mid(15, s.length()-15);
bool ok;
pcf = token.toDouble(&ok);
return ok;
@@ -420,13 +420,13 @@ bool RuleSet::parseLine(const QString &s) {
return FALSE;
}
-void RuleSet::setStartTime(QDateTime dt){
+void RuleSet::setStartTime(TQDateTime dt){
starttime = dt;
}
-void RuleSet::getActiveRule(QDateTime dt, double connect_time, double &costs, double &len) {
+void RuleSet::getActiveRule(TQDateTime dt, double connect_time, double &costs, double &len) {
// use default costs first
costs = default_costs;
len = default_len;
@@ -450,8 +450,8 @@ void RuleSet::getActiveRule(QDateTime dt, double connect_time, double &costs, do
{
// since rules do not have a year's entry, use the one
// from dt
- QDate from = r.date.from;
- QDate until = r.date.until;
+ TQDate from = r.date.from;
+ TQDate until = r.date.until;
from.setYMD(dt.date().year(), from.month(), from.day());
until.setYMD(dt.date().year(), until.month(), until.day());
if((from <= dt.date()) && (dt.date() <= until)) {
@@ -502,11 +502,11 @@ static double round(double d, int digits) {
}
#endif
-QString RuleSet::currencySymbol() const {
+TQString RuleSet::currencySymbol() const {
return _currency_symbol.copy();
}
-QString RuleSet::currencyString(double f) const {
+TQString RuleSet::currencyString(double f) const {
return KGlobal::locale()->formatMoney(f, _currency_symbol, _currency_digits);
}
@@ -516,7 +516,7 @@ double RuleSet::perConnectionCosts() const {
}
-QString RuleSet::name() const {
+TQString RuleSet::name() const {
return _name;
}
@@ -525,21 +525,21 @@ double RuleSet::minimumCosts() const {
return _minimum_costs;
}
-QTime RuleSet::midnight() const {
- return QTime(0, 0, 0, 0);
+TQTime RuleSet::midnight() const {
+ return TQTime(0, 0, 0, 0);
}
-QTime RuleSet::beforeMidnight() const {
- return QTime(23,59,59,999);
+TQTime RuleSet::beforeMidnight() const {
+ return TQTime(23,59,59,999);
}
-int RuleSet::checkRuleFile(const QString &rulefile) {
+int RuleSet::checkRuleFile(const TQString &rulefile) {
if(rulefile == NULL) {
fputs(i18n("kppp: no rulefile specified\n").local8Bit(), stderr);
return 1;
}
- QFile fl(rulefile);
+ TQFile fl(rulefile);
if(!fl.exists()) {
fprintf(stderr, i18n("kppp: rulefile \"%s\" not found\n").local8Bit(), rulefile.local8Bit().data());
return 1;
diff --git a/kppp/ruleset.h b/kppp/ruleset.h
index b66bb50c..8d3fbbe8 100644
--- a/kppp/ruleset.h
+++ b/kppp/ruleset.h
@@ -27,9 +27,9 @@
#ifndef __RULESET__H__
#define __RULESET__H__
-#include <qmemarray.h>
-#include <qdatetime.h>
-#include <qstring.h>
+#include <tqmemarray.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
// this structure is used to save
// accounting rules
@@ -38,9 +38,9 @@ typedef struct RULE {
double costs;
double len;
double after;
- QTime from, until;
+ TQTime from, until;
struct {
- QDate from, until;
+ TQDate from, until;
} date;
struct {
int from, until;
@@ -57,26 +57,26 @@ public:
~RuleSet() {};
/// returns the name of the ruleset
- QString name() const;
+ TQString name() const;
/** Load a ruleset from a file. If an error occurs,
* returns the linenumber the error was in,
* otherwise 0. If the file could not be opened,
* returns -1
*/
- int load(const QString &filename);
+ int load(const TQString &filename);
/// returns the currency symbol
- QString currencySymbol() const;
+ TQString currencySymbol() const;
/** returns a string representation of the
* of a doubleingpoint number using the
* currency-settings
*/
- QString currencyString(double val) const;
+ TQString currencyString(double val) const;
/// sets the start time -- must be called when the connection has bee established
- void setStartTime(QDateTime dt);
+ void setStartTime(TQDateTime dt);
/// returns the "per-connection" costs
double perConnectionCosts() const;
@@ -87,10 +87,10 @@ public:
double minimumCosts() const;
/// returns the currently valid rule settings
- void getActiveRule(QDateTime dt, double connect_time, double &costs, double &len);
+ void getActiveRule(TQDateTime dt, double connect_time, double &costs, double &len);
/// checks if a rulefile is ok (no parse errors...)
- static int checkRuleFile(const QString &);
+ static int checkRuleFile(const TQString &);
protected:
/** converts an english name of a day to integer,
@@ -99,38 +99,38 @@ protected:
int dayNameToInt(const char *s);
/// returns the date of easter-sunday for a year
- static QDate get_easter(int year);
+ static TQDate get_easter(int year);
/// add a rule to this ruleset
void addRule(RULE r);
/// parses on entry of the "on(...)" fields
- bool parseEntry(RULE &ret, QString s, int year);
+ bool parseEntry(RULE &ret, TQString s, int year);
/// parses the "on(...)" fields
- bool parseEntries(QString s, int year,
- QTime t1, QTime t2,
+ bool parseEntries(TQString s, int year,
+ TQTime t1, TQTime t2,
double costs, double len, double after);
/// parses the "between(...)" time fields
- bool parseTime(QTime &t1, QTime &t2, QString s);
+ bool parseTime(TQTime &t1, TQTime &t2, TQString s);
/// parses the "use(...)" fields
- bool parseRate(double &costs, double &len, double &after, QString s);
+ bool parseRate(double &costs, double &len, double &after, TQString s);
/// parses a whole line
- bool parseLine(const QString &line);
+ bool parseLine(const TQString &line);
/// returns midnight time (00:00:00.000)
- QTime midnight() const;
+ TQTime midnight() const;
/// returns the last valid time BEFORE midnight
- QTime beforeMidnight() const;
+ TQTime beforeMidnight() const;
protected:
- QString _name;
- QString _currency_symbol;
- QDateTime starttime;
+ TQString _name;
+ TQString _currency_symbol;
+ TQDateTime starttime;
int _currency_digits;
double default_costs;
double _minimum_costs;
@@ -140,7 +140,7 @@ protected:
double flat_init_duration;
double flat_init_costs;
- QMemArray<RULE> rules;
+ TQMemArray<RULE> rules;
};
#endif
diff --git a/kppp/runtests.cpp b/kppp/runtests.cpp
index 59f32e93..a520d116 100644
--- a/kppp/runtests.cpp
+++ b/kppp/runtests.cpp
@@ -24,7 +24,7 @@
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qdir.h>
+#include <tqdir.h>
#include "runtests.h"
#include <ctype.h>
#include <unistd.h>
@@ -197,13 +197,13 @@ int runTests() {
char buf[2048]; // safe
while(f != NULL && !feof(f)) {
if(fgets(buf, sizeof(buf), f) != NULL) {
- QString s(buf);
+ TQString s(buf);
s = s.stripWhiteSpace();
if(s[0] == '#' || s.length() == 0)
continue;
- if((uid_t)uidFromName(QFile::encodeName(s)) == getuid()) {
+ if((uid_t)uidFromName(TQFile::encodeName(s)) == getuid()) {
access = TRUE;
fclose(f);
f = NULL;
@@ -261,8 +261,8 @@ int runTests() {
// Test 5: check for existence of /etc/resolv.conf
if (access(_PATH_RESCONF, R_OK) != 0) {
- QString file = _PATH_RESCONF" ";
- QString msgstr = i18n("%1 is missing or can't be read!\n"
+ TQString file = _PATH_RESCONF" ";
+ TQString msgstr = i18n("%1 is missing or can't be read!\n"
"Ask your system administrator to create "
"this file (can be empty) with appropriate "
"read and write permissions.").arg(file);
diff --git a/kppp/scriptedit.cpp b/kppp/scriptedit.cpp
index 0cb676f5..afa88821 100644
--- a/kppp/scriptedit.cpp
+++ b/kppp/scriptedit.cpp
@@ -26,16 +26,16 @@
*/
#include "scriptedit.h"
-#include <qlayout.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
+#include <tqlayout.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
-ScriptEdit::ScriptEdit( QWidget *parent, const char *name )
- : QWidget(parent, name)
+ScriptEdit::ScriptEdit( TQWidget *parent, const char *name )
+ : TQWidget(parent, name)
{
- QHBoxLayout *tl = new QHBoxLayout(this, 0, 10);
+ TQHBoxLayout *tl = new TQHBoxLayout(this, 0, 10);
- st = new QComboBox(this, "st");
+ st = new TQComboBox(this, "st");
st->insertItem("Expect");
st->insertItem("Send");
st->insertItem("Pause (sec)");
@@ -51,12 +51,12 @@ ScriptEdit::ScriptEdit( QWidget *parent, const char *name )
st->insertItem("Scan");
st->insertItem("Save");
st->insertItem("SendNoEcho");
- connect(st, SIGNAL(activated(int)), SLOT(setType(int)));
+ connect(st, TQT_SIGNAL(activated(int)), TQT_SLOT(setType(int)));
- se = new QLineEdit(this, "se");
+ se = new TQLineEdit(this, "se");
se->setGeometry(120, 5, 140, 25);
se->setMaxLength(50);
- connect(se, SIGNAL(returnPressed()), SLOT(seReturnPressed()));
+ connect(se, TQT_SIGNAL(returnPressed()), TQT_SLOT(seReturnPressed()));
tl->addWidget(st, 3);
tl->addWidget(se, 7);
@@ -77,11 +77,11 @@ void ScriptEdit::seReturnPressed() {
}
-QString ScriptEdit::text()const {
+TQString ScriptEdit::text()const {
return se->text();
}
-void ScriptEdit::setText(const QString &t) {
+void ScriptEdit::setText(const TQString &t) {
se->setText(t);
}
diff --git a/kppp/scriptedit.h b/kppp/scriptedit.h
index d04416e0..7c914268 100644
--- a/kppp/scriptedit.h
+++ b/kppp/scriptedit.h
@@ -28,19 +28,19 @@
#ifndef _SCRIPTEDIT_H_
#define _SCRIPTEDIT_H_
-#include <qwidget.h>
+#include <tqwidget.h>
class QComboBox;
class QLineEdit;
-class ScriptEdit : public QWidget {
+class ScriptEdit : public TQWidget {
Q_OBJECT
public:
- ScriptEdit( QWidget *parent=0, const char *name=0 );
+ ScriptEdit( TQWidget *parent=0, const char *name=0 );
~ScriptEdit() {}
- QString text()const;
- void setText(const QString &);
+ TQString text()const;
+ void setText(const TQString &);
int type()const;
virtual void setEnabled(bool);
@@ -53,8 +53,8 @@ private slots:
void seReturnPressed();
private:
- QComboBox *st;
- QLineEdit *se;
+ TQComboBox *st;
+ TQLineEdit *se;
public:
enum setypes { Expect = 0,