summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2005-01-04 23:03:23 (UTC)
committer mickeyl <mickeyl>2005-01-04 23:03:23 (UTC)
commit49683b3396a2e93cf49ac1726eafca6e8798be81 (patch) (unidiff)
tree6aaa08205dbf55a214655c275c11cd7ef8a27bdd
parentb41e4499d41fc92cc1ed4ed487e57d0a002c1a02 (diff)
downloadopie-49683b3396a2e93cf49ac1726eafca6e8798be81.zip
opie-49683b3396a2e93cf49ac1726eafca6e8798be81.tar.gz
opie-49683b3396a2e93cf49ac1726eafca6e8798be81.tar.bz2
catch up with proper inclusion of OLedBox into libopieui
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/volumeapplet/config.in2
-rw-r--r--core/applets/volumeapplet/volume.cpp7
-rw-r--r--core/applets/volumeapplet/volume.h8
-rw-r--r--core/applets/volumeapplet/volumeapplet.pro7
-rw-r--r--noncore/settings/networksettings2/opietooth2/Opietooth.cpp2
-rw-r--r--noncore/settings/networksettings2/opietooth2/Opietooth.h4
6 files changed, 17 insertions, 13 deletions
diff --git a/core/applets/volumeapplet/config.in b/core/applets/volumeapplet/config.in
index b18cd54..7ab1a27 100644
--- a/core/applets/volumeapplet/config.in
+++ b/core/applets/volumeapplet/config.in
@@ -1,4 +1,4 @@
1 config VOLUMEAPPLET 1 config VOLUMEAPPLET
2 boolean "opie-volumeapplet (set volume for microphone and speaker)" 2 boolean "opie-volumeapplet (set volume for microphone and speaker)"
3 default "y" 3 default "y"
4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE 4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI
diff --git a/core/applets/volumeapplet/volume.cpp b/core/applets/volumeapplet/volume.cpp
index 45c106a..23c847d 100644
--- a/core/applets/volumeapplet/volume.cpp
+++ b/core/applets/volumeapplet/volume.cpp
@@ -1,139 +1,142 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "volume.h" 21#include "volume.h"
22 22
23/* OPIE */
23#include <opie2/oledbox.h> 24#include <opie2/oledbox.h>
24#include <opie2/odevice.h> 25#include <opie2/odevice.h>
25#include <opie2/otaskbarapplet.h> 26#include <opie2/otaskbarapplet.h>
26#include <qpe/resource.h> 27#include <qpe/resource.h>
27#include <qpe/applnk.h> 28#include <qpe/applnk.h>
28#include <qpe/config.h> 29#include <qpe/config.h>
29#include <qpe/qcopenvelope_qws.h> 30#include <qpe/qcopenvelope_qws.h>
31using namespace Opie::Core;
32using namespace Opie::Ui;
30 33
34/* QT */
31#include <qpainter.h> 35#include <qpainter.h>
32#include <qcheckbox.h> 36#include <qcheckbox.h>
33#include <qslider.h> 37#include <qslider.h>
34#include <qlayout.h> 38#include <qlayout.h>
35#include <qvbox.h> 39#include <qvbox.h>
36#include <qlabel.h> 40#include <qlabel.h>
37#include <qpushbutton.h> 41#include <qpushbutton.h>
38#include <qtimer.h> 42#include <qtimer.h>
39 43
44/* STD */
40#include <stdio.h> 45#include <stdio.h>
41 46
42using namespace Opie::Core;
43
44#define RATE_TIMER_INTERVAL 100 47#define RATE_TIMER_INTERVAL 100
45// Ten times per second is fine (RATE_TIMER_INTERVAL 100). A shorter time 48// Ten times per second is fine (RATE_TIMER_INTERVAL 100). A shorter time
46// results in "hanging" buttons on the iPAQ due to quite high CPU consumption. 49// results in "hanging" buttons on the iPAQ due to quite high CPU consumption.
47 50
48 51
49/* XPM */ 52/* XPM */
50using namespace Opie::Ui; 53using namespace Opie::Ui;
51static const char * vol_xpm[] = { 54static const char * vol_xpm[] = {
52"20 20 3 1", 55"20 20 3 1",
53" c None", 56" c None",
54". c #0000FF", 57". c #0000FF",
55"+ c #000000", 58"+ c #000000",
56" ", 59" ",
57" . ", 60" . ",
58" . . . . ", 61" . . . . ",
59" . . . . . . ", 62" . . . . . . ",
60" . . . . . . . ", 63" . . . . . . . ",
61" . . ..... . . ", 64" . . ..... . . ",
62" . ... ..... ... ", 65" . ... ..... ... ",
63" ........... .... ", 66" ........... .... ",
64" ................. ", 67" ................. ",
65"++++++++++++++++++++", 68"++++++++++++++++++++",
66" .................. ", 69" .................. ",
67" . ............. . ", 70" . ............. . ",
68" . ..... ....... ", 71" . ..... ....... ",
69" . ... ..... . ", 72" . ... ..... . ",
70" . ... ..... . ", 73" . ... ..... . ",
71" . ... ..... ", 74" . ... ..... ",
72" . . . . . ", 75" . . . . . ",
73" . . . ", 76" . . . ",
74" . . . ", 77" . . . ",
75" "}; 78" "};
76/* XPM */ 79/* XPM */
77static const char * mic_xpm[] = { 80static const char * mic_xpm[] = {
78"20 20 21 1", 81"20 20 21 1",
79" c None", 82" c None",
80". c #000000", 83". c #000000",
81"+ c #EEEEEE", 84"+ c #EEEEEE",
82"@ c #B4B6B4", 85"@ c #B4B6B4",
83"# c #8B8D8B", 86"# c #8B8D8B",
84"$ c #D5D6D5", 87"$ c #D5D6D5",
85"% c #E6E6E6", 88"% c #E6E6E6",
86"& c #9C9D9C", 89"& c #9C9D9C",
87"* c #6A696A", 90"* c #6A696A",
88"= c #E6E2E6", 91"= c #E6E2E6",
89"- c #F6F2F6", 92"- c #F6F2F6",
90"; c #CDC6CD", 93"; c #CDC6CD",
91"> c #737573", 94"> c #737573",
92", c #4A484A", 95", c #4A484A",
93"' c #DEDEDE", 96"' c #DEDEDE",
94") c #F6EEF6", 97") c #F6EEF6",
95"! c #414041", 98"! c #414041",
96"~ c #202020", 99"~ c #202020",
97"{ c #ACAEAC", 100"{ c #ACAEAC",
98"] c #838583", 101"] c #838583",
99"^ c #6A656A", 102"^ c #6A656A",
100" ", 103" ",
101" .... ", 104" .... ",
102" .+@+#. ", 105" .+@+#. ",
103" ..$%&%*. ", 106" ..$%&%*. ",
104" .=-.;=>=,. ", 107" .=-.;=>=,. ",
105" .'+).&+!+. ", 108" .'+).&+!+. ",
106" .+;+;.~+~. ", 109" .+;+;.~+~. ",
107" ..%{%,.... ", 110" ..%{%,.... ",
108" ..&=>=~.. ", 111" ..&=>=~.. ",
109" .+..]^,.. ", 112" .+..]^,.. ",
110" .+....... ", 113" .+....... ",
111" .%... ", 114" .%... ",
112" .=... ", 115" .=... ",
113" .+... ", 116" .+... ",
114" .+... ", 117" .+... ",
115" .... ", 118" .... ",
116" .... ", 119" .... ",
117" .. ", 120" .. ",
118" . ", 121" . ",
119". "}; 122". "};
120 123
121 124
122static const char * bass_xpm[] = { 125static const char * bass_xpm[] = {
123"20 20 3 1", 126"20 20 3 1",
124" c None", 127" c None",
125". c #000000", 128". c #000000",
126"+ c #0000FF", 129"+ c #0000FF",
127" ", 130" ",
128" ", 131" ",
129" ", 132" ",
130"..... +++ ......", 133"..... +++ ......",
131" +++++++ ", 134" +++++++ ",
132" ++ ++ ", 135" ++ ++ ",
133"... ++ ... ++ ++ .", 136"... ++ ... ++ ++ .",
134" +++ ++ ++ ", 137" +++ ++ ++ ",
135" ++++ ++ ", 138" ++++ ++ ",
136"... ++++ .. ++ .....", 139"... ++++ .. ++ .....",
137" ++ ++ ", 140" ++ ++ ",
138" ++ ++ ", 141" ++ ++ ",
139"..........++ ++ .", 142"..........++ ++ .",
diff --git a/core/applets/volumeapplet/volume.h b/core/applets/volumeapplet/volume.h
index 454a688..958395f 100644
--- a/core/applets/volumeapplet/volume.h
+++ b/core/applets/volumeapplet/volume.h
@@ -1,135 +1,135 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#ifndef __VOLUME_APPLET_H__ 21#ifndef __VOLUME_APPLET_H__
22#define __VOLUME_APPLET_H__ 22#define __VOLUME_APPLET_H__
23 23
24 24
25#include <qframe.h> 25#include <qframe.h>
26 26
27class QPixmap; 27class QPixmap;
28class QTimer; 28class QTimer;
29class QSlider; 29class QSlider;
30class QCheckBox; 30class QCheckBox;
31class QButton; 31class QButton;
32class OLedBox; 32namespace Opie { namespace Ui { class OLedBox; }; };
33 33
34class VolumeApplet; 34class VolumeApplet;
35 35
36class VolumeControl : public QFrame { 36class VolumeControl : public QFrame {
37 Q_OBJECT 37 Q_OBJECT
38 38
39public: 39public:
40 VolumeControl ( VolumeApplet *icon, bool showMic = false, QWidget *parent=0, const char *name=0 ); 40 VolumeControl ( VolumeApplet *icon, bool showMic = false, QWidget *parent=0, const char *name=0 );
41 41
42 bool volMuted ( ) const; 42 bool volMuted ( ) const;
43 int volPercent ( ) const; 43 int volPercent ( ) const;
44 44
45 virtual void show ( bool showmic ); 45 virtual void show ( bool showmic );
46 46
47protected: 47protected:
48 virtual void keyPressEvent ( QKeyEvent * e ); 48 virtual void keyPressEvent ( QKeyEvent * e );
49 49
50protected slots: 50protected slots:
51 void volumeChanged ( bool muted ); 51 void volumeChanged ( bool muted );
52 void micChanged ( bool muted ); 52 void micChanged ( bool muted );
53 53
54private slots: 54private slots:
55 void volMoved ( int percent ); 55 void volMoved ( int percent );
56 void micMoved ( int percent ); 56 void micMoved ( int percent );
57 void alarmMoved ( int percent ); 57 void alarmMoved ( int percent );
58 void bassMoved( int percent ); 58 void bassMoved( int percent );
59 void trebleMoved( int percent ); 59 void trebleMoved( int percent );
60 60
61 void volMuteToggled ( bool ); 61 void volMuteToggled ( bool );
62 void micMuteToggled ( bool ); 62 void micMuteToggled ( bool );
63 void alarmSoundToggled ( bool ); 63 void alarmSoundToggled ( bool );
64 void keyClickToggled ( bool ); 64 void keyClickToggled ( bool );
65 void screenTapToggled ( bool ); 65 void screenTapToggled ( bool );
66 66
67 void buttonChanged ( ); 67 void buttonChanged ( );
68 void rateTimerDone ( ); 68 void rateTimerDone ( );
69 69
70private: 70private:
71 void readConfig ( bool force = false ); 71 void readConfig ( bool force = false );
72 72
73 enum eUpdate { 73 enum eUpdate {
74 UPD_None, 74 UPD_None,
75 UPD_Vol, 75 UPD_Vol,
76 UPD_Mic, 76 UPD_Mic,
77 UPD_Bass, 77 UPD_Bass,
78 UPD_Treble 78 UPD_Treble
79 }; 79 };
80 void writeConfigEntry ( const char *entry, int val, eUpdate upd ); 80 void writeConfigEntry ( const char *entry, int val, eUpdate upd );
81 81
82 82
83private: 83private:
84 QSlider *volSlider; 84 QSlider *volSlider;
85 QSlider *bassSlider; 85 QSlider *bassSlider;
86 QSlider *trebleSlider; 86 QSlider *trebleSlider;
87 QSlider *micSlider; 87 QSlider *micSlider;
88 QSlider *alarmSlider; 88 QSlider *alarmSlider;
89 OLedBox *volLed; 89 Opie::Ui::OLedBox *volLed;
90 OLedBox *micLed; 90 Opie::Ui::OLedBox *micLed;
91 OLedBox *alarmLed; 91 Opie::Ui::OLedBox *alarmLed;
92 92
93 QCheckBox *alarmBox; 93 QCheckBox *alarmBox;
94 QCheckBox *tapBox; 94 QCheckBox *tapBox;
95 QCheckBox *keyBox; 95 QCheckBox *keyBox;
96 QPushButton *upButton; 96 QPushButton *upButton;
97 QPushButton *downButton; 97 QPushButton *downButton;
98 QTimer *rateTimer; 98 QTimer *rateTimer;
99 99
100 int m_vol_percent; 100 int m_vol_percent;
101 int m_mic_percent; 101 int m_mic_percent;
102 int m_alarm_percent; 102 int m_alarm_percent;
103 int m_bass_percent; 103 int m_bass_percent;
104 int m_treble_percent; 104 int m_treble_percent;
105 bool m_vol_muted; 105 bool m_vol_muted;
106 bool m_mic_muted; 106 bool m_mic_muted;
107 bool m_snd_alarm; 107 bool m_snd_alarm;
108 bool m_snd_touch; 108 bool m_snd_touch;
109 bool m_snd_key; 109 bool m_snd_key;
110 110
111 VolumeApplet *m_icon; 111 VolumeApplet *m_icon;
112}; 112};
113 113
114class VolumeApplet : public QWidget { 114class VolumeApplet : public QWidget {
115 Q_OBJECT 115 Q_OBJECT
116 116
117public: 117public:
118 VolumeApplet ( QWidget *parent = 0, const char *name=0 ); 118 VolumeApplet ( QWidget *parent = 0, const char *name=0 );
119 ~VolumeApplet ( ); 119 ~VolumeApplet ( );
120 static int position(); 120 static int position();
121 121
122 void redraw ( bool all = true ); 122 void redraw ( bool all = true );
123 123
124protected: 124protected:
125 virtual void mousePressEvent ( QMouseEvent * ); 125 virtual void mousePressEvent ( QMouseEvent * );
126 virtual void paintEvent ( QPaintEvent* ); 126 virtual void paintEvent ( QPaintEvent* );
127 127
128private: 128private:
129 QPixmap * m_pixmap; 129 QPixmap * m_pixmap;
130 VolumeControl *m_dialog; 130 VolumeControl *m_dialog;
131}; 131};
132 132
133 133
134#endif // __VOLUME_APPLET_H__ 134#endif // __VOLUME_APPLET_H__
135 135
diff --git a/core/applets/volumeapplet/volumeapplet.pro b/core/applets/volumeapplet/volumeapplet.pro
index e118dbd..3067a0f 100644
--- a/core/applets/volumeapplet/volumeapplet.pro
+++ b/core/applets/volumeapplet/volumeapplet.pro
@@ -1,14 +1,13 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2 CONFIG += qt plugin warn_on 2 CONFIG += qt plugin warn_on
3 HEADERS = volume.h oledbox.h 3 HEADERS = volume.h
4 #SOURCES= volume.cpp oledbox.cpp
5 SOURCES = volume.cpp 4 SOURCES = volume.cpp
6 TARGET = volumeapplet 5 TARGET = volumeapplet
7 DESTDIR = $(OPIEDIR)/plugins/applets 6 DESTDIR = $(OPIEDIR)/plugins/applets
8INCLUDEPATH += $(OPIEDIR)/include 7 INCLUDEPATH+= $(OPIEDIR)/include
9DEPENDPATH += 8DEPENDPATH +=
10LIBS += -lqpe -lopiecore2 9LIBS += -lqpe -lopiecore2 -lopieui2
11 VERSION = 1.0.0 10 VERSION = 1.0.0
12 11
13include( $(OPIEDIR)/include.pro ) 12include( $(OPIEDIR)/include.pro )
14target.path = $$prefix/plugins/applets 13target.path = $$prefix/plugins/applets
diff --git a/noncore/settings/networksettings2/opietooth2/Opietooth.cpp b/noncore/settings/networksettings2/opietooth2/Opietooth.cpp
index 8d71f32..8ea3a48 100644
--- a/noncore/settings/networksettings2/opietooth2/Opietooth.cpp
+++ b/noncore/settings/networksettings2/opietooth2/Opietooth.cpp
@@ -1,98 +1,100 @@
1#include <opie2/odebug.h> 1#include <opie2/odebug.h>
2#include <opie2/oledbox.h> 2#include <opie2/oledbox.h>
3using namespace Opie::Core;
4using namespace Opie::Ui;
3 5
4#include <qpe/resource.h> 6#include <qpe/resource.h>
5#include <qcheckbox.h> 7#include <qcheckbox.h>
6#include <qgroupbox.h> 8#include <qgroupbox.h>
7#include <qlabel.h> 9#include <qlabel.h>
8#include <qprogressbar.h> 10#include <qprogressbar.h>
9#include <qheader.h> 11#include <qheader.h>
10#include <qmessagebox.h> 12#include <qmessagebox.h>
11#include <qapplication.h> 13#include <qapplication.h>
12#include <qlistbox.h> 14#include <qlistbox.h>
13#include <qdialog.h> 15#include <qdialog.h>
14#include <qlayout.h> 16#include <qlayout.h>
15#include <qcombobox.h> 17#include <qcombobox.h>
16#include <qlabel.h> 18#include <qlabel.h>
17#include <qlistview.h> 19#include <qlistview.h>
18#include <qpushbutton.h> 20#include <qpushbutton.h>
19 21
20#include <Opietooth.h> 22#include <Opietooth.h>
21#include <OTDriver.h> 23#include <OTDriver.h>
22#include <OTPeer.h> 24#include <OTPeer.h>
23#include <OTGateway.h> 25#include <OTGateway.h>
24#include <OTSDPAttribute.h> 26#include <OTSDPAttribute.h>
25#include <OTSDPService.h> 27#include <OTSDPService.h>
26#include <OTInquiry.h> 28#include <OTInquiry.h>
27 29
28using namespace Opietooth2; 30using namespace Opietooth2;
29 31
30namespace Opietooth2 { 32namespace Opietooth2 {
31 33
32class PeerLVI : public QListViewItem { 34class PeerLVI : public QListViewItem {
33 35
34public : 36public :
35 37
36 PeerLVI( OTPeer * P, QListView * it ) : QListViewItem (it) { 38 PeerLVI( OTPeer * P, QListView * it ) : QListViewItem (it) {
37 Peer = P; 39 Peer = P;
38 } 40 }
39 ~PeerLVI( void ) { 41 ~PeerLVI( void ) {
40 } 42 }
41 43
42 inline OTPeer * peer( void ) 44 inline OTPeer * peer( void )
43 { return Peer; } 45 { return Peer; }
44 46
45private : 47private :
46 48
47 OTPeer * Peer; 49 OTPeer * Peer;
48}; 50};
49 51
50class ChannelLVI : public QListViewItem { 52class ChannelLVI : public QListViewItem {
51 53
52public : 54public :
53 55
54 ChannelLVI( int Ch, QListViewItem * it ) : QListViewItem (it) { 56 ChannelLVI( int Ch, QListViewItem * it ) : QListViewItem (it) {
55 Channel = Ch; 57 Channel = Ch;
56 } 58 }
57 ~ChannelLVI( void ) { 59 ~ChannelLVI( void ) {
58 } 60 }
59 61
60 inline int channel( void ) 62 inline int channel( void )
61 { return Channel; } 63 { return Channel; }
62 64
63private : 65private :
64 66
65 int Channel; 67 int Channel;
66}; 68};
67 69
68class DriverLVI : public QListViewItem { 70class DriverLVI : public QListViewItem {
69 71
70public : 72public :
71 73
72 DriverLVI( OTDriver * P, QListView * it ) : QListViewItem (it) { 74 DriverLVI( OTDriver * P, QListView * it ) : QListViewItem (it) {
73 Driver = P; 75 Driver = P;
74 } 76 }
75 ~DriverLVI( void ) { 77 ~DriverLVI( void ) {
76 } 78 }
77 79
78 inline OTDriver * driver( void ) 80 inline OTDriver * driver( void )
79 { return Driver; } 81 { return Driver; }
80 82
81private : 83private :
82 84
83 OTDriver * Driver; 85 OTDriver * Driver;
84}; 86};
85 87
86class LinkKeyLVI : public QListViewItem { 88class LinkKeyLVI : public QListViewItem {
87 89
88public : 90public :
89 91
90 LinkKeyLVI( int Ch, QListView * it ) : QListViewItem (it) { 92 LinkKeyLVI( int Ch, QListView * it ) : QListViewItem (it) {
91 LinkKey = Ch; 93 LinkKey = Ch;
92 } 94 }
93 ~LinkKeyLVI( void ) { 95 ~LinkKeyLVI( void ) {
94 } 96 }
95 97
96 inline int index( void ) 98 inline int index( void )
97 { return LinkKey; } 99 { return LinkKey; }
98 100
diff --git a/noncore/settings/networksettings2/opietooth2/Opietooth.h b/noncore/settings/networksettings2/opietooth2/Opietooth.h
index 9e53fcb..16a22d6 100644
--- a/noncore/settings/networksettings2/opietooth2/Opietooth.h
+++ b/noncore/settings/networksettings2/opietooth2/Opietooth.h
@@ -1,194 +1,194 @@
1#ifndef OPIETOOTH_H 1#ifndef OPIETOOTH_H
2#define OPIETOOTH_H 2#define OPIETOOTH_H
3 3
4#include <OTIcons.h> 4#include <OTIcons.h>
5 5
6#include <OTPairingGUI.h> 6#include <OTPairingGUI.h>
7class OLedBox; 7namespace Opie { namespace Ui { class OLedBox; }; };
8 8
9namespace Opietooth2 { 9namespace Opietooth2 {
10 10
11class OTGateway; 11class OTGateway;
12class OTDriver; 12class OTDriver;
13class OTInquiry; 13class OTInquiry;
14class OTPeer; 14class OTPeer;
15class PeerLVI; 15class PeerLVI;
16 16
17class OTPairing : public OTPairingGUI { 17class OTPairing : public OTPairingGUI {
18 18
19 Q_OBJECT 19 Q_OBJECT
20 20
21public : 21public :
22 22
23 OTPairing( QWidget * parent, 23 OTPairing( QWidget * parent,
24 OTIcons * _Ic = 0 ); 24 OTIcons * _Ic = 0 );
25 ~OTPairing(); 25 ~OTPairing();
26 26
27private slots : 27private slots :
28 28
29 void SLOT_Unpair( void ); 29 void SLOT_Unpair( void );
30 30
31signals : 31signals :
32 32
33protected : 33protected :
34 34
35private : 35private :
36 36
37 bool MyIcons; 37 bool MyIcons;
38 OTIcons * Icons; 38 OTIcons * Icons;
39 OTGateway * OT; 39 OTGateway * OT;
40}; 40};
41}; 41};
42 42
43#include <OTScanGUI.h> 43#include <OTScanGUI.h>
44 44
45namespace Opietooth2 { 45namespace Opietooth2 {
46 46
47class OTGateway; 47class OTGateway;
48class OTDriver; 48class OTDriver;
49class OTInquiry; 49class OTInquiry;
50class OTPeer; 50class OTPeer;
51 51
52class OTScan : public OTScanGUI { 52class OTScan : public OTScanGUI {
53 53
54 Q_OBJECT 54 Q_OBJECT
55 55
56public : 56public :
57 57
58 OTScan( QWidget * parent, 58 OTScan( QWidget * parent,
59 OTIcons * _Ic = 0 ); 59 OTIcons * _Ic = 0 );
60 ~OTScan(); 60 ~OTScan();
61 61
62 // static function to return a device and a channel 62 // static function to return a device and a channel
63 static int getDevice( OTPeer *& Peer, 63 static int getDevice( OTPeer *& Peer,
64 int & Channel, 64 int & Channel,
65 OTGateway * OT, 65 OTGateway * OT,
66 const UUIDVector & Filter = 0, 66 const UUIDVector & Filter = 0,
67 QWidget* Parent = 0); 67 QWidget* Parent = 0);
68 68
69 // show only services that match any of the filter 69 // show only services that match any of the filter
70 void setScanFilter( const UUIDVector & Filter ); 70 void setScanFilter( const UUIDVector & Filter );
71 void resetScanFilter( void ); 71 void resetScanFilter( void );
72 72
73 inline OTPeer * selectedPeer( void ) 73 inline OTPeer * selectedPeer( void )
74 { return SelectedPeer; } 74 { return SelectedPeer; }
75 inline int selectedChannel( void ) 75 inline int selectedChannel( void )
76 { return SelectedChannel; } 76 { return SelectedChannel; }
77 77
78public slots : 78public slots :
79 79
80private slots : 80private slots :
81 81
82 void SLOT_DoScan( bool ); 82 void SLOT_DoScan( bool );
83 void SLOT_NewPeer( OTPeer *, bool ); 83 void SLOT_NewPeer( OTPeer *, bool );
84 void SLOT_FinishedDetecting(); 84 void SLOT_FinishedDetecting();
85 void SLOT_Show( QListViewItem *); 85 void SLOT_Show( QListViewItem *);
86 void SLOT_RefreshServices( void ); 86 void SLOT_RefreshServices( void );
87 void SLOT_RefreshState( void ); 87 void SLOT_RefreshState( void );
88 void SLOT_CleanupOld( void ); 88 void SLOT_CleanupOld( void );
89 void SLOT_UpdateStrength( void ); 89 void SLOT_UpdateStrength( void );
90 void SLOT_PeerState( OTPeer * ); 90 void SLOT_PeerState( OTPeer * );
91 void SLOT_Selected( QListViewItem * ); 91 void SLOT_Selected( QListViewItem * );
92 92
93signals : 93signals :
94 94
95 void selected( void ); 95 void selected( void );
96 96
97protected : 97protected :
98 98
99private : 99private :
100 100
101 void refreshState( PeerLVI *, bool ); 101 void refreshState( PeerLVI *, bool );
102 void scanMode( bool ); 102 void scanMode( bool );
103 103
104 // load scanned devices 104 // load scanned devices
105 105
106 bool MyIcons; 106 bool MyIcons;
107 OTIcons * Icons; 107 OTIcons * Icons;
108 OTGateway * OT; 108 OTGateway * OT;
109 OTInquiry * Scanning; 109 OTInquiry * Scanning;
110 UUIDVector Filter; 110 UUIDVector Filter;
111 111
112 OLedBox * Paired_Led; 112 Opie::Ui::OLedBox * Paired_Led;
113 QTimer * StrengthTimer; 113 QTimer * StrengthTimer;
114 PeerLVI * Current; 114 PeerLVI * Current;
115 115
116 OTPeer * SelectedPeer; 116 OTPeer * SelectedPeer;
117 int SelectedChannel; 117 int SelectedChannel;
118}; 118};
119}; 119};
120 120
121#include <OTManageGUI.h> 121#include <OTManageGUI.h>
122namespace Opietooth2 { 122namespace Opietooth2 {
123 123
124class OTManage : public OTManageGUI { 124class OTManage : public OTManageGUI {
125 125
126 Q_OBJECT 126 Q_OBJECT
127 127
128public : 128public :
129 129
130 OTManage( QWidget * parent, 130 OTManage( QWidget * parent,
131 OTIcons * _IC = 0 ); 131 OTIcons * _IC = 0 );
132 ~OTManage(); 132 ~OTManage();
133 133
134public slots : 134public slots :
135 135
136private slots : 136private slots :
137 137
138 void SLOT_ShowDriver( QListViewItem * ); 138 void SLOT_ShowDriver( QListViewItem * );
139 void SLOT_UpDriver( bool ); 139 void SLOT_UpDriver( bool );
140 void SLOT_StateChange( OTDriver * , bool ); 140 void SLOT_StateChange( OTDriver * , bool );
141 void SLOT_DriverListChanged(); 141 void SLOT_DriverListChanged();
142 void SLOT_SetRefreshTimer( int ); 142 void SLOT_SetRefreshTimer( int );
143 143
144signals : 144signals :
145 145
146protected : 146protected :
147 147
148private : 148private :
149 149
150 // load scanned devices 150 // load scanned devices
151 151
152 bool MyIcons; 152 bool MyIcons;
153 OTIcons * Icons; 153 OTIcons * Icons;
154 OTGateway * OT; 154 OTGateway * OT;
155 OTInquiry * Scanning; 155 OTInquiry * Scanning;
156}; 156};
157}; 157};
158 158
159#include <OTMainGUI.h> 159#include <OTMainGUI.h>
160 160
161namespace Opietooth2 { 161namespace Opietooth2 {
162class OTMain : public OTMainGUI { 162class OTMain : public OTMainGUI {
163 163
164 Q_OBJECT 164 Q_OBJECT
165 165
166public : 166public :
167 167
168 OTMain( QWidget * parent ); 168 OTMain( QWidget * parent );
169 ~OTMain(); 169 ~OTMain();
170 170
171public slots : 171public slots :
172 172
173private slots : 173private slots :
174 174
175 void SLOT_Pairing( void ); 175 void SLOT_Pairing( void );
176 void SLOT_Manage( void ); 176 void SLOT_Manage( void );
177 void SLOT_Scan( void ); 177 void SLOT_Scan( void );
178 void SLOT_EnableBluetooth( bool ); 178 void SLOT_EnableBluetooth( bool );
179 void SLOT_DriverListChanged(); 179 void SLOT_DriverListChanged();
180 void SLOT_DeviceIsEnabled( bool ); 180 void SLOT_DeviceIsEnabled( bool );
181 void SLOT_StateChange( OTDriver * , bool ); 181 void SLOT_StateChange( OTDriver * , bool );
182 182
183signals : 183signals :
184 184
185protected : 185protected :
186 186
187private : 187private :
188 188
189 // load scanned devices 189 // load scanned devices
190 OTIcons * Icons; 190 OTIcons * Icons;
191 OTGateway * OT; 191 OTGateway * OT;
192}; 192};
193}; 193};
194#endif 194#endif