diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
commit | 47c8a359c5276062c4bc17f0e82410f29081b502 (patch) | |
tree | 2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kppp/modems.cpp | |
parent | 6f82532777a35e0e60bbd2b290b2e93e646f349b (diff) | |
download | tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kppp/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; } |