summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/ppp/general.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings/ppp/general.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/general.cpp34
1 files changed, 32 insertions, 2 deletions
diff --git a/noncore/settings/networksettings/ppp/general.cpp b/noncore/settings/networksettings/ppp/general.cpp
index 40ba19b..5e2a04f 100644
--- a/noncore/settings/networksettings/ppp/general.cpp
+++ b/noncore/settings/networksettings/ppp/general.cpp
@@ -283,13 +283,12 @@ ModemWidget::~ModemWidget()
283 { 283 {
284 edited.simplifyWhiteSpace(); 284 edited.simplifyWhiteSpace();
285 if ( devs.contains( edited ) == 0 ) 285 if ( devs.contains( edited ) == 0 )
286 { 286 {
287 devs << edited; 287 devs << edited;
288 } 288 }
289 _pppdata->setModemDevice( edited );
290 } 289 }
291 290
292 291
293 Config cfg("NetworkSetupPPP"); 292 Config cfg("NetworkSetupPPP");
294 cfg.setGroup("Devices_General"); 293 cfg.setGroup("Devices_General");
295 cfg.writeEntry("devices",devs,','); 294 cfg.writeEntry("devices",devs,',');
@@ -334,24 +333,51 @@ bool ModemWidget::save()
334{ 333{
335 //first check to make sure that the device name is unique! 334 //first check to make sure that the device name is unique!
336 if(modemname->text().isEmpty() || 335 if(modemname->text().isEmpty() ||
337 !_pppdata->isUniqueDevname(modemname->text())) 336 !_pppdata->isUniqueDevname(modemname->text()))
338 return false; 337 return false;
339 338
340 odebug << "ModemWidget::save saving modem1 data" << oendl;
341 _pppdata->setDevname( modemname->text() ); 339 _pppdata->setDevname( modemname->text() );
342 _pppdata->setModemDevice( modemdevice->currentText() ); 340 _pppdata->setModemDevice( modemdevice->currentText() );
343 _pppdata->setFlowcontrol(flowcontrol->currentText()); 341 _pppdata->setFlowcontrol(flowcontrol->currentText());
344 _pppdata->setFlowcontrol(flowcontrol->currentText()); 342 _pppdata->setFlowcontrol(flowcontrol->currentText());
345 _pppdata->setSpeed(baud_c->currentText()); 343 _pppdata->setSpeed(baud_c->currentText());
346 _pppdata->setModemLockFile( modemlockfile->isChecked()); 344 _pppdata->setModemLockFile( modemlockfile->isChecked());
347 _pppdata->setModemTimeout( modemtimeout->value() ); 345 _pppdata->setModemTimeout( modemtimeout->value() );
348 return true; 346 return true;
349 347
350} 348}
351 349
350void ModemWidget::slotBeforeModemQuery()
351{
352 m_oldModemDev = _pppdata->modemDevice();
353 m_oldFlowControl = _pppdata->flowcontrol();
354 m_oldSpeed = _pppdata->speed();
355 m_oldModemLock = _pppdata->modemLockFile();
356 m_oldModemTimeout = _pppdata->modemTimeout();
357
358
359 _pppdata->setModemDevice( modemdevice->currentText() );
360 _pppdata->setFlowcontrol(flowcontrol->currentText());
361 _pppdata->setFlowcontrol(flowcontrol->currentText());
362 _pppdata->setSpeed(baud_c->currentText());
363 _pppdata->setModemLockFile( modemlockfile->isChecked());
364 _pppdata->setModemTimeout( modemtimeout->value() );
365}
366
367
368void ModemWidget::slotAfterModemQuery()
369{
370 _pppdata->setModemDevice( m_oldModemDev );
371 _pppdata->setFlowcontrol( m_oldFlowControl );
372 _pppdata->setSpeed( m_oldSpeed );
373 _pppdata->setModemLockFile( m_oldModemLock );
374 _pppdata->setModemTimeout( m_oldModemTimeout );
375}
376
377
352ModemWidget2::ModemWidget2( PPPData *pd, InterfacePPP *ip, QWidget *parent, 378ModemWidget2::ModemWidget2( PPPData *pd, InterfacePPP *ip, QWidget *parent,
353 const char *name) 379 const char *name)
354 : QWidget(parent, name), _pppdata(pd), _ifaceppp(ip) 380 : QWidget(parent, name), _pppdata(pd), _ifaceppp(ip)
355{ 381{
356 QVBoxLayout *l1 = new QVBoxLayout(this, 0 );//, KDialog::spacingHint()); 382 QVBoxLayout *l1 = new QVBoxLayout(this, 0 );//, KDialog::spacingHint());
357 383
@@ -485,14 +511,18 @@ void ModemWidget2::modemcmdsbutton()
485 QPEApplication::execDialog( &mc ); 511 QPEApplication::execDialog( &mc );
486} 512}
487 513
488 514
489void ModemWidget2::query_modem() 515void ModemWidget2::query_modem()
490{ 516{
517 emit sig_beforeQueryModem();
518
491 ModemTransfer mt(_ifaceppp->modem(), this); 519 ModemTransfer mt(_ifaceppp->modem(), this);
492 mt.exec(); 520 mt.exec();
521
522 emit sig_afterQueryModem();
493} 523}
494 524
495 525
496// void ModemWidget2::terminal() { 526// void ModemWidget2::terminal() {
497// MiniTerm terminal(NULL,NULL); 527// MiniTerm terminal(NULL,NULL);
498// terminal.exec(); 528// terminal.exec();