diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
commit | 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch) | |
tree | 073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kppp/kpppwidget.cpp | |
parent | 3467e6464beac3a162839bf7078e22e3a74d73e7 (diff) | |
download | tdenetwork-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/kpppwidget.cpp')
-rw-r--r-- | kppp/kpppwidget.cpp | 82 |
1 files changed, 41 insertions, 41 deletions
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(); } } |