summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/btconfigwidget.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/btconfigwidget.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/btconfigwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-console/btconfigwidget.cpp22
1 files changed, 6 insertions, 16 deletions
diff --git a/noncore/apps/opie-console/btconfigwidget.cpp b/noncore/apps/opie-console/btconfigwidget.cpp
index 232e497..f2ed558 100644
--- a/noncore/apps/opie-console/btconfigwidget.cpp
+++ b/noncore/apps/opie-console/btconfigwidget.cpp
@@ -1,29 +1,19 @@
1#include "btconfigwidget.h"
2#include "iolayerbase.h"
3#include "comboboxhelper.h"
4
1#include <qlabel.h> 5#include <qlabel.h>
2#include <qlayout.h> 6#include <qlayout.h>
3#include <qlineedit.h> 7#include <qlineedit.h>
4#include <qcombobox.h> 8#include <qcombobox.h>
5#include <qhbox.h> 9#include <qhbox.h>
6#include <qradiobutton.h> 10#include <qradiobutton.h>
7 11
8#include "iolayerbase.h"
9#include "btconfigwidget.h"
10 12
11namespace { 13
12 void setCurrent( const QString& str, QComboBox* bo ) {
13 uint b = bo->count();
14 for (int i = 0; i < bo->count(); i++ ) {
15 if ( bo->text(i) == str ) {
16 bo->setCurrentItem( i );
17 return;
18 }
19 }
20 bo->insertItem( str );
21 bo->setCurrentItem( b );
22 }
23}
24 14
25BTConfigWidget::BTConfigWidget( const QString& name, 15BTConfigWidget::BTConfigWidget( const QString& name,
26 QWidget* parent, 16 QWidget* parent,
27 const char* na ) 17 const char* na )
28 : ProfileDialogConnectionWidget( name, parent, na ) { 18 : ProfileDialogConnectionWidget( name, parent, na ) {
29 19
@@ -112,13 +102,13 @@ void BTConfigWidget::load( const Profile& prof ) {
112 default: 102 default:
113 m_base->setSpeed(IOLayerBase::Baud_9600 ); 103 m_base->setSpeed(IOLayerBase::Baud_9600 );
114 break; 104 break;
115 } 105 }
116 106
117 if ( prof.readEntry("Device").isEmpty() ) return; 107 if ( prof.readEntry("Device").isEmpty() ) return;
118 setCurrent( prof.readEntry("Device"), m_deviceCmb ); 108 ComboboxHelper::setCurrent( prof.readEntry("Device"), m_deviceCmb );
119 109
120} 110}
121/* 111/*
122 * save speed, 112 * save speed,
123 * flow, 113 * flow,
124 * parity 114 * parity