summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/bluebase.cpp10
-rw-r--r--noncore/net/opietooth/manager/bluebase.h4
-rw-r--r--noncore/net/opietooth/manager/main.cpp6
-rw-r--r--noncore/net/opietooth/manager/manager.pro6
-rw-r--r--noncore/net/opietooth/manager/scandialog.cpp113
-rw-r--r--noncore/net/opietooth/manager/scandialog.h71
-rw-r--r--noncore/net/opietooth/manager/scandialog.ui155
7 files changed, 199 insertions, 166 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp
index 3d446f0..c905ea3 100644
--- a/noncore/net/opietooth/manager/bluebase.cpp
+++ b/noncore/net/opietooth/manager/bluebase.cpp
@@ -38,6 +38,10 @@
38#include <qpe/resource.h> 38#include <qpe/resource.h>
39#include <qpe/config.h> 39#include <qpe/config.h>
40 40
41
42namespace OpieTooth {
43
44
41BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl ) 45BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl )
42 : BluetoothBase( parent, name, fl ) { 46 : BluetoothBase( parent, name, fl ) {
43 47
@@ -91,8 +95,6 @@ void BlueBase::writeConfig() {
91 cfg.writeEntry("enableAuthentification", enableAuthentification); 95 cfg.writeEntry("enableAuthentification", enableAuthentification);
92 cfg.writeEntry("enablePagescan",enablePagescan); 96 cfg.writeEntry("enablePagescan",enablePagescan);
93 cfg.writeEntry("enableInquiryscan", enableInquiryscan); 97 cfg.writeEntry("enableInquiryscan", enableInquiryscan);
94
95
96} 98}
97 99
98 100
@@ -109,7 +111,6 @@ void BlueBase::initGui() {
109 inquiryscanCheckBox->setChecked(enableInquiryscan); 111 inquiryscanCheckBox->setChecked(enableInquiryscan);
110 deviceNameLine->setText(deviceName); 112 deviceNameLine->setText(deviceName);
111 passkeyLine->setText(defaultPasskey); 113 passkeyLine->setText(defaultPasskey);
112
113} 114}
114 115
115 116
@@ -143,8 +144,6 @@ void BlueBase::applyConfigChanges() {
143 box->show(); 144 box->show();
144 145
145 // falls nötig hcid killhupen - die funktionalität adden 146 // falls nötig hcid killhupen - die funktionalität adden
146
147
148} 147}
149 148
150 149
@@ -162,4 +161,5 @@ void BlueBase::startScan() {
162BlueBase::~BlueBase(){ 161BlueBase::~BlueBase(){
163} 162}
164 163
164}
165 165
diff --git a/noncore/net/opietooth/manager/bluebase.h b/noncore/net/opietooth/manager/bluebase.h
index fb1844c..023af7a 100644
--- a/noncore/net/opietooth/manager/bluebase.h
+++ b/noncore/net/opietooth/manager/bluebase.h
@@ -18,6 +18,8 @@ class QPushButton;
18class QTabWidget; 18class QTabWidget;
19class QCheckBox; 19class QCheckBox;
20 20
21namespace OpieTooth {
22
21class BlueBase : public BluetoothBase { 23class BlueBase : public BluetoothBase {
22 Q_OBJECT 24 Q_OBJECT
23 25
@@ -51,6 +53,6 @@ protected:
51 53
52}; 54};
53 55
54 56}
55 57
56#endif 58#endif
diff --git a/noncore/net/opietooth/manager/main.cpp b/noncore/net/opietooth/manager/main.cpp
index d566419..a86e36d 100644
--- a/noncore/net/opietooth/manager/main.cpp
+++ b/noncore/net/opietooth/manager/main.cpp
@@ -20,17 +20,19 @@
20#include "bluebase.h" 20#include "bluebase.h"
21#include <qpe/qpeapplication.h> 21#include <qpe/qpeapplication.h>
22 22
23
23QPEApplication *BluetoothApp; 24QPEApplication *BluetoothApp;
24 25
25int main( int argc, char ** argv ) { 26int main( int argc, char ** argv ) {
26 QPEApplication a(argc, argv); 27 QPEApplication a(argc, argv);
27 BluetoothApp=&a; 28 BluetoothApp=&a;
28 29
29 BlueBase t; 30 OpieTooth::BlueBase t;
30 31
31 t.setCaption( BlueBase::tr("Bluetooth Manager") ); 32 // t.setCaption( OpieTooth::BlueBase::tr("Bluetooth Manager") );
32 a.showMainWidget(&t); 33 a.showMainWidget(&t);
33 34
34 return a.exec(); 35 return a.exec();
35} 36}
36 37
38
diff --git a/noncore/net/opietooth/manager/manager.pro b/noncore/net/opietooth/manager/manager.pro
index c369eba..5f0a62c 100644
--- a/noncore/net/opietooth/manager/manager.pro
+++ b/noncore/net/opietooth/manager/manager.pro
@@ -1,12 +1,12 @@
1TEMPLATE = app 1TEMPLATE = app
2#CONFIG = qt warn_on debug 2#CONFIG = qt warn_on debug
3CONFIG = qt warn_on release 3CONFIG = qt warn_on release
4HEADERS = bluebase.h 4HEADERS = bluebase.h scandialog.h
5SOURCES = main.cpp bluebase.cpp 5SOURCES = main.cpp bluebase.cpp scandialog.cpp
6INCLUDEPATH += $(OPIEDIR)/include 6INCLUDEPATH += $(OPIEDIR)/include
7INCLUDEPATH += $(OPIEDIR)/noncore/opietooth/lib 7INCLUDEPATH += $(OPIEDIR)/noncore/opietooth/lib
8DEPENDPATH += $(OPIEDIR)/include 8DEPENDPATH += $(OPIEDIR)/include
9LIBS += -lqpe -lopietooth 9LIBS += -lqpe -lopietooth
10INTERFACES = bluetoothbase.ui devicedialog.ui scandialog.ui 10INTERFACES = bluetoothbase.ui devicedialog.ui
11TARGET = $(OPIEDIR)/bin/bluetooth-manager 11TARGET = $(OPIEDIR)/bin/bluetooth-manager
12 12
diff --git a/noncore/net/opietooth/manager/scandialog.cpp b/noncore/net/opietooth/manager/scandialog.cpp
new file mode 100644
index 0000000..3ddba3e
--- a/dev/null
+++ b/noncore/net/opietooth/manager/scandialog.cpp
@@ -0,0 +1,113 @@
1/* main.cpp
2 *
3 * ---------------------
4 *
5 * copyright : (c) 2002 by Maximilian Reiß
6 * email : max.reiss@gmx.de
7 *
8 */
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18
19#include "scandialog.h"
20
21#include <qframe.h>
22#include <qheader.h>
23#include <qlabel.h>
24#include <qlistview.h>
25#include <qpushbutton.h>
26#include <qlayout.h>
27#include <qvariant.h>
28#include <qtooltip.h>
29#include <qwhatsthis.h>
30
31#include <manager.h>
32#include <device.h>
33#include <remotedevice.h>
34
35
36namespace OpieTooth {
37
38/*
39
40 */
41 ScanDialog::ScanDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
42 : QDialog( parent, name, modal, fl ) {
43
44 if ( !name )
45 setName( "ScanDialog" );
46 resize( 360, 392 );
47 setCaption( tr( "Scan for devices" ) );
48
49 Frame7 = new QFrame( this, "Frame7" );
50 Frame7->setGeometry( QRect( 0, 0, 240, 331 ) );
51 Frame7->setFrameShape( QFrame::StyledPanel );
52 Frame7->setFrameShadow( QFrame::Raised );
53
54 QWidget* privateLayoutWidget = new QWidget( Frame7, "Layout11" );
55 privateLayoutWidget->setGeometry( QRect( 10, 9, 221, 310 ) );
56 Layout11 = new QGridLayout( privateLayoutWidget );
57 Layout11->setSpacing( 6 );
58 Layout11->setMargin( 0 );
59
60
61 TextLabel10 = new QLabel( privateLayoutWidget, "TextLabel10" );
62 TextLabel10->setText( tr( "ersetzen durch qprogressbar" ) );
63
64 Layout11->addMultiCellWidget( TextLabel10, 1, 1, 0, 1 );
65
66 StartButton = new QPushButton( privateLayoutWidget, "PushButton13" );
67 StartButton->setText( tr( "Start" ) );
68
69 Layout11->addWidget( StartButton, 2, 0 );
70
71 PushButton6 = new QPushButton( privateLayoutWidget, "PushButton6" );
72 PushButton6->setText( tr( "Stop" ) );
73
74 Layout11->addWidget( PushButton6, 2, 1 );
75
76 ListView1 = new QListView( privateLayoutWidget, "ListView1" );
77
78 // ListView1->addColumn( tr( "In List" ) );
79 ListView1->addColumn( tr( "Device Name" ) );
80 //ListView1->addColumn( tr( "Type" ) );
81
82 Layout11->addMultiCellWidget( ListView1, 0, 0, 0, 1 );
83
84 connect( (QObject*)StartButton, SIGNAL( clicked() ), this, SLOT( startSearch() ) );
85 connect( (QObject*)localDevice, SIGNAL( foundDevices( const QString& , RemoteDevices::ValueList ) ),
86 this, SLOT(fillList(const QString& , RemoteDevices::ValueList ) ) ) ;
87 }
88
89 void ScanDialog::startSearch() {
90 // read it from config later
91 localDevice = new Manager( "hci0" );
92 localDevice->searchDevices();
93 }
94
95
96 void ScanDialog::fillList(const QString& device, RemoteDevices::ValueList deviceList) {
97
98
99 RemoteDevices::ValueList::Iterator it;
100 for( it = deviceList.begin(); it != deviceList.end(); ++it ) {
101
102
103 }
104 }
105
106/*
107 * Cleanup
108 */
109 ScanDialog::~ScanDialog() {
110 delete localDevice;
111 }
112
113}
diff --git a/noncore/net/opietooth/manager/scandialog.h b/noncore/net/opietooth/manager/scandialog.h
new file mode 100644
index 0000000..5cebb11
--- a/dev/null
+++ b/noncore/net/opietooth/manager/scandialog.h
@@ -0,0 +1,71 @@
1/* main.cpp
2 *
3 * copyright : (c) 2002 by Maximilian Reiß
4 * email : max.reiss@gmx.de
5 *
6 */
7/***************************************************************************
8 * *
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 *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16
17#ifndef SCANDIALOG_H
18#define SCANDIALOG_H
19
20#include <qvariant.h>
21#include <qdialog.h>
22
23
24#include <remotedevice.h>
25
26class QVBoxLayout;
27class QHBoxLayout;
28class QGridLayout;
29class QFrame;
30class QLabel;
31class QListView;
32class QListViewItem;
33class QPushButton;
34
35class Manager;
36class Device;
37
38
39namespace OpieTooth {
40
41
42
43 class ScanDialog : public QDialog {
44 Q_OBJECT
45
46 public:
47 ScanDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
48 ~ScanDialog();
49
50 QFrame* Frame7;
51 QLabel* TextLabel10;
52 QPushButton* StartButton;
53 QPushButton* PushButton6;
54 QListView* ListView1;
55
56
57 protected:
58 QGridLayout* Layout11;
59
60 private slots:
61 void startSearch();
62 void fillList(const QString& device, RemoteDevices::ValueList list);
63
64 private:
65
66 Manager *localDevice;
67 };
68
69}
70
71#endif // SCANDIALOG_H
diff --git a/noncore/net/opietooth/manager/scandialog.ui b/noncore/net/opietooth/manager/scandialog.ui
deleted file mode 100644
index 37847ba..0000000
--- a/noncore/net/opietooth/manager/scandialog.ui
+++ b/dev/null
@@ -1,155 +0,0 @@
1<!DOCTYPE UI><UI>
2<class>ScanDialog</class>
3<widget>
4 <class>QDialog</class>
5 <property stdset="1">
6 <name>name</name>
7 <cstring>ScanDialog</cstring>
8 </property>
9 <property stdset="1">
10 <name>geometry</name>
11 <rect>
12 <x>0</x>
13 <y>0</y>
14 <width>360</width>
15 <height>392</height>
16 </rect>
17 </property>
18 <property stdset="1">
19 <name>caption</name>
20 <string>Form3</string>
21 </property>
22 <widget>
23 <class>QFrame</class>
24 <property stdset="1">
25 <name>name</name>
26 <cstring>Frame7</cstring>
27 </property>
28 <property stdset="1">
29 <name>geometry</name>
30 <rect>
31 <x>0</x>
32 <y>0</y>
33 <width>240</width>
34 <height>331</height>
35 </rect>
36 </property>
37 <property stdset="1">
38 <name>frameShape</name>
39 <enum>StyledPanel</enum>
40 </property>
41 <property stdset="1">
42 <name>frameShadow</name>
43 <enum>Raised</enum>
44 </property>
45 <widget>
46 <class>QLayoutWidget</class>
47 <property stdset="1">
48 <name>name</name>
49 <cstring>Layout11</cstring>
50 </property>
51 <property stdset="1">
52 <name>geometry</name>
53 <rect>
54 <x>10</x>
55 <y>9</y>
56 <width>221</width>
57 <height>310</height>
58 </rect>
59 </property>
60 <grid>
61 <property stdset="1">
62 <name>margin</name>
63 <number>0</number>
64 </property>
65 <property stdset="1">
66 <name>spacing</name>
67 <number>6</number>
68 </property>
69 <widget row="1" column="0" rowspan="1" colspan="2" >
70 <class>QLabel</class>
71 <property stdset="1">
72 <name>name</name>
73 <cstring>TextLabel10</cstring>
74 </property>
75 <property stdset="1">
76 <name>text</name>
77 <string>ersetzen durch qprogressbar</string>
78 </property>
79 </widget>
80 <widget row="2" column="0" >
81 <class>QPushButton</class>
82 <property stdset="1">
83 <name>name</name>
84 <cstring>PushButton13</cstring>
85 </property>
86 <property stdset="1">
87 <name>text</name>
88 <string>Start</string>
89 </property>
90 </widget>
91 <widget row="2" column="1" >
92 <class>QPushButton</class>
93 <property stdset="1">
94 <name>name</name>
95 <cstring>PushButton6</cstring>
96 </property>
97 <property stdset="1">
98 <name>text</name>
99 <string>Stop</string>
100 </property>
101 </widget>
102 <widget row="0" column="0" rowspan="1" colspan="2" >
103 <class>QListView</class>
104 <column>
105 <property>
106 <name>text</name>
107 <string>In List</string>
108 </property>
109 <property>
110 <name>clickable</name>
111 <bool>true</bool>
112 </property>
113 <property>
114 <name>resizeable</name>
115 <bool>true</bool>
116 </property>
117 </column>
118 <column>
119 <property>
120 <name>text</name>
121 <string>Device Name</string>
122 </property>
123 <property>
124 <name>clickable</name>
125 <bool>true</bool>
126 </property>
127 <property>
128 <name>resizeable</name>
129 <bool>true</bool>
130 </property>
131 </column>
132 <column>
133 <property>
134 <name>text</name>
135 <string>Type</string>
136 </property>
137 <property>
138 <name>clickable</name>
139 <bool>true</bool>
140 </property>
141 <property>
142 <name>resizeable</name>
143 <bool>true</bool>
144 </property>
145 </column>
146 <property stdset="1">
147 <name>name</name>
148 <cstring>ListView1</cstring>
149 </property>
150 </widget>
151 </grid>
152 </widget>
153 </widget>
154</widget>
155</UI>