author | zecke <zecke> | 2004-10-16 21:06:28 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-10-16 21:06:28 (UTC) |
commit | 999a0f2d22f132005bde62558ace48a0ce8b1dcc (patch) (side-by-side diff) | |
tree | 75f528b52a8a89289925e62bbd4c48d316c8ddcf /noncore/apps/opie-console/modemconfigwidget.cpp | |
parent | e70f226f5c4c2f488f6c4406034a04e128c0ca93 (diff) | |
download | opie-999a0f2d22f132005bde62558ace48a0ce8b1dcc.zip opie-999a0f2d22f132005bde62558ace48a0ce8b1dcc.tar.gz opie-999a0f2d22f132005bde62558ace48a0ce8b1dcc.tar.bz2 |
-Remove never finished classes by ibotty for the console widget
-Put setCurrent into ComboboxHelper and remove duplication from the
dialogs
-Remove old and unneeded debug output
-IOBt, IOIrda can share the implementation for sening,recieving
and supports with IOSerial
Diffstat (limited to 'noncore/apps/opie-console/modemconfigwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/modemconfigwidget.cpp | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/noncore/apps/opie-console/modemconfigwidget.cpp b/noncore/apps/opie-console/modemconfigwidget.cpp index b2f5c68..eb4bd0d 100644 --- a/noncore/apps/opie-console/modemconfigwidget.cpp +++ b/noncore/apps/opie-console/modemconfigwidget.cpp @@ -1,40 +1,26 @@ #include "modemconfigwidget.h" #include "dialdialog.h" +#include "comboboxhelper.h" /* OPIE */ -#include <opie2/odebug.h> #include <qpe/qpeapplication.h> -using namespace Opie::Core; /* QT */ #include <qlabel.h> #include <qlayout.h> #include <qcombobox.h> #include <qpushbutton.h> #include <qhbox.h> -namespace { - void setCurrent( const QString& str, QComboBox* bo ) { - uint b = bo->count(); - for (int i = 0; i < bo->count(); i++ ) { - if ( bo->text(i) == str ) { - bo->setCurrentItem( i ); - return; - } - } - bo->insertItem( str ); - bo->setCurrentItem( b ); - } -} 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 ); m_deviceCmb->setEditable( TRUE ); QLabel* telLabel = new QLabel( this ); telLabel->setText( tr( "Enter telefon number here:" ) ); @@ -137,28 +123,27 @@ void ModemConfigWidget::load( const Profile& prof ) { if ( sbits == 2) { m_base->setStop( IOLayerBase::Stop_Two ); } else if ( sbits == 15 ) { m_base->setStop( IOLayerBase::Stop_OnePointFive ); } else { m_base->setStop( IOLayerBase::Stop_One ); } atConf->readConfig( prof ); if ( prof.readEntry( "Device" ).isEmpty() ) { - owarn << "device empty!" << oendl; return; } - setCurrent( prof.readEntry( "Device" ), m_deviceCmb ); + ComboboxHelper::setCurrent( prof.readEntry( "Device" ), m_deviceCmb ); } /* * save speed, * flow, * parity */ void ModemConfigWidget::save( Profile& prof ) { int flow, parity, speed, data, stop; flow = parity = speed = data = stop = 0; |