Diffstat (limited to 'noncore/settings/networksettings/ppp/general.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/general.cpp | 55 |
1 files changed, 36 insertions, 19 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 | |||
@@ -27,9 +27,16 @@ | |||
27 | #include <termios.h> | 27 | #include <termios.h> |
28 | #include <string.h> | 28 | #include <string.h> |
29 | #include <qwhatsthis.h> | ||
30 | 29 | ||
31 | #include "knuminput.h" | 30 | #include <qcheckbox.h> |
32 | #include <qslider.h> | 31 | #include <qcombobox.h> |
32 | #include <qlabel.h> | ||
33 | #include <qlayout.h> | 33 | #include <qlayout.h> |
34 | #include <qpushbutton.h> | ||
35 | #include <qslider.h> | ||
36 | #include <qspinbox.h> | ||
37 | #include <qwhatsthis.h> | ||
38 | |||
39 | // #include <qgroupbox.h> | ||
40 | |||
34 | #include "general.h" | 41 | #include "general.h" |
35 | //#include "version.h" | 42 | //#include "version.h" |
@@ -51,4 +58,5 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name) | |||
51 | QGridLayout *tl = new QGridLayout(this, 8, 2, 0 );//, KDialog::spacingHint()); | 58 | QGridLayout *tl = new QGridLayout(this, 8, 2, 0 );//, KDialog::spacingHint()); |
52 | 59 | ||
60 | QLabel *label1; | ||
53 | label1 = new QLabel(i18n("Modem de&vice:"), this); | 61 | label1 = new QLabel(i18n("Modem de&vice:"), this); |
54 | tl->addWidget(label1, 0, 0); | 62 | tl->addWidget(label1, 0, 0); |
@@ -75,9 +83,9 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name) | |||
75 | 83 | ||
76 | 84 | ||
77 | label2 = new QLabel(i18n("&Flow control:"), this); | 85 | label1 = new QLabel(i18n("&Flow control:"), this); |
78 | tl->addWidget(label2, 1, 0); | 86 | tl->addWidget(label1, 1, 0); |
79 | 87 | ||
80 | flowcontrol = new QComboBox(false, this); | 88 | flowcontrol = new QComboBox(false, this); |
81 | label2->setBuddy(flowcontrol); | 89 | label1->setBuddy(flowcontrol); |
82 | flowcontrol->insertItem(i18n("Hardware [CRTSCTS]")); | 90 | flowcontrol->insertItem(i18n("Hardware [CRTSCTS]")); |
83 | flowcontrol->insertItem(i18n("Software [XON/XOFF]")); | 91 | flowcontrol->insertItem(i18n("Software [XON/XOFF]")); |
@@ -93,8 +101,8 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name) | |||
93 | "<b>Default</b>: CRTSCTS"); | 101 | "<b>Default</b>: CRTSCTS"); |
94 | 102 | ||
95 | QWhatsThis::add(label2,tmp); | 103 | QWhatsThis::add(label1,tmp); |
96 | QWhatsThis::add(flowcontrol,tmp); | 104 | QWhatsThis::add(flowcontrol,tmp); |
97 | 105 | ||
98 | labelenter = new QLabel(i18n("&Line termination:"), this); | 106 | QLabel *labelenter = new QLabel(i18n("&Line termination:"), this); |
99 | tl->addWidget(labelenter, 2, 0); | 107 | tl->addWidget(labelenter, 2, 0); |
100 | 108 | ||
@@ -117,5 +125,5 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name) | |||
117 | QWhatsThis::add(enter, tmp); | 125 | QWhatsThis::add(enter, tmp); |
118 | 126 | ||
119 | baud_label = new QLabel(i18n("Co&nnection speed:"), this); | 127 | QLabel *baud_label = new QLabel(i18n("Co&nnection speed:"), this); |
120 | tl->addWidget(baud_label, 3, 0); | 128 | tl->addWidget(baud_label, 3, 0); |
121 | baud_c = new QComboBox(this); | 129 | baud_c = new QComboBox(this); |
@@ -191,12 +199,16 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name) | |||
191 | 199 | ||
192 | // Modem Timeout Line Edit Box | 200 | // Modem Timeout Line Edit Box |
193 | 201 | QHBoxLayout *timeoutLayout = new QHBoxLayout( this ); | |
194 | modemtimeout = new KIntNumInput(PPPData::data()->modemTimeout(), this); | 202 | QLabel *timeoutlabel = new QLabel( tr("Modem timeout:") ,this, "timeout" ); |
195 | modemtimeout->setLabel(i18n("Modem &timeout:")); | 203 | modemtimeout = new QSpinBox( 1, 120, 1, this, "modemTimeout" ); |
196 | modemtimeout->setRange(1, 120, 1); | 204 | // modemtimeout = new KIntNumInput(PPPData::data()->modemTimeout(), this); |
205 | // modemtimeout->setLabel(i18n("Modem &timeout:")); | ||
206 | // modemtimeout->setRange(1, 120, 1); | ||
197 | modemtimeout->setSuffix(i18n(" sec")); | 207 | modemtimeout->setSuffix(i18n(" sec")); |
198 | connect(modemtimeout, SIGNAL(valueChanged(int)), | 208 | connect(modemtimeout, SIGNAL(valueChanged(int)), |
199 | SLOT(modemtimeoutchanged(int))); | 209 | SLOT(modemtimeoutchanged(int))); |
200 | tl->addMultiCellWidget(modemtimeout, 6, 6, 0, 1); | 210 | timeoutLayout->addWidget(timeoutlabel); |
211 | timeoutLayout->addWidget(modemtimeout); | ||
212 | tl->addMultiCellLayout(timeoutLayout, 6, 6, 0, 1); | ||
201 | 213 | ||
202 | QWhatsThis::add(modemtimeout, | 214 | QWhatsThis::add(modemtimeout, |
@@ -279,10 +291,15 @@ ModemWidget2::ModemWidget2( QWidget *parent, const char *name) | |||
279 | "<b>Default:</b>: On")); | 291 | "<b>Default:</b>: On")); |
280 | 292 | ||
281 | busywait = new KIntNumInput(PPPData::data()->busyWait(), this); | 293 | QHBoxLayout *waitLayout = new QHBoxLayout( this ); |
282 | busywait->setLabel(i18n("B&usy wait:")); | 294 | QLabel *waitLabel = new QLabel( tr("Busy wait:"), this, "busyWait" ); |
283 | busywait->setRange(0, 300, 5, true); | 295 | busywait = new QSpinBox( 0, 300, 5, this, "busyWait" ); |
284 | busywait->setSuffix(i18n(" sec")); | 296 | // busywait = new KIntNumInput(PPPData::data()->busyWait(), this); |
297 | // busywait->setLabel(i18n("B&usy wait:")); | ||
298 | // busywait->setRange(0, 300, 5, true); | ||
299 | busywait->setSuffix(i18n(" sec")); | ||
285 | connect(busywait, SIGNAL(valueChanged(int)), SLOT(busywaitchanged(int))); | 300 | connect(busywait, SIGNAL(valueChanged(int)), SLOT(busywaitchanged(int))); |
286 | l1->addWidget(busywait); | 301 | waitLayout->addWidget(waitLabel); |
302 | waitLayout->addWidget(busywait); | ||
303 | l1->addLayout( waitLayout ); | ||
287 | 304 | ||
288 | QWhatsThis::add(busywait, | 305 | QWhatsThis::add(busywait, |