Diffstat (limited to 'noncore/settings/networksettings/ppp/general.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/general.cpp | 53 |
1 files changed, 35 insertions, 18 deletions
diff --git a/noncore/settings/networksettings/ppp/general.cpp b/noncore/settings/networksettings/ppp/general.cpp index a02ee35..98e035b 100644 --- a/noncore/settings/networksettings/ppp/general.cpp +++ b/noncore/settings/networksettings/ppp/general.cpp @@ -23,17 +23,24 @@ * License along with this program; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <termios.h> #include <string.h> -#include <qwhatsthis.h> -#include "knuminput.h" -#include <qslider.h> +#include <qcheckbox.h> +#include <qcombobox.h> +#include <qlabel.h> #include <qlayout.h> +#include <qpushbutton.h> +#include <qslider.h> +#include <qspinbox.h> +#include <qwhatsthis.h> + +// #include <qgroupbox.h> + #include "general.h" //#include "version.h" //#include "miniterm.h" #include "modeminfo.h" #include "modemcmds.h" #include "devices.h" @@ -47,12 +54,13 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name) : QWidget(parent, name) { int k; QGridLayout *tl = new QGridLayout(this, 8, 2, 0 );//, KDialog::spacingHint()); + QLabel *label1; label1 = new QLabel(i18n("Modem de&vice:"), this); tl->addWidget(label1, 0, 0); modemdevice = new QComboBox(false, this); label1->setBuddy(modemdevice); @@ -71,17 +79,17 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name) "should select one of the /dev/ttyIx devices."); QWhatsThis::add(label1,tmp); QWhatsThis::add(modemdevice,tmp); - label2 = new QLabel(i18n("&Flow control:"), this); - tl->addWidget(label2, 1, 0); + label1 = new QLabel(i18n("&Flow control:"), this); + tl->addWidget(label1, 1, 0); flowcontrol = new QComboBox(false, this); - label2->setBuddy(flowcontrol); + label1->setBuddy(flowcontrol); flowcontrol->insertItem(i18n("Hardware [CRTSCTS]")); flowcontrol->insertItem(i18n("Software [XON/XOFF]")); flowcontrol->insertItem(i18n("None")); tl->addWidget(flowcontrol, 1, 1); connect(flowcontrol, SIGNAL(activated(int)), SLOT(setflowcontrol(int))); @@ -89,16 +97,16 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name) tmp = i18n("<p>Specifies how the serial port and modem\n" "communicate. You should not change this unless\n" "you know what you are doing.\n" "\n" "<b>Default</b>: CRTSCTS"); - QWhatsThis::add(label2,tmp); + QWhatsThis::add(label1,tmp); QWhatsThis::add(flowcontrol,tmp); - labelenter = new QLabel(i18n("&Line termination:"), this); + QLabel *labelenter = new QLabel(i18n("&Line termination:"), this); tl->addWidget(labelenter, 2, 0); enter = new QComboBox(false, this); labelenter->setBuddy(enter); enter->insertItem("CR"); enter->insertItem("LF"); @@ -113,13 +121,13 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name) "\n" "<b>Default</b>: CR/LF"); QWhatsThis::add(labelenter,tmp); QWhatsThis::add(enter, tmp); - baud_label = new QLabel(i18n("Co&nnection speed:"), this); + QLabel *baud_label = new QLabel(i18n("Co&nnection speed:"), this); tl->addWidget(baud_label, 3, 0); baud_c = new QComboBox(this); baud_label->setBuddy(baud_c); static const char *baudrates[] = { @@ -187,20 +195,24 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name) "Here you can select whether this locking will\n" "be done.\n" "\n" "<b>Default</b>: On")); // Modem Timeout Line Edit Box - - modemtimeout = new KIntNumInput(PPPData::data()->modemTimeout(), this); - modemtimeout->setLabel(i18n("Modem &timeout:")); - modemtimeout->setRange(1, 120, 1); + QHBoxLayout *timeoutLayout = new QHBoxLayout( this ); + QLabel *timeoutlabel = new QLabel( tr("Modem timeout:") ,this, "timeout" ); + modemtimeout = new QSpinBox( 1, 120, 1, this, "modemTimeout" ); +// modemtimeout = new KIntNumInput(PPPData::data()->modemTimeout(), this); +// modemtimeout->setLabel(i18n("Modem &timeout:")); +// modemtimeout->setRange(1, 120, 1); modemtimeout->setSuffix(i18n(" sec")); connect(modemtimeout, SIGNAL(valueChanged(int)), SLOT(modemtimeoutchanged(int))); - tl->addMultiCellWidget(modemtimeout, 6, 6, 0, 1); + timeoutLayout->addWidget(timeoutlabel); + timeoutLayout->addWidget(modemtimeout); + tl->addMultiCellLayout(timeoutLayout, 6, 6, 0, 1); QWhatsThis::add(modemtimeout, i18n("This specifies how long <i>kppp</i> waits for a\n" "<i>CONNECT</i> response from your modem. The\n" "recommended value is 30 seconds.")); @@ -275,18 +287,23 @@ ModemWidget2::ModemWidget2( QWidget *parent, const char *name) "start to dial a number. If your modem does not\n" "recognize this sound, or your local phone system\n" "does not emit such a tone, uncheck this option\n" "\n" "<b>Default:</b>: On")); - busywait = new KIntNumInput(PPPData::data()->busyWait(), this); - busywait->setLabel(i18n("B&usy wait:")); - busywait->setRange(0, 300, 5, true); + QHBoxLayout *waitLayout = new QHBoxLayout( this ); + QLabel *waitLabel = new QLabel( tr("Busy wait:"), this, "busyWait" ); + busywait = new QSpinBox( 0, 300, 5, this, "busyWait" ); +// busywait = new KIntNumInput(PPPData::data()->busyWait(), this); +// busywait->setLabel(i18n("B&usy wait:")); +// busywait->setRange(0, 300, 5, true); busywait->setSuffix(i18n(" sec")); connect(busywait, SIGNAL(valueChanged(int)), SLOT(busywaitchanged(int))); - l1->addWidget(busywait); + waitLayout->addWidget(waitLabel); + waitLayout->addWidget(busywait); + l1->addLayout( waitLayout ); QWhatsThis::add(busywait, i18n("Specifies the number of seconds to wait before\n" "redial if all dialed numbers are busy. This is\n" "necessary because some modems get stuck if the\n" "same number is busy too often.\n" |