summaryrefslogtreecommitdiffstats
path: root/kppp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
commit69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch)
tree073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kppp
parent3467e6464beac3a162839bf7078e22e3a74d73e7 (diff)
downloadtdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz
tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kppp')
-rwxr-xr-xkppp/Rules/checkrules4
-rw-r--r--kppp/accounting.cpp32
-rw-r--r--kppp/accounting.h9
-rw-r--r--kppp/accounts.cpp58
-rw-r--r--kppp/accounts.h6
-rw-r--r--kppp/acctselect.cpp38
-rw-r--r--kppp/acctselect.h3
-rw-r--r--kppp/connect.cpp116
-rw-r--r--kppp/connect.h3
-rw-r--r--kppp/conwindow.cpp34
-rw-r--r--kppp/conwindow.h3
-rw-r--r--kppp/debug.cpp10
-rw-r--r--kppp/debug.h5
-rw-r--r--kppp/docking.cpp8
-rw-r--r--kppp/docking.h3
-rw-r--r--kppp/edit.cpp190
-rw-r--r--kppp/edit.h23
-rw-r--r--kppp/general.cpp88
-rw-r--r--kppp/general.h12
-rw-r--r--kppp/iplined.cpp8
-rw-r--r--kppp/iplined.h4
-rw-r--r--kppp/kpppwidget.cpp82
-rw-r--r--kppp/kpppwidget.h3
-rw-r--r--kppp/loginterm.cpp16
-rw-r--r--kppp/loginterm.h6
-rw-r--r--kppp/logview/export.cpp14
-rw-r--r--kppp/logview/export.h3
-rw-r--r--kppp/logview/log.cpp10
-rw-r--r--kppp/logview/log.h6
-rw-r--r--kppp/logview/main.cpp4
-rw-r--r--kppp/logview/main.h1
-rw-r--r--kppp/logview/monthly.cpp118
-rw-r--r--kppp/logview/monthly.h5
-rw-r--r--kppp/macros.h14
-rw-r--r--kppp/main.cpp8
-rw-r--r--kppp/miniterm.cpp26
-rw-r--r--kppp/miniterm.h6
-rw-r--r--kppp/modem.h1
-rw-r--r--kppp/modemcmds.cpp40
-rw-r--r--kppp/modemcmds.h3
-rw-r--r--kppp/modemdb.cpp26
-rw-r--r--kppp/modemdb.h3
-rw-r--r--kppp/modeminfo.cpp24
-rw-r--r--kppp/modeminfo.h6
-rw-r--r--kppp/modems.cpp28
-rw-r--r--kppp/modems.h3
-rw-r--r--kppp/newwidget.cpp8
-rw-r--r--kppp/newwidget.h4
-rw-r--r--kppp/opener.cpp24
-rw-r--r--kppp/opener.h2
-rw-r--r--kppp/pppdargs.cpp8
-rw-r--r--kppp/pppdargs.h3
-rw-r--r--kppp/pppdata.cpp24
-rw-r--r--kppp/pppdata.h6
-rw-r--r--kppp/ppplog.cpp22
-rw-r--r--kppp/pppstatdlg.cpp30
-rw-r--r--kppp/pppstatdlg.h7
-rw-r--r--kppp/pppstats.cpp16
-rw-r--r--kppp/pppstats.h5
-rw-r--r--kppp/providerdb.cpp46
-rw-r--r--kppp/providerdb.h21
-rw-r--r--kppp/pwentry.cpp10
-rw-r--r--kppp/pwentry.h3
-rw-r--r--kppp/requester.cpp8
-rw-r--r--kppp/requester.h4
-rw-r--r--kppp/ruleset.cpp48
-rw-r--r--kppp/runtests.cpp4
-rw-r--r--kppp/scriptedit.cpp4
-rw-r--r--kppp/scriptedit.h3
69 files changed, 735 insertions, 688 deletions
diff --git a/kppp/Rules/checkrules b/kppp/Rules/checkrules
index 9e695d5b..2ac45ec1 100755
--- a/kppp/Rules/checkrules
+++ b/kppp/Rules/checkrules
@@ -4,8 +4,8 @@ KPPP=`which kppp` || (echo "cannot find kppp"; exit 1)
cd `dirname $0 2> /dev/null` || (echo "\"dirname\" required"; exit 1)
-FILESTOCHECK=`find -name "*.rst" -type f 2> /dev/null` || \
- (echo "\"find\" required\""; exit 1)
+FILESTOCHECK=`tqfind -name "*.rst" -type f 2> /dev/null` || \
+ (echo "\"tqfind\" required\""; exit 1)
for i in ${FILESTOCHECK}
do
diff --git a/kppp/accounting.cpp b/kppp/accounting.cpp
index 76c5f02e..b9280eda 100644
--- a/kppp/accounting.cpp
+++ b/kppp/accounting.cpp
@@ -67,15 +67,15 @@ static TQString timet2qstring(time_t t) {
// accounting is accomplished withing it's derived classes
//
/////////////////////////////////////////////////////////////////////////////
-AccountingBase::AccountingBase(TQObject *parent) :
- TQObject(parent),
+AccountingBase::AccountingBase(TQObject *tqparent) :
+ TQObject(tqparent),
_total(0),
_session(0)
{
- TQDate dt = TQDate::currentDate();
+ TQDate dt = TQDate::tqcurrentDate();
LogFileName = TQString("%1-%2.log")
- .arg(TQDate::shortMonthName(dt.month()))
- .arg(dt.year(), 4);
+ .tqarg(TQDate::shortMonthName(dt.month()))
+ .tqarg(dt.year(), 4);
LogFileName = KGlobal::dirs()->saveLocation("appdata", "Log")
+ "/" + LogFileName;
@@ -212,8 +212,8 @@ TQString AccountingBase::getAccountingFile(const TQString &accountname) {
// Accounting class for ruleset files
//
/////////////////////////////////////////////////////////////////////////////
-Accounting::Accounting(TQObject *parent, PPPStats *st) :
- AccountingBase(parent),
+Accounting::Accounting(TQObject *tqparent, PPPStats *st) :
+ AccountingBase(tqparent),
acct_timer_id(0),
update_timer_id(0),
stats(st)
@@ -233,7 +233,7 @@ void Accounting::timerEvent(TQTimerEvent *t) {
double newLen;
double connect_time = difftime(time(0), start_time);
- rules.getActiveRule(TQDateTime::currentDateTime(), connect_time, newCosts, newLen);
+ rules.getActiveRule(TQDateTime::tqcurrentDateTime(), connect_time, newCosts, newLen);
if(newLen < 1) { // changed to < 1
slotStop();
return; // no default rule found
@@ -279,7 +279,7 @@ void Accounting::slotStart() {
_lastcosts = 0.0;
_lastlen = 0.0;
_session = rules.perConnectionCosts();
- rules.setStartTime(TQDateTime::currentDateTime());
+ rules.setStartTime(TQDateTime::tqcurrentDateTime());
acct_timer_id = startTimer(1);
if(UPDATE_TIME > 0)
update_timer_id = startTimer(UPDATE_TIME);
@@ -358,8 +358,8 @@ double Accounting::session() const {
-ExecutableAccounting::ExecutableAccounting(PPPStats *st, TQObject *parent) :
- AccountingBase(parent),
+ExecutableAccounting::ExecutableAccounting(PPPStats *st, TQObject *tqparent) :
+ AccountingBase(tqparent),
proc(0),
stats(st)
{
@@ -384,11 +384,11 @@ void ExecutableAccounting::gotData(KProcess */*proc*/, char *buffer, int /*bufle
// split string
TQString b(buffer);
- pos = b.find(':');
+ pos = b.tqfind(':');
while(pos != -1 && nFields < 8) {
field[nFields++] = b.mid(last_pos, pos-last_pos);
last_pos = pos+1;
- pos = b.find(':', last_pos);
+ pos = b.tqfind(':', last_pos);
}
for(int i = 0; i < nFields;i++)
@@ -398,9 +398,9 @@ void ExecutableAccounting::gotData(KProcess */*proc*/, char *buffer, int /*bufle
TQString s(buffer);
int del1, del2, del3;
- del1 = s.find(':');
- del2 = s.find(':', del1+1);
- del3 = s.find(':', del2+1);
+ del1 = s.tqfind(':');
+ del2 = s.tqfind(':', del1+1);
+ del3 = s.tqfind(':', del2+1);
if(del1 == -1 || del2 == -1 || del3 == -1) {
// TODO: do something usefull here
return;
diff --git a/kppp/accounting.h b/kppp/accounting.h
index 4fe65591..962d5d6a 100644
--- a/kppp/accounting.h
+++ b/kppp/accounting.h
@@ -39,8 +39,9 @@ class PPPStats;
/////////////////////////////////////////////////////////////////////////////
class AccountingBase : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
- AccountingBase(TQObject *parent);
+ AccountingBase(TQObject *tqparent);
virtual ~AccountingBase();
virtual double total() const;
@@ -81,8 +82,9 @@ public:
/////////////////////////////////////////////////////////////////////////////
class Accounting : public AccountingBase {
Q_OBJECT
+ TQ_OBJECT
public:
- Accounting(TQObject *parent, PPPStats *st);
+ Accounting(TQObject *tqparent, PPPStats *st);
virtual double total() const;
virtual double session() const;
@@ -118,8 +120,9 @@ private:
/////////////////////////////////////////////////////////////////////////////
class ExecutableAccounting : public AccountingBase {
Q_OBJECT
+ TQ_OBJECT
public:
- ExecutableAccounting(PPPStats *st, TQObject *parent = 0);
+ ExecutableAccounting(PPPStats *st, TQObject *tqparent = 0);
virtual bool loadRuleSet(const TQString & );
virtual bool running() const;
diff --git a/kppp/accounts.cpp b/kppp/accounts.cpp
index ce7b6ea3..cbfe03d7 100644
--- a/kppp/accounts.cpp
+++ b/kppp/accounts.cpp
@@ -51,17 +51,17 @@
void parseargs(char* buf, char** args);
-AccountWidget::AccountWidget( TQWidget *parent, const char *name )
- : TQWidget( parent, name )
+AccountWidget::AccountWidget( TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent, name )
{
int min = 0;
- TQVBoxLayout *l1 = new TQVBoxLayout(parent, 10, 10);
+ TQVBoxLayout *l1 = new TQVBoxLayout(tqparent, 10, 10);
// add a hbox
TQHBoxLayout *l11 = new TQHBoxLayout;
l1->addLayout(l11);
- accountlist_l = new TQListBox(parent);
+ accountlist_l = new TQListBox(tqparent);
accountlist_l->setMinimumSize(160, 128);
connect(accountlist_l, TQT_SIGNAL(highlighted(int)),
this, TQT_SLOT(slotListBoxSelect(int)));
@@ -71,23 +71,23 @@ AccountWidget::AccountWidget( TQWidget *parent, const char *name )
TQVBoxLayout *l111 = new TQVBoxLayout;
l11->addLayout(l111, 1);
- edit_b = new TQPushButton(i18n("&Edit..."), parent);
+ edit_b = new TQPushButton(i18n("&Edit..."), tqparent);
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);
+ min = edit_b->tqsizeHint().width();
+ min = TQMAX(70,min);
edit_b->setMinimumWidth(min);
l111->addWidget(edit_b);
- new_b = new TQPushButton(i18n("&New..."), parent);
+ new_b = new TQPushButton(i18n("&New..."), tqparent);
connect(new_b, TQT_SIGNAL(clicked()), TQT_SLOT(newaccount()));
l111->addWidget(new_b);
TQWhatsThis::add(new_b, i18n("Create a new dialup connection\n"
"to the Internet"));
- copy_b = new TQPushButton(i18n("Co&py"), parent);
+ copy_b = new TQPushButton(i18n("Co&py"), tqparent);
connect(copy_b, TQT_SIGNAL(clicked()), TQT_SLOT(copyaccount()));
l111->addWidget(copy_b);
TQWhatsThis::add(copy_b,
@@ -96,7 +96,7 @@ AccountWidget::AccountWidget( TQWidget *parent, const char *name )
"to a new account that you can modify to fit your\n"
"needs"));
- delete_b = new TQPushButton(i18n("De&lete"), parent);
+ delete_b = new TQPushButton(i18n("De&lete"), tqparent);
connect(delete_b, TQT_SIGNAL(clicked()), TQT_SLOT(deleteaccount()));
l111->addWidget(delete_b);
TQWhatsThis::add(delete_b,
@@ -110,13 +110,13 @@ AccountWidget::AccountWidget( TQWidget *parent, const char *name )
TQVBoxLayout *l121 = new TQVBoxLayout;
l12->addLayout(l121);
l121->addStretch(1);
- costlabel = new TQLabel(i18n("Phone costs:"), parent);
+ costlabel = new TQLabel(i18n("Phone costs:"), tqparent);
costlabel->setEnabled(FALSE);
l121->addWidget(costlabel);
- costedit = new TQLineEdit(parent);
- costedit->setFocusPolicy(TQWidget::NoFocus);
- costedit->setFixedHeight(costedit->sizeHint().height());
+ costedit = new TQLineEdit(tqparent);
+ costedit->setFocusPolicy(TQ_NoFocus);
+ costedit->setFixedHeight(costedit->tqsizeHint().height());
costedit->setEnabled(FALSE);
l121->addWidget(costedit);
l121->addStretch(1);
@@ -129,13 +129,13 @@ AccountWidget::AccountWidget( TQWidget *parent, const char *name )
TQWhatsThis::add(costlabel, tmp);
TQWhatsThis::add(costedit, tmp);
- vollabel = new TQLabel(i18n("Volume:"), parent);
+ vollabel = new TQLabel(i18n("Volume:"), tqparent);
vollabel->setEnabled(FALSE);
l121->addWidget(vollabel);
- voledit = new TQLineEdit(parent,"voledit");
- voledit->setFocusPolicy(TQWidget::NoFocus);
- voledit->setFixedHeight(voledit->sizeHint().height());
+ voledit = new TQLineEdit(tqparent,"voledit");
+ voledit->setFocusPolicy(TQ_NoFocus);
+ voledit->setFixedHeight(voledit->tqsizeHint().height());
voledit->setEnabled(FALSE);
l121->addWidget(voledit);
tmp = i18n("<p>This shows the number of bytes transferred\n"
@@ -153,13 +153,13 @@ AccountWidget::AccountWidget( TQWidget *parent, const char *name )
l12->addLayout(l122);
l122->addStretch(1);
- reset = new TQPushButton(i18n("&Reset..."), parent);
+ reset = new TQPushButton(i18n("&Reset..."), tqparent);
reset->setEnabled(FALSE);
connect(reset, TQT_SIGNAL(clicked()),
this, TQT_SLOT(resetClicked()));
l122->addWidget(reset);
- log = new TQPushButton(i18n("&View Logs"), parent);
+ log = new TQPushButton(i18n("&View Logs"), tqparent);
connect(log, TQT_SIGNAL(clicked()),
this, TQT_SLOT(viewLogClicked()));
l122->addWidget(log);
@@ -293,7 +293,7 @@ void AccountWidget::newaccount() {
if(result == TQDialog::Accepted) {
accountlist_l->insertItem(gpppdata.accname());
- accountlist_l->setSelected(accountlist_l->findItem(gpppdata.accname()),
+ accountlist_l->setSelected(accountlist_l->tqfindItem(gpppdata.accname()),
true);
emit resetaccounts();
gpppdata.save();
@@ -324,7 +324,7 @@ void AccountWidget::copyaccount() {
void AccountWidget::deleteaccount() {
TQString s = i18n("Are you sure you want to delete\nthe account \"%1\"?")
- .arg(accountlist_l->text(accountlist_l->currentItem()));
+ .tqarg(accountlist_l->text(accountlist_l->currentItem()));
if(KMessageBox::warningYesNo(this, s, i18n("Confirm"), KGuiItem(i18n("Delete"), "editdelete"), KStdGuiItem::cancel()) != KMessageBox::Yes)
return;
@@ -341,7 +341,7 @@ void AccountWidget::deleteaccount() {
int AccountWidget::doTab(){
- tabWindow = new KDialogBase( KDialogBase::Tabbed, TQString::null,
+ tabWindow = new KDialogBase( KDialogBase::Tabbed, TQString(),
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok,
0, 0, true);
KWin::setIcons(tabWindow->winId(), kapp->icon(), kapp->miniIcon());
@@ -403,7 +403,7 @@ int AccountWidget::doTab(){
TQString AccountWidget::prettyPrintVolume(unsigned int n) {
int idx = 0;
const TQString quant[] = {i18n("Byte"), i18n("KB"),
- i18n("MB"), i18n("GB"), TQString::null};
+ i18n("MB"), i18n("GB"), TQString()};
float n1 = n;
while(n >= 1024 && !quant[idx].isNull()) {
@@ -426,14 +426,14 @@ TQString AccountWidget::prettyPrintVolume(unsigned int n) {
// Queries the user what to reset: costs, volume or both
//
/////////////////////////////////////////////////////////////////////////////
-QueryReset::QueryReset(TQWidget *parent) : TQDialog(parent, 0, true) {
+QueryReset::QueryReset(TQWidget *tqparent) : TQDialog(tqparent, 0, true) {
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
setCaption(i18n("Reset Accounting"));
TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10);
TQVGroupBox *f = new TQVGroupBox(i18n("What to Reset"), this);
- TQVBoxLayout *l1 = new TQVBoxLayout(parent, 10, 10);
+ TQVBoxLayout *l1 = new TQVBoxLayout(tqparent, 10, 10);
costs = new TQCheckBox(i18n("Reset the accumulated p&hone costs"), f);
costs->setChecked(true);
l1->addWidget(costs);
@@ -450,7 +450,7 @@ QueryReset::QueryReset(TQWidget *parent) : TQDialog(parent, 0, true) {
l1->activate();
- // this activates the f-layout and sets minimumSize()
+ // this activates the f-tqlayout and sets tqminimumSize()
f->show();
tl->addWidget(f);
@@ -466,11 +466,11 @@ QueryReset::QueryReset(TQWidget *parent) : TQDialog(parent, 0, true) {
connect(cancel, TQT_SIGNAL(clicked()),
this, TQT_SLOT(reject()));
- bbox->layout();
+ bbox->tqlayout();
tl->addWidget(bbox);
// TODO: activate if KGroupBox is fixed
- // setFixedSize(sizeHint());
+ // setFixedSize(tqsizeHint());
}
diff --git a/kppp/accounts.h b/kppp/accounts.h
index 4ed96d47..61ba901d 100644
--- a/kppp/accounts.h
+++ b/kppp/accounts.h
@@ -44,8 +44,9 @@ class GatewayWidget;
class AccountWidget : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- AccountWidget( TQWidget *parent=0, const char *name=0 );
+ AccountWidget( TQWidget *tqparent=0, const char *name=0 );
~AccountWidget() {}
private slots:
@@ -93,8 +94,9 @@ private:
class QueryReset : public TQDialog {
Q_OBJECT
+ TQ_OBJECT
public:
- QueryReset(TQWidget *parent);
+ QueryReset(TQWidget *tqparent);
enum {COSTS=1, VOLUME=2};
diff --git a/kppp/acctselect.cpp b/kppp/acctselect.cpp
index eceeff76..4cad3aeb 100644
--- a/kppp/acctselect.cpp
+++ b/kppp/acctselect.cpp
@@ -52,25 +52,25 @@
#include "pppdata.h"
-AccountingSelector::AccountingSelector(TQWidget *parent, bool _isnewaccount, const char *name)
- : TQWidget(parent, name),
+AccountingSelector::AccountingSelector(TQWidget *tqparent, bool _isnewaccount, const char *name)
+ : TQWidget(tqparent, name),
isnewaccount(_isnewaccount)
{
- TQVBoxLayout *l1 = new TQVBoxLayout(parent, 0, KDialog::spacingHint());
+ TQVBoxLayout *l1 = new TQVBoxLayout(tqparent, 0, KDialog::spacingHint());
- enable_accounting = new TQCheckBox(i18n("&Enable accounting"), parent);
+ enable_accounting = new TQCheckBox(i18n("&Enable accounting"), tqparent);
l1->addWidget(enable_accounting, 1);
connect(enable_accounting, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(enableItems(bool)));
// insert the tree widget
- tl = new TQListView(parent, "treewidget");
+ tl = new TQListView(tqparent, "treewidget");
connect(tl, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this,
TQT_SLOT(slotSelectionChanged(TQListViewItem*)));
tl->setMinimumSize(220, 200);
l1->addWidget(tl, 1);
- KURLLabel *up = new KURLLabel(parent);
+ KURLLabel *up = new KURLLabel(tqparent);
up->setText(i18n("Check for rule updates"));
up->setURL("http://developer.kde.org/~kppp/rules.html");
connect(up, TQT_SIGNAL(leftClickedURL(const TQString&)), TQT_SLOT(openURL(const TQString&)));
@@ -81,11 +81,11 @@ AccountingSelector::AccountingSelector(TQWidget *parent, bool _isnewaccount, con
TQHBoxLayout *l11 = new TQHBoxLayout;
l1->addSpacing(10);
l1->addLayout(l11);
- TQLabel *lsel = new TQLabel(i18n("Selected:"), parent);
- selected = new TQLabel(parent);
+ TQLabel *lsel = new TQLabel(i18n("Selected:"), tqparent);
+ selected = new TQLabel(tqparent);
selected->setFrameStyle(TQFrame::Sunken | TQFrame::WinPanel);
selected->setLineWidth(1);
- selected->setFixedHeight(selected->sizeHint().height() + 16);
+ selected->setFixedHeight(selected->tqsizeHint().height() + 16);
l11->addWidget(lsel, 0);
l11->addSpacing(10);
l11->addWidget(selected, 1);
@@ -94,8 +94,8 @@ AccountingSelector::AccountingSelector(TQWidget *parent, bool _isnewaccount, con
l1->addStretch(1);
TQHBoxLayout *l12 = new TQHBoxLayout;
l1->addLayout(l12);
- TQLabel *usevol_l = new TQLabel(i18n("Volume accounting:"), parent);
- use_vol = new TQComboBox(parent);
+ TQLabel *usevol_l = new TQLabel(i18n("Volume accounting:"), tqparent);
+ use_vol = new TQComboBox(tqparent);
use_vol->insertItem(i18n("No Accounting"), 0);
use_vol->insertItem(i18n("Bytes In"), 1);
use_vol->insertItem(i18n("Bytes Out"), 2);
@@ -134,7 +134,7 @@ AccountingSelector::AccountingSelector(TQWidget *parent, bool _isnewaccount, con
TQString AccountingSelector::fileNameToName(TQString s) {
- s.replace('_', " ");
+ s.tqreplace('_', " ");
return KURL::decode_string(s);
}
@@ -142,7 +142,7 @@ TQString AccountingSelector::fileNameToName(TQString s) {
TQString AccountingSelector::nameToFileName(TQString s) {
- s.replace(' ', "_");
+ s.tqreplace(' ', "_");
return s;
}
@@ -174,8 +174,8 @@ void AccountingSelector::insertDir(TQDir d, TQListViewItem *root) {
d.setSorting(TQDir::Name);
// read the list of files
- const QFileInfoList *list = d.entryInfoList();
- QFileInfoListIterator it( *list );
+ const TQFileInfoList *list = d.entryInfoList();
+ TQFileInfoListIterator it( *list );
TQFileInfo *fi;
// traverse the list and insert into the widget
@@ -210,8 +210,8 @@ void AccountingSelector::insertDir(TQDir d, TQListViewItem *root) {
// set up a filter for the directories
d.setFilter(TQDir::Dirs);
d.setNameFilter("*");
- const QFileInfoList *dlist = d.entryInfoList();
- QFileInfoListIterator dit(*dlist);
+ const TQFileInfoList *dlist = d.entryInfoList();
+ TQFileInfoListIterator dit(*dlist);
while((fi = dit.current())) {
// skip "." and ".." directories
@@ -266,7 +266,7 @@ void AccountingSelector::setupTreeWidget() {
// appropriate item
if(!isnewaccount && edit_item) {
tl->setSelected(edit_item, true);
- tl->setOpen(edit_item->parent(), true);
+ tl->setOpen(edit_item->tqparent(), true);
tl->ensureItemVisible(edit_item);
}
@@ -285,7 +285,7 @@ void AccountingSelector::enableItems(bool enabled) {
TQString s;
while(i) {
s = "/" + i->text(0) + s;
- i = i->parent();
+ i = i->tqparent();
}
selected->setText(s.mid(1));
diff --git a/kppp/acctselect.h b/kppp/acctselect.h
index 150e821b..5f93b44e 100644
--- a/kppp/acctselect.h
+++ b/kppp/acctselect.h
@@ -47,8 +47,9 @@ class TQListViewItem;
class AccountingSelector : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- AccountingSelector(TQWidget *parent = 0, bool _isnewaccount = false, const char *name = 0);
+ AccountingSelector(TQWidget *tqparent = 0, bool _isnewaccount = false, const char *name = 0);
~AccountingSelector() {}
bool save();
diff --git a/kppp/connect.cpp b/kppp/connect.cpp
index 0ab7f662..bb2c17a2 100644
--- a/kppp/connect.cpp
+++ b/kppp/connect.cpp
@@ -78,8 +78,8 @@ TQString old_hostname;
bool modified_hostname;
-ConnectWidget::ConnectWidget(TQWidget *parent, const char *name, PPPStats *st)
- : TQWidget(parent, name),
+ConnectWidget::ConnectWidget(TQWidget *tqparent, const char *name, PPPStats *st)
+ : TQWidget(tqparent, name),
// initialize some important variables
myreadbuffer(""),
main_timer_ID(0),
@@ -109,11 +109,11 @@ ConnectWidget::ConnectWidget(TQWidget *parent, const char *name, PPPStats *st)
l0->addSpacing(10);
messg = new TQLabel(this, "messg");
messg->setFrameStyle(TQFrame::Panel|TQFrame::Sunken);
- messg->setAlignment(AlignCenter);
+ messg->tqsetAlignment(AlignCenter);
messg->setText(i18n("Unable to create modem lock file."));
- messg->setMinimumHeight(messg->sizeHint().height() + 5);
- int messw = (messg->sizeHint().width() * 12) / 10;
- messw = QMAX(messw,280);
+ messg->setMinimumHeight(messg->tqsizeHint().height() + 5);
+ int messw = (messg->tqsizeHint().width() * 12) / 10;
+ messw = TQMAX(messw,280);
messg->setMinimumWidth(messw);
messg->setText(i18n("Looking for modem..."));
l0->addWidget(messg);
@@ -131,16 +131,16 @@ ConnectWidget::ConnectWidget(TQWidget *parent, const char *name, PPPStats *st)
cancel->setFocus();
connect(cancel, TQT_SIGNAL(clicked()), TQT_SLOT(cancelbutton()));
- int maxw = QMAX(cancel->sizeHint().width(),
- debug->sizeHint().width());
- maxw = QMAX(maxw,65);
+ int maxw = TQMAX(cancel->tqsizeHint().width(),
+ debug->tqsizeHint().width());
+ maxw = TQMAX(maxw,65);
debug->setFixedWidth(maxw);
cancel->setFixedWidth(maxw);
l1->addWidget(debug);
l1->addWidget(cancel);
l1->addSpacing(10);
- setFixedSize(sizeHint());
+ setFixedSize(tqsizeHint());
pausetimer = new TQTimer(this);
connect(pausetimer, TQT_SIGNAL(timeout()), TQT_SLOT(pause()));
@@ -210,7 +210,7 @@ void ConnectWidget::init() {
comlist = &gpppdata.scriptType();
arglist = &gpppdata.script();
- TQString tit = i18n("Connecting to: %1").arg(gpppdata.accname());
+ TQString tit = i18n("Connecting to: %1").tqarg(gpppdata.accname());
setCaption(tit);
kapp->processEvents();
@@ -259,7 +259,7 @@ void ConnectWidget::init() {
semaphore = false;
Modem::modem->stop();
- Modem::modem->notify(this, TQT_SLOT(readChar(unsigned char)));
+ Modem::modem->notify(TQT_TQOBJECT(this), TQT_SLOT(readChar(unsigned char)));
// if we are stuck anywhere we will time out
timeout_timer->start(gpppdata.modemTimeout()*1000);
@@ -398,7 +398,7 @@ void ConnectWidget::timerEvent(TQTimerEvent *) {
TQStringList &plist = gpppdata.phonenumbers();
TQString bmarg= gpppdata.dialPrefix();
bmarg += *plist.at(dialnumber);
- TQString bm = i18n("Dialing %1").arg(bmarg);
+ TQString bm = i18n("Dialing %1").tqarg(bmarg);
messg->setText(bm);
emit debugMessage(bm);
@@ -425,7 +425,7 @@ void ConnectWidget::timerEvent(TQTimerEvent *) {
return;
}
- if(readbuffer.contains(gpppdata.modemBusyResp())) {
+ if(readbuffer.tqcontains(gpppdata.modemBusyResp())) {
timeout_timer->stop();
timeout_timer->start(gpppdata.modemTimeout()*1000);
@@ -434,7 +434,7 @@ void ConnectWidget::timerEvent(TQTimerEvent *) {
Modem::modem->hangup();
if(gpppdata.busyWait() > 0) {
- TQString bm = i18n("Line busy. Waiting: %1 seconds").arg(gpppdata.busyWait());
+ TQString bm = i18n("Line busy. Waiting: %1 seconds").tqarg(gpppdata.busyWait());
messg->setText(bm);
emit debugMessage(bm);
@@ -451,7 +451,7 @@ void ConnectWidget::timerEvent(TQTimerEvent *) {
return;
}
- if(readbuffer.contains(gpppdata.modemNoDialtoneResp())) {
+ if(readbuffer.tqcontains(gpppdata.modemNoDialtoneResp())) {
timeout_timer->stop();
messg->setText(i18n("No Dial Tone"));
@@ -461,13 +461,13 @@ void ConnectWidget::timerEvent(TQTimerEvent *) {
return;
}
- if(readbuffer.contains(gpppdata.modemNoCarrierResp())) {
+ if(readbuffer.tqcontains(gpppdata.modemNoCarrierResp())) {
if (gpppdata.get_redial_on_nocarrier()) {
timeout_timer->stop();
timeout_timer->start(gpppdata.modemTimeout()*1000);
if(gpppdata.busyWait() > 0) {
- TQString bm = i18n("No carrier. Waiting: %1 seconds").arg(gpppdata.busyWait());
+ TQString bm = i18n("No carrier. Waiting: %1 seconds").tqarg(gpppdata.busyWait());
messg->setText(bm);
emit debugMessage(bm);
@@ -492,7 +492,7 @@ void ConnectWidget::timerEvent(TQTimerEvent *) {
return;
}
- if(readbuffer.contains(gpppdata.modemDLPResp())) {
+ if(readbuffer.tqcontains(gpppdata.modemDLPResp())) {
timeout_timer->stop();
messg->setText(i18n("Digital Line Protection Detected."));
@@ -553,7 +553,7 @@ void ConnectWidget::timerEvent(TQTimerEvent *) {
}
if (scriptCommand == "Scan") {
- TQString bm = i18n("Scanning %1").arg(scriptArgument);
+ TQString bm = i18n("Scanning %1").tqarg(scriptArgument);
messg->setText(bm);
emit debugMessage(bm);
@@ -563,7 +563,7 @@ void ConnectWidget::timerEvent(TQTimerEvent *) {
}
if (scriptCommand == "Save") {
- TQString bm = i18n("Saving %1").arg(scriptArgument);
+ TQString bm = i18n("Saving %1").tqarg(scriptArgument);
messg->setText(bm);
emit debugMessage(bm);
@@ -583,18 +583,18 @@ void ConnectWidget::timerEvent(TQTimerEvent *) {
if (scriptCommand == "Send" || scriptCommand == "SendNoEcho") {
TQString bm = i18n("Sending %1");
- // replace %USERNAME% and %PASSWORD%
+ // tqreplace %USERNAME% and %PASSWORD%
TQString arg = scriptArgument;
TQRegExp re1("%USERNAME%");
TQRegExp re2("%PASSWORD%");
- arg = arg.replace(re1, gpppdata.storedUsername());
- arg = arg.replace(re2, gpppdata.storedPassword());
+ arg = arg.tqreplace(re1, gpppdata.storedUsername());
+ arg = arg.tqreplace(re2, gpppdata.storedPassword());
if (scriptCommand == "Send")
- bm = bm.arg(scriptArgument);
+ bm = bm.tqarg(scriptArgument);
else {
for(uint i = 0; i < scriptArgument.length(); i++)
- bm = bm.arg("*");
+ bm = bm.tqarg("*");
}
messg->setText(bm);
@@ -606,7 +606,7 @@ void ConnectWidget::timerEvent(TQTimerEvent *) {
}
if (scriptCommand == "Expect") {
- TQString bm = i18n("Expecting %1").arg(scriptArgument);
+ TQString bm = i18n("Expecting %1").tqarg(scriptArgument);
messg->setText(bm);
emit debugMessage(bm);
@@ -620,7 +620,7 @@ void ConnectWidget::timerEvent(TQTimerEvent *) {
if (scriptCommand == "Pause") {
- TQString bm = i18n("Pause %1 seconds").arg(scriptArgument);
+ TQString bm = i18n("Pause %1 seconds").tqarg(scriptArgument);
messg->setText(bm);
emit debugMessage(bm);
@@ -637,7 +637,7 @@ void ConnectWidget::timerEvent(TQTimerEvent *) {
timeout_timer->stop();
- TQString bm = i18n("Timeout %1 seconds").arg(scriptArgument);
+ TQString bm = i18n("Timeout %1 seconds").tqarg(scriptArgument);
messg->setText(bm);
emit debugMessage(bm);
@@ -672,7 +672,7 @@ void ConnectWidget::timerEvent(TQTimerEvent *) {
}
if (scriptCommand == "ID") {
- TQString bm = i18n("ID %1").arg(scriptArgument);
+ TQString bm = i18n("ID %1").tqarg(scriptArgument);
messg->setText(bm);
emit debugMessage(bm);
@@ -708,7 +708,7 @@ void ConnectWidget::timerEvent(TQTimerEvent *) {
}
if (scriptCommand == "Password") {
- TQString bm = i18n("Password %1").arg(scriptArgument);
+ TQString bm = i18n("Password %1").tqarg(scriptArgument);
messg->setText(bm);
emit debugMessage(bm);
@@ -752,13 +752,13 @@ void ConnectWidget::timerEvent(TQTimerEvent *) {
// variable (from the subsequent scan).
TQString ts = scriptArgument;
- int vstart = ts.find( "##" );
+ int vstart = ts.tqfind( "##" );
if( vstart != -1 ) {
ts.remove( vstart, 2 );
ts.insert( vstart, scanvar );
}
- bm = bm.arg(ts);
+ bm = bm.tqarg(ts);
messg->setText(bm);
emit debugMessage(bm);
@@ -782,7 +782,7 @@ void ConnectWidget::timerEvent(TQTimerEvent *) {
}
if (scriptCommand == "PWPrompt") {
- TQString bm = i18n("PW Prompt %1").arg(scriptArgument);
+ TQString bm = i18n("PW Prompt %1").tqarg(scriptArgument);
messg->setText(bm);
emit debugMessage(bm);
@@ -807,7 +807,7 @@ void ConnectWidget::timerEvent(TQTimerEvent *) {
if (scriptCommand == "LoopStart") {
- TQString bm = i18n("Loop Start %1").arg(scriptArgument);
+ TQString bm = i18n("Loop Start %1").tqarg(scriptArgument);
// The incrementing of the scriptindex MUST be before the
// call to setExpect otherwise the expect will miss a string that is
@@ -832,9 +832,9 @@ void ConnectWidget::timerEvent(TQTimerEvent *) {
}
if (scriptCommand == "LoopEnd") {
- TQString bm = i18n("Loop End %1").arg(scriptArgument);
+ TQString bm = i18n("Loop End %1").tqarg(scriptArgument);
if ( loopnest <= 0 ) {
- bm = i18n("LoopEnd without matching Start. Line: %1").arg(bm);
+ bm = i18n("LoopEnd without matching Start. Line: %1").tqarg(bm);
vmain=20;
cancelbutton();
KMessageBox::error(0, bm);
@@ -994,26 +994,26 @@ void ConnectWidget::checkBuffers() {
// Let's check if we are finished with scanning:
// The scanstring have to be in the buffer and the latest character
// was a carriage return or an linefeed (depending on modem setup)
- if( scanning && scanbuffer.contains(scanstr) &&
+ if( scanning && scanbuffer.tqcontains(scanstr) &&
( scanbuffer.right(1) == "\n" || scanbuffer.right(1) == "\r") ) {
scanning = false;
- int vstart = scanbuffer.find( scanstr ) + scanstr.length();
+ int vstart = scanbuffer.tqfind( scanstr ) + scanstr.length();
scanvar = scanbuffer.mid( vstart, scanbuffer.length() - vstart);
scanvar = scanvar.stripWhiteSpace();
// Show the Variabel content in the debug window
- TQString sv = i18n("Scan Var: %1").arg(scanvar);
+ TQString sv = i18n("Scan Var: %1").tqarg(scanvar);
emit debugMessage(sv);
}
if(expecting) {
- if(readbuffer.contains(expectstr)) {
+ if(readbuffer.tqcontains(expectstr)) {
expecting = false;
// keep everything after the expected string
- readbuffer.remove(0, readbuffer.find(expectstr) + expectstr.length());
+ readbuffer.remove(0, readbuffer.tqfind(expectstr) + expectstr.length());
- TQString ts = i18n("Found: %1").arg(expectstr);
+ TQString ts = i18n("Found: %1").tqarg(expectstr);
emit debugMessage(ts);
if (loopend) {
@@ -1021,10 +1021,10 @@ void ConnectWidget::checkBuffers() {
}
}
- if (loopend && readbuffer.contains(loopstr[loopnest])) {
+ if (loopend && readbuffer.tqcontains(loopstr[loopnest])) {
expecting = false;
readbuffer = "";
- TQString ts = i18n("Looping: %1").arg(loopstr[loopnest]);
+ TQString ts = i18n("Looping: %1").tqarg(loopstr[loopnest]);
emit debugMessage(ts);
scriptindex = loopstartindex[loopnest];
loopend = false;
@@ -1117,7 +1117,7 @@ void ConnectWidget::setScan(const TQString &n) {
scanstr = n;
scanbuffer = "";
- TQString ts = i18n("Scanning: %1").arg(n);
+ TQString ts = i18n("Scanning: %1").tqarg(n);
emit debugMessage(ts);
}
@@ -1126,8 +1126,8 @@ void ConnectWidget::setExpect(const TQString &n) {
expecting = true;
expectstr = n;
- TQString ts = i18n("Expecting: %1").arg(n);
- ts.replace(TQRegExp("\n"), "<LF>");
+ TQString ts = i18n("Expecting: %1").tqarg(n);
+ ts.tqreplace(TQRegExp("\n"), "<LF>");
emit debugMessage(ts);
// check if the expected string is in the read buffer already.
@@ -1271,8 +1271,8 @@ bool ConnectWidget::execppp() {
command += gpppdata.gateway();
}
- if(gpppdata.subnetmask() != "0.0.0.0")
- command += " netmask " + gpppdata.subnetmask();
+ if(gpppdata.subnettqmask() != "0.0.0.0")
+ command += " nettqmask " + gpppdata.subnettqmask();
// the english/i18n mix below is ugly but we want to keep working
// after someone changed the code to use i18n'ed config values
@@ -1374,7 +1374,7 @@ void auto_hostname() {
gethostname(tmp_str, sizeof(tmp_str));
tmp_str[sizeof(tmp_str)-1]=0; // panic
- old_hostname=tmp_str; // copy to QString
+ old_hostname=tmp_str; // copy to TQString
if (!p_kppp->stats->local_ip_address.isEmpty() && gpppdata.autoname()) {
local_ip.s_addr=inet_addr(p_kppp->stats->local_ip_address.ascii());
@@ -1382,7 +1382,7 @@ void auto_hostname() {
if (hostname_entry != 0L) {
new_hostname=hostname_entry->h_name;
- dot=new_hostname.find('.');
+ dot=new_hostname.tqfind('.');
new_hostname=new_hostname.remove(dot,new_hostname.length()-dot);
Requester::rq->setHostname(new_hostname);
modified_hostname = TRUE;
@@ -1427,11 +1427,11 @@ void add_domain(const TQString &domain) {
write(fd, tmp.data(), tmp.length());
for(int j=0; j < i; j++) {
- if((resolv[j].contains("domain") ||
- ( resolv[j].contains("nameserver")
- && !resolv[j].contains("#kppp temp entry")
+ if((resolv[j].tqcontains("domain") ||
+ ( resolv[j].tqcontains("nameserver")
+ && !resolv[j].tqcontains("#kppp temp entry")
&& gpppdata.exDNSDisabled()))
- && !resolv[j].contains("#entry disabled by kppp")) {
+ && !resolv[j].tqcontains("#entry disabled by kppp")) {
TQCString tmp = "# " + resolv[j].local8Bit() +
" \t#entry disabled by kppp\n";
write(fd, tmp, tmp.length());
@@ -1510,8 +1510,8 @@ void removedns() {
if((fd = Requester::rq->openResolv(O_WRONLY|O_TRUNC)) >= 0) {
for(int j=0; j < i; j++) {
- if(resolv[j].contains("#kppp temp entry")) continue;
- if(resolv[j].contains("#entry disabled by kppp")) {
+ if(resolv[j].tqcontains("#kppp temp entry")) continue;
+ if(resolv[j].tqcontains("#entry disabled by kppp")) {
TQCString tmp = resolv[j].local8Bit();
write(fd, tmp.data()+2, tmp.length() - 27);
write(fd, "\n", 1);
diff --git a/kppp/connect.h b/kppp/connect.h
index c387a84b..8f46ce8b 100644
--- a/kppp/connect.h
+++ b/kppp/connect.h
@@ -45,8 +45,9 @@ class PPPStats;
class ConnectWidget : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- ConnectWidget(TQWidget *parent, const char *name, PPPStats *st);
+ ConnectWidget(TQWidget *tqparent, const char *name, PPPStats *st);
~ConnectWidget();
public:
diff --git a/kppp/conwindow.cpp b/kppp/conwindow.cpp
index 3b14e916..3a20bbee 100644
--- a/kppp/conwindow.cpp
+++ b/kppp/conwindow.cpp
@@ -31,9 +31,9 @@
extern PPPData gpppdata;
-ConWindow::ConWindow(TQWidget *parent, const char *name,TQWidget *mainwidget,
+ConWindow::ConWindow(TQWidget *tqparent, const char *name,TQWidget *mainwidget,
PPPStats *st)
- : TQWidget(parent, name, 0),
+ : TQWidget(tqparent, name, 0),
minutes(0),
seconds(0),
hours(0),
@@ -96,7 +96,7 @@ bool ConWindow::event(TQEvent *e) {
TQString ConWindow::prettyPrintVolume(unsigned int n) {
int idx = 0;
const TQString quant[] = {i18n("Byte"), i18n("KB"),
- i18n("MB"), i18n("GB"), TQString::null};
+ i18n("MB"), i18n("GB"), TQString()};
float n1 = n;
while(n >= 1024 && !quant[idx].isNull()) {
@@ -118,11 +118,11 @@ void ConWindow::accounting(bool on) {
accountingEnabled = on;
volumeAccountingEnabled = gpppdata.VolAcctEnabled();
- // delete old layout
+ // delete old tqlayout
if(tl1 != 0)
delete tl1;
- // add layout now
+ // add tqlayout now
tl1 = new TQVBoxLayout(this, 10, 10);
tl1->addSpacing(5);
TQHBoxLayout *tl = new TQHBoxLayout;
@@ -142,11 +142,11 @@ void ConWindow::accounting(bool on) {
l1->setColStretch(0, 0);
l1->setColStretch(1, 1);
- info2->setAlignment(AlignRight|AlignVCenter);
- timelabel2->setAlignment(AlignRight|AlignVCenter);
- session_bill->setAlignment(AlignRight|AlignVCenter);
- total_bill->setAlignment(AlignRight|AlignVCenter);
- volinfo->setAlignment(AlignRight|AlignVCenter);
+ info2->tqsetAlignment(AlignRight|AlignVCenter);
+ timelabel2->tqsetAlignment(AlignRight|AlignVCenter);
+ session_bill->tqsetAlignment(AlignRight|AlignVCenter);
+ total_bill->tqsetAlignment(AlignRight|AlignVCenter);
+ volinfo->tqsetAlignment(AlignRight|AlignVCenter);
// make sure that there's enough space for the bills
TQString s1 = session_bill->text();
TQString s2 = total_bill->text();
@@ -155,9 +155,9 @@ void ConWindow::accounting(bool on) {
session_bill->setText("888888.88 XXX");
total_bill->setText("888888.88 XXX");
volinfo->setText("8888.8 MB");
- session_bill->setFixedSize(session_bill->sizeHint());
- total_bill->setFixedSize(total_bill->sizeHint());
- volinfo->setFixedSize(volinfo->sizeHint());
+ session_bill->setFixedSize(session_bill->tqsizeHint());
+ total_bill->setFixedSize(total_bill->tqsizeHint());
+ volinfo->setFixedSize(volinfo->tqsizeHint());
session_bill->setText(s1);
total_bill->setText(s2);
volinfo->setText(s3);
@@ -214,7 +214,7 @@ void ConWindow::accounting(bool on) {
tl1->addSpacing(5);
- setFixedSize(sizeHint());
+ setFixedSize(tqsizeHint());
/*
do not overwrite position read from config
// If this gets re-enabled, fix it for Xinerama before committing to CVS.
@@ -264,12 +264,12 @@ void ConWindow::timeclick() {
TQString tooltip = i18n("Connection: %1\n"
"Connected at: %2\n"
"Time connected: %3")
- .arg(gpppdata.accname()).arg(info2->text())
- .arg(time_string2);
+ .tqarg(gpppdata.accname()).tqarg(info2->text())
+ .tqarg(time_string2);
if(accountingEnabled)
tooltip += i18n("\nSession Bill: %1\nTotal Bill: %2")
- .arg(session_bill->text()).arg(total_bill->text());
+ .tqarg(session_bill->text()).tqarg(total_bill->text());
// volume accounting
if(volumeAccountingEnabled) {
diff --git a/kppp/conwindow.h b/kppp/conwindow.h
index fd3609de..e7fed7f5 100644
--- a/kppp/conwindow.h
+++ b/kppp/conwindow.h
@@ -38,9 +38,10 @@ class PPPStats;
class ConWindow : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- ConWindow(TQWidget *parent, const char *name,TQWidget *main, PPPStats *st);
+ ConWindow(TQWidget *tqparent, const char *name,TQWidget *main, PPPStats *st);
~ConWindow();
protected:
diff --git a/kppp/debug.cpp b/kppp/debug.cpp
index 3dee5797..914ce940 100644
--- a/kppp/debug.cpp
+++ b/kppp/debug.cpp
@@ -29,8 +29,8 @@
extern KPPPWidget *p_kppp;
-myMultiEdit::myMultiEdit(TQWidget *parent, const char *name)
- : TQMultiLineEdit(parent, name)
+myMultiEdit::myMultiEdit(TQWidget *tqparent, const char *name)
+ : TQMultiLineEdit(tqparent, name)
{
setReadOnly(true);
}
@@ -45,8 +45,8 @@ void myMultiEdit::newLine() {
}
-DebugWidget::DebugWidget(TQWidget *parent, const char *name)
- : TQDialog(parent, name, FALSE)
+DebugWidget::DebugWidget(TQWidget *tqparent, const char *name)
+ : TQDialog(tqparent, name, FALSE)
{
setCaption(i18n("Login Script Debug Window"));
@@ -57,7 +57,7 @@ DebugWidget::DebugWidget(TQWidget *parent, const char *name)
statuslabel = new TQLabel("", this, "statuslabel");
statuslabel->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
- statuslabel->setAlignment( AlignLeft|AlignVCenter );
+ statuslabel->tqsetAlignment( AlignLeft|AlignVCenter );
statuslabel->setGeometry(2, 307, 400, 20);
//statusPageLabel->setFont( KGlobalSettings::generalFont() );
diff --git a/kppp/debug.h b/kppp/debug.h
index a1a73be9..bc939dde 100644
--- a/kppp/debug.h
+++ b/kppp/debug.h
@@ -34,7 +34,7 @@
class myMultiEdit : public TQMultiLineEdit {
public:
- myMultiEdit(TQWidget *parent=0, const char *name=0);
+ myMultiEdit(TQWidget *tqparent=0, const char *name=0);
void newLine();
void insertChar(unsigned char c);
@@ -43,8 +43,9 @@ public:
class DebugWidget : public TQDialog {
Q_OBJECT
+ TQ_OBJECT
public:
- DebugWidget(TQWidget *parent=0, const char *name=0);
+ DebugWidget(TQWidget *tqparent=0, const char *name=0);
void clear();
diff --git a/kppp/docking.cpp b/kppp/docking.cpp
index e5cd0c5e..efe81924 100644
--- a/kppp/docking.cpp
+++ b/kppp/docking.cpp
@@ -38,8 +38,8 @@ extern KPPPWidget *p_kppp;
// static member
DockWidget *DockWidget::dock_widget = 0;
-DockWidget::DockWidget(TQWidget *parent, const char *name, PPPStats *st)
- : KSystemTray(parent, name), stats(st) {
+DockWidget::DockWidget(TQWidget *tqparent, const char *name, PPPStats *st)
+ : KSystemTray(tqparent, name), stats(st) {
// load pixmaps
dock_none_pixmap = UserIcon("dock_none");
@@ -114,12 +114,12 @@ void DockWidget::stop_stats() {
void DockWidget::mousePressEvent(TQMouseEvent *e) {
// open/close connect-window on right mouse button
- if ( e->button() == LeftButton ) {
+ if ( e->button() == Qt::LeftButton ) {
toggle_window_state();
}
// open popup menu on left mouse button
- if ( e->button() == RightButton ) {
+ if ( e->button() == Qt::RightButton ) {
TQString text;
if(p_kppp->con_win->isVisible())
text = i18n("Minimize");
diff --git a/kppp/docking.h b/kppp/docking.h
index 93c6d344..bb1e8139 100644
--- a/kppp/docking.h
+++ b/kppp/docking.h
@@ -35,8 +35,9 @@ class PPPStats;
class DockWidget : public KSystemTray {
Q_OBJECT
+ TQ_OBJECT
public:
- DockWidget(TQWidget * parent, const char *name, PPPStats *st);
+ DockWidget(TQWidget * tqparent, const char *name, PPPStats *st);
~DockWidget();
protected:
diff --git a/kppp/edit.cpp b/kppp/edit.cpp
index 8986520b..e330db7f 100644
--- a/kppp/edit.cpp
+++ b/kppp/edit.cpp
@@ -44,17 +44,17 @@
#include "iplined.h"
#include "auth.h"
-DialWidget::DialWidget( TQWidget *parent, bool isnewaccount, const char *name )
- : TQWidget(parent, name)
+DialWidget::DialWidget( TQWidget *tqparent, bool isnewaccount, const char *name )
+ : TQWidget(tqparent, name)
{
const int GRIDROWS = 8;
- TQGridLayout *tl = new TQGridLayout(parent, GRIDROWS, 2, 0, KDialog::spacingHint());
+ TQGridLayout *tl = new TQGridLayout(tqparent, GRIDROWS, 2, 0, KDialog::spacingHint());
- connect_label = new TQLabel(i18n("Connection &name:"), parent);
+ connect_label = new TQLabel(i18n("Connection &name:"), tqparent);
tl->addWidget(connect_label, 0, 0);
- connectname_l = new TQLineEdit(parent);
+ connectname_l = new TQLineEdit(tqparent);
connectname_l->setMaxLength(ACCNAME_SIZE);
connect_label->setBuddy(connectname_l);
@@ -65,24 +65,24 @@ DialWidget::DialWidget( TQWidget *parent, bool isnewaccount, const char *name )
TQWhatsThis::add(connectname_l,tmp);
- number_label = new TQLabel(i18n("P&hone number:"), parent);
- number_label->setAlignment(AlignTop|AlignLeft);
+ number_label = new TQLabel(i18n("P&hone number:"), tqparent);
+ number_label->tqsetAlignment(AlignTop|AlignLeft);
tl->addWidget(number_label, 1, 0);
TQHBoxLayout *lpn = new TQHBoxLayout(5);
tl->addLayout(lpn, 1, 1);
- numbers = new TQListBox(parent);
+ numbers = new TQListBox(tqparent);
number_label->setBuddy(numbers);
numbers->setMinimumSize(120, 70);
lpn->addWidget(numbers);
TQVBoxLayout *lpn1 = new TQVBoxLayout;
lpn->addLayout(lpn1);
- add = new TQPushButton(i18n("&Add..."), parent);
- del = new TQPushButton(i18n("&Remove"), parent);
+ add = new TQPushButton(i18n("&Add..."), tqparent);
+ del = new TQPushButton(i18n("&Remove"), tqparent);
- up = new TQPushButton(parent);
+ up = new TQPushButton(tqparent);
up->setIconSet(BarIconSet("up"));
- down = new TQPushButton(parent);
+ down = new TQPushButton(tqparent);
down->setIconSet(BarIconSet("down"));
lpn1->addWidget(add);
lpn1->addWidget(del);
@@ -112,10 +112,10 @@ DialWidget::DialWidget( TQWidget *parent, bool isnewaccount, const char *name )
TQWhatsThis::add(number_label,tmp);
TQWhatsThis::add(numbers,tmp);
- auth_l = new TQLabel(i18n("A&uthentication:"), parent);
+ auth_l = new TQLabel(i18n("A&uthentication:"), tqparent);
tl->addWidget(auth_l, 3, 0);
- auth = new TQComboBox(parent);
+ auth = new TQComboBox(tqparent);
auth_l->setBuddy(auth);
auth->insertItem(i18n("Script-based"));
auth->insertItem(i18n("PAP"));
@@ -136,7 +136,7 @@ DialWidget::DialWidget( TQWidget *parent, bool isnewaccount, const char *name )
TQWhatsThis::add(auth_l,tmp);
TQWhatsThis::add(auth,tmp);
- store_password = new TQCheckBox(i18n("Store &password"), parent);
+ store_password = new TQCheckBox(i18n("Store &password"), tqparent);
store_password->setChecked(true);
tl->addMultiCellWidget(store_password, 4, 4, 0, 1, AlignRight);
TQWhatsThis::add(store_password,
@@ -149,10 +149,10 @@ DialWidget::DialWidget( TQWidget *parent, bool isnewaccount, const char *name )
"readable only to you. Make sure nobody\n"
"gains access to this file!"));
- cbtype_l = new TQLabel(i18n("&Callback type:"), parent);
+ cbtype_l = new TQLabel(i18n("&Callback type:"), tqparent);
tl->addWidget(cbtype_l, 5, 0);
- cbtype = new TQComboBox(parent);
+ cbtype = new TQComboBox(tqparent);
cbtype_l->setBuddy(cbtype);
cbtype->insertItem(i18n("None"));
cbtype->insertItem(i18n("Administrator-defined"));
@@ -165,10 +165,10 @@ DialWidget::DialWidget( TQWidget *parent, bool isnewaccount, const char *name )
TQWhatsThis::add(cbtype_l,tmp);
TQWhatsThis::add(cbtype,tmp);
- cbphone_l = new TQLabel(i18n("Call&back number:"), parent);
+ cbphone_l = new TQLabel(i18n("Call&back number:"), tqparent);
tl->addWidget(cbphone_l, 6, 0);
- cbphone = new TQLineEdit(parent);
+ cbphone = new TQLineEdit(tqparent);
cbphone_l->setBuddy(cbphone);
cbphone->setMaxLength(140);
tl->addWidget(cbphone, 6, 1);
@@ -177,7 +177,7 @@ DialWidget::DialWidget( TQWidget *parent, bool isnewaccount, const char *name )
TQWhatsThis::add(cbphone_l,tmp);
TQWhatsThis::add(cbphone,tmp);
- pppdargs = new TQPushButton(i18n("Customize &pppd Arguments..."), parent);
+ pppdargs = new TQPushButton(i18n("Customize &pppd Arguments..."), tqparent);
connect(pppdargs, TQT_SIGNAL(clicked()), TQT_SLOT(pppdargsbutton()));
tl->addMultiCellWidget(pppdargs, 7, 7, 0, 1, AlignCenter);
@@ -312,10 +312,10 @@ void DialWidget::pppdargsbutton() {
/////////////////////////////////////////////////////////////////////////////
// ExecWidget
/////////////////////////////////////////////////////////////////////////////
-ExecWidget::ExecWidget(TQWidget *parent, bool isnewaccount, const char *name) :
- TQWidget(parent, name)
+ExecWidget::ExecWidget(TQWidget *tqparent, bool isnewaccount, const char *name) :
+ TQWidget(tqparent, name)
{
- TQVBoxLayout *tl = new TQVBoxLayout(parent, 0, KDialog::spacingHint());
+ TQVBoxLayout *tl = new TQVBoxLayout(tqparent, 0, KDialog::spacingHint());
TQLabel *l = new TQLabel(\
i18n("Here you can select commands to run at certain stages of the\n"
@@ -323,8 +323,8 @@ i18n("Here you can select commands to run at certain stages of the\n"
"you cannot run any commands here requiring root permissions\n"
"(unless, of course, you are root).\n\n"
"Be sure to supply the whole path to the program otherwise\n"
- "kppp might be unable to find it."), parent);
- l->setMinimumHeight(l->sizeHint().height());
+ "kppp might be unable to find it."), tqparent);
+ l->setMinimumHeight(l->tqsizeHint().height());
tl->addWidget(l);
tl->addStretch(1);
@@ -333,10 +333,10 @@ i18n("Here you can select commands to run at certain stages of the\n"
l1->setColStretch(0, 0);
l1->setColStretch(1, 1);
- before_connect_l = new TQLabel(i18n("&Before connect:"), parent);
- before_connect_l->setAlignment(AlignVCenter);
+ before_connect_l = new TQLabel(i18n("&Before connect:"), tqparent);
+ before_connect_l->tqsetAlignment(AlignVCenter);
l1->addWidget(before_connect_l, 0, 0);
- before_connect = new TQLineEdit(parent);
+ before_connect = new TQLineEdit(tqparent);
before_connect_l->setBuddy(before_connect);
before_connect->setMaxLength(COMMAND_SIZE);
l1->addWidget(before_connect, 0, 1);
@@ -349,10 +349,10 @@ i18n("Here you can select commands to run at certain stages of the\n"
TQWhatsThis::add(before_connect_l,tmp);
TQWhatsThis::add(before_connect,tmp);
- command_label = new TQLabel(i18n("&Upon connect:"), parent);
- command_label->setAlignment(AlignVCenter);
+ command_label = new TQLabel(i18n("&Upon connect:"), tqparent);
+ command_label->tqsetAlignment(AlignVCenter);
l1->addWidget(command_label, 1, 0);
- command = new TQLineEdit(parent);
+ command = new TQLineEdit(tqparent);
command_label->setBuddy(command);
command->setMaxLength(COMMAND_SIZE);
l1->addWidget(command, 1, 1);
@@ -366,10 +366,10 @@ i18n("Here you can select commands to run at certain stages of the\n"
TQWhatsThis::add(command,tmp);
predisconnect_label = new TQLabel(i18n("Before &disconnect:"),
- parent);
- predisconnect_label->setAlignment(AlignVCenter);
+ tqparent);
+ predisconnect_label->tqsetAlignment(AlignVCenter);
l1->addWidget(predisconnect_label, 2, 0);
- predisconnect = new TQLineEdit(parent);
+ predisconnect = new TQLineEdit(tqparent);
predisconnect_label->setBuddy(predisconnect);
predisconnect->setMaxLength(COMMAND_SIZE);
l1->addWidget(predisconnect, 2, 1);
@@ -381,11 +381,11 @@ i18n("Here you can select commands to run at certain stages of the\n"
TQWhatsThis::add(predisconnect,tmp);
discommand_label = new TQLabel(i18n("U&pon disconnect:"),
- parent);
- discommand_label->setAlignment(AlignVCenter);
+ tqparent);
+ discommand_label->tqsetAlignment(AlignVCenter);
l1->addWidget(discommand_label, 3, 0);
- discommand = new TQLineEdit(parent);
+ discommand = new TQLineEdit(tqparent);
discommand_label->setBuddy(discommand);
discommand->setMaxLength(COMMAND_SIZE);
l1->addWidget(discommand, 3, 1);
@@ -427,16 +427,16 @@ bool ExecWidget::save() {
// IPWidget
//
/////////////////////////////////////////////////////////////////////////////
-IPWidget::IPWidget( TQWidget *parent, bool isnewaccount, const char *name )
- : TQWidget(parent, name)
+IPWidget::IPWidget( TQWidget *tqparent, bool isnewaccount, const char *name )
+ : TQWidget(tqparent, name)
{
- TQVBoxLayout *topLayout = new TQVBoxLayout(parent);
+ TQVBoxLayout *topLayout = new TQVBoxLayout(tqparent);
topLayout->setSpacing(KDialog::spacingHint());
- box = new TQVGroupBox(i18n("C&onfiguration"), parent);
+ box = new TQVGroupBox(i18n("C&onfiguration"), tqparent);
box->setInsideSpacing(KDialog::spacingHint());
- rb = new TQButtonGroup(parent);
+ rb = new TQButtonGroup(tqparent);
rb->hide();
connect(rb, TQT_SIGNAL(clicked(int)),
TQT_SLOT(hitIPSelect(int)));
@@ -478,23 +478,23 @@ IPWidget::IPWidget( TQWidget *parent, bool isnewaccount, const char *name )
TQWhatsThis::add(ipaddress_label,tmp);
TQWhatsThis::add(ipaddress_l,tmp);
- sub_label = new TQLabel(i18n("&Subnet mask:"), ipWidget);
+ sub_label = new TQLabel(i18n("&Subnet tqmask:"), 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"
+ "you must supply a network tqmask here. In almost\n"
+ "all cases this nettqmask will be <b>255.255.255.0</b>,\n"
"but your mileage may vary.\n"
"\n"
"If unsure, contact your Internet Service Provider");
ipLayout->addWidget(sub_label, 1, 0);
- subnetmask_l = new IPLineEdit(ipWidget);
- sub_label->setBuddy(subnetmask_l);
- ipLayout->addWidget(subnetmask_l, 1, 1);
+ subnettqmask_l = new IPLineEdit(ipWidget);
+ sub_label->setBuddy(subnettqmask_l);
+ ipLayout->addWidget(subnettqmask_l, 1, 1);
TQWhatsThis::add(sub_label,tmp);
- TQWhatsThis::add(subnetmask_l,tmp);
+ TQWhatsThis::add(subnettqmask_l,tmp);
- autoname = new TQCheckBox(i18n("&Auto-configure hostname from this IP"), parent);
+ autoname = new TQCheckBox(i18n("&Auto-configure hostname from this IP"), tqparent);
autoname->setChecked(gpppdata.autoname());
connect(autoname,TQT_SIGNAL(toggled(bool)),
this,TQT_SLOT(autoname_t(bool)));
@@ -516,14 +516,14 @@ IPWidget::IPWidget( TQWidget *parent, bool isnewaccount, const char *name )
//load info from gpppdata
if(!isnewaccount) {
if(gpppdata.ipaddr() == "0.0.0.0" &&
- gpppdata.subnetmask() == "0.0.0.0") {
+ gpppdata.subnettqmask() == "0.0.0.0") {
dynamicadd_rb->setChecked(true);
hitIPSelect(0);
autoname->setChecked(gpppdata.autoname());
}
else {
ipaddress_l->setText(gpppdata.ipaddr());
- subnetmask_l->setText(gpppdata.subnetmask());
+ subnettqmask_l->setText(gpppdata.subnettqmask());
staticadd_rb->setChecked(true);
autoname->setChecked(false);
}
@@ -557,10 +557,10 @@ void IPWidget::autoname_t(bool on) {
void IPWidget::save() {
if(dynamicadd_rb->isChecked()) {
gpppdata.setIpaddr("0.0.0.0");
- gpppdata.setSubnetmask("0.0.0.0");
+ gpppdata.setSubnettqmask("0.0.0.0");
} else {
gpppdata.setIpaddr(ipaddress_l->text());
- gpppdata.setSubnetmask(subnetmask_l->text());
+ gpppdata.setSubnettqmask(subnettqmask_l->text());
}
gpppdata.setAutoname(autoname->isChecked());
}
@@ -571,28 +571,28 @@ void IPWidget::hitIPSelect( int i ) {
ipaddress_label->setEnabled(false);
sub_label->setEnabled(false);
ipaddress_l->setEnabled(false);
- subnetmask_l->setEnabled(false);
+ subnettqmask_l->setEnabled(false);
}
else {
ipaddress_label->setEnabled(true);
sub_label->setEnabled(true);
ipaddress_l->setEnabled(true);
- subnetmask_l->setEnabled(true);
+ subnettqmask_l->setEnabled(true);
}
}
-DNSWidget::DNSWidget( TQWidget *parent, bool isnewaccount, const char *name )
- : TQWidget(parent, name)
+DNSWidget::DNSWidget( TQWidget *tqparent, bool isnewaccount, const char *name )
+ : TQWidget(tqparent, name)
{
- // box = new TQGroupBox(parent);
- TQGridLayout *tl = new TQGridLayout(parent, 7, 2, 0, KDialog::spacingHint());
+ // box = new TQGroupBox(tqparent);
+ TQGridLayout *tl = new TQGridLayout(tqparent, 7, 2, 0, KDialog::spacingHint());
- dnsdomain_label = new TQLabel(i18n("Domain &name:"), parent);
+ dnsdomain_label = new TQLabel(i18n("Domain &name:"), tqparent);
tl->addWidget(dnsdomain_label, 0, 0);
- dnsdomain = new TQLineEdit(parent);
+ dnsdomain = new TQLineEdit(tqparent);
dnsdomain_label->setBuddy(dnsdomain);
dnsdomain->setMaxLength(DOMAIN_SIZE);
tl->addWidget(dnsdomain, 0, 1);
@@ -608,7 +608,7 @@ DNSWidget::DNSWidget( TQWidget *parent, bool isnewaccount, const char *name )
TQWhatsThis::add(dnsdomain_label,tmp);
TQWhatsThis::add(dnsdomain,tmp);
- conf_label = new TQLabel(i18n("C&onfiguration:"), parent);
+ conf_label = new TQLabel(i18n("C&onfiguration:"), tqparent);
tl->addWidget(conf_label, 1, 0);
bg = new TQButtonGroup("Group", this);
@@ -616,23 +616,23 @@ DNSWidget::DNSWidget( TQWidget *parent, bool isnewaccount, const char *name )
connect(bg, TQT_SIGNAL(clicked(int)), TQT_SLOT(DNS_Mode_Selected(int)));
bg->hide();
- autodns = new TQRadioButton(i18n("Automatic"), parent);
+ autodns = new TQRadioButton(i18n("Automatic"), tqparent);
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 TQRadioButton(i18n("Manual"), parent);
+ mandns = new TQRadioButton(i18n("Manual"), tqparent);
bg->insert(mandns, 1);
tl->addWidget(mandns, 2, 1);
- dns_label = new TQLabel(i18n("DNS &IP address:"), parent);
+ dns_label = new TQLabel(i18n("DNS &IP address:"), tqparent);
tl->addWidget(dns_label, 3, 0);
TQHBoxLayout *l2 = new TQHBoxLayout;
tl->addLayout(l2, 3, 1);
- dnsipaddr = new IPLineEdit(parent);
+ dnsipaddr = new IPLineEdit(tqparent);
dns_label->setBuddy(dnsipaddr);
connect(dnsipaddr, TQT_SIGNAL(returnPressed()),
TQT_SLOT(adddns()));
@@ -653,10 +653,10 @@ DNSWidget::DNSWidget( TQWidget *parent, bool isnewaccount, const char *name )
TQHBoxLayout *l1 = new TQHBoxLayout;
tl->addLayout(l1, 4, 1);
- add = new TQPushButton(i18n("&Add"), parent);
+ add = new TQPushButton(i18n("&Add"), tqparent);
connect(add, TQT_SIGNAL(clicked()), TQT_SLOT(adddns()));
- int width = add->sizeHint().width();
- width = QMAX(width,60);
+ int width = add->tqsizeHint().width();
+ width = TQMAX(width,60);
add->setMinimumWidth(width);
l1->addWidget(add);
l1->addStretch(1);
@@ -665,21 +665,21 @@ DNSWidget::DNSWidget( TQWidget *parent, bool isnewaccount, const char *name )
"specified in the field above. The entry\n"
"will then be added to the list below"));
- remove = new TQPushButton(i18n("&Remove"), parent);
+ remove = new TQPushButton(i18n("&Remove"), tqparent);
connect(remove, TQT_SIGNAL(clicked()), TQT_SLOT(removedns()));
- width = remove->sizeHint().width();
- width = QMAX(width,60);
+ width = remove->tqsizeHint().width();
+ width = TQMAX(width,60);
remove->setMinimumWidth(width);
l1->addWidget(remove);
TQWhatsThis::add(remove,
i18n("Click this button to remove the selected DNS\n"
"server entry from the list below"));
- servers_label = new TQLabel(i18n("DNS address &list:"), parent);
- servers_label->setAlignment(AlignTop|AlignLeft);
+ servers_label = new TQLabel(i18n("DNS address &list:"), tqparent);
+ servers_label->tqsetAlignment(AlignTop|AlignLeft);
tl->addWidget(servers_label, 5, 0);
- dnsservers = new TQListBox(parent);
+ dnsservers = new TQListBox(tqparent);
servers_label->setBuddy(dnsservers);
dnsservers->setMinimumSize(150, 80);
connect(dnsservers, TQT_SIGNAL(highlighted(int)),
@@ -694,7 +694,7 @@ DNSWidget::DNSWidget( TQWidget *parent, bool isnewaccount, const char *name )
exdnsdisabled_toggle = new TQCheckBox(i18n( \
"&Disable existing DNS servers during connection"),
- parent);
+ tqparent);
exdnsdisabled_toggle->setChecked(gpppdata.exDNSDisabled());
tl->addMultiCellWidget(exdnsdisabled_toggle, 6, 6, 0, 1, AlignCenter);
TQWhatsThis::add(exdnsdisabled_toggle,
@@ -724,7 +724,7 @@ DNSWidget::DNSWidget( TQWidget *parent, bool isnewaccount, const char *name )
void DNSWidget::DNS_Edit_Changed(const TQString &text) {
TQRegExp r("[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+");
- add->setEnabled(text.find(r) != -1);
+ add->setEnabled(text.tqfind(r) != -1);
}
void DNSWidget::DNS_Entry_Selected(int) {
@@ -782,16 +782,16 @@ void DNSWidget::removedns() {
//
// GatewayWidget
//
-GatewayWidget::GatewayWidget( TQWidget *parent, bool isnewaccount, const char *name )
- : TQWidget(parent, name)
+GatewayWidget::GatewayWidget( TQWidget *tqparent, bool isnewaccount, const char *name )
+ : TQWidget(tqparent, name)
{
- TQVBoxLayout *topLayout = new TQVBoxLayout(parent);
+ TQVBoxLayout *topLayout = new TQVBoxLayout(tqparent);
topLayout->setSpacing(KDialog::spacingHint());
- box = new TQVGroupBox(i18n("C&onfiguration"), parent);
+ box = new TQVGroupBox(i18n("C&onfiguration"), tqparent);
box->setInsideSpacing(KDialog::spacingHint());
- rb = new TQButtonGroup(parent);
+ rb = new TQButtonGroup(tqparent);
rb->hide();
connect(rb, TQT_SIGNAL(clicked(int)), TQT_SLOT(hitGatewaySelect(int)));
@@ -822,7 +822,7 @@ GatewayWidget::GatewayWidget( TQWidget *parent, bool isnewaccount, const char *n
gate_label->setBuddy(gatewayaddr);
defaultroute = new TQCheckBox(i18n("&Assign the default route to this gateway"),
- parent);
+ tqparent);
TQWhatsThis::add(defaultroute,
i18n("If this option is enabled, all packets not\n"
"going to the local net are routed through\n"
@@ -874,16 +874,16 @@ void GatewayWidget::hitGatewaySelect( int i ) {
-ScriptWidget::ScriptWidget( TQWidget *parent, bool isnewaccount, const char *name )
- : TQWidget(parent, name)
+ScriptWidget::ScriptWidget( TQWidget *tqparent, bool isnewaccount, const char *name )
+ : TQWidget(tqparent, name)
{
- TQVBoxLayout *tl = new TQVBoxLayout(parent, 0, KDialog::spacingHint());
- se = new ScriptEdit(parent);
+ TQVBoxLayout *tl = new TQVBoxLayout(tqparent, 0, KDialog::spacingHint());
+ se = new ScriptEdit(tqparent);
connect(se, TQT_SIGNAL(returnPressed()), TQT_SLOT(addButton()));
tl->addWidget(se);
// insert equal-sized buttons
- KButtonBox *bbox = new KButtonBox(parent);
+ KButtonBox *bbox = new KButtonBox(tqparent);
add = bbox->addButton(i18n("&Add"));
connect(add, TQT_SIGNAL(clicked()), TQT_SLOT(addButton()));
bbox->addStretch(1);
@@ -892,23 +892,23 @@ ScriptWidget::ScriptWidget( TQWidget *parent, bool isnewaccount, const char *nam
bbox->addStretch(1);
remove = bbox->addButton(i18n("&Remove"));
connect(remove, TQT_SIGNAL(clicked()), TQT_SLOT(removeButton()));
- bbox->layout();
+ bbox->tqlayout();
tl->addWidget(bbox);
TQHBoxLayout *l12 = new TQHBoxLayout(0);
tl->addLayout(l12);
- stl = new TQListBox(parent);
+ stl = new TQListBox(tqparent);
stl->setVScrollBarMode( TQScrollView::AlwaysOff );
connect(stl, TQT_SIGNAL(highlighted(int)), TQT_SLOT(stlhighlighted(int)));
stl->setMinimumSize(TQSize(70, 140));
- sl = new TQListBox(parent);
+ sl = new TQListBox(tqparent);
sl->setVScrollBarMode( TQScrollView::AlwaysOff );
connect(sl, TQT_SIGNAL(highlighted(int)), TQT_SLOT(slhighlighted(int)));
sl->setMinimumSize(TQSize(150, 140));
- slb = new TQScrollBar(parent);
- slb->setFixedWidth(slb->sizeHint().width());
+ slb = new TQScrollBar(tqparent);
+ slb->setFixedWidth(slb->tqsizeHint().width());
connect(slb, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(scrolling(int)));
l12->addWidget(stl, 1);
@@ -1201,7 +1201,7 @@ void ScriptWidget::removeButton() {
// Used to specify a new phone number
//
/////////////////////////////////////////////////////////////////////////////
-PhoneNumberDialog::PhoneNumberDialog(TQWidget *parent) : KDialogBase(parent, 0, true, i18n("Add Phone Number"), Ok|Cancel) {
+PhoneNumberDialog::PhoneNumberDialog(TQWidget *tqparent) : KDialogBase(tqparent, 0, true, i18n("Add Phone Number"), Ok|Cancel) {
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
TQHBox *hbox = new TQHBox(this);
diff --git a/kppp/edit.h b/kppp/edit.h
index b0412079..6b20df1a 100644
--- a/kppp/edit.h
+++ b/kppp/edit.h
@@ -49,8 +49,9 @@ class IPLineEdit;
class DialWidget : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- DialWidget( TQWidget *parent=0, bool isnewaccount = true, const char *name=0 );
+ DialWidget( TQWidget *tqparent=0, bool isnewaccount = true, const char *name=0 );
~DialWidget() {}
public slots:
@@ -91,8 +92,9 @@ private:
/////////////////////////////////////////////////////////////////////////////
class ExecWidget : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- ExecWidget(TQWidget *parent=0, bool isnewaccount=true, const char *name=0);
+ ExecWidget(TQWidget *tqparent=0, bool isnewaccount=true, const char *name=0);
public slots:
bool save();
@@ -114,8 +116,9 @@ private:
class IPWidget : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- IPWidget( TQWidget *parent=0, bool isnewaccount = true, const char *name=0 );
+ IPWidget( TQWidget *tqparent=0, bool isnewaccount = true, const char *name=0 );
~IPWidget() {}
public slots:
@@ -136,7 +139,7 @@ private:
TQRadioButton *staticadd_rb;
IPLineEdit *ipaddress_l;
- IPLineEdit *subnetmask_l;
+ IPLineEdit *subnettqmask_l;
TQCheckBox *autoname;
};
@@ -144,8 +147,9 @@ private:
class DNSWidget : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- DNSWidget( TQWidget *parent=0, bool isnewaccount = true, const char *name=0 );
+ DNSWidget( TQWidget *tqparent=0, bool isnewaccount = true, const char *name=0 );
~DNSWidget() {}
public slots:
@@ -176,8 +180,9 @@ private:
class GatewayWidget : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- GatewayWidget( TQWidget *parent=0, bool isnewaccount = true, const char *name=0 );
+ GatewayWidget( TQWidget *tqparent=0, bool isnewaccount = true, const char *name=0 );
~GatewayWidget() {}
public slots:
@@ -200,8 +205,9 @@ private:
class ScriptWidget : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- ScriptWidget( TQWidget *parent=0, bool isnewaccount = true, const char *name=0 );
+ ScriptWidget( TQWidget *tqparent=0, bool isnewaccount = true, const char *name=0 );
~ScriptWidget() {}
public slots:
@@ -240,8 +246,9 @@ private:
/////////////////////////////////////////////////////////////////////////////
class PhoneNumberDialog : public KDialogBase {
Q_OBJECT
+ TQ_OBJECT
public:
- PhoneNumberDialog(TQWidget *parent = 0);
+ PhoneNumberDialog(TQWidget *tqparent = 0);
TQString phoneNumber();
diff --git a/kppp/general.cpp b/kppp/general.cpp
index 929f6321..49981474 100644
--- a/kppp/general.cpp
+++ b/kppp/general.cpp
@@ -46,23 +46,23 @@
// Widget containing misc. configuration options
//
/////////////////////////////////////////////////////////////////////////////
-GeneralWidget::GeneralWidget( TQWidget *parent, const char *name)
- : TQWidget(parent, name)
+GeneralWidget::GeneralWidget( TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent, name)
{
- TQVBoxLayout *tl = new TQVBoxLayout(parent, 0, KDialog::spacingHint());
+ TQVBoxLayout *tl = new TQVBoxLayout(tqparent, 0, KDialog::spacingHint());
TQHBoxLayout *hbox = new TQHBoxLayout(tl);
TQLabel *label;
- label = new TQLabel(i18n("pppd version:"), parent);
+ label = new TQLabel(i18n("pppd version:"), tqparent);
hbox->addWidget(label);
TQString version = gpppdata.pppdVersion();
if(version == "0.0.0")
version = "unknown";
- label = new TQLabel(version, parent);
+ label = new TQLabel(version, tqparent);
label->setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken);
hbox->addWidget(label);
- KIntNumInput *pppdTimeout = new KIntNumInput(gpppdata.pppdTimeout(), parent);
+ KIntNumInput *pppdTimeout = new KIntNumInput(gpppdata.pppdTimeout(), tqparent);
pppdTimeout->setLabel(i18n("pppd &timeout:"));
pppdTimeout->setRange(1, TIMEOUT_SIZE, 5, true);
pppdTimeout->setSuffix(i18n(" sec"));
@@ -79,7 +79,7 @@ GeneralWidget::GeneralWidget( TQWidget *parent, const char *name)
tl->addSpacing(10);
TQCheckBox *chkBox;
- chkBox = new TQCheckBox(i18n("Doc&k into panel on connect"), parent);
+ chkBox = new TQCheckBox(i18n("Doc&k into panel on connect"), tqparent);
TQWhatsThis::add(chkBox,
i18n("<p>After a connection is established, the\n"
"window is minimized and a small icon\n"
@@ -94,7 +94,7 @@ GeneralWidget::GeneralWidget( TQWidget *parent, const char *name)
this, TQT_SLOT(docking_toggled(bool)));
tl->addWidget(chkBox);
- chkBox = new TQCheckBox(i18n("A&utomatic redial on disconnect"), parent);
+ chkBox = new TQCheckBox(i18n("A&utomatic redial on disconnect"), tqparent);
chkBox->setChecked(gpppdata.automatic_redial());
connect(chkBox,TQT_SIGNAL(toggled(bool)),
this, TQT_SLOT(redial_toggled(bool)));
@@ -106,7 +106,7 @@ GeneralWidget::GeneralWidget( TQWidget *parent, const char *name)
"\n"
"See <a href=\"#redial\">here</a> for more on this topic."));
- chkBox = new TQCheckBox(i18n("Automatic redial on NO &CARRIER"), parent);
+ chkBox = new TQCheckBox(i18n("Automatic redial on NO &CARRIER"), tqparent);
chkBox->setChecked(gpppdata.get_redial_on_nocarrier());
connect(chkBox,TQT_SIGNAL(toggled(bool)),
this, TQT_SLOT(nocarrier_toggled(bool)));
@@ -117,7 +117,7 @@ GeneralWidget::GeneralWidget( TQWidget *parent, const char *name)
"instead of waiting for user to click <CANCEL>\n"
"button."));
- chkBox = new TQCheckBox(i18n("&Show clock on caption"), parent);
+ chkBox = new TQCheckBox(i18n("&Show clock on caption"), tqparent);
chkBox->setChecked(gpppdata.get_show_clock_on_caption());
connect(chkBox, TQT_SIGNAL(toggled(bool)),
this, TQT_SLOT(caption_toggled(bool)));
@@ -128,7 +128,7 @@ GeneralWidget::GeneralWidget( TQWidget *parent, const char *name)
"was established. Very useful, so you \n"
"should turn this on"));
- chkBox = new TQCheckBox(i18n("Disco&nnect on X server shutdown"), parent);
+ chkBox = new TQCheckBox(i18n("Disco&nnect on X server shutdown"), tqparent);
chkBox->setChecked(gpppdata.get_xserver_exit_disconnect());
connect(chkBox, TQT_SIGNAL(toggled(bool)),
this, TQT_SLOT(xserver_toggled(bool)));
@@ -141,7 +141,7 @@ GeneralWidget::GeneralWidget( TQWidget *parent, const char *name)
"\n"
"See <a href=\"#disxserver\">here</a> for more on this."));
- chkBox = new TQCheckBox(i18n("&Quit on disconnect"), parent);
+ chkBox = new TQCheckBox(i18n("&Quit on disconnect"), tqparent);
chkBox->setChecked(gpppdata.quit_on_disconnect());
connect(chkBox, TQT_SIGNAL(toggled(bool)),
this, TQT_SLOT(quit_toggled(bool)));
@@ -150,7 +150,7 @@ GeneralWidget::GeneralWidget( TQWidget *parent, const char *name)
i18n("When this option is turned on, <i>kppp</i>\n"
"will be closed when you disconnect"));
- chkBox = new TQCheckBox(i18n("Minimi&ze window on connect"), parent);
+ chkBox = new TQCheckBox(i18n("Minimi&ze window on connect"), tqparent);
chkBox->setChecked(gpppdata.get_iconify_on_connect());
connect(chkBox,TQT_SIGNAL(toggled(bool)),
this,TQT_SLOT(iconify_toggled(bool)));
@@ -203,15 +203,15 @@ void GeneralWidget::pppdtimeoutchanged(int n) {
}
-ModemWidget::ModemWidget(TQWidget *parent, bool isnewmodem, const char *name)
- : TQWidget(parent, name)
+ModemWidget::ModemWidget(TQWidget *tqparent, bool isnewmodem, const char *name)
+ : TQWidget(tqparent, name)
{
- TQGridLayout *tl = new TQGridLayout(parent, 9, 2, 0, KDialog::spacingHint());
+ TQGridLayout *tl = new TQGridLayout(tqparent, 9, 2, 0, KDialog::spacingHint());
- connect_label = new TQLabel(i18n("Modem &name:"), parent);
+ connect_label = new TQLabel(i18n("Modem &name:"), tqparent);
tl->addWidget(connect_label, 0, 0);
- connectname_l = new TQLineEdit(parent);
+ connectname_l = new TQLineEdit(tqparent);
connectname_l->setMaxLength(ACCNAME_SIZE);
connect_label->setBuddy(connectname_l);
@@ -221,10 +221,10 @@ ModemWidget::ModemWidget(TQWidget *parent, bool isnewmodem, const char *name)
TQWhatsThis::add(connect_label,tmp);
TQWhatsThis::add(connectname_l,tmp);
- label1 = new TQLabel(i18n("Modem de&vice:"), parent);
+ label1 = new TQLabel(i18n("Modem de&vice:"), tqparent);
tl->addWidget(label1, 1, 0);
- modemdevice = new TQComboBox(false, parent);
+ modemdevice = new TQComboBox(false, tqparent);
label1->setBuddy(modemdevice);
// ### deviceExist mechanism not functional right now
bool deviceExist = false;
@@ -252,10 +252,10 @@ ModemWidget::ModemWidget(TQWidget *parent, bool isnewmodem, const char *name)
TQWhatsThis::add(modemdevice,tmp);
- label2 = new TQLabel(i18n("&Flow control:"), parent);
+ label2 = new TQLabel(i18n("&Flow control:"), tqparent);
tl->addWidget(label2, 2, 0);
- flowcontrol = new TQComboBox(false, parent);
+ flowcontrol = new TQComboBox(false, tqparent);
label2->setBuddy(flowcontrol);
flowcontrol->insertItem(i18n("Hardware [CRTSCTS]")); // sync with pppdata.cpp
flowcontrol->insertItem(i18n("Software [XON/XOFF]"));
@@ -278,10 +278,10 @@ ModemWidget::ModemWidget(TQWidget *parent, bool isnewmodem, const char *name)
TQWhatsThis::add(label2,tmp);
TQWhatsThis::add(flowcontrol,tmp);
- labelenter = new TQLabel(i18n("&Line termination:"), parent);
+ labelenter = new TQLabel(i18n("&Line termination:"), tqparent);
tl->addWidget(labelenter, 3, 0);
- enter = new TQComboBox(false, parent);
+ enter = new TQComboBox(false, tqparent);
labelenter->setBuddy(enter);
enter->insertItem("CR");
enter->insertItem("LF");
@@ -299,9 +299,9 @@ ModemWidget::ModemWidget(TQWidget *parent, bool isnewmodem, const char *name)
TQWhatsThis::add(labelenter,tmp);
TQWhatsThis::add(enter, tmp);
- baud_label = new TQLabel(i18n("Co&nnection speed:"), parent);
+ baud_label = new TQLabel(i18n("Co&nnection speed:"), tqparent);
tl->addWidget(baud_label, 4, 0);
- baud_c = new TQComboBox(parent);
+ baud_c = new TQComboBox(tqparent);
baud_label->setBuddy(baud_c);
static const char *baudrates[] = {
@@ -358,7 +358,7 @@ ModemWidget::ModemWidget(TQWidget *parent, bool isnewmodem, const char *name)
tl->addRowSpacing(4, 10);
//Modem Lock File
- modemlockfile = new TQCheckBox(i18n("&Use lock file"), parent);
+ modemlockfile = new TQCheckBox(i18n("&Use lock file"), tqparent);
modemlockfile->setChecked(gpppdata.modemLockFile());
/* connect(modemlockfile, TQT_SIGNAL(toggled(bool)),
@@ -378,7 +378,7 @@ ModemWidget::ModemWidget(TQWidget *parent, bool isnewmodem, const char *name)
// Modem Timeout Line Edit Box
- modemtimeout = new KIntNumInput(gpppdata.modemTimeout(), parent);
+ modemtimeout = new KIntNumInput(gpppdata.modemTimeout(), tqparent);
modemtimeout->setLabel(i18n("Modem &timeout:"));
modemtimeout->setRange(1, 120, 1);
modemtimeout->setSuffix(i18n(" sec"));
@@ -445,13 +445,13 @@ bool ModemWidget::save()
}
-ModemWidget2::ModemWidget2(TQWidget *parent, const char *name)
- : TQWidget(parent, name)
+ModemWidget2::ModemWidget2(TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent, name)
{
- TQVBoxLayout *l1 = new TQVBoxLayout(parent, 0, KDialog::spacingHint());
+ TQVBoxLayout *l1 = new TQVBoxLayout(tqparent, 0, KDialog::spacingHint());
- waitfordt = new TQCheckBox(i18n("&Wait for dial tone before dialing"), parent);
+ waitfordt = new TQCheckBox(i18n("&Wait for dial tone before dialing"), tqparent);
waitfordt->setChecked(gpppdata.waitForDialTone());
// connect(waitfordt, TQT_SIGNAL(toggled(bool)), TQT_SLOT(waitfordtchanged(bool)));
l1->addWidget(waitfordt);
@@ -464,7 +464,7 @@ ModemWidget2::ModemWidget2(TQWidget *parent, const char *name)
"\n"
"<b>Default:</b>: On"));
- busywait = new KIntNumInput(gpppdata.busyWait(), parent);
+ busywait = new KIntNumInput(gpppdata.busyWait(), tqparent);
busywait->setLabel(i18n("B&usy wait:"));
busywait->setRange(0, 300, 5, true);
busywait->setSuffix(i18n(" sec"));
@@ -485,9 +485,9 @@ ModemWidget2::ModemWidget2(TQWidget *parent, const char *name)
TQHBoxLayout *hbl = new TQHBoxLayout;
hbl->setSpacing(KDialog::spacingHint());
- TQLabel *volumeLabel = new TQLabel(i18n("Modem &volume:"), parent);
+ TQLabel *volumeLabel = new TQLabel(i18n("Modem &volume:"), tqparent);
hbl->addWidget(volumeLabel);
- volume = new TQSlider(0, 2, 1, gpppdata.volume(), TQSlider::Horizontal, parent);
+ volume = new TQSlider(0, 2, 1, gpppdata.volume(), Qt::Horizontal, tqparent);
volumeLabel->setBuddy(volume);
volume->setTickmarks(TQSlider::Below);
hbl->addWidget(volume);
@@ -510,7 +510,7 @@ ModemWidget2::ModemWidget2(TQWidget *parent, const char *name)
l1->addSpacing(20);
#if 0
- chkbox1 = new TQCheckBox(i18n("Modem asserts CD line"), parent);
+ chkbox1 = new TQCheckBox(i18n("Modem asserts CD line"), tqparent);
chkbox1->setChecked(gpppdata.UseCDLine());
connect(chkbox1,TQT_SIGNAL(toggled(bool)),
this,TQT_SLOT(use_cdline_toggled(bool)));
@@ -525,12 +525,12 @@ ModemWidget2::ModemWidget2(TQWidget *parent, const char *name)
"<b>Default</b>: Off"));
#endif
- modemcmds = new TQPushButton(i18n("Mod&em Commands..."), parent);
+ modemcmds = new TQPushButton(i18n("Mod&em Commands..."), tqparent);
TQWhatsThis::add(modemcmds,
i18n("Allows you to change the AT command for\n"
"your modem."));
- modeminfo_button = new TQPushButton(i18n("&Query Modem..."), parent);
+ modeminfo_button = new TQPushButton(i18n("&Query Modem..."), tqparent);
TQWhatsThis::add(modeminfo_button,
i18n("Most modems support the ATI command set to\n"
"find out vendor and revision of your modem.\n"
@@ -539,7 +539,7 @@ ModemWidget2::ModemWidget2(TQWidget *parent, const char *name)
"this information. It can be useful to help\n"
"you set up the modem"));
- terminal_button = new TQPushButton(i18n("&Terminal..."), parent);
+ terminal_button = new TQPushButton(i18n("&Terminal..."), tqparent);
TQWhatsThis::add(terminal_button,
i18n("Opens the built-in terminal program. You\n"
"can use this if you want to play around\n"
@@ -607,20 +607,20 @@ bool ModemWidget2::save()
// Setup widget for the graph
//
/////////////////////////////////////////////////////////////////////////////
-GraphSetup::GraphSetup(TQWidget *parent, const char *name) :
- TQWidget(parent, name)
+GraphSetup::GraphSetup(TQWidget *tqparent, const char *name) :
+ TQWidget(tqparent, name)
{
- TQVBoxLayout *tl = new TQVBoxLayout(parent);
+ TQVBoxLayout *tl = new TQVBoxLayout(tqparent);
bool enable;
TQColor bg, text, in, out;
gpppdata.graphingOptions(enable, bg, text, in, out);
- enable_check = new TQCheckBox(i18n("&Enable throughput graph"), parent);
+ enable_check = new TQCheckBox(i18n("&Enable throughput graph"), tqparent);
tl->addWidget(enable_check);
grpColor = new TQGroupBox(2, Qt::Horizontal,
- i18n("Graph Colors"), parent);
+ i18n("Graph Colors"), tqparent);
tl->addWidget(grpColor);
TQLabel *label;
diff --git a/kppp/general.h b/kppp/general.h
index bc1b005a..543d6588 100644
--- a/kppp/general.h
+++ b/kppp/general.h
@@ -39,8 +39,9 @@ class ModemCommands;
class GeneralWidget : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- GeneralWidget( TQWidget *parent=0, const char *name=0 );
+ GeneralWidget( TQWidget *tqparent=0, const char *name=0 );
private slots:
void pppdtimeoutchanged(int);
@@ -57,8 +58,9 @@ private slots:
class ModemWidget : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- ModemWidget(TQWidget *parent=0, bool isnewmodem=true, const char *name=0);
+ ModemWidget(TQWidget *tqparent=0, bool isnewmodem=true, const char *name=0);
bool save();
TQLineEdit *connectName() { return connectname_l;}
private slots:
@@ -86,8 +88,9 @@ private:
class ModemWidget2 : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- ModemWidget2(TQWidget *parent=0, const char *name=0);
+ ModemWidget2(TQWidget *tqparent=0, const char *name=0);
bool save();
private slots:
@@ -112,8 +115,9 @@ private:
class GraphSetup : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- GraphSetup(TQWidget *parent = 0, const char *name = 0);
+ GraphSetup(TQWidget *tqparent = 0, const char *name = 0);
private slots:
void enableToggled(bool);
diff --git a/kppp/iplined.cpp b/kppp/iplined.cpp
index 197b13a6..38603633 100644
--- a/kppp/iplined.cpp
+++ b/kppp/iplined.cpp
@@ -26,17 +26,17 @@
#include "iplined.h"
-IPLineEdit::IPLineEdit( TQWidget *parent, const char *name )
- : KRestrictedLine(parent, name, "0123456789.")
+IPLineEdit::IPLineEdit( TQWidget *tqparent, const char *name )
+ : KRestrictedLine(tqparent, name, "0123456789.")
{
setMaxLength(3 * 4 + 1 * 3);
}
-TQSize IPLineEdit::sizeHint() const {
+TQSize IPLineEdit::tqsizeHint() const {
TQFontMetrics fm = fontMetrics();
TQSize s;
- s.setHeight(TQLineEdit::sizeHint().height());
+ s.setHeight(TQLineEdit::tqsizeHint().height());
s.setWidth(fm.boundingRect("888.888.888.888XX").width());
return s;
}
diff --git a/kppp/iplined.h b/kppp/iplined.h
index b978b6f5..3ba6202f 100644
--- a/kppp/iplined.h
+++ b/kppp/iplined.h
@@ -31,10 +31,10 @@
class IPLineEdit : public KRestrictedLine {
public:
- IPLineEdit( TQWidget *parent=0, const char *name=0 );
+ IPLineEdit( TQWidget *tqparent=0, const char *name=0 );
~IPLineEdit() {}
- virtual TQSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
};
#endif
diff --git a/kppp/kpppwidget.cpp b/kppp/kpppwidget.cpp
index cac304c5..7549581a 100644
--- a/kppp/kpppwidget.cpp
+++ b/kppp/kpppwidget.cpp
@@ -74,8 +74,8 @@
extern KPPPWidget *p_kppp;
-KPPPWidget::KPPPWidget( TQWidget *parent, const char *name )
- : DCOPObject( "KpppIface" ), TQWidget(parent, name)
+KPPPWidget::KPPPWidget( TQWidget *tqparent, const char *name )
+ : DCOPObject( "KpppIface" ), TQWidget(tqparent, name)
, acct(0)
, m_bCmdlAccount (false)
, m_bCmdlModem (false)
@@ -189,13 +189,13 @@ KPPPWidget::KPPPWidget( TQWidget *parent, const char *name )
int minw = 0;
quit_b = new KPushButton(KStdGuiItem::quit(), this);
connect( quit_b, TQT_SIGNAL(clicked()), TQT_SLOT(quitbutton()));
- if(quit_b->sizeHint().width() > minw)
- minw = quit_b->sizeHint().width();
+ if(quit_b->tqsizeHint().width() > minw)
+ minw = quit_b->tqsizeHint().width();
setup_b = new KPushButton(KGuiItem(i18n("Co&nfigure..."), "configure"), this);
connect( setup_b, TQT_SIGNAL(clicked()), TQT_SLOT(expandbutton()));
- if(setup_b->sizeHint().width() > minw)
- minw = setup_b->sizeHint().width();
+ if(setup_b->tqsizeHint().width() > minw)
+ minw = setup_b->tqsizeHint().width();
if(gpppdata.access() != KConfig::ReadWrite)
setup_b->setEnabled(false);
@@ -206,19 +206,19 @@ KPPPWidget::KPPPWidget( TQWidget *parent, const char *name )
KHelpMenu *helpMenu = new KHelpMenu(this, KGlobal::instance()->aboutData(), true);
help_b->setPopup((TQPopupMenu*)helpMenu->menu());
- if(help_b->sizeHint().width() > minw)
- minw = help_b->sizeHint().width();
+ if(help_b->tqsizeHint().width() > minw)
+ minw = help_b->tqsizeHint().width();
connect_b = new TQPushButton(i18n("&Connect"), this);
connect_b->setDefault(true);
connect_b->setFocus();
connect(connect_b, TQT_SIGNAL(clicked()), TQT_SLOT(beginConnect()));
- if(connect_b->sizeHint().width() > minw)
- minw = connect_b->sizeHint().width();
+ if(connect_b->tqsizeHint().width() > minw)
+ minw = connect_b->tqsizeHint().width();
quit_b->setFixedWidth(minw);
setup_b->setFixedWidth(minw);
- help_b->setFixedWidth(help_b->sizeHint().width());
+ help_b->setFixedWidth(help_b->tqsizeHint().width());
connect_b->setFixedWidth(minw);
l2->addWidget(quit_b);
@@ -227,7 +227,7 @@ KPPPWidget::KPPPWidget( TQWidget *parent, const char *name )
l2->addSpacing(20);
l2->addWidget(connect_b);
- setFixedSize(sizeHint());
+ setFixedSize(tqsizeHint());
(void)new Modem;
@@ -258,7 +258,7 @@ KPPPWidget::KPPPWidget( TQWidget *parent, const char *name )
KWin::setIcons(con->winId(), kapp->icon(), kapp->miniIcon() );
connect(this, TQT_SIGNAL(begin_connect()),con, TQT_SLOT(preinit()));
- TQRect desk = KGlobalSettings::desktopGeometry(topLevelWidget());
+ TQRect desk = KGlobalSettings::desktopGeometry(tqtopLevelWidget());
con->setGeometry(desk.center().x()-175, desk.center().y()-55, 350,110);
// connect the ConnectWidgets various signals
@@ -305,7 +305,7 @@ KPPPWidget::KPPPWidget( TQWidget *parent, const char *name )
bool result = gpppdata.setModem(m_strCmdlModem);
if (!result){
TQString string;
- string = i18n("No such Modem:\n%1\nFalling back to default").arg(m_strCmdlModem);
+ string = i18n("No such Modem:\n%1\nFalling back to default").tqarg(m_strCmdlModem);
KMessageBox::error(this, string);
m_bCmdlModem = false;
}
@@ -315,7 +315,7 @@ KPPPWidget::KPPPWidget( TQWidget *parent, const char *name )
bool result = gpppdata.setAccount(m_strCmdlAccount);
if (!result){
TQString string;
- string = i18n("No such Account:\n%1").arg(m_strCmdlAccount);
+ string = i18n("No such Account:\n%1").tqarg(m_strCmdlAccount);
KMessageBox::error(this, string);
m_bCmdlAccount = false;
show();
@@ -367,9 +367,9 @@ bool KPPPWidget::eventFilter(TQObject *o, TQEvent *e) {
return true;
}
- if(o == connect_b) {
+ if(TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(connect_b)) {
if(e->type() == TQEvent::KeyPress) {
- if(connect_b->hasFocus() && ((TQKeyEvent *)e)->key() == Qt::Key_Return) {
+ if(connect_b->hasFocus() && ((TQKeyEvent *)e)->key() == TQt::Key_Return) {
beginConnect();
return true;
}
@@ -515,8 +515,8 @@ void KPPPWidget::resetmodems() {
}
label7->setShown(m_bModemCShown);
modem_c->setShown(m_bModemCShown);
- layout()->invalidate();
- setFixedSize(sizeHint());
+ tqlayout()->tqinvalidate();
+ setFixedSize(tqsizeHint());
//set the default modem
if(!gpppdata.defaultModem().isEmpty()) {
@@ -598,8 +598,8 @@ void KPPPWidget::sigPPPDDied() {
Modem::modem->unlockdevice();
con->pppdDied();
- Requester::rq->pppdExitStatus();
- gpppdata.setWaitCallback(gpppdata.callbackType() && Requester::rq->lastStatus == E_CBCP_WAIT);
+ Requester::rq->pppdExittqStatus();
+ gpppdata.setWaitCallback(gpppdata.callbackType() && Requester::rq->lasttqStatus == E_CBCP_WAIT);
if(!gpppdata.automatic_redial() && !gpppdata.waitCallback()) {
quit_b->setFocus();
@@ -617,14 +617,14 @@ void KPPPWidget::sigPPPDDied() {
"to come up.");
else {
msg = i18n("<p>The pppd daemon died unexpectedly!</p>");
- Requester::rq->pppdExitStatus();
- if (Requester::rq->lastStatus != 99) { // more recent pppds only
- msg += i18n("<p>Exit status: %1").arg(Requester::rq->lastStatus);
+ Requester::rq->pppdExittqStatus();
+ if (Requester::rq->lasttqStatus != 99) { // more recent pppds only
+ msg += i18n("<p>Exit status: %1").tqarg(Requester::rq->lasttqStatus);
msg += i18n("</p><p>See 'man pppd' for an explanation of the error "
"codes or take a look at the kppp FAQ on "
" <a href=\"%1\">%2</a></p>")
- .arg("http://developer.kde.org/~kppp/index.html")
- .arg("http://developer.kde.org/~kppp/index.html");
+ .tqarg("http://developer.kde.org/~kppp/index.html")
+ .tqarg("http://developer.kde.org/~kppp/index.html");
}
}
@@ -715,7 +715,7 @@ void KPPPWidget::beginConnect() {
string = i18n("kppp cannot execute:\n %1\n"
"Please make sure that you have given kppp "
"setuid permission and that "
- "pppd is executable.").arg(gpppdata.pppdPath());
+ "pppd is executable.").tqarg(gpppdata.pppdPath());
KMessageBox::error(this, string);
return;
@@ -733,11 +733,11 @@ void KPPPWidget::beginConnect() {
if(!info2.exists()){
TQString string;
- string = i18n("kppp can not find:\n %1\nPlease make sure you have setup "
+ string = i18n("kppp can not tqfind:\n %1\nPlease make sure you have setup "
"your modem device properly "
"and/or adjust the location of the modem device on "
"the modem tab of "
- "the setup dialog.").arg(device);
+ "the setup dialog.").tqarg(device);
KMessageBox::error(this, string);
return;
}
@@ -760,7 +760,7 @@ void KPPPWidget::beginConnect() {
encodeWord(gpppdata.password()))) {
TQString s;
s = i18n("Cannot create PAP/CHAP authentication\n"
- "file \"%1\"").arg(PAP_AUTH_FILE);
+ "file \"%1\"").tqarg(PAP_AUTH_FILE);
KMessageBox::error(this, s);
return;
}
@@ -775,7 +775,7 @@ void KPPPWidget::beginConnect() {
hide();
- TQString tit = i18n("Connecting to: %1").arg(gpppdata.accname());
+ TQString tit = i18n("Connecting to: %1").tqarg(gpppdata.accname());
con->setCaption(tit);
con->enableButtons();
con->show();
@@ -820,7 +820,7 @@ void KPPPWidget::disconnect() {
con->setMsg(i18n("Announcing disconnection."));
- // this is no longer necessary since I'm delaying disconnection usign a QTimer
+ // this is no longer necessary since I'm delaying disconnection usign a TQTimer
// kapp->processEvents();
// set the timer to call delayedDisconnect() in DISCONNECT_DELAY ms
@@ -912,7 +912,7 @@ void KPPPWidget::startAccounting() {
TQString d = AccountingBase::getAccountingFile(gpppdata.accountingFile());
// if(::access(d.data(), X_OK) != 0)
- acct = new Accounting(this, stats);
+ acct = new Accounting(TQT_TQOBJECT(this), stats);
// else
// acct = new ExecutableAccounting(this);
@@ -922,7 +922,7 @@ void KPPPWidget::startAccounting() {
if(!acct->loadRuleSet(gpppdata.accountingFile())) {
TQString s= i18n("Can not load the accounting "
- "ruleset \"%1\".").arg(gpppdata.accountingFile());
+ "ruleset \"%1\".").tqarg(gpppdata.accountingFile());
// starting the messagebox with a timer will prevent us
// from blocking the calling function ConnectWidget::timerEvent
@@ -994,7 +994,7 @@ void KPPPWidget::resetVolume(const TQString &s) {
*/
TQString KPPPWidget::encodeWord(const TQString &s) {
TQString r = s;
- r.replace(TQRegExp("\\"), "\\\\");
+ r.tqreplace(TQRegExp("\\"), "\\\\");
return r;
}
@@ -1008,8 +1008,8 @@ void KPPPWidget::showNews() {
/*
* Introduce the QuickHelp feature to new users of this version
*/
- #define QUICKHELP_HINT "Hint_QuickHelp"
- if(gpppdata.readNumConfig(GENERAL_GRP, QUICKHELP_HINT, 0) == 0) {
+ #define TQUICKHELP_HINT "Hint_QuickHelp"
+ if(gpppdata.readNumConfig(GENERAL_GRP, TQUICKHELP_HINT, 0) == 0) {
TQDialog dlg(0, 0, true);
dlg.setCaption(i18n("Recent Changes in KPPP"));
@@ -1020,7 +1020,7 @@ void KPPPWidget::showNews() {
TQLabel *icon = new TQLabel(&dlg);
icon->setPixmap(BarIcon("exclamation"));
- icon->setFixedSize(icon->sizeHint());
+ icon->setFixedSize(icon->tqsizeHint());
l1->addWidget(icon);
l1->addLayout(l2);
@@ -1037,7 +1037,7 @@ void KPPPWidget::showNews() {
&dlg);
TQCheckBox *cb = new TQCheckBox(i18n("Don't show this hint again"), &dlg);
- cb->setFixedSize(cb->sizeHint());
+ cb->setFixedSize(cb->tqsizeHint());
KButtonBox *bbox = new KButtonBox(&dlg);
bbox->addStretch(1);
@@ -1046,7 +1046,7 @@ void KPPPWidget::showNews() {
dlg.connect(ok, TQT_SIGNAL(clicked()),
&dlg, TQT_SLOT(accept()));
bbox->addStretch(1);
- bbox->layout();
+ bbox->tqlayout();
l2->addWidget(l);
l2->addWidget(cb);
@@ -1061,7 +1061,7 @@ void KPPPWidget::showNews() {
dlg.exec();
if(cb->isChecked()) {
- gpppdata.writeConfig(GENERAL_GRP, QUICKHELP_HINT, 1);
+ gpppdata.writeConfig(GENERAL_GRP, TQUICKHELP_HINT, 1);
gpppdata.save();
}
}
diff --git a/kppp/kpppwidget.h b/kppp/kpppwidget.h
index 55f5b84a..08c9e956 100644
--- a/kppp/kpppwidget.h
+++ b/kppp/kpppwidget.h
@@ -61,9 +61,10 @@ private:
class KPPPWidget : public TQWidget, virtual public KpppIface {
Q_OBJECT
+ TQ_OBJECT
public:
- KPPPWidget( TQWidget *parent=0, const char *name=0 );
+ KPPPWidget( TQWidget *tqparent=0, const char *name=0 );
~KPPPWidget();
void setPW_Edit(const TQString &);
diff --git a/kppp/loginterm.cpp b/kppp/loginterm.cpp
index 2aeed5e4..65232a93 100644
--- a/kppp/loginterm.cpp
+++ b/kppp/loginterm.cpp
@@ -35,8 +35,8 @@
extern KPPPWidget *p_kppp;
-LoginMultiLineEdit::LoginMultiLineEdit(TQWidget *parent, const char *name)
- : TQMultiLineEdit(parent, name)
+LoginMultiLineEdit::LoginMultiLineEdit(TQWidget *tqparent, const char *name)
+ : TQMultiLineEdit(tqparent, name)
{
}
@@ -93,8 +93,8 @@ void LoginMultiLineEdit::readChar(unsigned char c) {
}
-LoginTerm::LoginTerm (TQWidget *parent, const char *name)
- : TQDialog(parent, name, FALSE)
+LoginTerm::LoginTerm (TQWidget *tqparent, const char *name)
+ : TQDialog(tqparent, name, FALSE)
{
setCaption(i18n("Login Terminal Window"));
setMinimumSize(300, 200);
@@ -123,10 +123,10 @@ LoginTerm::LoginTerm (TQWidget *parent, const char *name)
connect(continue_b, TQT_SIGNAL(clicked()), TQT_SLOT(continuebutton()));
int mwidth;
- if (cancel_b->sizeHint().width() > continue_b->sizeHint().width())
- mwidth = cancel_b->sizeHint().width();
+ if (cancel_b->tqsizeHint().width() > continue_b->tqsizeHint().width())
+ mwidth = cancel_b->tqsizeHint().width();
else
- mwidth = continue_b->sizeHint().width();
+ mwidth = continue_b->tqsizeHint().width();
cancel_b->setFixedWidth(mwidth + 20);
continue_b->setFixedWidth(mwidth + 20);
@@ -136,7 +136,7 @@ LoginTerm::LoginTerm (TQWidget *parent, const char *name)
cont = false;
- Modem::modem->notify(text_window, TQT_SLOT(readChar(unsigned char)));
+ Modem::modem->notify(TQT_TQOBJECT(text_window), TQT_SLOT(readChar(unsigned char)));
}
diff --git a/kppp/loginterm.h b/kppp/loginterm.h
index 1b8a0cc3..0940381c 100644
--- a/kppp/loginterm.h
+++ b/kppp/loginterm.h
@@ -9,10 +9,11 @@
class LoginMultiLineEdit : public TQMultiLineEdit {
Q_OBJECT
+ TQ_OBJECT
public:
- LoginMultiLineEdit(TQWidget *parent, const char *name);
+ LoginMultiLineEdit(TQWidget *tqparent, const char *name);
~LoginMultiLineEdit();
void keyPressEvent(TQKeyEvent *k);
@@ -27,8 +28,9 @@ public slots:
class LoginTerm : public TQDialog {
Q_OBJECT
+ TQ_OBJECT
public:
- LoginTerm(TQWidget *parent, const char *name);
+ LoginTerm(TQWidget *tqparent, const char *name);
bool pressedContinue();
diff --git a/kppp/logview/export.cpp b/kppp/logview/export.cpp
index 14c614c4..e741405d 100644
--- a/kppp/logview/export.cpp
+++ b/kppp/logview/export.cpp
@@ -47,8 +47,8 @@ ExportFormats [] = {
/***** ExportWizard *****/
-ExportWizard::ExportWizard(TQWidget *parent, const TQString &_date)
- : KWizard(parent, "", true) {
+ExportWizard::ExportWizard(TQWidget *tqparent, const TQString &_date)
+ : KWizard(tqparent, "", true) {
date = _date;
filterID = 0;
@@ -73,7 +73,7 @@ ExportWizard::ExportWizard(TQWidget *parent, const TQString &_date)
formatLayout->addSpacing(10);
typeInfo = new TQLabel(formatPage);
- typeInfo->setAlignment(Qt::AlignTop | Qt::WordBreak);
+ typeInfo->tqsetAlignment(TQt::AlignTop | TQt::WordBreak);
typeInfo->setText(i18n("<qt><b>Please choose the output format on the left side.</b></qt>"));
typeInfo->setMinimumSize(350, 200);
formatLayout->addWidget(typeInfo);
@@ -144,7 +144,7 @@ void ExportWizard::getFilename() {
void ExportWizard::reject() {
hide();
- filename = TQString::null;
+ filename = TQString();
}
void ExportWizard::accept() {
@@ -219,12 +219,12 @@ void CSVExport::setFinishCode() {
/***** HTMLExport *****/
HTMLExport::HTMLExport(const TQString &filename, const TQString &date)
: Export(filename) {
- TQString title = i18n("Connection log for %1").arg(date);
+ TQString title = i18n("Connection log for %1").tqarg(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(TQString::fromLatin1(" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=")
+ buffer.append(TQString::tqfromLatin1(" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=")
+ TQTextCodec::codecForLocale()->mimeName() +
- TQString::fromLatin1("\">"));
+ TQString::tqfromLatin1("\">"));
buffer.append("\n</head>\n<body>\n<h1>"+title+"</h1>\n\n");
buffer.append("<table width=\"100%\" border=\"1\">\n");
diff --git a/kppp/logview/export.h b/kppp/logview/export.h
index 3c601e96..d99748aa 100644
--- a/kppp/logview/export.h
+++ b/kppp/logview/export.h
@@ -40,8 +40,9 @@ class Export;
/***** ExportWizard *****/
class ExportWizard : public KWizard {
Q_OBJECT
+ TQ_OBJECT
public:
- ExportWizard(TQWidget *parent, const TQString &_date);
+ ExportWizard(TQWidget *tqparent, const TQString &_date);
Export *createExportFilter();
int filterID;
diff --git a/kppp/logview/log.cpp b/kppp/logview/log.cpp
index 93be0098..53508bdc 100644
--- a/kppp/logview/log.cpp
+++ b/kppp/logview/log.cpp
@@ -43,8 +43,8 @@ int loadLogs() {
kdDebug(5002) << "logdirname: " << logdirname << endl;
// get log file size
- const QFileInfoList *list = logdir.entryInfoList();
- QFileInfoListIterator it( *list );
+ const TQFileInfoList *list = logdir.entryInfoList();
+ TQFileInfoListIterator it( *list );
TQFileInfo *fi;
while ((fi = it.current()) != 0) {
@@ -53,13 +53,13 @@ int loadLogs() {
}
dlg = new TQProgressDialog(i18n("Loading log files"),
- TQString::null,
+ TQString(),
logsize);
dlg->setProgress(0);
// load logs
list = logdir.entryInfoList();
- QFileInfoListIterator it1( *list );
+ TQFileInfoListIterator it1( *list );
int retval = 0;
while ((fi = it1.current()) != 0) {
@@ -116,7 +116,7 @@ int loadLog(TQString fname) {
return 0;
}
-int QLogList::compareItems(Item a, Item b) {
+int TQLogList::compareItems(Item a, Item b) {
LogInfo *la = (LogInfo *)a;
LogInfo *lb = (LogInfo *)b;
diff --git a/kppp/logview/log.h b/kppp/logview/log.h
index d8fa15cd..75dd86e3 100644
--- a/kppp/logview/log.h
+++ b/kppp/logview/log.h
@@ -24,10 +24,10 @@
#include "loginfo.h"
#include <tqptrlist.h>
-typedef TQPtrList<LogInfo> QLogInfoBase;
-typedef TQPtrListIterator<LogInfo> QLogInfoIterator;
+typedef TQPtrList<LogInfo> TQLogInfoBase;
+typedef TQPtrListIterator<LogInfo> TQLogInfoIterator;
-class QLogList : public QLogInfoBase {
+class TQLogList : public TQLogInfoBase {
public:
virtual int compareItems(Item, Item);
};
diff --git a/kppp/logview/main.cpp b/kppp/logview/main.cpp
index f034c462..6f87ae21 100644
--- a/kppp/logview/main.cpp
+++ b/kppp/logview/main.cpp
@@ -86,8 +86,8 @@ TopWidget::TopWidget() : KMainWindow(0, "") {
kapp, TQT_SLOT(quit()));
}
- setMinimumSize(mw->sizeHint().width() + 15,
- mw->sizeHint().height() + 120);
+ setMinimumSize(mw->tqsizeHint().width() + 15,
+ mw->tqsizeHint().height() + 120);
setCentralWidget(w);
}
diff --git a/kppp/logview/main.h b/kppp/logview/main.h
index db7ca8da..deafd41e 100644
--- a/kppp/logview/main.h
+++ b/kppp/logview/main.h
@@ -28,6 +28,7 @@
class TopWidget : public KMainWindow {
Q_OBJECT
+ TQ_OBJECT
public:
TopWidget();
~TopWidget();
diff --git a/kppp/logview/monthly.cpp b/kppp/logview/monthly.cpp
index 904f2800..8d949db1 100644
--- a/kppp/logview/monthly.cpp
+++ b/kppp/logview/monthly.cpp
@@ -38,67 +38,67 @@ static void formatBytes(double bytes, TQString &result) {
if(bytes < 1024)
result.setNum(bytes);
else if(bytes < 1024*1024)
- result = i18n("%1 KB").arg(KGlobal::locale()->formatNumber((float)bytes / 1024.0, 1));
+ result = i18n("%1 KB").tqarg(KGlobal::locale()->formatNumber((float)bytes / 1024.0, 1));
else
- result = i18n("%1 MB").arg(KGlobal::locale()->formatNumber((float)bytes / 1024.0 / 1024.0, 1));
+ result = i18n("%1 MB").tqarg(KGlobal::locale()->formatNumber((float)bytes / 1024.0 / 1024.0, 1));
}
static void formatBytesMonth(double bytes, TQString &result) {
int day, days;
- day = TQDate::currentDate().day();
- days = TQDate::currentDate().daysInMonth();
+ day = TQDate::tqcurrentDate().day();
+ days = TQDate::tqcurrentDate().daysInMonth();
bytes = (bytes / day) * days;
if(bytes < 1024)
result.setNum(bytes);
else if(bytes < 1024*1024)
- result = i18n("%1 KB").arg(KGlobal::locale()->formatNumber((float)bytes / 1024.0, 1));
+ result = i18n("%1 KB").tqarg(KGlobal::locale()->formatNumber((float)bytes / 1024.0, 1));
else
- result = i18n("%1 MB").arg(KGlobal::locale()->formatNumber((float)bytes / 1024.0 / 1024.0, 1));
+ result = i18n("%1 MB").tqarg(KGlobal::locale()->formatNumber((float)bytes / 1024.0 / 1024.0, 1));
}
static void formatDuration(int seconds, TQString &result) {
TQString sec;
sec.sprintf("%02d", seconds%60);
if(seconds < 60)
- result = i18n("%1s").arg(sec);
+ result = i18n("%1s").tqarg(sec);
else if(seconds < 3600)
- result = i18n("%1m %2s").arg(seconds/60).arg(sec);
+ result = i18n("%1m %2s").tqarg(seconds/60).tqarg(sec);
else
result = i18n("%1h %2m %3s")
- .arg(seconds/3600)
- .arg((seconds % 3600)/60)
- .arg(sec);
+ .tqarg(seconds/3600)
+ .tqarg((seconds % 3600)/60)
+ .tqarg(sec);
}
static void formatDurationMonth(int seconds, TQString &result) {
int day, days;
- day = TQDate::currentDate().day();
- days = TQDate::currentDate().daysInMonth();
+ day = TQDate::tqcurrentDate().day();
+ days = TQDate::tqcurrentDate().daysInMonth();
seconds = (seconds / day) * days;
TQString sec;
sec.sprintf("%02d", seconds%60);
if(seconds < 60)
- result = i18n("%1s").arg(sec);
+ result = i18n("%1s").tqarg(sec);
else if(seconds < 3600)
- result = i18n("%1m %2s").arg(seconds/60).arg(sec);
+ result = i18n("%1m %2s").tqarg(seconds/60).tqarg(sec);
else
result = i18n("%1h %2m %3s")
- .arg(seconds/3600)
- .arg((seconds % 3600)/60)
- .arg(sec);
+ .tqarg(seconds/3600)
+ .tqarg((seconds % 3600)/60)
+ .tqarg(sec);
}
static void costsMonth(double costs, double &result) {
int day, days;
- day = TQDate::currentDate().day();
- days = TQDate::currentDate().daysInMonth();
+ day = TQDate::tqcurrentDate().day();
+ days = TQDate::tqcurrentDate().daysInMonth();
result = (costs / day) * days;
@@ -107,17 +107,17 @@ static void costsMonth(double costs, double &result) {
class LogListItem : public TQListViewItem {
public:
LogListItem(LogInfo *l,
- TQListView * parent,
+ TQListView * tqparent,
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),
+ : TQListViewItem(tqparent, s1, s2, s3, s4, s5, s6, s7, s8),
li(l)
{
}
virtual void paintCell( TQPainter *p, const TQColorGroup & cg,
- int column, int width, int alignment );
+ int column, int width, int tqalignment );
virtual TQString key(int, bool) const;
@@ -125,9 +125,9 @@ public:
};
void LogListItem::paintCell( TQPainter *p, const TQColorGroup & cg,
- int column, int width, int alignment )
+ int column, int width, int tqalignment )
{
- TQListViewItem::paintCell(p, cg, column, width, alignment);
+ TQListViewItem::paintCell(p, cg, column, width, tqalignment);
// double line above sum
//if(!li) {
@@ -167,8 +167,8 @@ TQString LogListItem::key(int c, bool ascending) const
return k;
}
-MonthlyWidget::MonthlyWidget(TQWidget *parent) :
- TQWidget(parent)
+MonthlyWidget::MonthlyWidget(TQWidget *tqparent) :
+ TQWidget(tqparent)
{
tl = 0;
@@ -212,7 +212,7 @@ MonthlyWidget::MonthlyWidget(TQWidget *parent) :
lv2->setSorting(-1);
lv2->setItemMargin(2);
lv2->setMaximumHeight(100);
- lv2->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum);
+ lv2->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum);
lv2->setSelectionMode(TQListView::NoSelection);
title = new TQLabel("X", this);
@@ -220,7 +220,7 @@ MonthlyWidget::MonthlyWidget(TQWidget *parent) :
f.setPointSize(f.pointSize() + 2);
f.setBold(TRUE);
title->setFont(f);
- title->setFixedHeight(title->sizeHint().height()*2);
+ title->setFixedHeight(title->tqsizeHint().height()*2);
cboConnections = new TQComboBox(false, this); // add a combo box to select connections
cboConnections->setMaximumWidth(200); // a resonable size
@@ -246,13 +246,13 @@ MonthlyWidget::MonthlyWidget(TQWidget *parent) :
this, TQT_SLOT(exportWizard()));
bbox->addStretch(8);
- bbox->layout();
+ bbox->tqlayout();
currentMonth();
- layoutWidget();
+ tqlayoutWidget();
}
-void MonthlyWidget::layoutWidget() {
+void MonthlyWidget::tqlayoutWidget() {
if(tl)
delete tl;
@@ -265,8 +265,8 @@ void MonthlyWidget::layoutWidget() {
f2.setPointSize(f2.pointSize() + 1);
f2.setBold(TRUE);
l->setFont(f2);
- l->setFixedHeight(l->sizeHint().height());
- l->setAlignment( AlignLeft );
+ l->setFixedHeight(l->tqsizeHint().height());
+ l->tqsetAlignment( AlignLeft );
tl->addWidget(l, 5, 0);
tl->addWidget(bbox, 1, 2);
tl->addMultiCellWidget(lv, 1, 4, 0, 1);
@@ -304,7 +304,7 @@ void MonthlyWidget::plotMonth() {
con = li->connectionName();
// this connection name not in the list and combo box
- if(lstConnections.findIndex(con) == -1) {
+ if(lstConnections.tqfindIndex(con) == -1) {
lstConnections.append(con);
cboConnections->insertItem(con);
}
@@ -384,19 +384,19 @@ void MonthlyWidget::plotMonth() {
formatDuration(duration,
s_duration);
- TQString s_costs(KGlobal::locale()->formatMoney(costs, TQString::null, 2));
+ TQString s_costs(KGlobal::locale()->formatMoney(costs, TQString(), 2));
selectionItem = new LogListItem(0, lv2,
i18n("Selection (%n connection)", "Selection (%n connections)", 0),
- TQString::null, TQString::null, TQString::null,
- TQString::null, TQString::null, TQString::null, TQString::null);
+ TQString(), TQString(), TQString(),
+ TQString(), TQString(), TQString(), TQString());
(void) new LogListItem(0, lv2,
i18n("%n connection", "%n connections", count),
- s_duration, s_costs, _bin, _bout, TQString::null, TQString::null, TQString::null);
+ s_duration, s_costs, _bin, _bout, TQString(), TQString(), TQString());
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
- if(calendar->month(periodeFirst()) == calendar->month(TQDate::currentDate())) {
+ if(calendar->month(periodeFirst()) == calendar->month(TQDate::tqcurrentDate())) {
TQString m_bin, m_bout;
@@ -414,11 +414,11 @@ void MonthlyWidget::plotMonth() {
formatDurationMonth(duration, m_duration);
costsMonth(costs, costs);
- TQString m_costs(KGlobal::locale()->formatMoney(costs, TQString::null, 2));
+ TQString m_costs(KGlobal::locale()->formatMoney(costs, TQString(), 2));
(void) new TQListViewItem(lv2, selectionItem,
i18n("Monthly estimates"), m_duration, m_costs, m_bin, m_bout,
- TQString::null, TQString::null, TQString::null);
+ TQString(), TQString(), TQString());
}
}
@@ -426,13 +426,13 @@ void MonthlyWidget::plotMonth() {
if(lv->childCount() > 0) {
exportBttn->setEnabled(true); // export possibility
t = i18n("Connection log for %1 %2")
- .arg(calendar->monthName(startDate))
- .arg(calendar->year(startDate));
+ .tqarg(calendar->monthName(startDate))
+ .tqarg(calendar->year(startDate));
} else {
exportBttn->setEnabled(false); // nothing to export
t = i18n("No connection log for %1 %2 available")
- .arg(calendar->monthName(startDate))
- .arg(calendar->year(startDate));
+ .tqarg(calendar->monthName(startDate))
+ .tqarg(calendar->year(startDate));
}
title->setText(t);
@@ -456,7 +456,7 @@ void MonthlyWidget::prevMonth() {
void MonthlyWidget::currentMonth() {
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
- TQDate dt = TQDate::currentDate();
+ TQDate dt = TQDate::tqcurrentDate();
calendar->setYMD(m_periodeFirst, calendar->year(dt), calendar->month(dt), 1);
plotMonth();
@@ -464,9 +464,9 @@ void MonthlyWidget::currentMonth() {
void MonthlyWidget::exportWizard() {
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
- TQString date = TQString::fromLatin1("%1-%2") // e.g.: June-2001
- .arg(calendar->monthName(periodeFirst()))
- .arg(calendar->year(periodeFirst()));
+ TQString date = TQString::tqfromLatin1("%1-%2") // e.g.: June-2001
+ .tqarg(calendar->monthName(periodeFirst()))
+ .tqarg(calendar->year(periodeFirst()));
ExportWizard *wizard = new ExportWizard(0, date);
wizard->exec();
@@ -513,7 +513,7 @@ void MonthlyWidget::exportWizard() {
con = li->connectionName();
// this connection name not in the list and combo box
- if(lstConnections.findIndex(con) == -1) {
+ if(lstConnections.tqfindIndex(con) == -1) {
lstConnections.append(con);
cboConnections->insertItem(con);
}
@@ -576,7 +576,7 @@ void MonthlyWidget::exportWizard() {
}
}
- if(calendar->month(periodeFirst()) == calendar->month(TQDate::currentDate())) {
+ if(calendar->month(periodeFirst()) == calendar->month(TQDate::tqcurrentDate())) {
TQString m_bin, m_bout;
if(bin < 0)
@@ -593,13 +593,13 @@ void MonthlyWidget::exportWizard() {
formatDurationMonth(duration, m_duration);
costsMonth(costs, costs);
- TQString m_costs(KGlobal::locale()->formatMoney(costs, TQString::null, 2));
+ TQString m_costs(KGlobal::locale()->formatMoney(costs, TQString(), 2));
- TQString datetime = KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), true);
+ TQString datetime = KGlobal::locale()->formatDateTime( TQDateTime::tqcurrentDateTime(), true);
exportIFace->addEmptyLine();
- exportIFace->addDataline(i18n("Monthly estimates (%1)").arg(datetime),
- TQString::null, TQString::null, TQString::null, m_duration, m_costs, m_bin, m_bout);
+ exportIFace->addDataline(i18n("Monthly estimates (%1)").tqarg(datetime),
+ TQString(), TQString(), TQString(), m_duration, m_costs, m_bin, m_bout);
}
if(count) {
@@ -624,11 +624,11 @@ void MonthlyWidget::exportWizard() {
formatDuration(duration,
s_duration);
- TQString s_costs(KGlobal::locale()->formatMoney(costs, TQString::null, 2));
+ TQString s_costs(KGlobal::locale()->formatMoney(costs, TQString(), 2));
// call export methods
exportIFace->addEmptyLine();
- exportIFace->addDataline(i18n("%n connection", "%n connections", count), TQString::null, TQString::null, TQString::null, s_duration,
+ exportIFace->addDataline(i18n("%n connection", "%n connections", count), TQString(), TQString(), TQString(), s_duration,
s_costs, _bin, _bout);
exportIFace->setFinishCode();
@@ -716,7 +716,7 @@ void MonthlyWidget::slotSelectionChanged()
formatDuration(duration,
s_duration);
- TQString s_costs(KGlobal::locale()->formatMoney(costs, TQString::null, 2));
+ TQString s_costs(KGlobal::locale()->formatMoney(costs, TQString(), 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 e7c90b26..9f9fd24a 100644
--- a/kppp/logview/monthly.h
+++ b/kppp/logview/monthly.h
@@ -38,8 +38,9 @@ class LogListItem;
class MonthlyWidget : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- MonthlyWidget(TQWidget *parent = 0);
+ MonthlyWidget(TQWidget *tqparent = 0);
private slots:
void prevMonth();
@@ -50,7 +51,7 @@ private slots:
void slotSelectionChanged();
private:
- void layoutWidget();
+ void tqlayoutWidget();
void plotMonth();
/**
diff --git a/kppp/macros.h b/kppp/macros.h
index 6f541b76..8b96469f 100644
--- a/kppp/macros.h
+++ b/kppp/macros.h
@@ -1,15 +1,15 @@
-// helper macros for layouting
+// helper macros for tqlayouting
#ifndef __MACROS__H__
#define __MACROS__H__
#include <tqlayout.h>
-#define MIN_WIDTH(w) w->setMinimumWidth(w->sizeHint().width());
-#define MIN_HEIGHT(w) w->setMinimumHeight(w->sizeHint().height());
-#define MIN_SIZE(w) w->setMinimumSize(w->sizeHint());
-#define FIXED_SIZE(w) w->setFixedSize(w->sizeHint());
-#define FIXED_WIDTH(w) w->setFixedWidth(w->sizeHint().width());
-#define FIXED_HEIGHT(w) w->setFixedHeight(w->sizeHint().height());
+#define MIN_WIDTH(w) w->setMinimumWidth(w->tqsizeHint().width());
+#define MIN_HEIGHT(w) w->setMinimumHeight(w->tqsizeHint().height());
+#define MIN_SIZE(w) w->setMinimumSize(w->tqsizeHint());
+#define FIXED_SIZE(w) w->setFixedSize(w->tqsizeHint());
+#define FIXED_WIDTH(w) w->setFixedWidth(w->tqsizeHint().width());
+#define FIXED_HEIGHT(w) w->setFixedHeight(w->tqsizeHint().height());
#endif
diff --git a/kppp/main.cpp b/kppp/main.cpp
index 753291ba..9890e9e1 100644
--- a/kppp/main.cpp
+++ b/kppp/main.cpp
@@ -135,7 +135,7 @@ extern "C" {
int main( int argc, char **argv ) {
// make sure that open/fopen and so on NEVER return 1 or 2 (stdout and stderr)
- // Expl: if stdout/stderr were closed on program start (by parent), open()
+ // Expl: if stdout/stderr were closed on program start (by tqparent), open()
// would return a FD of 1, 2 (or even 0 if stdin was closed too)
if(fcntl(0, F_GETFL) == -1)
(void)open("/dev/null", O_RDONLY);
@@ -172,7 +172,7 @@ int main( int argc, char **argv ) {
exit(1);
}
- // parent process
+ // tqparent process
close(sockets[1]);
// drop setuid status
@@ -241,7 +241,7 @@ int main( int argc, char **argv ) {
KGlobal::dirs()->saveLocation("appdata", "Rules");
int pid = create_pidfile();
- TQString 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.").tqarg(pidfile);
if(pid < 0) {
KMessageBox::error(0L, err_msg);
@@ -281,7 +281,7 @@ int main( int argc, char **argv ) {
"Alternatively, if you have determined that "
"there is no other kppp running, please "
"click Continue to begin.")
- .arg(pidfile).arg(pid);
+ .tqarg(pidfile).tqarg(pid);
int button = KMessageBox::warningYesNo(0, msg, i18n("Error"),
i18n("Exit"), KStdGuiItem::cont());
if (button == KMessageBox::Yes) /* exit */
diff --git a/kppp/miniterm.cpp b/kppp/miniterm.cpp
index 06c01194..2c917e3f 100644
--- a/kppp/miniterm.cpp
+++ b/kppp/miniterm.cpp
@@ -47,8 +47,8 @@
extern PPPData gpppdata;
-MiniTerm::MiniTerm(TQWidget *parent, const char *name)
- : TQDialog(parent, name, true)
+MiniTerm::MiniTerm(TQWidget *tqparent, const char *name)
+ : TQDialog(tqparent, name, true)
{
setCaption(i18n("Kppp Mini-Terminal"));
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
@@ -79,11 +79,11 @@ MiniTerm::MiniTerm(TQWidget *parent, const char *name)
setupToolbar();
- TQVBoxLayout *layout=new TQVBoxLayout(this);
- layout->addWidget(menubar);
- layout->addWidget(toolbar);
- layout->addWidget(terminal);
- layout->addWidget(statusbar);
+ TQVBoxLayout *tqlayout=new TQVBoxLayout(this);
+ tqlayout->addWidget(menubar);
+ tqlayout->addWidget(toolbar);
+ tqlayout->addWidget(terminal);
+ tqlayout->addWidget(statusbar);
inittimer = new TQTimer(this);
connect(inittimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(init()));
@@ -103,15 +103,15 @@ void MiniTerm::setupToolbar() {
toolbar = new KToolBar( this );
toolbar->insertButton("exit", 0,
- TQT_SIGNAL(clicked()), this,
+ TQT_SIGNAL(clicked()), TQT_TQOBJECT(this),
TQT_SLOT(cancelbutton()), TRUE, i18n("Close MiniTerm"));
toolbar->insertButton("back", 0,
- TQT_SIGNAL(clicked()), this,
+ TQT_SIGNAL(clicked()), TQT_TQOBJECT(this),
TQT_SLOT(resetModem()), TRUE, i18n("Reset Modem"));
toolbar->insertButton("help", 0,
- TQT_SIGNAL(clicked()), this,
+ TQT_SIGNAL(clicked()), TQT_TQOBJECT(this),
TQT_SLOT(help()), TRUE, i18n("Help"));
toolbar->setBarPos( KToolBar::Top );
@@ -154,7 +154,7 @@ void MiniTerm::init() {
kapp->processEvents();
kapp->processEvents();
- Modem::modem->notify(this, TQT_SLOT(readChar(unsigned char)));
+ Modem::modem->notify(TQT_TQOBJECT(this), TQT_SLOT(readChar(unsigned char)));
return;
}
}
@@ -225,8 +225,8 @@ void MiniTerm::help() {
}
-MyTerm::MyTerm(TQWidget *parent, const char* name)
- : TQMultiLineEdit(parent, name)
+MyTerm::MyTerm(TQWidget *tqparent, const char* name)
+ : TQMultiLineEdit(tqparent, name)
{
setFont(KGlobalSettings::fixedFont());
}
diff --git a/kppp/miniterm.h b/kppp/miniterm.h
index f856effd..f1a6ab66 100644
--- a/kppp/miniterm.h
+++ b/kppp/miniterm.h
@@ -45,8 +45,9 @@ class TQLabel;
class MyTerm : public TQMultiLineEdit {
Q_OBJECT
+ TQ_OBJECT
public:
- MyTerm(TQWidget *parent=0, const char *name=0);
+ MyTerm(TQWidget *tqparent=0, const char *name=0);
void keyPressEvent (TQKeyEvent*);
void insertChar(unsigned char c);
@@ -60,9 +61,10 @@ public:
class MiniTerm : public TQDialog {
Q_OBJECT
+ TQ_OBJECT
public:
- MiniTerm(TQWidget *parent=0, const char *name=0);
+ MiniTerm(TQWidget *tqparent=0, const char *name=0);
~MiniTerm();
void closeEvent( TQCloseEvent *e );
diff --git a/kppp/modem.h b/kppp/modem.h
index 7e8f2376..431e1e79 100644
--- a/kppp/modem.h
+++ b/kppp/modem.h
@@ -43,6 +43,7 @@ void alarm_handler(int);
class Modem : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
Modem();
~Modem();
diff --git a/kppp/modemcmds.cpp b/kppp/modemcmds.cpp
index 29780e15..77c76134 100644
--- a/kppp/modemcmds.cpp
+++ b/kppp/modemcmds.cpp
@@ -40,13 +40,13 @@
#include <tqlabel.h>
-#define ADJUSTEDIT(e) e->setText("XXXXXXXXqy"); e->setMinimumSize(e->sizeHint()); e->setFixedHeight(e->sizeHint().height()); e->setText(""); e->setMaxLength(MODEMSTR_SIZE);
+#define ADJUSTEDIT(e) e->setText("XXXXXXXXqy"); e->setMinimumSize(e->tqsizeHint()); e->setFixedHeight(e->tqsizeHint().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(TQLineEdit(dummyWidget).sizeHint().height()); l->setAlignment(AlignCenter); l->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken); l->setLineWidth(2);
+#define FORMATSLIDERLABEL(l) l->setFixedWidth(l->tqsizeHint().width()); l->setFixedHeight(TQLineEdit(dummyWidget).tqsizeHint().height()); l->tqsetAlignment(AlignCenter); l->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken); l->setLineWidth(2);
-ModemCommands::ModemCommands(TQWidget *parent, const char *name)
- : KDialogBase(parent, name, true, i18n("Edit Modem Commands"), Ok|Cancel)
+ModemCommands::ModemCommands(TQWidget *tqparent, const char *name)
+ : KDialogBase(tqparent, name, true, i18n("Edit Modem Commands"), Ok|Cancel)
{
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
TQWidget *dummyWidget = new TQWidget(this);
@@ -55,7 +55,7 @@ ModemCommands::ModemCommands(TQWidget *parent, const char *name)
const int GRIDROWS = 22;
int row = 0;
- // toplevel layout
+ // toplevel tqlayout
TQVBoxLayout *tl = new TQVBoxLayout(dummyWidget, 10, 4);
// add grid + frame
@@ -71,8 +71,8 @@ ModemCommands::ModemCommands(TQWidget *parent, const char *name)
FORMATSLIDERLABEL(lpreinitslider);
preinitslider = new TQSlider(0, 300, 1, 0,
- TQSlider::Horizontal, dummyWidget);
- preinitslider->setFixedHeight(preinitslider->sizeHint().height());
+ Qt::Horizontal, dummyWidget);
+ preinitslider->setFixedHeight(preinitslider->tqsizeHint().height());
connect(preinitslider, TQT_SIGNAL(valueChanged(int)),
lpreinitslider, TQT_SLOT(setNum(int)));
l2->addWidget(lpreinitslider, 0);
@@ -83,7 +83,7 @@ ModemCommands::ModemCommands(TQWidget *parent, const char *name)
for(int i = 0; i < PPPData::NumInitStrings; i++) {
initstr[i] = new TQLineEdit(dummyWidget);
- TQLabel *initLabel = new TQLabel(i18n("Initialization string %1:").arg(i + 1),
+ TQLabel *initLabel = new TQLabel(i18n("Initialization string %1:").tqarg(i + 1),
dummyWidget);
ADJUSTEDIT(initstr[i]);
l1->addWidget(initLabel, row, 1);
@@ -95,8 +95,8 @@ ModemCommands::ModemCommands(TQWidget *parent, const char *name)
linitslider = new TQLabel("MMMM", dummyWidget);
FORMATSLIDERLABEL(linitslider);
initslider = new TQSlider(1, 300, 1, 0,
- TQSlider::Horizontal, dummyWidget);
- initslider->setFixedHeight(initslider->sizeHint().height());
+ Qt::Horizontal, dummyWidget);
+ initslider->setFixedHeight(initslider->tqsizeHint().height());
connect(initslider, TQT_SIGNAL(valueChanged(int)),
linitslider, TQT_SLOT(setNum(int)));
l3->addWidget(linitslider, 0);
@@ -111,8 +111,8 @@ ModemCommands::ModemCommands(TQWidget *parent, const char *name)
ldurationslider = new TQLabel("MMMM", dummyWidget);
FORMATSLIDERLABEL(ldurationslider);
durationslider = new TQSlider(1, 255, 1, 0,
- TQSlider::Horizontal, dummyWidget);
- durationslider->setFixedHeight(durationslider->sizeHint().height());
+ Qt::Horizontal, dummyWidget);
+ durationslider->setFixedHeight(durationslider->tqsizeHint().height());
connect(durationslider, TQT_SIGNAL(valueChanged(int)),
ldurationslider, TQT_SLOT(setNum(int)));
l4->addWidget(ldurationslider, 0);
@@ -227,8 +227,8 @@ ModemCommands::ModemCommands(TQWidget *parent, const char *name)
FORMATSLIDERLABEL(lslider);
slider = new TQSlider(0, 255, 1, 0,
- TQSlider::Horizontal, dummyWidget);
- slider->setFixedHeight(slider->sizeHint().height());
+ Qt::Horizontal, dummyWidget);
+ slider->setFixedHeight(slider->tqsizeHint().height());
connect(slider, TQT_SIGNAL(valueChanged(int)),
lslider, TQT_SLOT(setNum(int)));
l5->addWidget(lslider, 0);
@@ -242,14 +242,14 @@ ModemCommands::ModemCommands(TQWidget *parent, const char *name)
TQHBoxLayout *l6 = new TQHBoxLayout;
l1->addLayout(l6, row++, 2);
volume_off = new TQLineEdit(dummyWidget);
- volume_off->setFixedHeight(volume_off->sizeHint().height());
- volume_off->setMinimumWidth((int)(volume_off->sizeHint().width() / 2));
+ volume_off->setFixedHeight(volume_off->tqsizeHint().height());
+ volume_off->setMinimumWidth((int)(volume_off->tqsizeHint().width() / 2));
volume_medium = new TQLineEdit(dummyWidget);
- volume_medium->setFixedHeight(volume_medium->sizeHint().height());
- volume_medium->setMinimumWidth((int)(volume_medium->sizeHint().width() / 2));
+ volume_medium->setFixedHeight(volume_medium->tqsizeHint().height());
+ volume_medium->setMinimumWidth((int)(volume_medium->tqsizeHint().width() / 2));
volume_high = new TQLineEdit(dummyWidget);
- volume_high->setFixedHeight(volume_high->sizeHint().height());
- volume_high->setMinimumWidth((int)(volume_high->sizeHint().width() / 2));
+ volume_high->setFixedHeight(volume_high->tqsizeHint().height());
+ volume_high->setMinimumWidth((int)(volume_high->tqsizeHint().width() / 2));
l6->addWidget(volume_off);
l6->addWidget(volume_medium);
l6->addWidget(volume_high);
diff --git a/kppp/modemcmds.h b/kppp/modemcmds.h
index 1ae13ad3..2a7486f9 100644
--- a/kppp/modemcmds.h
+++ b/kppp/modemcmds.h
@@ -46,10 +46,11 @@ class TQGroupBox;
class ModemCommands : public KDialogBase {
Q_OBJECT
+ TQ_OBJECT
public:
- ModemCommands(TQWidget *parent=0, const char *name=0);
+ ModemCommands(TQWidget *tqparent=0, const char *name=0);
~ModemCommands() {}
private slots:
diff --git a/kppp/modemdb.cpp b/kppp/modemdb.cpp
index 11b25b9c..74488dca 100644
--- a/kppp/modemdb.cpp
+++ b/kppp/modemdb.cpp
@@ -42,7 +42,7 @@
#include <kconfig.h>
#include <kstdguiitem.h>
-ModemSelector::ModemSelector(TQWidget *parent) : TQDialog(parent, 0, true) {
+ModemSelector::ModemSelector(TQWidget *tqparent) : TQDialog(tqparent, 0, true) {
// set up widgets and such
setCaption(i18n("Select Modem Type"));
TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10);
@@ -51,7 +51,7 @@ ModemSelector::ModemSelector(TQWidget *parent) : TQDialog(parent, 0, true) {
"right list. If you don't know which modem you have, "
"you can try out one of the \"Generic\" modems."),
this);
- l1->setAlignment(AlignLeft | WordBreak);
+ l1->tqsetAlignment(AlignLeft | WordBreak);
l1->setFixedWidth(400);
l1->setMinimumHeight(50);
tl->addWidget(l1, 0);
@@ -73,9 +73,9 @@ ModemSelector::ModemSelector(TQWidget *parent) : TQDialog(parent, 0, true) {
ok->setDefault(true);
ok->setEnabled(false);
cancel = bbox->addButton(KStdGuiItem::cancel());
- bbox->layout();
+ bbox->tqlayout();
tl->addWidget(bbox);
- setFixedSize(sizeHint());
+ setFixedSize(tqsizeHint());
// set up modem database
db = new ModemDatabase();
@@ -112,7 +112,7 @@ void ModemSelector::vendorSelected(int idx) {
model->clear();
model->insertStringList(*models);
- // FIXME: work around Qt bug
+ // FIXME: work around TQt bug
if(models->count() == 0)
model->update();
delete models;
@@ -152,7 +152,7 @@ TQStringList *ModemDatabase::models(TQString vendor) {
for(uint i = 0; i < modems.count(); i++) {
CharDict *dict = modems.at(i);
- if(dict->find("Vendor") != 0) {
+ if(dict->tqfind("Vendor") != 0) {
if(vendor == *(*dict)["Vendor"] && (*(*dict)["Name"]).at(0) != '!')
sl->append(*(*dict)["Name"]);
}
@@ -173,13 +173,13 @@ void ModemDatabase::loadModem(const TQString &key, CharDict &dict) {
map = modemDB->entryMap(key);
it = map.begin();
- // remove parent attribute
+ // remove tqparent attribute
dict.setAutoDelete(true);
dict.remove("Parent");
// e = it->current();
while(!it.key().isNull()) {
- if(dict.find(it.key()) == 0) {
+ if(dict.tqfind(it.key()) == 0) {
dict.insert(it.key(), new TQString(it.data()));
}
it++;
@@ -187,10 +187,10 @@ void ModemDatabase::loadModem(const TQString &key, CharDict &dict) {
// check name attribute
if(dict["Name"] == 0 || key[0]=='!') {
- dict.replace("Name", new TQString(key));
+ dict.tqreplace("Name", new TQString(key));
}
- // check parent attribute
+ // check tqparent attribute
if(dict["Parent"] != 0)
loadModem(*dict["Parent"], dict);
else
@@ -217,16 +217,16 @@ void ModemDatabase::load() {
// if(strcmp(it->latin1(), "Common") == 0) {
if(*it == "Common") {
TQString s = i18n("Hayes(tm) compatible modem");
- c->replace("Name", new TQString (s));
+ c->tqreplace("Name", new TQString (s));
s = i18n("<Generic>");
- c->replace("Vendor", new TQString(s));
+ c->tqreplace("Vendor", new TQString(s));
}
modems.append(c);
if(modemDB->hasKey("Vendor")) {
TQString vendor = modemDB->readEntry("Vendor");
- if(lvendors->findIndex(vendor) == -1)
+ if(lvendors->tqfindIndex(vendor) == -1)
lvendors->append(vendor);
}
++it;
diff --git a/kppp/modemdb.h b/kppp/modemdb.h
index afd4d601..f0c6c406 100644
--- a/kppp/modemdb.h
+++ b/kppp/modemdb.h
@@ -67,8 +67,9 @@ private:
class ModemSelector : public TQDialog {
Q_OBJECT
+ TQ_OBJECT
public:
- ModemSelector(TQWidget *parent = 0);
+ ModemSelector(TQWidget *tqparent = 0);
~ModemSelector();
private slots:
diff --git a/kppp/modeminfo.cpp b/kppp/modeminfo.cpp
index 6136b68a..9aa79b8a 100644
--- a/kppp/modeminfo.cpp
+++ b/kppp/modeminfo.cpp
@@ -35,8 +35,8 @@
#include "modem.h"
#include <klocale.h>
-ModemTransfer::ModemTransfer(TQWidget *parent, const char *name)
- : TQDialog(parent, name,TRUE, WStyle_Customize|WStyle_NormalBorder)
+ModemTransfer::ModemTransfer(TQWidget *tqparent, const char *name)
+ : TQDialog(tqparent, name,TRUE, WStyle_Customize|WStyle_NormalBorder)
{
setCaption(i18n("ATI Query"));
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
@@ -48,7 +48,7 @@ ModemTransfer::ModemTransfer(TQWidget *parent, const char *name)
statusBar = new TQLabel(this,"sBar");
statusBar->setFrameStyle(TQFrame::Panel|TQFrame::Sunken);
- statusBar->setAlignment(AlignCenter);
+ statusBar->tqsetAlignment(AlignCenter);
// This is a rather complicated case. Since we do not know which
// message is the widest in the national language, we'd to
@@ -56,12 +56,12 @@ ModemTransfer::ModemTransfer(TQWidget *parent, const char *name)
// the longest english message, translate it and give it additional
// 20 percent space. Hope this is enough.
statusBar->setText(i18n("Unable to create modem lock file."));
- statusBar->setFixedWidth((statusBar->sizeHint().width() * 12) / 10);
- statusBar->setFixedHeight(statusBar->sizeHint().height() + 4);
+ statusBar->setFixedWidth((statusBar->tqsizeHint().width() * 12) / 10);
+ statusBar->setFixedHeight(statusBar->tqsizeHint().height() + 4);
// set original text
statusBar->setText(i18n("Looking for modem..."));
- progressBar->setFixedHeight(statusBar->minimumSize().height());
+ progressBar->setFixedHeight(statusBar->tqminimumSize().height());
tl->addWidget(progressBar);
tl->addWidget(statusBar);
@@ -74,7 +74,7 @@ ModemTransfer::ModemTransfer(TQWidget *parent, const char *name)
l1->addStretch(1);
l1->addWidget(cancel);
- setFixedSize(sizeHint());
+ setFixedSize(tqsizeHint());
step = 0;
@@ -151,7 +151,7 @@ void ModemTransfer::init() {
// clear modem buffer
Modem::modem->flush();
- Modem::modem->notify(this, TQT_SLOT(readChar(unsigned char)));
+ Modem::modem->notify(TQT_TQOBJECT(this), TQT_SLOT(readChar(unsigned char)));
return;
}
}
@@ -207,7 +207,7 @@ void ModemTransfer::readtty() {
if (step == 0)
return;
- readbuffer.replace(TQRegExp("[\n\r]")," "); // remove stray \n and \r
+ readbuffer.tqreplace(TQRegExp("[\n\r]")," "); // remove stray \n and \r
readbuffer = readbuffer.stripWhiteSpace(); // strip of leading or trailing white
// space
@@ -240,8 +240,8 @@ void ModemTransfer::closeEvent( TQCloseEvent *e ) {
}
-ModemInfo::ModemInfo(TQWidget *parent, const char* name)
- : TQDialog(parent, name, TRUE, WStyle_Customize|WStyle_NormalBorder)
+ModemInfo::ModemInfo(TQWidget *tqparent, const char* name)
+ : TQDialog(tqparent, name, TRUE, WStyle_Customize|WStyle_NormalBorder)
{
TQString label_text;
@@ -280,7 +280,7 @@ ModemInfo::ModemInfo(TQWidget *parent, const char* name)
connect(ok, TQT_SIGNAL(clicked()), TQT_SLOT(accept()));
l2->addWidget(ok);
- setMinimumSize(sizeHint());
+ setMinimumSize(tqsizeHint());
}
diff --git a/kppp/modeminfo.h b/kppp/modeminfo.h
index 0298ecdd..aeeb86e0 100644
--- a/kppp/modeminfo.h
+++ b/kppp/modeminfo.h
@@ -41,8 +41,9 @@ const int NUM_OF_ATI = 8;
class ModemTransfer : public TQDialog {
Q_OBJECT
+ TQ_OBJECT
public:
- ModemTransfer(TQWidget *parent=0, const char *name=0);
+ ModemTransfer(TQWidget *tqparent=0, const char *name=0);
public slots:
void init();
@@ -74,8 +75,9 @@ private:
class ModemInfo : public TQDialog {
Q_OBJECT
+ TQ_OBJECT
public:
- ModemInfo(TQWidget *parent=0, const char *name=0);
+ ModemInfo(TQWidget *tqparent=0, const char *name=0);
public:
void setAtiString(int num, TQString s);
diff --git a/kppp/modems.cpp b/kppp/modems.cpp
index cd7e3373..6fb3a650 100644
--- a/kppp/modems.cpp
+++ b/kppp/modems.cpp
@@ -50,17 +50,17 @@
void parseargs(char* buf, char** args);
-ModemsWidget::ModemsWidget( TQWidget *parent, const char *name )
- : TQWidget( parent, name )
+ModemsWidget::ModemsWidget( TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent, name )
{
int min = 0;
- TQVBoxLayout *l1 = new TQVBoxLayout(parent, 10, 10);
+ TQVBoxLayout *l1 = new TQVBoxLayout(tqparent, 10, 10);
// add a hbox
TQHBoxLayout *l11 = new TQHBoxLayout;
l1->addLayout(l11);
- modemlist_l = new TQListBox(parent);
+ modemlist_l = new TQListBox(tqparent);
modemlist_l->setMinimumSize(160, 128);
connect(modemlist_l, TQT_SIGNAL(highlighted(int)),
this, TQT_SLOT(slotListBoxSelect(int)));
@@ -70,23 +70,23 @@ ModemsWidget::ModemsWidget( TQWidget *parent, const char *name )
TQVBoxLayout *l111 = new TQVBoxLayout;
l11->addLayout(l111, 1);
- edit_b = new TQPushButton(i18n("&Edit..."), parent);
+ edit_b = new TQPushButton(i18n("&Edit..."), tqparent);
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);
+ min = edit_b->tqsizeHint().width();
+ min = TQMAX(70,min);
edit_b->setMinimumWidth(min);
l111->addWidget(edit_b);
- new_b = new TQPushButton(i18n("&New..."), parent);
+ new_b = new TQPushButton(i18n("&New..."), tqparent);
connect(new_b, TQT_SIGNAL(clicked()), TQT_SLOT(newmodem()));
l111->addWidget(new_b);
TQWhatsThis::add(new_b, i18n("Create a new dialup connection\n"
"to the Internet"));
- copy_b = new TQPushButton(i18n("Co&py"), parent);
+ copy_b = new TQPushButton(i18n("Co&py"), tqparent);
connect(copy_b, TQT_SIGNAL(clicked()), TQT_SLOT(copymodem()));
l111->addWidget(copy_b);
TQWhatsThis::add(copy_b,
@@ -95,7 +95,7 @@ ModemsWidget::ModemsWidget( TQWidget *parent, const char *name )
"to a new account that you can modify to fit your\n"
"needs"));
- delete_b = new TQPushButton(i18n("De&lete"), parent);
+ delete_b = new TQPushButton(i18n("De&lete"), tqparent);
connect(delete_b, TQT_SIGNAL(clicked()), TQT_SLOT(deletemodem()));
l111->addWidget(delete_b);
TQWhatsThis::add(delete_b,
@@ -159,7 +159,7 @@ void ModemsWidget::newmodem() {
if(result == TQDialog::Accepted) {
modemlist_l->insertItem(gpppdata.modname());
- modemlist_l->setSelected(modemlist_l->findItem(gpppdata.modname()),
+ modemlist_l->setSelected(modemlist_l->tqfindItem(gpppdata.modname()),
true);
emit resetmodems();
gpppdata.save();
@@ -190,7 +190,7 @@ void ModemsWidget::copymodem() {
void ModemsWidget::deletemodem() {
TQString s = i18n("Are you sure you want to delete\nthe modem \"%1\"?")
- .arg(modemlist_l->text(modemlist_l->currentItem()));
+ .tqarg(modemlist_l->text(modemlist_l->currentItem()));
if(KMessageBox::warningContinueCancel(this, s, i18n("Confirm"), KStdGuiItem::del()) != KMessageBox::Continue)
return;
@@ -207,7 +207,7 @@ void ModemsWidget::deletemodem() {
int ModemsWidget::doTab(){
- tabWindow = new KDialogBase( KDialogBase::Tabbed, TQString::null,
+ tabWindow = new KDialogBase( KDialogBase::Tabbed, TQString(),
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok,
0, 0, true);
KWin::setIcons(tabWindow->winId(), kapp->icon(), kapp->miniIcon());
@@ -257,7 +257,7 @@ void ModemsWidget::modemNameChanged(const TQString & text)
TQString ModemsWidget::prettyPrintVolume(unsigned int n) {
int idx = 0;
const TQString quant[] = {i18n("Byte"), i18n("KB"),
- i18n("MB"), i18n("GB"), TQString::null};
+ i18n("MB"), i18n("GB"), TQString()};
float n1 = n;
while(n >= 1024 && !quant[idx].isNull()) {
diff --git a/kppp/modems.h b/kppp/modems.h
index 64a5fdc7..069139af 100644
--- a/kppp/modems.h
+++ b/kppp/modems.h
@@ -45,8 +45,9 @@ class GatewayWidget;
class ModemsWidget : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- ModemsWidget( TQWidget *parent=0, const char *name=0 );
+ ModemsWidget( TQWidget *tqparent=0, const char *name=0 );
~ModemsWidget() {}
private slots:
diff --git a/kppp/newwidget.cpp b/kppp/newwidget.cpp
index ba8508e5..66ed8649 100644
--- a/kppp/newwidget.cpp
+++ b/kppp/newwidget.cpp
@@ -1,15 +1,15 @@
/////////////////////////////////////////////////////////////////////////////
//
-// functions generating layout-aware widgets
+// functions generating tqlayout-aware widgets
//
/////////////////////////////////////////////////////////////////////////////
#include "newwidget.h"
-TQLineEdit *newLineEdit(int visiblewidth, TQWidget *parent) {
- TQLineEdit *l = new TQLineEdit(parent);
+TQLineEdit *newLineEdit(int visiblewidth, TQWidget *tqparent) {
+ TQLineEdit *l = new TQLineEdit(tqparent);
if(visiblewidth == 0)
- l->setMinimumWidth(l->sizeHint().width());
+ l->setMinimumWidth(l->tqsizeHint().width());
else
l->setFixedWidth(l->fontMetrics().width('H') * visiblewidth);
diff --git a/kppp/newwidget.h b/kppp/newwidget.h
index 2cb2e717..49d79e69 100644
--- a/kppp/newwidget.h
+++ b/kppp/newwidget.h
@@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
-// functions generating layout-aware widgets
+// functions generating tqlayout-aware widgets
//
/////////////////////////////////////////////////////////////////////////////
@@ -14,6 +14,6 @@
#define L_FIXEDH 2
#define L_FIXED (L_FIXEDW | L_FIXEDH)
-TQLineEdit *newLineEdit(int visiblewidth, TQWidget *parent);
+TQLineEdit *newLineEdit(int visiblewidth, TQWidget *tqparent);
#endif
diff --git a/kppp/opener.cpp b/kppp/opener.cpp
index f700d0c8..7f61f775 100644
--- a/kppp/opener.cpp
+++ b/kppp/opener.cpp
@@ -28,9 +28,9 @@
*
* Apart from the first dozen lines in main() the following code represents
* the setuid root part of kppp. So please be careful !
- * o restrain from using X, Qt or KDE library calls
+ * o restrain from using X, TQt or KDE library calls
* o check for possible buffer overflows
- * o handle requests from the parent process with care. They might be forged.
+ * o handle requests from the tqparent process with care. They might be forged.
* o be paranoid and think twice about everything you change.
*/
@@ -123,7 +123,7 @@ extern "C" {
static void sighandler_child(int);
static pid_t pppdPid = -1;
-static int pppdExitStatus = -1;
+static int pppdExittqStatus = -1;
static int checkForInterface();
// processing will stop at first file that could be opened successfully
@@ -311,10 +311,10 @@ void Opener::mainLoop() {
sendResponse(&response);
break;
- case PPPDExitStatus:
- Debug("Opener: received PPPDExitStatus");
+ case PPPDExittqStatus:
+ Debug("Opener: received PPPDExittqStatus");
MY_ASSERT(len == sizeof(struct PPPDExitStatusRequest));
- response.status = pppdExitStatus;
+ response.status = pppdExittqStatus;
sendResponse(&response);
break;
@@ -514,12 +514,12 @@ bool Opener::execpppd(const char *arguments) {
if(ttyfd<0)
return false;
- pppdExitStatus = -1;
+ pppdExittqStatus = -1;
switch(pppdPid = fork())
{
case -1:
- fprintf(stderr,"In parent: fork() failed\n");
+ fprintf(stderr,"In tqparent: fork() failed\n");
return false;
break;
@@ -561,7 +561,7 @@ bool Opener::execpppd(const char *arguments) {
break;
default:
- Debug2("In parent: pppd pid %d\n",pppdPid);
+ Debug2("In tqparent: pppd pid %d\n",pppdPid);
close(ttyfd);
ttyfd = -1;
return true;
@@ -706,10 +706,10 @@ void sighandler_child(int) {
Debug("It was pppd that died");
pppdPid = -1;
if((WIFEXITED(status))) {
- pppdExitStatus = (WEXITSTATUS(status));
- Debug2("pppd exited with return value %d\n", pppdExitStatus);
+ pppdExittqStatus = (WEXITSTATUS(status));
+ Debug2("pppd exited with return value %d\n", pppdExittqStatus);
} else {
- pppdExitStatus = 99;
+ pppdExittqStatus = 99;
Debug("pppd exited abnormally.");
}
Debug2("Sending %i a SIGUSR1\n", getppid());
diff --git a/kppp/opener.h b/kppp/opener.h
index 812ec9ba..99568f5d 100644
--- a/kppp/opener.h
+++ b/kppp/opener.h
@@ -34,7 +34,7 @@ public:
SetSecret, RemoveSecret,
SetHostname,
ExecPPPDaemon, KillPPPDaemon,
- PPPDExitStatus,
+ PPPDExittqStatus,
Stop };
enum Auth { PAP = 1, CHAP };
enum { MaxPathLen = 30, MaxStrLen = 40, MaxArgs = 100 };
diff --git a/kppp/pppdargs.cpp b/kppp/pppdargs.cpp
index f03103bb..b057e9b5 100644
--- a/kppp/pppdargs.cpp
+++ b/kppp/pppdargs.cpp
@@ -40,8 +40,8 @@
#include <kpushbutton.h>
#include <kstdguiitem.h>
-PPPdArguments::PPPdArguments(TQWidget *parent, const char *name)
- : TQDialog(parent, name, TRUE)
+PPPdArguments::PPPdArguments(TQWidget *tqparent, const char *name)
+ : TQDialog(tqparent, name, TRUE)
{
setCaption(i18n("Customize pppd Arguments"));
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
@@ -95,10 +95,10 @@ PPPdArguments::PPPdArguments(TQWidget *parent, const char *name)
TQPushButton *cancel = bbox->addButton(KStdGuiItem::cancel());
connect(cancel, TQT_SIGNAL(clicked()),
this, TQT_SLOT(reject()));
- bbox->layout();
+ bbox->tqlayout();
l->addWidget(bbox);
- setFixedSize(sizeHint());
+ setFixedSize(tqsizeHint());
//load info from gpppdata
init();
diff --git a/kppp/pppdargs.h b/kppp/pppdargs.h
index e93f0086..300e3f99 100644
--- a/kppp/pppdargs.h
+++ b/kppp/pppdargs.h
@@ -39,8 +39,9 @@ class KPushButton;
class PPPdArguments : public TQDialog {
Q_OBJECT
+ TQ_OBJECT
public:
- PPPdArguments(TQWidget *parent=0, const char *name=0);
+ PPPdArguments(TQWidget *tqparent=0, const char *name=0);
~PPPdArguments() {}
private slots:
diff --git a/kppp/pppdata.cpp b/kppp/pppdata.cpp
index 2c43d7f7..e856dd2c 100644
--- a/kppp/pppdata.cpp
+++ b/kppp/pppdata.cpp
@@ -300,12 +300,12 @@ void PPPData::set_redial_on_nocarrier(bool set) {
bool PPPData::quit_on_disconnect() {
- return (bool) readNumConfig(GENERAL_GRP, QUITONDISCONNECT_KEY, false);
+ return (bool) readNumConfig(GENERAL_GRP, TQUITONDISCONNECT_KEY, false);
}
void PPPData::set_quit_on_disconnect(bool set) {
- writeConfig(GENERAL_GRP, QUITONDISCONNECT_KEY, (int) set);
+ writeConfig(GENERAL_GRP, TQUITONDISCONNECT_KEY, (int) set);
}
@@ -350,7 +350,7 @@ void PPPData::set_dock_into_panel(bool set) {
TQString PPPData::pppdVersion() {
- return TQString("%1.%2.%3").arg(pppdVer).arg(pppdMod).arg(pppdPatch);
+ return TQString("%1.%2.%3").tqarg(pppdVer).tqarg(pppdMod).tqarg(pppdPatch);
}
bool PPPData::pppdVersionMin(int ver, int mod, int patch) {
@@ -498,7 +498,7 @@ int PPPData::copymodem(int i) {
TQMap <TQString, TQString> map = config->entryMap(cmodemgroup);
TQMap <TQString, TQString>::ConstIterator it = map.begin();
- TQString newname = i18n("%1_copy").arg(modname());
+ TQString newname = i18n("%1_copy").tqarg(modname());
newmodem();
@@ -929,7 +929,7 @@ bool PPPData::setAccountByIndex(int i) {
bool PPPData::isUniqueAccname(const TQString &n) {
- if(n.contains(':'))
+ if(n.tqcontains(':'))
return false;
int current = caccount;
for(int i=0; i <= accounthighcount; i++) {
@@ -1026,7 +1026,7 @@ int PPPData::copyaccount(int i) {
TQMap <TQString, TQString> map = config->entryMap(caccountgroup);
TQMap <TQString, TQString>::ConstIterator it = map.begin();
- TQString newname = i18n("%1_copy").arg(accname());
+ TQString newname = i18n("%1_copy").tqarg(accname());
newaccount();
@@ -1199,12 +1199,12 @@ void PPPData::setIpaddr(const TQString &n) {
}
-const TQString PPPData::subnetmask() {
+const TQString PPPData::subnettqmask() {
return readConfig(caccountgroup, SUBNETMASK_KEY);
}
-void PPPData::setSubnetmask(const TQString &n) {
+void PPPData::setSubnettqmask(const TQString &n) {
writeConfig(caccountgroup, SUBNETMASK_KEY, n);
}
@@ -1418,13 +1418,13 @@ void PPPData::graphingOptions(bool &enable,
if(config) {
config->setGroup(GRAPH_GRP);
enable = config->readBoolEntry(GENABLED, true);
- c = Qt::white;
+ c = TQt::white;
bg = config->readColorEntry(GCOLOR_BG, &c);
- c = Qt::black;
+ c = TQt::black;
text = config->readColorEntry(GCOLOR_TEXT, &c);
- c = Qt::blue;
+ c = TQt::blue;
in = config->readColorEntry(GCOLOR_IN, &c);
- c = Qt::red;
+ c = TQt::red;
out = config->readColorEntry(GCOLOR_OUT, &c);
}
}
diff --git a/kppp/pppdata.h b/kppp/pppdata.h
index 7879d1fa..8956f6c8 100644
--- a/kppp/pppdata.h
+++ b/kppp/pppdata.h
@@ -70,7 +70,7 @@ class KConfig;
#define SHOWLOGWIN_KEY "ShowLogWindow"
#define AUTOREDIAL_KEY "AutomaticRedial"
#define DISCONNECT_KEY "DisconnectOnXServerExit"
-#define QUITONDISCONNECT_KEY "QuitOnDisconnect"
+#define TQUITONDISCONNECT_KEY "QuitOnDisconnect"
#define NUMACCOUNTS_KEY "NumberOfAccounts"
#define NUMMODEMS_KEY "NumberOfModems"
#define REDIALONNOCARR_KEY "RedialOnNoCarrier"
@@ -413,8 +413,8 @@ public:
const TQString ipaddr();
void setIpaddr(const TQString &);
- const TQString subnetmask();
- void setSubnetmask(const TQString &);
+ const TQString subnettqmask();
+ void setSubnettqmask(const TQString &);
bool AcctEnabled();
void setAcctEnabled(bool set);
diff --git a/kppp/ppplog.cpp b/kppp/ppplog.cpp
index 96ccaa34..597cd53d 100644
--- a/kppp/ppplog.cpp
+++ b/kppp/ppplog.cpp
@@ -163,7 +163,7 @@ void PPPL_AnalyseLog(TQStringList &list, TQStringList &result) {
for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
// look for remote message
- int pos = (*it).find(rmsg);
+ int pos = (*it).tqfind(rmsg);
if (pos != -1)
{
TQString str = (*it);
@@ -171,7 +171,7 @@ void PPPL_AnalyseLog(TQStringList &list, TQStringList &result) {
if(!str.isEmpty()) {
msg = i18n("Notice that the remote system has sent the following"
" message:\n\"%1\"\nThis may give you a hint why the"
- " the connection has failed.").arg(str);
+ " the connection has failed.").tqarg(str);
result.append(msg);
}
}
@@ -180,7 +180,7 @@ void PPPL_AnalyseLog(TQStringList &list, TQStringList &result) {
for(uint k = 0; hints[k].regexp != 0; k++) {
TQRegExp rx(hints[k].regexp);
TQString l(*it);
- if(l.contains(rx)) {
+ if(l.tqcontains(rx)) {
result.append(i18n(hints[k].answer));
break;
}
@@ -202,15 +202,15 @@ void PPPL_ShowLog() {
bool foundConnect = false;
bool foundLCP = gpppdata.getPPPDebug();
- TQString lcp = TQString::fromLatin1("[LCP");
- TQString conn = TQString::fromLatin1("Connect:");
+ TQString lcp = TQString::tqfromLatin1("[LCP");
+ TQString conn = TQString::tqfromLatin1("Connect:");
TQStringList::ConstIterator it = sl.begin();
for( ; it != sl.end(); it++) {
- if((*it).find(lcp) >= 0) {
+ if((*it).tqfind(lcp) >= 0) {
foundLCP = true;
break;
}
- if((*it).find(conn) >= 0)
+ if((*it).tqfind(conn) >= 0)
foundConnect = true;
}
if(foundConnect && !foundLCP) {
@@ -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?"), TQString::null, i18n("Restart pppd"), i18n("Do Not Restart"));
+ "Shall I turn it on now?"), TQString(), i18n("Restart pppd"), i18n("Do Not Restart"));
if(result == KMessageBox::Yes) {
gpppdata.setPPPDebug(TRUE);
@@ -249,7 +249,7 @@ void PPPL_ShowLog() {
bbox->addStretch(1);
TQPushButton *write = bbox->addButton(i18n("Write to File"));
TQPushButton *close = bbox->addButton(KStdGuiItem::close());
- bbox->layout();
+ bbox->tqlayout();
edit->setMinimumSize(600, 250);
label->setMinimumSize(600, 15);
diagnosis->setMinimumSize(600, 60);
@@ -258,7 +258,7 @@ void PPPL_ShowLog() {
tl->addWidget(label);
tl->addWidget(diagnosis, 1);
tl->addWidget(bbox);
- dlg->setFixedSize(dlg->sizeHint());
+ dlg->setFixedSize(dlg->tqsizeHint());
for(uint i = 0; i < sl.count(); i++)
edit->append(*sl.at(i));
@@ -281,7 +281,7 @@ void PPPL_ShowLog() {
fclose(f);
umask(old_umask);
- 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);
+ 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").tqarg(s);
KMessageBox::information(0, msg);
}
delete dlg;
diff --git a/kppp/pppstatdlg.cpp b/kppp/pppstatdlg.cpp
index 9c5ecda9..15582324 100644
--- a/kppp/pppstatdlg.cpp
+++ b/kppp/pppstatdlg.cpp
@@ -44,9 +44,9 @@
extern PPPData gpppdata;
-PPPStatsDlg::PPPStatsDlg(TQWidget *parent, const char *name, TQWidget *,
+PPPStatsDlg::PPPStatsDlg(TQWidget *tqparent, const char *name, TQWidget *,
PPPStats *st)
- : TQWidget(parent, name, 0),
+ : TQWidget(tqparent, name, 0),
stats(st)
{
int i;
@@ -80,7 +80,7 @@ PPPStatsDlg::PPPStatsDlg(TQWidget *parent, const char *name, TQWidget *,
pixmap_l = new TQLabel(this);
pixmap_l->setMinimumSize(big_modem_both_pixmap.size());
l111->addWidget(pixmap_l, 1);
- pixmap_l->setAlignment(AlignVCenter|AlignLeft);
+ pixmap_l->tqsetAlignment(AlignVCenter|AlignLeft);
TQGridLayout *l1112 = new TQGridLayout(3, 2);
l111->addLayout(l1112);
@@ -89,13 +89,13 @@ PPPStatsDlg::PPPStatsDlg(TQWidget *parent, const char *name, TQWidget *,
ip_address_label1->setText(i18n("Local Addr:"));
ip_address_label2 = new IPLineEdit(this);
- ip_address_label2->setFocusPolicy(TQWidget::NoFocus);
+ ip_address_label2->setFocusPolicy(TQ_NoFocus);
ip_address_label3 = new TQLabel(this);
ip_address_label3->setText(i18n("Remote Addr:"));
ip_address_label4 = new IPLineEdit(this);
- ip_address_label4->setFocusPolicy(TQWidget::NoFocus);
+ ip_address_label4->setFocusPolicy(TQ_NoFocus);
l1112->addWidget(ip_address_label1, 0, 0);
l1112->addWidget(ip_address_label2, 0, 1);
@@ -137,14 +137,14 @@ PPPStatsDlg::PPPStatsDlg(TQWidget *parent, const char *name, TQWidget *,
for(i = 0; i < 5; i++) {
labela2[i]->setText("888888888"); // TODO: resize automatically
labelb2[i]->setText("888888888");
- labela2[i]->setAlignment(Qt::AlignRight);
- labelb2[i]->setAlignment(Qt::AlignRight);
- labela2[i]->setFixedSize(labela2[i]->sizeHint());
- labelb2[i]->setFixedSize(labelb2[i]->sizeHint());
+ labela2[i]->tqsetAlignment(TQt::AlignRight);
+ labelb2[i]->tqsetAlignment(TQt::AlignRight);
+ labela2[i]->setFixedSize(labela2[i]->tqsizeHint());
+ labelb2[i]->setFixedSize(labelb2[i]->tqsizeHint());
labela2[i]->setText("");
labelb2[i]->setText("");
- // add to layout
+ // add to tqlayout
l112->addWidget(labela1[i], i, 0);
l112->addWidget(labela2[i], i, 1);
l112->addWidget(labelb1[i], i, 2);
@@ -175,8 +175,8 @@ PPPStatsDlg::PPPStatsDlg(TQWidget *parent, const char *name, TQWidget *,
cancelbutton = new KPushButton(KStdGuiItem::close(),this, "cancelbutton");
cancelbutton->setFocus();
connect(cancelbutton, TQT_SIGNAL(clicked()), this,TQT_SLOT(cancel()));
- cancelbutton->setFixedHeight(cancelbutton->sizeHint().height());
- cancelbutton->setMinimumWidth(QMAX(cancelbutton->sizeHint().width(), 70));
+ cancelbutton->setFixedHeight(cancelbutton->tqsizeHint().height());
+ cancelbutton->setMinimumWidth(TQMAX(cancelbutton->tqsizeHint().width(), 70));
l12->addWidget(cancelbutton);
if(gpppdata.graphingEnabled()) {
@@ -184,7 +184,7 @@ PPPStatsDlg::PPPStatsDlg(TQWidget *parent, const char *name, TQWidget *,
connect(graphTimer, TQT_SIGNAL(timeout()), TQT_SLOT(updateGraph()));
}
- setFixedSize(sizeHint());
+ setFixedSize(tqsizeHint());
connect(stats, TQT_SIGNAL(statsChanged(int)), TQT_SLOT(paintIcon(int)));
@@ -290,8 +290,8 @@ void PPPStatsDlg::paintGraph() {
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));
+ .tqarg(KGlobal::locale()->formatNumber((float)last_max / 1024.0, 1))
+ .tqarg(KGlobal::locale()->formatNumber((float)max / 1024.0, 1));
p.drawText(0, 0, pm.width(), 2*8, AlignRight|AlignVCenter, s, -1, &r);
p.drawLine(0, 8, r.left() - 8, 8);
diff --git a/kppp/pppstatdlg.h b/kppp/pppstatdlg.h
index 07b15e42..cfb3a464 100644
--- a/kppp/pppstatdlg.h
+++ b/kppp/pppstatdlg.h
@@ -45,10 +45,11 @@ class PPPStats;
class PPPStatsDlg : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- PPPStatsDlg(TQWidget *parent, const char *name,TQWidget *main,
+ PPPStatsDlg(TQWidget *tqparent, const char *name,TQWidget *main,
PPPStats *st);
~PPPStatsDlg();
@@ -110,8 +111,8 @@ private:
TQString uncompressedin_string;
TQString errorin_string;
TQString obytes_string;
- QString opackets_string;
- QString compressed_string;
+ TQString opackets_string;
+ TQString compressed_string;
TQString packetsunc_string;
TQString packetsoutunc_string;
TQGroupBox *box;
diff --git a/kppp/pppstats.cpp b/kppp/pppstats.cpp
index ecc083fc..d4b3007e 100644
--- a/kppp/pppstats.cpp
+++ b/kppp/pppstats.cpp
@@ -121,25 +121,25 @@ void PPPStats::clear()
compressed = 0;
packetsunc = 0;
packetsoutunc = 0;
- ioStatus = BytesNone;
+ iotqStatus = BytesNone;
}
void PPPStats::timerClick() {
- enum IOStatus newStatus;
+ enum IOtqStatus newtqStatus;
doStats();
if((ibytes != ibytes_last) && (obytes != obytes_last))
- newStatus = BytesBoth;
+ newtqStatus = BytesBoth;
else if(ibytes != ibytes_last)
- newStatus = BytesIn;
+ newtqStatus = BytesIn;
else if(obytes != obytes_last)
- newStatus = BytesOut;
+ newtqStatus = BytesOut;
else
- newStatus = BytesNone;
+ newtqStatus = BytesNone;
- if(newStatus != ioStatus)
- emit statsChanged(ioStatus = newStatus);
+ if(newtqStatus != iotqStatus)
+ emit statsChanged(iotqStatus = newtqStatus);
ibytes_last = ibytes;
obytes_last = obytes;
diff --git a/kppp/pppstats.h b/kppp/pppstats.h
index 97611ca8..91e4e9e0 100644
--- a/kppp/pppstats.h
+++ b/kppp/pppstats.h
@@ -34,6 +34,7 @@ class TQTimer;
class PPPStats : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
PPPStats();
~PPPStats();
@@ -64,7 +65,7 @@ public:
TQString local_ip_address;
TQString remote_ip_address;
- enum IOStatus { BytesNone = 0, BytesIn, BytesOut, BytesBoth };
+ enum IOtqStatus { BytesNone = 0, BytesIn, BytesOut, BytesBoth };
private:
bool get_ppp_stats(struct ppp_stats *curp);
@@ -77,7 +78,7 @@ private:
#endif
int unit;
char unitName[5];
- enum IOStatus ioStatus;
+ enum IOtqStatus iotqStatus;
TQTimer *timer;
};
diff --git a/kppp/providerdb.cpp b/kppp/providerdb.cpp
index adcb8336..a86b915d 100644
--- a/kppp/providerdb.cpp
+++ b/kppp/providerdb.cpp
@@ -44,12 +44,12 @@
#include <ksimpleconfig.h>
-#define UNENCODED_CHARS "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_"
+#define UNENCODED_CHARS "ABCDEFGHIJKLMNOPTQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_"
TQWizard* ProviderDB::wiz = 0L;
-ProviderDB::ProviderDB(TQWidget *parent) :
- KWizard(parent, "", true),
+ProviderDB::ProviderDB(TQWidget *tqparent) :
+ KWizard(tqparent, "", true),
cfg(0)
{
setCaption(i18n("Create New Account"));
@@ -88,7 +88,7 @@ ProviderDB::ProviderDB(TQWidget *parent) :
connect((const TQObject *)backButton(), TQT_SIGNAL(clicked()),
this, TQT_SLOT(pageSelected()));
- // resize(minimumSize());
+ // resize(tqminimumSize());
adjustSize();
}
@@ -143,11 +143,11 @@ void ProviderDB::accept() {
while(it != map.end()) {
TQString key = it.key();
TQString value = *it;
- if(value.contains(re_username))
- value.replace(re_username, page4->username());
+ if(value.tqcontains(re_username))
+ value.tqreplace(re_username, page4->username());
- if(value.contains(re_password))
- value.replace(re_password, page4->password());
+ if(value.tqcontains(re_password))
+ value.tqreplace(re_password, page4->password());
gpppdata.writeConfig(gpppdata.currentAccountGroup(), key, value);
@@ -164,7 +164,7 @@ void ProviderDB::accept() {
/////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////
-PDB_Intro::PDB_Intro(TQWidget *parent) : TQWidget(parent) {
+PDB_Intro::PDB_Intro(TQWidget *tqparent) : TQWidget(tqparent) {
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"
@@ -182,7 +182,7 @@ PDB_Intro::PDB_Intro(TQWidget *parent) : TQWidget(parent) {
/////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////
-PDB_Country::PDB_Country(TQWidget *parent) : TQWidget(parent) {
+PDB_Country::PDB_Country(TQWidget *tqparent) : TQWidget(tqparent) {
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"
@@ -213,9 +213,9 @@ PDB_Country::PDB_Country(TQWidget *parent) : TQWidget(parent) {
d.setSorting(TQDir::Name);
// read the list of files
- const QFileInfoList *flist = d.entryInfoList();
+ const TQFileInfoList *flist = d.entryInfoList();
if(flist) {
- QFileInfoListIterator it( *flist );
+ TQFileInfoListIterator it( *flist );
TQFileInfo *fi;
// traverse the flist and insert into a map for sorting
TQMap<TQString, TQString> countries;
@@ -251,7 +251,7 @@ PDB_Country::~PDB_Country()
}
void PDB_Country::selectionChanged(int idx) {
- // TQWizard *wizard = (TQWizard *)parent(); Why doesn't this work ?
+ // TQWizard *wizard = (TQWizard *)tqparent(); Why doesn't this work ?
ProviderDB::wiz->setNextEnabled(this, (idx != -1));
}
@@ -259,7 +259,7 @@ void PDB_Country::selectionChanged(int idx) {
/////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////
-PDB_Provider::PDB_Provider(TQWidget *parent) : TQWidget(parent) {
+PDB_Provider::PDB_Provider(TQWidget *tqparent) : TQWidget(tqparent) {
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"
@@ -296,7 +296,7 @@ void PDB_Provider::setDir(const TQString &_dir) {
TQString dir1 = KGlobal::dirs()->findDirs("appdata", "Provider").first();
TQRegExp re1(" ");
- dir = dir.replace(re1, "_");
+ dir = dir.tqreplace(re1, "_");
dir1 += dir;
TQDir d(dir1);
@@ -304,8 +304,8 @@ void PDB_Provider::setDir(const TQString &_dir) {
d.setSorting(TQDir::Name);
// read the list of files
- const QFileInfoList *list = d.entryInfoList();
- QFileInfoListIterator it( *list );
+ const TQFileInfoList *list = d.entryInfoList();
+ TQFileInfoListIterator it( *list );
TQFileInfo *fi;
// traverse the list and insert into the widget
@@ -319,7 +319,7 @@ void PDB_Provider::setDir(const TQString &_dir) {
++it;
}
- // TODO: Qt 1.x needs this if list is empty
+ // TODO: TQt 1.x needs this if list is empty
lb->update();
}
}
@@ -334,7 +334,7 @@ TQString PDB_Provider::getDir() {
/////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////
-PDB_UserInfo::PDB_UserInfo(TQWidget *parent) : TQWidget(parent) {
+PDB_UserInfo::PDB_UserInfo(TQWidget *tqparent) : TQWidget(tqparent) {
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"
@@ -388,7 +388,7 @@ void PDB_UserInfo::activate() {
/////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////
-PDB_DialPrefix::PDB_DialPrefix(TQWidget *parent) : TQWidget(parent) {
+PDB_DialPrefix::PDB_DialPrefix(TQWidget *tqparent) : TQWidget(tqparent) {
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"
@@ -424,7 +424,7 @@ void PDB_DialPrefix::activate() {
/////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////
-PDB_Finished::PDB_Finished(TQWidget *parent) : TQWidget(parent) {
+PDB_Finished::PDB_Finished(TQWidget *tqparent) : TQWidget(tqparent) {
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"
@@ -458,10 +458,10 @@ void urlEncode(TQString &s) {
TQString s1, tmp;
for(uint i = 0; i < s.length(); i++) {
- if(TQString(UNENCODED_CHARS).find(s[i]) >= 0)
+ if(TQString(UNENCODED_CHARS).tqfind(s[i]) >= 0)
s1 += s[i];
else {
- tmp.sprintf("%%%03i", s[i].unicode());
+ tmp.sprintf("%%%03i", s[i].tqunicode());
s1 += tmp;
}
}
diff --git a/kppp/providerdb.h b/kppp/providerdb.h
index 1c0cd7a9..0705cac3 100644
--- a/kppp/providerdb.h
+++ b/kppp/providerdb.h
@@ -44,15 +44,17 @@ class KSimpleConfig;
class PDB_Intro : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- PDB_Intro(TQWidget *parent);
+ PDB_Intro(TQWidget *tqparent);
};
class PDB_Country : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- PDB_Country(TQWidget *parent);
+ PDB_Country(TQWidget *tqparent);
~PDB_Country();
TQListBox *lb;
TQStringList *list;
@@ -64,8 +66,9 @@ public slots:
class PDB_Provider : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- PDB_Provider(TQWidget *parent);
+ PDB_Provider(TQWidget *tqparent);
void setDir(const TQString &d);
TQString getDir();
@@ -82,8 +85,9 @@ private:
class PDB_UserInfo : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- PDB_UserInfo(TQWidget *parent);
+ PDB_UserInfo(TQWidget *tqparent);
TQString username();
TQString password();
void activate();
@@ -99,8 +103,9 @@ private:
class PDB_DialPrefix : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- PDB_DialPrefix(TQWidget *parent);
+ PDB_DialPrefix(TQWidget *tqparent);
TQString prefix();
void activate();
@@ -111,15 +116,17 @@ private:
class PDB_Finished : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- PDB_Finished(TQWidget *parent);
+ PDB_Finished(TQWidget *tqparent);
};
class ProviderDB : public KWizard {
Q_OBJECT
+ TQ_OBJECT
public:
- ProviderDB(TQWidget *parent);
+ ProviderDB(TQWidget *tqparent);
~ProviderDB();
static TQWizard *wiz;
diff --git a/kppp/pwentry.cpp b/kppp/pwentry.cpp
index 5e6397a5..e6cbea58 100644
--- a/kppp/pwentry.cpp
+++ b/kppp/pwentry.cpp
@@ -30,26 +30,26 @@
#include <kglobalsettings.h>
#include "pwentry.h"
-PWEntry::PWEntry( TQWidget *parent, const char *name )
+PWEntry::PWEntry( TQWidget *tqparent, const char *name )
: TQWidget(NULL, name) {
- if(parent){
+ if(tqparent){
TQPoint point = mapToGlobal (TQPoint (0,0));
- TQRect pos = geometry();
+ TQRect pos = tqgeometry();
setGeometry(point.x() + pos.width()/2 - 300/2,
point.y() + pos.height()/2 - 90/2,
300,
90);
} else {
- TQRect desk = KGlobalSettings::desktopGeometry(parent);
+ TQRect desk = KGlobalSettings::desktopGeometry(tqparent);
setGeometry( desk.center().x() - 150, desk.center().y() - 50, 300, 90 );
}
frame = new TQGroupBox(name, this );
- setFocusPolicy( TQWidget::StrongFocus );
+ setFocusPolicy( TQ_StrongFocus );
pw = new TQLineEdit( this, "le" );
pw->setEchoMode( TQLineEdit::Password );
diff --git a/kppp/pwentry.h b/kppp/pwentry.h
index b812bb16..258c079e 100644
--- a/kppp/pwentry.h
+++ b/kppp/pwentry.h
@@ -35,10 +35,11 @@
class PWEntry : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- PWEntry( TQWidget *parent=0, const char *name=0 );
+ PWEntry( TQWidget *tqparent=0, const char *name=0 );
bool Consumed();
void setConsumed();
TQString text();
diff --git a/kppp/requester.cpp b/kppp/requester.cpp
index b5450929..dcb28fcb 100644
--- a/kppp/requester.cpp
+++ b/kppp/requester.cpp
@@ -70,7 +70,7 @@ Requester *Requester::rq = 0L;
Requester::Requester(int s) : socket(s) {
assert(rq==0L);
rq = this;
- lastStatus = -1;
+ lasttqStatus = -1;
}
Requester::~Requester() {
@@ -167,7 +167,7 @@ bool Requester::recvResponse() {
kdDebug(5002) << "response.status: " << response.status << endl;
}
- lastStatus = response.status;
+ lasttqStatus = response.status;
return (response.status == 0);
}
@@ -306,10 +306,10 @@ bool Requester::killPPPDaemon() {
return recvResponse();
}
-int Requester::pppdExitStatus()
+int Requester::pppdExittqStatus()
{
struct PPPDExitStatusRequest req;
- req.header.type = Opener::PPPDExitStatus;
+ req.header.type = Opener::PPPDExittqStatus;
sendRequest((struct RequestHeader *) &req, sizeof(req));
return recvResponse();
}
diff --git a/kppp/requester.h b/kppp/requester.h
index ea415df0..46626df5 100644
--- a/kppp/requester.h
+++ b/kppp/requester.h
@@ -17,12 +17,12 @@ public:
bool setHostname(const TQString & name);
bool execPPPDaemon(const TQString & arguments);
bool killPPPDaemon();
- int pppdExitStatus();
+ int pppdExittqStatus();
bool stop();
public:
static Requester *rq;
- int lastStatus;
+ int lasttqStatus;
private:
bool sendRequest(struct RequestHeader *request, int len);
diff --git a/kppp/ruleset.cpp b/kppp/ruleset.cpp
index 723d5f2b..6c2131a6 100644
--- a/kppp/ruleset.cpp
+++ b/kppp/ruleset.cpp
@@ -127,7 +127,7 @@ int RuleSet::load(const TQString &filename) {
} while(!f.atEnd() && backslashed);
// strip whitespace
- line = line.replace(TQRegExp("[ \t\r]"), "");
+ line = line.tqreplace(TQRegExp("[ \t\r]"), "");
// skip comment lines
if((line.left(1) == "#") || line.isEmpty())
continue;
@@ -183,7 +183,7 @@ void RuleSet::addRule(RULE r) {
}
bool RuleSet::parseEntry(RULE &ret, TQString s, int year) {
- if(s.contains(TQRegExp("^[0-9]+/[0-9]+$"))) {
+ if(s.tqcontains(TQRegExp("^[0-9]+/[0-9]+$"))) {
int d, m;
sscanf(s.ascii(), "%d/%d", &m, &d);
ret.type = 1;
@@ -192,7 +192,7 @@ bool RuleSet::parseEntry(RULE &ret, TQString s, int year) {
return TRUE;
}
- if(s.contains(TQRegExp("^[0-9]+\\.[0-9]+$"))) {
+ if(s.tqcontains(TQRegExp("^[0-9]+\\.[0-9]+$"))) {
int d, m;
sscanf(s.ascii(), "%d.%d", &d, &m);
ret.type = 1;
@@ -245,7 +245,7 @@ bool RuleSet::parseEntries(TQString s, int year,
s = "monday..sunday";
while(s.length()) {
- int pos = s.find(',');
+ int pos = s.tqfind(',');
TQString token;
if(pos == -1) {
token = s;
@@ -258,9 +258,9 @@ bool RuleSet::parseEntries(TQString s, int year,
// we've a token, now check if it defines a
// range
RULE r;
- if(token.contains("..")) {
+ if(token.tqcontains("..")) {
TQString left, right;
- left = token.left(token.find(".."));
+ left = token.left(token.tqfind(".."));
right = token.right(token.length()-2-left.length());
RULE lr, rr;
if(parseEntry(lr, left, year) && parseEntry(rr, right, year)) {
@@ -317,13 +317,13 @@ bool RuleSet::parseRate(double &costs, double &len, double &after, TQString s) {
bool RuleSet::parseLine(const TQString &s) {
- // ### use TQRegExp::cap() instead of mid() and find()
+ // ### use TQRegExp::cap() instead of mid() and tqfind()
// for our french friends -- Bernd
- if(s.contains(TQRegExp("flat_init_costs=\\(.*"))) {
+ if(s.tqcontains(TQRegExp("flat_init_costs=\\(.*"))) {
// parse the time fields
- TQString token = s.mid(s.find("flat_init_costs=(") + 17,
- s.find(")")-s.find("flat_init_costs=(") - 17);
+ TQString token = s.mid(s.tqfind("flat_init_costs=(") + 17,
+ s.tqfind(")")-s.tqfind("flat_init_costs=(") - 17);
// printf("TOKEN=%s\n",token.ascii());
double after;
@@ -342,17 +342,17 @@ bool RuleSet::parseLine(const TQString &s) {
}
- if(s.contains(TQRegExp("on\\(.*\\)between\\(.*\\)use\\(.*\\)"))) {
+ if(s.tqcontains(TQRegExp("on\\(.*\\)between\\(.*\\)use\\(.*\\)"))) {
// parse the time fields
- TQString token = s.mid(s.find("between(") + 8,
- s.find(")use")-s.find("between(") - 8);
+ TQString token = s.mid(s.tqfind("between(") + 8,
+ s.tqfind(")use")-s.tqfind("between(") - 8);
TQTime t1, t2;
if(!parseTime(t1, t2, token))
return FALSE;
// parse the rate fields
- token = s.mid(s.find("use(") + 4,
- s.findRev(")")-s.find("use(") - 4);
+ token = s.mid(s.tqfind("use(") + 4,
+ s.tqfindRev(")")-s.tqfind("use(") - 4);
double costs;
double len;
double after;
@@ -360,9 +360,9 @@ bool RuleSet::parseLine(const TQString &s) {
return FALSE;
// parse the days
- token = s.mid(s.find("on(") + 3,
- s.find(")betw")-s.find("on(") - 3);
- if(!parseEntries(token, TQDate::currentDate().year(),
+ token = s.mid(s.tqfind("on(") + 3,
+ s.tqfind(")betw")-s.tqfind("on(") - 3);
+ if(!parseEntries(token, TQDate::tqcurrentDate().year(),
t1, t2, costs, len, after))
return FALSE;
@@ -370,14 +370,14 @@ bool RuleSet::parseLine(const TQString &s) {
}
// check for the name
- if(s.contains(TQRegExp("name=.*"))) {
+ if(s.tqcontains(TQRegExp("name=.*"))) {
_name = s.right(s.length()-5);
return !_name.isEmpty();
}
// check default entry
- if(s.contains(TQRegExp("default=\\(.*\\)"))) {
+ if(s.tqcontains(TQRegExp("default=\\(.*\\)"))) {
TQString token = s.mid(9, s.length() - 10);
double after;
if(parseRate(default_costs, default_len, after, token))
@@ -385,7 +385,7 @@ bool RuleSet::parseLine(const TQString &s) {
}
// check for "minimum costs"
- if(s.contains(TQRegExp("minimum_costs=.*"))) {
+ if(s.tqcontains(TQRegExp("minimum_costs=.*"))) {
TQString token = s.right(s.length() - strlen("minimum_costs="));
bool ok;
_minimum_costs = token.toDouble(&ok);
@@ -398,7 +398,7 @@ bool RuleSet::parseLine(const TQString &s) {
return TRUE;
}
- if(s.contains(TQRegExp("currency_digits=.*"))) {
+ if(s.tqcontains(TQRegExp("currency_digits=.*"))) {
TQString token = s.mid(16, s.length() - 16);
bool ok;
_currency_digits = token.toInt(&ok);
@@ -406,11 +406,11 @@ bool RuleSet::parseLine(const TQString &s) {
}
// "currency_position" is deprecated so we'll simply ignore it
- if(s.contains(TQRegExp("currency_position=.*")))
+ if(s.tqcontains(TQRegExp("currency_position=.*")))
return TRUE;
// check per connection fee
- if(s.contains(TQRegExp("per_connection="))) {
+ if(s.tqcontains(TQRegExp("per_connection="))) {
TQString token = s.mid(15, s.length()-15);
bool ok;
pcf = token.toDouble(&ok);
diff --git a/kppp/runtests.cpp b/kppp/runtests.cpp
index a520d116..23f2196d 100644
--- a/kppp/runtests.cpp
+++ b/kppp/runtests.cpp
@@ -253,7 +253,7 @@ int runTests() {
i18n("You don't have sufficient permission to run\n"
"%1\n"
"Please make sure that kppp is owned by root "
- "and has the SUID bit set.").arg(f));
+ "and has the SUID bit set.").tqarg(f));
warning++;
}
}
@@ -265,7 +265,7 @@ int runTests() {
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);
+ "read and write permissions.").tqarg(file);
KMessageBox::error(0, msgstr);
warning ++;
}
diff --git a/kppp/scriptedit.cpp b/kppp/scriptedit.cpp
index afa88821..afc3818d 100644
--- a/kppp/scriptedit.cpp
+++ b/kppp/scriptedit.cpp
@@ -30,8 +30,8 @@
#include <tqcombobox.h>
#include <tqlineedit.h>
-ScriptEdit::ScriptEdit( TQWidget *parent, const char *name )
- : TQWidget(parent, name)
+ScriptEdit::ScriptEdit( TQWidget *tqparent, const char *name )
+ : TQWidget(tqparent, name)
{
TQHBoxLayout *tl = new TQHBoxLayout(this, 0, 10);
diff --git a/kppp/scriptedit.h b/kppp/scriptedit.h
index fd40100e..f94e717e 100644
--- a/kppp/scriptedit.h
+++ b/kppp/scriptedit.h
@@ -35,8 +35,9 @@ class TQLineEdit;
class ScriptEdit : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- ScriptEdit( TQWidget *parent=0, const char *name=0 );
+ ScriptEdit( TQWidget *tqparent=0, const char *name=0 );
~ScriptEdit() {}
TQString text()const;