author | tille <tille> | 2003-05-25 12:33:50 (UTC) |
---|---|---|
committer | tille <tille> | 2003-05-25 12:33:50 (UTC) |
commit | 675680dcb43767447d5b678eb6b7b3aee453cb1d (patch) (unidiff) | |
tree | 4f8af79474d0bb3876725018b21008c8b3d5242b /noncore/settings/networksettings/ppp/general.cpp | |
parent | f6d835c4846f48d33f0ba9e86707c4ec23544182 (diff) | |
download | opie-675680dcb43767447d5b678eb6b7b3aee453cb1d.zip opie-675680dcb43767447d5b678eb6b7b3aee453cb1d.tar.gz opie-675680dcb43767447d5b678eb6b7b3aee453cb1d.tar.bz2 |
knuminput gone too
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 | |||
@@ -23,17 +23,24 @@ | |||
23 | * License along with this program; if not, write to the Free | 23 | * License along with this program; if not, write to the Free |
24 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 24 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
25 | */ | 25 | */ |
26 | 26 | ||
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" |
36 | //#include "miniterm.h" | 43 | //#include "miniterm.h" |
37 | #include "modeminfo.h" | 44 | #include "modeminfo.h" |
38 | #include "modemcmds.h" | 45 | #include "modemcmds.h" |
39 | #include "devices.h" | 46 | #include "devices.h" |
@@ -47,12 +54,13 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name) | |||
47 | : QWidget(parent, name) | 54 | : QWidget(parent, name) |
48 | { | 55 | { |
49 | int k; | 56 | int k; |
50 | 57 | ||
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); |
55 | 63 | ||
56 | modemdevice = new QComboBox(false, this); | 64 | modemdevice = new QComboBox(false, this); |
57 | label1->setBuddy(modemdevice); | 65 | label1->setBuddy(modemdevice); |
58 | 66 | ||
@@ -71,17 +79,17 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name) | |||
71 | "should select one of the /dev/ttyIx devices."); | 79 | "should select one of the /dev/ttyIx devices."); |
72 | 80 | ||
73 | QWhatsThis::add(label1,tmp); | 81 | QWhatsThis::add(label1,tmp); |
74 | QWhatsThis::add(modemdevice,tmp); | 82 | QWhatsThis::add(modemdevice,tmp); |
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]")); |
84 | flowcontrol->insertItem(i18n("None")); | 92 | flowcontrol->insertItem(i18n("None")); |
85 | tl->addWidget(flowcontrol, 1, 1); | 93 | tl->addWidget(flowcontrol, 1, 1); |
86 | connect(flowcontrol, SIGNAL(activated(int)), | 94 | connect(flowcontrol, SIGNAL(activated(int)), |
87 | SLOT(setflowcontrol(int))); | 95 | SLOT(setflowcontrol(int))); |
@@ -89,16 +97,16 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name) | |||
89 | tmp = i18n("<p>Specifies how the serial port and modem\n" | 97 | tmp = i18n("<p>Specifies how the serial port and modem\n" |
90 | "communicate. You should not change this unless\n" | 98 | "communicate. You should not change this unless\n" |
91 | "you know what you are doing.\n" | 99 | "you know what you are doing.\n" |
92 | "\n" | 100 | "\n" |
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 | ||
101 | enter = new QComboBox(false, this); | 109 | enter = new QComboBox(false, this); |
102 | labelenter->setBuddy(enter); | 110 | labelenter->setBuddy(enter); |
103 | enter->insertItem("CR"); | 111 | enter->insertItem("CR"); |
104 | enter->insertItem("LF"); | 112 | enter->insertItem("LF"); |
@@ -113,13 +121,13 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name) | |||
113 | "\n" | 121 | "\n" |
114 | "<b>Default</b>: CR/LF"); | 122 | "<b>Default</b>: CR/LF"); |
115 | 123 | ||
116 | QWhatsThis::add(labelenter,tmp); | 124 | QWhatsThis::add(labelenter,tmp); |
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); |
122 | baud_label->setBuddy(baud_c); | 130 | baud_label->setBuddy(baud_c); |
123 | 131 | ||
124 | static const char *baudrates[] = { | 132 | static const char *baudrates[] = { |
125 | 133 | ||
@@ -187,20 +195,24 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name) | |||
187 | "Here you can select whether this locking will\n" | 195 | "Here you can select whether this locking will\n" |
188 | "be done.\n" | 196 | "be done.\n" |
189 | "\n" | 197 | "\n" |
190 | "<b>Default</b>: On")); | 198 | "<b>Default</b>: On")); |
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, |
203 | i18n("This specifies how long <i>kppp</i> waits for a\n" | 215 | i18n("This specifies how long <i>kppp</i> waits for a\n" |
204 | "<i>CONNECT</i> response from your modem. The\n" | 216 | "<i>CONNECT</i> response from your modem. The\n" |
205 | "recommended value is 30 seconds.")); | 217 | "recommended value is 30 seconds.")); |
206 | 218 | ||
@@ -275,18 +287,23 @@ ModemWidget2::ModemWidget2( QWidget *parent, const char *name) | |||
275 | "start to dial a number. If your modem does not\n" | 287 | "start to dial a number. If your modem does not\n" |
276 | "recognize this sound, or your local phone system\n" | 288 | "recognize this sound, or your local phone system\n" |
277 | "does not emit such a tone, uncheck this option\n" | 289 | "does not emit such a tone, uncheck this option\n" |
278 | "\n" | 290 | "\n" |
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, |
289 | i18n("Specifies the number of seconds to wait before\n" | 306 | i18n("Specifies the number of seconds to wait before\n" |
290 | "redial if all dialed numbers are busy. This is\n" | 307 | "redial if all dialed numbers are busy. This is\n" |
291 | "necessary because some modems get stuck if the\n" | 308 | "necessary because some modems get stuck if the\n" |
292 | "same number is busy too often.\n" | 309 | "same number is busy too often.\n" |