diff options
Diffstat (limited to 'kppp/modems.cpp')
-rw-r--r-- | kppp/modems.cpp | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/kppp/modems.cpp b/kppp/modems.cpp index f6970cc1..379b3c96 100644 --- a/kppp/modems.cpp +++ b/kppp/modems.cpp @@ -25,12 +25,12 @@ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qdir.h> +#include <tqdir.h> #include <stdlib.h> -#include <qlayout.h> -#include <qtabdialog.h> -#include <qwhatsthis.h> -#include <qmessagebox.h> +#include <tqlayout.h> +#include <tqtabdialog.h> +#include <tqwhatsthis.h> +#include <tqmessagebox.h> #include <kapplication.h> #include <kbuttonbox.h> @@ -39,7 +39,7 @@ #include <kglobal.h> #include <kwin.h> #include <kdialogbase.h> -#include <qvgroupbox.h> +#include <tqvgroupbox.h> #include "general.h" #include "pppdata.h" @@ -50,29 +50,29 @@ void parseargs(char* buf, char** args); -ModemsWidget::ModemsWidget( QWidget *parent, const char *name ) - : QWidget( parent, name ) +ModemsWidget::ModemsWidget( TQWidget *parent, const char *name ) + : TQWidget( parent, name ) { int min = 0; - QVBoxLayout *l1 = new QVBoxLayout(parent, 10, 10); + TQVBoxLayout *l1 = new TQVBoxLayout(parent, 10, 10); // add a hbox - QHBoxLayout *l11 = new QHBoxLayout; + TQHBoxLayout *l11 = new QHBoxLayout; l1->addLayout(l11); - modemlist_l = new QListBox(parent); + modemlist_l = new TQListBox(parent); modemlist_l->setMinimumSize(160, 128); - connect(modemlist_l, SIGNAL(highlighted(int)), - this, SLOT(slotListBoxSelect(int))); - connect(modemlist_l, SIGNAL(selected(int)), - this, SLOT(editmodem())); + connect(modemlist_l, TQT_SIGNAL(highlighted(int)), + this, TQT_SLOT(slotListBoxSelect(int))); + connect(modemlist_l, TQT_SIGNAL(selected(int)), + this, TQT_SLOT(editmodem())); l11->addWidget(modemlist_l, 10); - QVBoxLayout *l111 = new QVBoxLayout; + TQVBoxLayout *l111 = new QVBoxLayout; l11->addLayout(l111, 1); - edit_b = new QPushButton(i18n("&Edit..."), parent); - connect(edit_b, SIGNAL(clicked()), SLOT(editmodem())); - QWhatsThis::add(edit_b, i18n("Allows you to modify the selected account")); + edit_b = new TQPushButton(i18n("&Edit..."), parent); + connect(edit_b, TQT_SIGNAL(clicked()), TQT_SLOT(editmodem())); + TQWhatsThis::add(edit_b, i18n("Allows you to modify the selected account")); min = edit_b->sizeHint().width(); min = QMAX(70,min); @@ -80,32 +80,32 @@ ModemsWidget::ModemsWidget( QWidget *parent, const char *name ) l111->addWidget(edit_b); - new_b = new QPushButton(i18n("&New..."), parent); - connect(new_b, SIGNAL(clicked()), SLOT(newmodem())); + new_b = new TQPushButton(i18n("&New..."), parent); + connect(new_b, TQT_SIGNAL(clicked()), TQT_SLOT(newmodem())); l111->addWidget(new_b); - QWhatsThis::add(new_b, i18n("Create a new dialup connection\n" + TQWhatsThis::add(new_b, i18n("Create a new dialup connection\n" "to the Internet")); - copy_b = new QPushButton(i18n("Co&py"), parent); - connect(copy_b, SIGNAL(clicked()), SLOT(copymodem())); + copy_b = new TQPushButton(i18n("Co&py"), parent); + connect(copy_b, TQT_SIGNAL(clicked()), TQT_SLOT(copymodem())); l111->addWidget(copy_b); - QWhatsThis::add(copy_b, + TQWhatsThis::add(copy_b, i18n("Makes a copy of the selected account. All\n" "settings of the selected account are copied\n" "to a new account that you can modify to fit your\n" "needs")); - delete_b = new QPushButton(i18n("De&lete"), parent); - connect(delete_b, SIGNAL(clicked()), SLOT(deletemodem())); + delete_b = new TQPushButton(i18n("De&lete"), parent); + connect(delete_b, TQT_SIGNAL(clicked()), TQT_SLOT(deletemodem())); l111->addWidget(delete_b); - QWhatsThis::add(delete_b, + TQWhatsThis::add(delete_b, i18n("<p>Deletes the selected account\n\n" "<font color=\"red\"><b>Use with care!</b></font>")); //load up account list from gppdata to the list box // but keep the current one selected in gpppdata if(gpppdata.modemCount() > 0) { - const QString currentmodem = gpppdata.modname(); + const TQString currentmodem = gpppdata.modname(); for(int i=0; i <= gpppdata.modemCount()-1; i++) { gpppdata.setModemByIndex(i); modemlist_l->insertItem(gpppdata.modname()); @@ -125,7 +125,7 @@ void ModemsWidget::slotListBoxSelect(int idx) { edit_b->setEnabled((bool)(idx != -1)); copy_b->setEnabled((bool)(idx != -1)); if(idx!=-1) { - QString modem = gpppdata.modname(); + TQString modem = gpppdata.modname(); gpppdata.setModemByIndex(modemlist_l->currentItem()); gpppdata.setModem(modem); } @@ -136,7 +136,7 @@ void ModemsWidget::editmodem() { int result = doTab(); - if(result == QDialog::Accepted) { + if(result == TQDialog::Accepted) { modemlist_l->changeItem(gpppdata.modname(),modemlist_l->currentItem()); emit resetmodems(); gpppdata.save(); @@ -157,7 +157,7 @@ void ModemsWidget::newmodem() { result = doTab(); - if(result == QDialog::Accepted) { + if(result == TQDialog::Accepted) { modemlist_l->insertItem(gpppdata.modname()); modemlist_l->setSelected(modemlist_l->findItem(gpppdata.modname()), true); @@ -189,7 +189,7 @@ void ModemsWidget::copymodem() { void ModemsWidget::deletemodem() { - QString s = i18n("Are you sure you want to delete\nthe modem \"%1\"?") + TQString s = i18n("Are you sure you want to delete\nthe modem \"%1\"?") .arg(modemlist_l->text(modemlist_l->currentItem())); if(KMessageBox::warningContinueCancel(this, s, i18n("Confirm"), KStdGuiItem::del()) != KMessageBox::Continue) @@ -207,7 +207,7 @@ void ModemsWidget::deletemodem() { int ModemsWidget::doTab(){ - tabWindow = new KDialogBase( KDialogBase::Tabbed, QString::null, + tabWindow = new KDialogBase( KDialogBase::Tabbed, TQString::null, KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, 0, 0, true); KWin::setIcons(tabWindow->winId(), kapp->icon(), kapp->miniIcon()); @@ -217,14 +217,14 @@ int ModemsWidget::doTab(){ tabWindow->setCaption(i18n("New Modem")); isnewmodem = true; } else { - QString tit = i18n("Edit Modem: "); + TQString tit = i18n("Edit Modem: "); tit += gpppdata.modname(); tabWindow->setCaption(tit); isnewmodem = false; } modem1 = new ModemWidget(tabWindow->addPage( i18n("&Device"), i18n("Serial Device")), isnewmodem ); modem2 = new ModemWidget2(tabWindow->addPage( i18n("&Modem"), i18n("Modem Settings"))); - connect ( modem1->connectName(), SIGNAL(textChanged ( const QString & )), this, SLOT(modemNameChanged(const QString & ))); + connect ( modem1->connectName(), TQT_SIGNAL(textChanged ( const TQString & )), this, TQT_SLOT(modemNameChanged(const TQString & ))); modemNameChanged(modem1->connectName()->text()); int result = 0; @@ -234,7 +234,7 @@ int ModemsWidget::doTab(){ result = tabWindow->exec(); ok = true; - if(result == QDialog::Accepted) { + if(result == TQDialog::Accepted) { if(modem1->save()) { modem2->save(); } else { @@ -249,15 +249,15 @@ int ModemsWidget::doTab(){ return result; } -void ModemsWidget::modemNameChanged(const QString & text) +void ModemsWidget::modemNameChanged(const TQString & text) { tabWindow->enableButtonOK( !text.isEmpty() ); } -QString ModemsWidget::prettyPrintVolume(unsigned int n) { +TQString ModemsWidget::prettyPrintVolume(unsigned int n) { int idx = 0; - const QString quant[] = {i18n("Byte"), i18n("KB"), - i18n("MB"), i18n("GB"), QString::null}; + const TQString quant[] = {i18n("Byte"), i18n("KB"), + i18n("MB"), i18n("GB"), TQString::null}; float n1 = n; while(n >= 1024 && !quant[idx].isNull()) { @@ -269,7 +269,7 @@ QString ModemsWidget::prettyPrintVolume(unsigned int n) { while(i--) n1 = n1 / 1024.0; - QString s = KGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 ); + TQString s = KGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 ); s += " " + quant[idx]; return s; } |