summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager
Unidiff
Diffstat (limited to 'noncore/net/opietooth/manager') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/bluebase.h2
-rw-r--r--noncore/net/opietooth/manager/scandialog.cpp3
-rw-r--r--noncore/net/opietooth/manager/scandialog.h4
3 files changed, 5 insertions, 4 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.h b/noncore/net/opietooth/manager/bluebase.h
index ae5ce67..5364e51 100644
--- a/noncore/net/opietooth/manager/bluebase.h
+++ b/noncore/net/opietooth/manager/bluebase.h
@@ -1,36 +1,38 @@
1 1
2#ifndef BLUEBASE_H 2#ifndef BLUEBASE_H
3#define BLUEBASE_H 3#define BLUEBASE_H
4 4
5#include <qvariant.h> 5#include <qvariant.h>
6#include <qwidget.h> 6#include <qwidget.h>
7#include <qscrollview.h> 7#include <qscrollview.h>
8#include <qsplitter.h> 8#include <qsplitter.h>
9#include <qlist.h> 9#include <qlist.h>
10 10
11#include "bluetoothbase.h" 11#include "bluetoothbase.h"
12 12
13#include <remotedevice.h>
14
13class QVBox; 15class QVBox;
14class QHBoxLayout; 16class QHBoxLayout;
15class QGridLayout; 17class QGridLayout;
16class QFrame; 18class QFrame;
17class QLabel; 19class QLabel;
18class QPushButton; 20class QPushButton;
19class QTabWidget; 21class QTabWidget;
20class QCheckBox; 22class QCheckBox;
21 23
22namespace OpieTooth { 24namespace OpieTooth {
23 25
24 26
25 27
26 class BlueBase : public BluetoothBase { 28 class BlueBase : public BluetoothBase {
27 Q_OBJECT 29 Q_OBJECT
28 30
29 public: 31 public:
30 BlueBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 32 BlueBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
31 ~BlueBase(); 33 ~BlueBase();
32 34
33 protected: 35 protected:
34 36
35 37
36 private slots: 38 private slots:
diff --git a/noncore/net/opietooth/manager/scandialog.cpp b/noncore/net/opietooth/manager/scandialog.cpp
index 70ea77a..8a7ea01 100644
--- a/noncore/net/opietooth/manager/scandialog.cpp
+++ b/noncore/net/opietooth/manager/scandialog.cpp
@@ -113,58 +113,57 @@ namespace OpieTooth {
113 QCheckListItem *deviceItem2 = new QCheckListItem( ListView1, "Test1", QCheckListItem::CheckBox ); 113 QCheckListItem *deviceItem2 = new QCheckListItem( ListView1, "Test1", QCheckListItem::CheckBox );
114 deviceItem2->setText(1, "BLAH" ); 114 deviceItem2->setText(1, "BLAH" );
115 115
116 progressTimer(); 116 progressTimer();
117 // when finished, it emmite foundDevices() 117 // when finished, it emmite foundDevices()
118 // checken ob initialisiert , qcop ans applet. 118 // checken ob initialisiert , qcop ans applet.
119 localDevice->searchDevices(); 119 localDevice->searchDevices();
120 120
121 } 121 }
122 122
123 void ScanDialog::stopSearch() { 123 void ScanDialog::stopSearch() {
124 124
125 } 125 }
126 126
127 void ScanDialog::fillList(const QString& device, RemoteDevices::ValueList deviceList) { 127 void ScanDialog::fillList(const QString& device, RemoteDevices::ValueList deviceList) {
128 128
129 QCheckListItem * deviceItem; 129 QCheckListItem * deviceItem;
130 130
131 RemoteDevices::ValueList::Iterator it; 131 RemoteDevices::ValueList::Iterator it;
132 for( it = deviceList.begin(); it != deviceList.end(); ++it ) { 132 for( it = deviceList.begin(); it != deviceList.end(); ++it ) {
133 133
134 deviceItem = new QCheckListItem( ListView1, (*it).name() ); 134 deviceItem = new QCheckListItem( ListView1, (*it).name() );
135 deviceItem->setText(1, (*it).mac() ); 135 deviceItem->setText(1, (*it).mac() );
136 } 136 }
137
138 } 137 }
139 138
140/* 139/*
141 * Iterates trough the items, and collects the checked items. 140 * Iterates trough the items, and collects the checked items.
142 * Then it emits it, so the manager can connect to the signal to fill the listing. 141 * Then it emits it, so the manager can connect to the signal to fill the listing.
143 */ 142 */
144 void ScanDialog::emitToManager() { 143 void ScanDialog::emitToManager() {
145 144
146 if (!ListView1) { 145 if (!ListView1) {
147 return; 146 return;
148 } 147 }
149 148
150 QList<RemoteDevices> *deviceList = new QList<RemoteDevices>; 149 QList<RemoteDevices> *deviceList = new QList<RemoteDevices>;
151 150
152 QListViewItemIterator it( ListView1 ); 151 QListViewItemIterator it( ListView1 );
153 for ( ; it.current(); ++it ) { 152 for ( ; it.current(); ++it ) {
154 if ( it.current()->isSelected() ) { 153 if ( ((QCheckListItem*)it.current())->isOn() ) {
155 RemoteDevices* device = new RemoteDevices( it.current()->text(1), it.current()->text(0)); 154 RemoteDevices* device = new RemoteDevices( it.current()->text(1), it.current()->text(0));
156 deviceList->append( device ); 155 deviceList->append( device );
157 } 156 }
158 } 157 }
159 emit selectedDevices( *deviceList ); 158 emit selectedDevices( *deviceList );
160 } 159 }
161 160
162/* 161/*
163 * Cleanup 162 * Cleanup
164 */ 163 */
165 ScanDialog::~ScanDialog() { 164 ScanDialog::~ScanDialog() {
166 emitToManager(); 165 emitToManager();
167 delete localDevice; 166 delete localDevice;
168 } 167 }
169 168
170} 169}
diff --git a/noncore/net/opietooth/manager/scandialog.h b/noncore/net/opietooth/manager/scandialog.h
index 4785a62..0ca302a 100644
--- a/noncore/net/opietooth/manager/scandialog.h
+++ b/noncore/net/opietooth/manager/scandialog.h
@@ -1,62 +1,62 @@
1/* main.cpp 1/* main.cpp
2 * 2 *
3 * copyright : (c) 2002 by Maximilian Reiß 3 * copyright : (c) 2002 by Maximilian Reiß
4 * email : max.reiss@gmx.de 4 * email : max.reiss@gmx.de
5 * 5 *
6 */ 6 */
7/*************************************************************************** 7/***************************************************************************
8 * * 8 * *
9 * This program is free software; you can redistribute it and/or modify * 9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by * 10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or * 11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. * 12 * (at your option) any later version. *
13 * * 13 * *
14 ***************************************************************************/ 14 ***************************************************************************/
15 15
16 16
17#ifndef SCANDIALOG_H 17#ifndef SCANDIALOG_H
18#define SCANDIALOG_H 18#define SCANDIALOG_H
19 19
20#include <qvariant.h> 20#include <qvariant.h>
21#include <qdialog.h> 21#include <qdialog.h>
22#include <qlist.h> 22#include <qlist.h>
23 23
24 24#include <remotedevice.h>
25class QVBoxLayout; 25class QVBoxLayout;
26class QHBoxLayout; 26class QHBoxLayout;
27class QGridLayout; 27class QGridLayout;
28class QFrame; 28class QFrame;
29class QLabel; 29class QLabel;
30class QListView; 30class QListView;
31class QListViewItem; 31class QListViewItem;
32class QPushButton; 32class QPushButton;
33class QProgressBar; 33class QProgressBar;
34 34
35 35
36namespace OpieTooth { 36namespace OpieTooth {
37 37
38#include <remotedevices.h> 38
39class Manager; 39class Manager;
40class Device; 40class Device;
41 41
42 class ScanDialog : public QDialog { 42 class ScanDialog : public QDialog {
43 Q_OBJECT 43 Q_OBJECT
44 44
45 public: 45 public:
46 ScanDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); 46 ScanDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
47 ~ScanDialog(); 47 ~ScanDialog();
48 48
49 QFrame* Frame7; 49 QFrame* Frame7;
50 QProgressBar* progress; 50 QProgressBar* progress;
51 QPushButton* StartButton; 51 QPushButton* StartButton;
52 QPushButton* StopButton; 52 QPushButton* StopButton;
53 QListView* ListView1; 53 QListView* ListView1;
54 54
55 55
56 protected: 56 protected:
57 QVBoxLayout* Layout11; 57 QVBoxLayout* Layout11;
58 58
59 private slots: 59 private slots:
60 void stopSearch(); 60 void stopSearch();
61 void startSearch(); 61 void startSearch();
62 void progressTimer(); 62 void progressTimer();