Diffstat (limited to 'noncore/apps/opie-console/modemconfigwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/modemconfigwidget.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/noncore/apps/opie-console/modemconfigwidget.cpp b/noncore/apps/opie-console/modemconfigwidget.cpp index 0968f62..ac62e45 100644 --- a/noncore/apps/opie-console/modemconfigwidget.cpp +++ b/noncore/apps/opie-console/modemconfigwidget.cpp @@ -2,15 +2,14 @@ #include <qlayout.h> #include <qcombobox.h> #include <qlineedit.h> #include <qpushbutton.h> #include <qhbox.h> -#include "iolayerbase.h" + #include "modemconfigwidget.h" -#include "atconfigdialog.h" #include "dialdialog.h" namespace { void setCurrent( const QString& str, QComboBox* bo ) { uint b = bo->count(); for (uint i = 0; i < bo->count(); i++ ) { @@ -21,14 +20,13 @@ namespace { } bo->insertItem( str ); bo->setCurrentItem( b ); } } -ModemConfigWidget::ModemConfigWidget( const QString& name, - QWidget* parent, +ModemConfigWidget::ModemConfigWidget( const QString& name, QWidget* parent, const char* na ) : ProfileDialogConnectionWidget( name, parent, na ) { m_lay = new QVBoxLayout(this ); m_device = new QLabel(tr("Modem is attached to:"), this ); m_deviceCmb = new QComboBox(this ); @@ -57,13 +55,13 @@ ModemConfigWidget::ModemConfigWidget( const QString& name, m_lay->addWidget( m_base ); m_deviceCmb->insertItem( "/dev/ttyS0" ); m_deviceCmb->insertItem( "/dev/ttyS1" ); m_deviceCmb->insertItem( "/dev/ttyS2" ); - + atConf = new ATConfigDialog( this, "ATConfig", true ); } ModemConfigWidget::~ModemConfigWidget() { } void ModemConfigWidget::load( const Profile& prof ) { @@ -107,16 +105,20 @@ void ModemConfigWidget::load( const Profile& prof ) { case 9600: default: m_base->setSpeed(IOLayerBase::Baud_9600 ); break; } - if ( prof.readEntry("Device").isEmpty() ) return; + if ( prof.readEntry( "Device" ).isEmpty() ) { + return; + } setCurrent( prof.readEntry("Device"), m_deviceCmb ); + atConf->readConfig( prof ); } + /* * save speed, * flow, * parity */ void ModemConfigWidget::save( Profile& prof ) { @@ -167,17 +169,16 @@ void ModemConfigWidget::save( Profile& prof ) { prof.writeEntry("Parity", parity); prof.writeEntry("Speed", speed); prof.writeEntry("Number", m_telNumber->text() ); } void ModemConfigWidget::slotAT() { - ATConfigDialog conf( this, "ATConfig", true ); - conf.readConfig(); - conf.showMaximized(); - if ( conf.exec() == QDialog::Accepted ) { - conf.writeConfig(); + // ATConfigDialog conf( this, "ATConfig", true ); + atConf->showMaximized(); + if ( atConf->exec() == QDialog::Accepted ) { + // atConf->writeConfig(); } } void ModemConfigWidget::slotDial() { DialDialog dial( this, "DialConfig", true ); dial.showMaximized(); |