summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/serialconfigwidget.cpp
authorzecke <zecke>2004-10-16 21:06:28 (UTC)
committer zecke <zecke>2004-10-16 21:06:28 (UTC)
commit999a0f2d22f132005bde62558ace48a0ce8b1dcc (patch) (unidiff)
tree75f528b52a8a89289925e62bbd4c48d316c8ddcf /noncore/apps/opie-console/serialconfigwidget.cpp
parente70f226f5c4c2f488f6c4406034a04e128c0ca93 (diff)
downloadopie-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/serialconfigwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-console/serialconfigwidget.cpp23
1 files changed, 5 insertions, 18 deletions
diff --git a/noncore/apps/opie-console/serialconfigwidget.cpp b/noncore/apps/opie-console/serialconfigwidget.cpp
index c4c9c99..4efb286 100644
--- a/noncore/apps/opie-console/serialconfigwidget.cpp
+++ b/noncore/apps/opie-console/serialconfigwidget.cpp
@@ -1,28 +1,15 @@
1#include <qlabel.h>
2#include <qlayout.h>
3#include <qcombobox.h>
4
5#include "iolayerbase.h" 1#include "iolayerbase.h"
6#include "serialconfigwidget.h" 2#include "serialconfigwidget.h"
3#include "comboboxhelper.h"
7 4
8namespace { 5#include <qlabel.h>
9 void setCurrent( const QString& str, QComboBox* bo ) { 6#include <qlayout.h>
10 uint b = bo->count(); 7#include <qcombobox.h>
11 for (int i = 0; i < bo->count(); i++ ) {
12 if ( bo->text(i) == str ) {
13 bo->setCurrentItem( i );
14 return;
15 }
16 }
17 bo->insertItem( str );
18 bo->setCurrentItem( b );
19 }
20 8
21 9
22}
23 10
24SerialConfigWidget::SerialConfigWidget( const QString& name, 11SerialConfigWidget::SerialConfigWidget( const QString& name,
25 QWidget* parent, 12 QWidget* parent,
26 const char* na ) 13 const char* na )
27 : ProfileDialogConnectionWidget( name, parent, na ) { 14 : ProfileDialogConnectionWidget( name, parent, na ) {
28 15
@@ -113,13 +100,13 @@ void SerialConfigWidget::load( const Profile& prof ) {
113 m_base->setStop( IOLayerBase::Stop_OnePointFive ); 100 m_base->setStop( IOLayerBase::Stop_OnePointFive );
114 } else { 101 } else {
115 m_base->setStop( IOLayerBase::Stop_One ); 102 m_base->setStop( IOLayerBase::Stop_One );
116 } 103 }
117 104
118 if ( prof.readEntry("Device").isEmpty() ) return; 105 if ( prof.readEntry("Device").isEmpty() ) return;
119 setCurrent( prof.readEntry("Device"), m_deviceCmb ); 106 ComboboxHelper::setCurrent( prof.readEntry("Device"), m_deviceCmb );
120 107
121} 108}
122/* 109/*
123 * save speed, 110 * save speed,
124 * flow, 111 * flow,
125 * parity 112 * parity