Diffstat (limited to 'noncore/settings/networksettings2/opietooth2/Opietooth.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/opietooth2/Opietooth.h | 194 |
1 files changed, 194 insertions, 0 deletions
diff --git a/noncore/settings/networksettings2/opietooth2/Opietooth.h b/noncore/settings/networksettings2/opietooth2/Opietooth.h new file mode 100644 index 0000000..9e53fcb --- a/dev/null +++ b/noncore/settings/networksettings2/opietooth2/Opietooth.h | |||
@@ -0,0 +1,194 @@ | |||
1 | #ifndef OPIETOOTH_H | ||
2 | #define OPIETOOTH_H | ||
3 | |||
4 | #include <OTIcons.h> | ||
5 | |||
6 | #include <OTPairingGUI.h> | ||
7 | class OLedBox; | ||
8 | |||
9 | namespace Opietooth2 { | ||
10 | |||
11 | class OTGateway; | ||
12 | class OTDriver; | ||
13 | class OTInquiry; | ||
14 | class OTPeer; | ||
15 | class PeerLVI; | ||
16 | |||
17 | class OTPairing : public OTPairingGUI { | ||
18 | |||
19 | Q_OBJECT | ||
20 | |||
21 | public : | ||
22 | |||
23 | OTPairing( QWidget * parent, | ||
24 | OTIcons * _Ic = 0 ); | ||
25 | ~OTPairing(); | ||
26 | |||
27 | private slots : | ||
28 | |||
29 | void SLOT_Unpair( void ); | ||
30 | |||
31 | signals : | ||
32 | |||
33 | protected : | ||
34 | |||
35 | private : | ||
36 | |||
37 | bool MyIcons; | ||
38 | OTIcons * Icons; | ||
39 | OTGateway * OT; | ||
40 | }; | ||
41 | }; | ||
42 | |||
43 | #include <OTScanGUI.h> | ||
44 | |||
45 | namespace Opietooth2 { | ||
46 | |||
47 | class OTGateway; | ||
48 | class OTDriver; | ||
49 | class OTInquiry; | ||
50 | class OTPeer; | ||
51 | |||
52 | class OTScan : public OTScanGUI { | ||
53 | |||
54 | Q_OBJECT | ||
55 | |||
56 | public : | ||
57 | |||
58 | OTScan( QWidget * parent, | ||
59 | OTIcons * _Ic = 0 ); | ||
60 | ~OTScan(); | ||
61 | |||
62 | // static function to return a device and a channel | ||
63 | static int getDevice( OTPeer *& Peer, | ||
64 | int & Channel, | ||
65 | OTGateway * OT, | ||
66 | const UUIDVector & Filter = 0, | ||
67 | QWidget* Parent = 0); | ||
68 | |||
69 | // show only services that match any of the filter | ||
70 | void setScanFilter( const UUIDVector & Filter ); | ||
71 | void resetScanFilter( void ); | ||
72 | |||
73 | inline OTPeer * selectedPeer( void ) | ||
74 | { return SelectedPeer; } | ||
75 | inline int selectedChannel( void ) | ||
76 | { return SelectedChannel; } | ||
77 | |||
78 | public slots : | ||
79 | |||
80 | private slots : | ||
81 | |||
82 | void SLOT_DoScan( bool ); | ||
83 | void SLOT_NewPeer( OTPeer *, bool ); | ||
84 | void SLOT_FinishedDetecting(); | ||
85 | void SLOT_Show( QListViewItem *); | ||
86 | void SLOT_RefreshServices( void ); | ||
87 | void SLOT_RefreshState( void ); | ||
88 | void SLOT_CleanupOld( void ); | ||
89 | void SLOT_UpdateStrength( void ); | ||
90 | void SLOT_PeerState( OTPeer * ); | ||
91 | void SLOT_Selected( QListViewItem * ); | ||
92 | |||
93 | signals : | ||
94 | |||
95 | void selected( void ); | ||
96 | |||
97 | protected : | ||
98 | |||
99 | private : | ||
100 | |||
101 | void refreshState( PeerLVI *, bool ); | ||
102 | void scanMode( bool ); | ||
103 | |||
104 | // load scanned devices | ||
105 | |||
106 | bool MyIcons; | ||
107 | OTIcons * Icons; | ||
108 | OTGateway * OT; | ||
109 | OTInquiry * Scanning; | ||
110 | UUIDVector Filter; | ||
111 | |||
112 | OLedBox * Paired_Led; | ||
113 | QTimer * StrengthTimer; | ||
114 | PeerLVI * Current; | ||
115 | |||
116 | OTPeer * SelectedPeer; | ||
117 | int SelectedChannel; | ||
118 | }; | ||
119 | }; | ||
120 | |||
121 | #include <OTManageGUI.h> | ||
122 | namespace Opietooth2 { | ||
123 | |||
124 | class OTManage : public OTManageGUI { | ||
125 | |||
126 | Q_OBJECT | ||
127 | |||
128 | public : | ||
129 | |||
130 | OTManage( QWidget * parent, | ||
131 | OTIcons * _IC = 0 ); | ||
132 | ~OTManage(); | ||
133 | |||
134 | public slots : | ||
135 | |||
136 | private slots : | ||
137 | |||
138 | void SLOT_ShowDriver( QListViewItem * ); | ||
139 | void SLOT_UpDriver( bool ); | ||
140 | void SLOT_StateChange( OTDriver * , bool ); | ||
141 | void SLOT_DriverListChanged(); | ||
142 | void SLOT_SetRefreshTimer( int ); | ||
143 | |||
144 | signals : | ||
145 | |||
146 | protected : | ||
147 | |||
148 | private : | ||
149 | |||
150 | // load scanned devices | ||
151 | |||
152 | bool MyIcons; | ||
153 | OTIcons * Icons; | ||
154 | OTGateway * OT; | ||
155 | OTInquiry * Scanning; | ||
156 | }; | ||
157 | }; | ||
158 | |||
159 | #include <OTMainGUI.h> | ||
160 | |||
161 | namespace Opietooth2 { | ||
162 | class OTMain : public OTMainGUI { | ||
163 | |||
164 | Q_OBJECT | ||
165 | |||
166 | public : | ||
167 | |||
168 | OTMain( QWidget * parent ); | ||
169 | ~OTMain(); | ||
170 | |||
171 | public slots : | ||
172 | |||
173 | private slots : | ||
174 | |||
175 | void SLOT_Pairing( void ); | ||
176 | void SLOT_Manage( void ); | ||
177 | void SLOT_Scan( void ); | ||
178 | void SLOT_EnableBluetooth( bool ); | ||
179 | void SLOT_DriverListChanged(); | ||
180 | void SLOT_DeviceIsEnabled( bool ); | ||
181 | void SLOT_StateChange( OTDriver * , bool ); | ||
182 | |||
183 | signals : | ||
184 | |||
185 | protected : | ||
186 | |||
187 | private : | ||
188 | |||
189 | // load scanned devices | ||
190 | OTIcons * Icons; | ||
191 | OTGateway * OT; | ||
192 | }; | ||
193 | }; | ||
194 | #endif | ||