Diffstat (limited to 'noncore/settings/networksettings/ppp/general.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/general.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/noncore/settings/networksettings/ppp/general.cpp b/noncore/settings/networksettings/ppp/general.cpp index f803628..a02ee35 100644 --- a/noncore/settings/networksettings/ppp/general.cpp +++ b/noncore/settings/networksettings/ppp/general.cpp | |||
@@ -143,210 +143,210 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name) | |||
143 | "19200", | 143 | "19200", |
144 | "9600", | 144 | "9600", |
145 | "2400", | 145 | "2400", |
146 | 0}; | 146 | 0}; |
147 | 147 | ||
148 | for(k = 0; baudrates[k]; k++) | 148 | for(k = 0; baudrates[k]; k++) |
149 | baud_c->insertItem(baudrates[k]); | 149 | baud_c->insertItem(baudrates[k]); |
150 | 150 | ||
151 | baud_c->setCurrentItem(3); | 151 | baud_c->setCurrentItem(3); |
152 | connect(baud_c, SIGNAL(activated(int)), | 152 | connect(baud_c, SIGNAL(activated(int)), |
153 | this, SLOT(speed_selection(int))); | 153 | this, SLOT(speed_selection(int))); |
154 | tl->addWidget(baud_c, 3, 1); | 154 | tl->addWidget(baud_c, 3, 1); |
155 | 155 | ||
156 | tmp = i18n("Specifies the speed your modem and the serial\n" | 156 | tmp = i18n("Specifies the speed your modem and the serial\n" |
157 | "port talk to each other. You should begin with\n" | 157 | "port talk to each other. You should begin with\n" |
158 | "the default of 38400 bits/sec. If everything\n" | 158 | "the default of 38400 bits/sec. If everything\n" |
159 | "works you can try to increase this value, but to\n" | 159 | "works you can try to increase this value, but to\n" |
160 | "no more than 115200 bits/sec (unless you know\n" | 160 | "no more than 115200 bits/sec (unless you know\n" |
161 | "that your serial port supports higher speeds)."); | 161 | "that your serial port supports higher speeds)."); |
162 | 162 | ||
163 | QWhatsThis::add(baud_label,tmp); | 163 | QWhatsThis::add(baud_label,tmp); |
164 | QWhatsThis::add(baud_c,tmp); | 164 | QWhatsThis::add(baud_c,tmp); |
165 | 165 | ||
166 | for(int i=0; i <= enter->count()-1; i++) { | 166 | for(int i=0; i <= enter->count()-1; i++) { |
167 | if(gpppdata.enter() == enter->text(i)) | 167 | if(PPPData::data()->enter() == enter->text(i)) |
168 | enter->setCurrentItem(i); | 168 | enter->setCurrentItem(i); |
169 | } | 169 | } |
170 | 170 | ||
171 | tl->addRowSpacing(4, 10); | 171 | tl->addRowSpacing(4, 10); |
172 | 172 | ||
173 | //Modem Lock File | 173 | //Modem Lock File |
174 | modemlockfile = new QCheckBox(i18n("&Use lock file"), this); | 174 | modemlockfile = new QCheckBox(i18n("&Use lock file"), this); |
175 | 175 | ||
176 | modemlockfile->setChecked(gpppdata.modemLockFile()); | 176 | modemlockfile->setChecked(PPPData::data()->modemLockFile()); |
177 | connect(modemlockfile, SIGNAL(toggled(bool)), | 177 | connect(modemlockfile, SIGNAL(toggled(bool)), |
178 | SLOT(modemlockfilechanged(bool))); | 178 | SLOT(modemlockfilechanged(bool))); |
179 | tl->addMultiCellWidget(modemlockfile, 5, 5, 0, 1); | 179 | tl->addMultiCellWidget(modemlockfile, 5, 5, 0, 1); |
180 | // l12->addStretch(1); | 180 | // l12->addStretch(1); |
181 | QWhatsThis::add(modemlockfile, | 181 | QWhatsThis::add(modemlockfile, |
182 | i18n("<p>To prevent other programs from accessing the\n" | 182 | i18n("<p>To prevent other programs from accessing the\n" |
183 | "modem while a connection is established, a\n" | 183 | "modem while a connection is established, a\n" |
184 | "file can be created to indicate that the modem\n" | 184 | "file can be created to indicate that the modem\n" |
185 | "is in use. On Linux an example file would be\n" | 185 | "is in use. On Linux an example file would be\n" |
186 | "<tt>/var/lock/LCK..ttyS1</tt>\n" | 186 | "<tt>/var/lock/LCK..ttyS1</tt>\n" |
187 | "Here you can select whether this locking will\n" | 187 | "Here you can select whether this locking will\n" |
188 | "be done.\n" | 188 | "be done.\n" |
189 | "\n" | 189 | "\n" |
190 | "<b>Default</b>: On")); | 190 | "<b>Default</b>: On")); |
191 | 191 | ||
192 | // Modem Timeout Line Edit Box | 192 | // Modem Timeout Line Edit Box |
193 | 193 | ||
194 | modemtimeout = new KIntNumInput(gpppdata.modemTimeout(), this); | 194 | modemtimeout = new KIntNumInput(PPPData::data()->modemTimeout(), this); |
195 | modemtimeout->setLabel(i18n("Modem &timeout:")); | 195 | modemtimeout->setLabel(i18n("Modem &timeout:")); |
196 | modemtimeout->setRange(1, 120, 1); | 196 | modemtimeout->setRange(1, 120, 1); |
197 | modemtimeout->setSuffix(i18n(" sec")); | 197 | modemtimeout->setSuffix(i18n(" sec")); |
198 | connect(modemtimeout, SIGNAL(valueChanged(int)), | 198 | connect(modemtimeout, SIGNAL(valueChanged(int)), |
199 | SLOT(modemtimeoutchanged(int))); | 199 | SLOT(modemtimeoutchanged(int))); |
200 | tl->addMultiCellWidget(modemtimeout, 6, 6, 0, 1); | 200 | tl->addMultiCellWidget(modemtimeout, 6, 6, 0, 1); |
201 | 201 | ||
202 | QWhatsThis::add(modemtimeout, | 202 | QWhatsThis::add(modemtimeout, |
203 | i18n("This specifies how long <i>kppp</i> waits for a\n" | 203 | i18n("This specifies how long <i>kppp</i> waits for a\n" |
204 | "<i>CONNECT</i> response from your modem. The\n" | 204 | "<i>CONNECT</i> response from your modem. The\n" |
205 | "recommended value is 30 seconds.")); | 205 | "recommended value is 30 seconds.")); |
206 | 206 | ||
207 | //set stuff from gpppdata | 207 | //set stuff from gpppdata |
208 | for(int i=0; i <= enter->count()-1; i++) { | 208 | for(int i=0; i <= enter->count()-1; i++) { |
209 | if(gpppdata.enter() == enter->text(i)) | 209 | if(PPPData::data()->enter() == enter->text(i)) |
210 | enter->setCurrentItem(i); | 210 | enter->setCurrentItem(i); |
211 | } | 211 | } |
212 | 212 | ||
213 | for(int i=0; i <= modemdevice->count()-1; i++) { | 213 | for(int i=0; i <= modemdevice->count()-1; i++) { |
214 | if(gpppdata.modemDevice() == modemdevice->text(i)) | 214 | if(PPPData::data()->modemDevice() == modemdevice->text(i)) |
215 | modemdevice->setCurrentItem(i); | 215 | modemdevice->setCurrentItem(i); |
216 | } | 216 | } |
217 | 217 | ||
218 | for(int i=0; i <= flowcontrol->count()-1; i++) { | 218 | for(int i=0; i <= flowcontrol->count()-1; i++) { |
219 | if(gpppdata.flowcontrol() == flowcontrol->text(i)) | 219 | if(PPPData::data()->flowcontrol() == flowcontrol->text(i)) |
220 | flowcontrol->setCurrentItem(i); | 220 | flowcontrol->setCurrentItem(i); |
221 | } | 221 | } |
222 | 222 | ||
223 | //set the modem speed | 223 | //set the modem speed |
224 | for(int i=0; i < baud_c->count(); i++) | 224 | for(int i=0; i < baud_c->count(); i++) |
225 | if(baud_c->text(i) == gpppdata.speed()) | 225 | if(baud_c->text(i) == PPPData::data()->speed()) |
226 | baud_c->setCurrentItem(i); | 226 | baud_c->setCurrentItem(i); |
227 | 227 | ||
228 | tl->setRowStretch(7, 1); | 228 | tl->setRowStretch(7, 1); |
229 | } | 229 | } |
230 | 230 | ||
231 | 231 | ||
232 | void ModemWidget::speed_selection(int) { | 232 | void ModemWidget::speed_selection(int) { |
233 | gpppdata.setSpeed(baud_c->text(baud_c->currentItem())); | 233 | PPPData::data()->setSpeed(baud_c->text(baud_c->currentItem())); |
234 | } | 234 | } |
235 | 235 | ||
236 | 236 | ||
237 | void ModemWidget::setenter(int ) { | 237 | void ModemWidget::setenter(int ) { |
238 | gpppdata.setEnter(enter->text(enter->currentItem())); | 238 | PPPData::data()->setEnter(enter->text(enter->currentItem())); |
239 | } | 239 | } |
240 | 240 | ||
241 | 241 | ||
242 | void ModemWidget::setmodemdc(int i) { | 242 | void ModemWidget::setmodemdc(int i) { |
243 | gpppdata.setModemDevice(modemdevice->text(i)); | 243 | PPPData::data()->setModemDevice(modemdevice->text(i)); |
244 | } | 244 | } |
245 | 245 | ||
246 | 246 | ||
247 | void ModemWidget::setflowcontrol(int i) { | 247 | void ModemWidget::setflowcontrol(int i) { |
248 | gpppdata.setFlowcontrol(flowcontrol->text(i)); | 248 | PPPData::data()->setFlowcontrol(flowcontrol->text(i)); |
249 | } | 249 | } |
250 | 250 | ||
251 | 251 | ||
252 | void ModemWidget::modemlockfilechanged(bool set) { | 252 | void ModemWidget::modemlockfilechanged(bool set) { |
253 | gpppdata.setModemLockFile(set); | 253 | PPPData::data()->setModemLockFile(set); |
254 | } | 254 | } |
255 | 255 | ||
256 | 256 | ||
257 | void ModemWidget::modemtimeoutchanged(int n) { | 257 | void ModemWidget::modemtimeoutchanged(int n) { |
258 | gpppdata.setModemTimeout(n); | 258 | PPPData::data()->setModemTimeout(n); |
259 | } | 259 | } |
260 | 260 | ||
261 | 261 | ||
262 | ModemWidget2::ModemWidget2( QWidget *parent, const char *name) | 262 | ModemWidget2::ModemWidget2( QWidget *parent, const char *name) |
263 | : QWidget(parent, name) | 263 | : QWidget(parent, name) |
264 | { | 264 | { |
265 | QVBoxLayout *l1 = new QVBoxLayout(this, 0 );//, KDialog::spacingHint()); | 265 | QVBoxLayout *l1 = new QVBoxLayout(this, 0 );//, KDialog::spacingHint()); |
266 | 266 | ||
267 | 267 | ||
268 | waitfordt = new QCheckBox(i18n("&Wait for dial tone before dialing"), this); | 268 | waitfordt = new QCheckBox(i18n("&Wait for dial tone before dialing"), this); |
269 | waitfordt->setChecked(gpppdata.waitForDialTone()); | 269 | waitfordt->setChecked(PPPData::data()->waitForDialTone()); |
270 | connect(waitfordt, SIGNAL(toggled(bool)), SLOT(waitfordtchanged(bool))); | 270 | connect(waitfordt, SIGNAL(toggled(bool)), SLOT(waitfordtchanged(bool))); |
271 | l1->addWidget(waitfordt); | 271 | l1->addWidget(waitfordt); |
272 | QWhatsThis::add(waitfordt, | 272 | QWhatsThis::add(waitfordt, |
273 | i18n("<p>Normally the modem waits for a dial tone\n" | 273 | i18n("<p>Normally the modem waits for a dial tone\n" |
274 | "from your phone line, indicating that it can\n" | 274 | "from your phone line, indicating that it can\n" |
275 | "start to dial a number. If your modem does not\n" | 275 | "start to dial a number. If your modem does not\n" |
276 | "recognize this sound, or your local phone system\n" | 276 | "recognize this sound, or your local phone system\n" |
277 | "does not emit such a tone, uncheck this option\n" | 277 | "does not emit such a tone, uncheck this option\n" |
278 | "\n" | 278 | "\n" |
279 | "<b>Default:</b>: On")); | 279 | "<b>Default:</b>: On")); |
280 | 280 | ||
281 | busywait = new KIntNumInput(gpppdata.busyWait(), this); | 281 | busywait = new KIntNumInput(PPPData::data()->busyWait(), this); |
282 | busywait->setLabel(i18n("B&usy wait:")); | 282 | busywait->setLabel(i18n("B&usy wait:")); |
283 | busywait->setRange(0, 300, 5, true); | 283 | busywait->setRange(0, 300, 5, true); |
284 | busywait->setSuffix(i18n(" sec")); | 284 | busywait->setSuffix(i18n(" sec")); |
285 | connect(busywait, SIGNAL(valueChanged(int)), SLOT(busywaitchanged(int))); | 285 | connect(busywait, SIGNAL(valueChanged(int)), SLOT(busywaitchanged(int))); |
286 | l1->addWidget(busywait); | 286 | l1->addWidget(busywait); |
287 | 287 | ||
288 | QWhatsThis::add(busywait, | 288 | QWhatsThis::add(busywait, |
289 | i18n("Specifies the number of seconds to wait before\n" | 289 | i18n("Specifies the number of seconds to wait before\n" |
290 | "redial if all dialed numbers are busy. This is\n" | 290 | "redial if all dialed numbers are busy. This is\n" |
291 | "necessary because some modems get stuck if the\n" | 291 | "necessary because some modems get stuck if the\n" |
292 | "same number is busy too often.\n" | 292 | "same number is busy too often.\n" |
293 | "\n" | 293 | "\n" |
294 | "The default is 0 seconds, you should not change\n" | 294 | "The default is 0 seconds, you should not change\n" |
295 | "this unless you need to.")); | 295 | "this unless you need to.")); |
296 | 296 | ||
297 | l1->addSpacing(10); | 297 | l1->addSpacing(10); |
298 | 298 | ||
299 | QHBoxLayout *hbl = new QHBoxLayout; | 299 | QHBoxLayout *hbl = new QHBoxLayout; |
300 | hbl->setSpacing(2);//KDialog::spacingHint()); | 300 | hbl->setSpacing(2);//KDialog::spacingHint()); |
301 | 301 | ||
302 | QLabel *volumeLabel = new QLabel(i18n("Modem &volume:"), this); | 302 | QLabel *volumeLabel = new QLabel(i18n("Modem &volume:"), this); |
303 | hbl->addWidget(volumeLabel); | 303 | hbl->addWidget(volumeLabel); |
304 | volume = new QSlider(0, 2, 1, gpppdata.volume(), QSlider::Horizontal, this); | 304 | volume = new QSlider(0, 2, 1, PPPData::data()->volume(), QSlider::Horizontal, this); |
305 | volumeLabel->setBuddy(volume); | 305 | volumeLabel->setBuddy(volume); |
306 | volume->setTickmarks(QSlider::Below); | 306 | volume->setTickmarks(QSlider::Below); |
307 | hbl->addWidget(volume); | 307 | hbl->addWidget(volume); |
308 | 308 | ||
309 | l1->addLayout(hbl); | 309 | l1->addLayout(hbl); |
310 | 310 | ||
311 | connect(volume, SIGNAL(valueChanged(int)), | 311 | connect(volume, SIGNAL(valueChanged(int)), |
312 | this, SLOT(volumeChanged(int))); | 312 | this, SLOT(volumeChanged(int))); |
313 | QString tmp = i18n("Most modems have a speaker which makes\n" | 313 | QString tmp = i18n("Most modems have a speaker which makes\n" |
314 | "a lot of noise when dialing. Here you can\n" | 314 | "a lot of noise when dialing. Here you can\n" |
315 | "either turn this completely off or select a\n" | 315 | "either turn this completely off or select a\n" |
316 | "lower volume.\n" | 316 | "lower volume.\n" |
317 | "\n" | 317 | "\n" |
318 | "If this does not work for your modem,\n" | 318 | "If this does not work for your modem,\n" |
319 | "you must modify the modem volume command."); | 319 | "you must modify the modem volume command."); |
320 | 320 | ||
321 | QWhatsThis::add(volumeLabel,tmp); | 321 | QWhatsThis::add(volumeLabel,tmp); |
322 | QWhatsThis::add(volume, tmp); | 322 | QWhatsThis::add(volume, tmp); |
323 | 323 | ||
324 | l1->addSpacing(20); | 324 | l1->addSpacing(20); |
325 | 325 | ||
326 | #if 0 | 326 | #if 0 |
327 | chkbox1 = new QCheckBox(i18n("Modem asserts CD line"), this); | 327 | chkbox1 = new QCheckBox(i18n("Modem asserts CD line"), this); |
328 | chkbox1->setChecked(gpppdata.UseCDLine()); | 328 | chkbox1->setChecked(PPPData::data()->UseCDLine()); |
329 | connect(chkbox1,SIGNAL(toggled(bool)), | 329 | connect(chkbox1,SIGNAL(toggled(bool)), |
330 | this,SLOT(use_cdline_toggled(bool))); | 330 | this,SLOT(use_cdline_toggled(bool))); |
331 | l12->addWidget(chkbox1); | 331 | l12->addWidget(chkbox1); |
332 | l12->addStretch(1); | 332 | l12->addStretch(1); |
333 | l1->addStretch(1); | 333 | l1->addStretch(1); |
334 | QWhatsThis::add(chkbox1, | 334 | QWhatsThis::add(chkbox1, |
335 | i18n("This controls how <i>kppp</i> detects that the modem\n" | 335 | i18n("This controls how <i>kppp</i> detects that the modem\n" |
336 | "is not responding. Unless you are having\n" | 336 | "is not responding. Unless you are having\n" |
337 | "problems with this, do not modify this setting.\n" | 337 | "problems with this, do not modify this setting.\n" |
338 | "\n" | 338 | "\n" |
339 | "<b>Default</b>: Off")); | 339 | "<b>Default</b>: Off")); |
340 | #endif | 340 | #endif |
341 | 341 | ||
342 | modemcmds = new QPushButton(i18n("Mod&em Commands..."), this); | 342 | modemcmds = new QPushButton(i18n("Mod&em Commands..."), this); |
343 | QWhatsThis::add(modemcmds, | 343 | QWhatsThis::add(modemcmds, |
344 | i18n("Allows you to change the AT command for\n" | 344 | i18n("Allows you to change the AT command for\n" |
345 | "your modem.")); | 345 | "your modem.")); |
346 | 346 | ||
347 | modeminfo_button = new QPushButton(i18n("&Query Modem..."), this); | 347 | modeminfo_button = new QPushButton(i18n("&Query Modem..."), this); |
348 | QWhatsThis::add(modeminfo_button, | 348 | QWhatsThis::add(modeminfo_button, |
349 | i18n("Most modems support the ATI command set to\n" | 349 | i18n("Most modems support the ATI command set to\n" |
350 | "find out vendor and revision of your modem.\n" | 350 | "find out vendor and revision of your modem.\n" |
351 | "\n" | 351 | "\n" |
352 | "Press this button to query your modem for\n" | 352 | "Press this button to query your modem for\n" |
@@ -381,41 +381,41 @@ ModemWidget2::ModemWidget2( QWidget *parent, const char *name) | |||
381 | } | 381 | } |
382 | 382 | ||
383 | 383 | ||
384 | void ModemWidget2::modemcmdsbutton() { | 384 | void ModemWidget2::modemcmdsbutton() { |
385 | ModemCommands mc(this); | 385 | ModemCommands mc(this); |
386 | mc.showMaximized(); | 386 | mc.showMaximized(); |
387 | mc.exec(); | 387 | mc.exec(); |
388 | } | 388 | } |
389 | 389 | ||
390 | 390 | ||
391 | void ModemWidget2::query_modem() { | 391 | void ModemWidget2::query_modem() { |
392 | ModemTransfer mt(this); | 392 | ModemTransfer mt(this); |
393 | mt.exec(); | 393 | mt.exec(); |
394 | } | 394 | } |
395 | 395 | ||
396 | 396 | ||
397 | // void ModemWidget2::terminal() { | 397 | // void ModemWidget2::terminal() { |
398 | // MiniTerm terminal(NULL,NULL); | 398 | // MiniTerm terminal(NULL,NULL); |
399 | // terminal.exec(); | 399 | // terminal.exec(); |
400 | // } | 400 | // } |
401 | 401 | ||
402 | 402 | ||
403 | #if 0 | 403 | #if 0 |
404 | void ModemWidget2::use_cdline_toggled(bool on) { | 404 | void ModemWidget2::use_cdline_toggled(bool on) { |
405 | gpppdata.setUseCDLine(on); | 405 | PPPData::data()->setUseCDLine(on); |
406 | } | 406 | } |
407 | #endif | 407 | #endif |
408 | 408 | ||
409 | void ModemWidget2::waitfordtchanged(bool b) { | 409 | void ModemWidget2::waitfordtchanged(bool b) { |
410 | gpppdata.setWaitForDialTone((int)b); | 410 | PPPData::data()->setWaitForDialTone((int)b); |
411 | } | 411 | } |
412 | 412 | ||
413 | void ModemWidget2::busywaitchanged(int n) { | 413 | void ModemWidget2::busywaitchanged(int n) { |
414 | gpppdata.setbusyWait(n); | 414 | PPPData::data()->setbusyWait(n); |
415 | } | 415 | } |
416 | 416 | ||
417 | 417 | ||
418 | void ModemWidget2::volumeChanged(int v) { | 418 | void ModemWidget2::volumeChanged(int v) { |
419 | gpppdata.setVolume(v); | 419 | PPPData::data()->setVolume(v); |
420 | } | 420 | } |
421 | 421 | ||