Diffstat (limited to 'noncore/net/opietooth/manager/bluebase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/manager/bluebase.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp index 71da82e..c993c7c 100644 --- a/noncore/net/opietooth/manager/bluebase.cpp +++ b/noncore/net/opietooth/manager/bluebase.cpp | |||
@@ -25,32 +25,34 @@ | |||
25 | #include <qlayout.h> | 25 | #include <qlayout.h> |
26 | #include <qvariant.h> | 26 | #include <qvariant.h> |
27 | #include <qwhatsthis.h> | 27 | #include <qwhatsthis.h> |
28 | #include <qimage.h> | 28 | #include <qimage.h> |
29 | #include <qpixmap.h> | 29 | #include <qpixmap.h> |
30 | #include <qtabwidget.h> | 30 | #include <qtabwidget.h> |
31 | #include <qscrollview.h> | 31 | #include <qscrollview.h> |
32 | #include <qvbox.h> | 32 | #include <qvbox.h> |
33 | #include <qmessagebox.h> | 33 | #include <qmessagebox.h> |
34 | #include <qapplication.h> | 34 | #include <qapplication.h> |
35 | #include <qcheckbox.h> | 35 | #include <qcheckbox.h> |
36 | #include <qlineedit.h> | 36 | #include <qlineedit.h> |
37 | #include <qlistview.h> | ||
37 | 38 | ||
38 | #include <qpe/resource.h> | 39 | #include <qpe/resource.h> |
39 | #include <qpe/config.h> | 40 | #include <qpe/config.h> |
40 | 41 | ||
41 | 42 | ||
42 | namespace OpieTooth { | 43 | namespace OpieTooth { |
43 | 44 | ||
44 | class RemoteDevices; | 45 | |
46 | #include <remotedevice.h> | ||
45 | 47 | ||
46 | BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl ) | 48 | BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl ) |
47 | : BluetoothBase( parent, name, fl ) { | 49 | : BluetoothBase( parent, name, fl ) { |
48 | 50 | ||
49 | 51 | ||
50 | QObject::connect( (QObject*) PushButton2, SIGNAL( clicked() ), this, SLOT(startScan())); | 52 | QObject::connect( (QObject*) PushButton2, SIGNAL( clicked() ), this, SLOT(startScan())); |
51 | QObject::connect((QObject*)configApplyButton, SIGNAL(clicked() ), this, SLOT(applyConfigChanges())); | 53 | QObject::connect((QObject*)configApplyButton, SIGNAL(clicked() ), this, SLOT(applyConfigChanges())); |
52 | 54 | ||
53 | 55 | ||
54 | 56 | ||
55 | 57 | ||
56 | QPalette pal = this->palette(); | 58 | QPalette pal = this->palette(); |
@@ -144,38 +146,47 @@ namespace OpieTooth { | |||
144 | enableInquiryscan = inquiryscanCheckBox->isChecked(); | 146 | enableInquiryscan = inquiryscanCheckBox->isChecked(); |
145 | 147 | ||
146 | writeConfig(); | 148 | writeConfig(); |
147 | 149 | ||
148 | QMessageBox* box = new QMessageBox(this, "Test"); | 150 | QMessageBox* box = new QMessageBox(this, "Test"); |
149 | box->setText(tr("Changes applied")); | 151 | box->setText(tr("Changes applied")); |
150 | box->show(); | 152 | box->show(); |
151 | 153 | ||
152 | // falls nötig hcid killhupen - die funktionalität adden | 154 | // falls nötig hcid killhupen - die funktionalität adden |
153 | } | 155 | } |
154 | 156 | ||
155 | 157 | ||
156 | void BlueBase::addSearchedDevices( QList<RemoteDevices> &newDevices ) { | 158 | void BlueBase::addSearchedDevices( QList<RemoteDevice> &newDevices ) { |
159 | |||
160 | QListViewItem * deviceItem; | ||
161 | |||
162 | QListIterator<RemoteDevice> it(newDevices); | ||
157 | 163 | ||
164 | for( ; it.current(); ++it ) { | ||
158 | 165 | ||
159 | 166 | ||
167 | RemoteDevice *dev = it.current(); | ||
168 | deviceItem = new QListViewItem( ListView4, dev->name() ); | ||
169 | deviceItem->setText(1, dev->mac() ); | ||
170 | } | ||
160 | } | 171 | } |
161 | 172 | ||
162 | 173 | ||
163 | /** | 174 | /** |
164 | * Open the "scan for devices" dialog | 175 | * Open the "scan for devices" dialog |
165 | */ | 176 | */ |
166 | void BlueBase::startScan() { | 177 | void BlueBase::startScan() { |
167 | ScanDialog *scan = new ScanDialog( this, "", true); | 178 | ScanDialog *scan = new ScanDialog( this, "", true); |
168 | QObject::connect((QObject*)scan, SIGNAL( selectedDevices(QList<RemoteDevices>&) ), | 179 | QObject::connect((QObject*)scan, SIGNAL( selectedDevices(QList<RemoteDevice>&) ), |
169 | this, SLOT( addSearchedDevices(QList<RemoteDevices>& ) )); | 180 | this, SLOT( addSearchedDevices(QList<RemoteDevice>& ) )); |
170 | 181 | ||
171 | scan->showMaximized(); | 182 | scan->showMaximized(); |
172 | } | 183 | } |
173 | 184 | ||
174 | /** | 185 | /** |
175 | * Decontructor | 186 | * Decontructor |
176 | */ | 187 | */ |
177 | BlueBase::~BlueBase(){ | 188 | BlueBase::~BlueBase(){ |
178 | } | 189 | } |
179 | 190 | ||
180 | } | 191 | } |
181 | 192 | ||