author | mickeyl <mickeyl> | 2003-05-08 09:12:24 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-05-08 09:12:24 (UTC) |
commit | 215b9cbd3d1316887674b92268610c8f63a5caaf (patch) (unidiff) | |
tree | 92f77edcb0f997cf180d545dd78a40fe23a44169 | |
parent | eb1dba5550e63ab7b915d55048175e2992ab5447 (diff) | |
download | opie-215b9cbd3d1316887674b92268610c8f63a5caaf.zip opie-215b9cbd3d1316887674b92268610c8f63a5caaf.tar.gz opie-215b9cbd3d1316887674b92268610c8f63a5caaf.tar.bz2 |
add fine tuning of parsing process - the semantics is not yet set in stone however...
-rw-r--r-- | noncore/net/wellenreiter/gui/configbase.ui | 149 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/graphwindow.cpp | 50 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/graphwindow.h | 3 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/protolistview.cpp | 19 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/protolistview.h | 4 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 64 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.h | 3 |
7 files changed, 198 insertions, 94 deletions
diff --git a/noncore/net/wellenreiter/gui/configbase.ui b/noncore/net/wellenreiter/gui/configbase.ui index 7504ebc..422826a 100644 --- a/noncore/net/wellenreiter/gui/configbase.ui +++ b/noncore/net/wellenreiter/gui/configbase.ui | |||
@@ -1,255 +1,205 @@ | |||
1 | <!DOCTYPE UI><UI> | 1 | <!DOCTYPE UI><UI> |
2 | <class>WellenreiterConfigBase</class> | 2 | <class>WellenreiterConfigBase</class> |
3 | <widget> | 3 | <widget> |
4 | <class>QDialog</class> | 4 | <class>QDialog</class> |
5 | <property stdset="1"> | 5 | <property stdset="1"> |
6 | <name>name</name> | 6 | <name>name</name> |
7 | <cstring>WellenreiterConfigBase</cstring> | 7 | <cstring>WellenreiterConfigBase</cstring> |
8 | </property> | 8 | </property> |
9 | <property stdset="1"> | 9 | <property stdset="1"> |
10 | <name>geometry</name> | 10 | <name>geometry</name> |
11 | <rect> | 11 | <rect> |
12 | <x>0</x> | 12 | <x>0</x> |
13 | <y>0</y> | 13 | <y>0</y> |
14 | <width>209</width> | 14 | <width>261</width> |
15 | <height>287</height> | 15 | <height>280</height> |
16 | </rect> | 16 | </rect> |
17 | </property> | 17 | </property> |
18 | <property stdset="1"> | 18 | <property stdset="1"> |
19 | <name>caption</name> | 19 | <name>caption</name> |
20 | <string>Wellenreiter II COnfiguration Dialog</string> | 20 | <string>Wellenreiter II COnfiguration Dialog</string> |
21 | </property> | 21 | </property> |
22 | <property> | 22 | <property> |
23 | <name>layoutMargin</name> | 23 | <name>layoutMargin</name> |
24 | </property> | 24 | </property> |
25 | <property> | 25 | <property> |
26 | <name>layoutSpacing</name> | 26 | <name>layoutSpacing</name> |
27 | </property> | 27 | </property> |
28 | <grid> | 28 | <grid> |
29 | <property stdset="1"> | 29 | <property stdset="1"> |
30 | <name>margin</name> | 30 | <name>margin</name> |
31 | <number>2</number> | 31 | <number>2</number> |
32 | </property> | 32 | </property> |
33 | <property stdset="1"> | 33 | <property stdset="1"> |
34 | <name>spacing</name> | 34 | <name>spacing</name> |
35 | <number>3</number> | 35 | <number>3</number> |
36 | </property> | 36 | </property> |
37 | <widget row="0" column="0" > | 37 | <widget row="0" column="0" > |
38 | <class>QTabWidget</class> | 38 | <class>QTabWidget</class> |
39 | <property stdset="1"> | 39 | <property stdset="1"> |
40 | <name>name</name> | 40 | <name>name</name> |
41 | <cstring>tab</cstring> | 41 | <cstring>tab</cstring> |
42 | </property> | 42 | </property> |
43 | <property> | 43 | <property> |
44 | <name>layoutMargin</name> | 44 | <name>layoutMargin</name> |
45 | </property> | 45 | </property> |
46 | <property> | 46 | <property> |
47 | <name>layoutSpacing</name> | 47 | <name>layoutSpacing</name> |
48 | </property> | 48 | </property> |
49 | <widget> | 49 | <widget> |
50 | <class>QWidget</class> | 50 | <class>QWidget</class> |
51 | <property stdset="1"> | 51 | <property stdset="1"> |
52 | <name>name</name> | 52 | <name>name</name> |
53 | <cstring>tab</cstring> | 53 | <cstring>tab</cstring> |
54 | </property> | 54 | </property> |
55 | <attribute> | 55 | <attribute> |
56 | <name>title</name> | 56 | <name>title</name> |
57 | <string>Interface</string> | 57 | <string>Interface</string> |
58 | </attribute> | 58 | </attribute> |
59 | <grid> | 59 | <grid> |
60 | <property stdset="1"> | 60 | <property stdset="1"> |
61 | <name>margin</name> | 61 | <name>margin</name> |
62 | <number>5</number> | 62 | <number>5</number> |
63 | </property> | 63 | </property> |
64 | <property stdset="1"> | 64 | <property stdset="1"> |
65 | <name>spacing</name> | 65 | <name>spacing</name> |
66 | <number>3</number> | 66 | <number>3</number> |
67 | </property> | 67 | </property> |
68 | <widget row="0" column="0" > | 68 | <widget row="0" column="0" > |
69 | <class>QLabel</class> | 69 | <class>QLabel</class> |
70 | <property stdset="1"> | 70 | <property stdset="1"> |
71 | <name>name</name> | 71 | <name>name</name> |
72 | <cstring>TextLabel1_2</cstring> | 72 | <cstring>TextLabel1_2</cstring> |
73 | </property> | 73 | </property> |
74 | <property stdset="1"> | 74 | <property stdset="1"> |
75 | <name>enabled</name> | 75 | <name>enabled</name> |
76 | <bool>true</bool> | 76 | <bool>true</bool> |
77 | </property> | 77 | </property> |
78 | <property stdset="1"> | 78 | <property stdset="1"> |
79 | <name>text</name> | 79 | <name>text</name> |
80 | <string>Name:</string> | 80 | <string>Name:</string> |
81 | </property> | 81 | </property> |
82 | </widget> | 82 | </widget> |
83 | <widget row="1" column="0" > | 83 | <widget row="1" column="0" > |
84 | <class>QLabel</class> | 84 | <class>QLabel</class> |
85 | <property stdset="1"> | 85 | <property stdset="1"> |
86 | <name>name</name> | 86 | <name>name</name> |
87 | <cstring>TextLabel2_3</cstring> | 87 | <cstring>TextLabel2_3</cstring> |
88 | </property> | 88 | </property> |
89 | <property stdset="1"> | 89 | <property stdset="1"> |
90 | <name>enabled</name> | 90 | <name>enabled</name> |
91 | <bool>true</bool> | 91 | <bool>true</bool> |
92 | </property> | 92 | </property> |
93 | <property stdset="1"> | 93 | <property stdset="1"> |
94 | <name>text</name> | 94 | <name>text</name> |
95 | <string>Driver:</string> | 95 | <string>Driver:</string> |
96 | </property> | 96 | </property> |
97 | </widget> | 97 | </widget> |
98 | <widget row="4" column="0" rowspan="1" colspan="2" > | ||
99 | <class>QCheckBox</class> | ||
100 | <property stdset="1"> | ||
101 | <name>name</name> | ||
102 | <cstring>hopChannels</cstring> | ||
103 | </property> | ||
104 | <property stdset="1"> | ||
105 | <name>text</name> | ||
106 | <string>Hop Channels</string> | ||
107 | </property> | ||
108 | <property stdset="1"> | ||
109 | <name>checked</name> | ||
110 | <bool>true</bool> | ||
111 | </property> | ||
112 | </widget> | ||
113 | <widget row="2" column="0" rowspan="1" colspan="4" > | 98 | <widget row="2" column="0" rowspan="1" colspan="4" > |
114 | <class>QCheckBox</class> | 99 | <class>QCheckBox</class> |
115 | <property stdset="1"> | 100 | <property stdset="1"> |
116 | <name>name</name> | 101 | <name>name</name> |
117 | <cstring>prismHeader</cstring> | 102 | <cstring>prismHeader</cstring> |
118 | </property> | 103 | </property> |
119 | <property stdset="1"> | 104 | <property stdset="1"> |
120 | <name>text</name> | 105 | <name>text</name> |
121 | <string>Use additional PRISM header</string> | 106 | <string>Use additional PRISM header</string> |
122 | </property> | 107 | </property> |
123 | </widget> | 108 | </widget> |
124 | <widget row="4" column="3" > | 109 | <widget row="6" column="0" rowspan="1" colspan="4" > |
125 | <class>QSpinBox</class> | ||
126 | <property stdset="1"> | ||
127 | <name>name</name> | ||
128 | <cstring>hopInterval</cstring> | ||
129 | </property> | ||
130 | <property stdset="1"> | ||
131 | <name>enabled</name> | ||
132 | <bool>true</bool> | ||
133 | </property> | ||
134 | <property stdset="1"> | ||
135 | <name>suffix</name> | ||
136 | <string> ms</string> | ||
137 | </property> | ||
138 | <property stdset="1"> | ||
139 | <name>maxValue</name> | ||
140 | <number>2000</number> | ||
141 | </property> | ||
142 | <property stdset="1"> | ||
143 | <name>minValue</name> | ||
144 | <number>100</number> | ||
145 | </property> | ||
146 | <property stdset="1"> | ||
147 | <name>lineStep</name> | ||
148 | <number>100</number> | ||
149 | </property> | ||
150 | <property stdset="1"> | ||
151 | <name>value</name> | ||
152 | <number>1000</number> | ||
153 | </property> | ||
154 | <property> | ||
155 | <name>whatsThis</name> | ||
156 | <string>Choose the channel hop interval.</string> | ||
157 | </property> | ||
158 | </widget> | ||
159 | <widget row="5" column="0" rowspan="1" colspan="4" > | ||
160 | <class>QGroupBox</class> | 110 | <class>QGroupBox</class> |
161 | <property stdset="1"> | 111 | <property stdset="1"> |
162 | <name>name</name> | 112 | <name>name</name> |
163 | <cstring>GroupBox1</cstring> | 113 | <cstring>GroupBox1</cstring> |
164 | </property> | 114 | </property> |
165 | <property stdset="1"> | 115 | <property stdset="1"> |
166 | <name>title</name> | 116 | <name>title</name> |
167 | <string>Scan on channel</string> | 117 | <string>Scan on channel</string> |
168 | </property> | 118 | </property> |
169 | <property> | 119 | <property> |
170 | <name>layoutMargin</name> | 120 | <name>layoutMargin</name> |
171 | </property> | 121 | </property> |
172 | <property> | 122 | <property> |
173 | <name>layoutSpacing</name> | 123 | <name>layoutSpacing</name> |
174 | </property> | 124 | </property> |
175 | <grid> | 125 | <grid> |
176 | <property stdset="1"> | 126 | <property stdset="1"> |
177 | <name>margin</name> | 127 | <name>margin</name> |
178 | <number>4</number> | 128 | <number>4</number> |
179 | </property> | 129 | </property> |
180 | <property stdset="1"> | 130 | <property stdset="1"> |
181 | <name>spacing</name> | 131 | <name>spacing</name> |
182 | <number>2</number> | 132 | <number>2</number> |
183 | </property> | 133 | </property> |
184 | <widget row="1" column="1" > | 134 | <widget row="1" column="1" > |
185 | <class>QCheckBox</class> | 135 | <class>QCheckBox</class> |
186 | <property stdset="1"> | 136 | <property stdset="1"> |
187 | <name>name</name> | 137 | <name>name</name> |
188 | <cstring>channel6</cstring> | 138 | <cstring>channel6</cstring> |
189 | </property> | 139 | </property> |
190 | <property stdset="1"> | 140 | <property stdset="1"> |
191 | <name>text</name> | 141 | <name>text</name> |
192 | <string>6</string> | 142 | <string>6</string> |
193 | </property> | 143 | </property> |
194 | </widget> | 144 | </widget> |
195 | <widget row="1" column="3" > | 145 | <widget row="1" column="3" > |
196 | <class>QCheckBox</class> | 146 | <class>QCheckBox</class> |
197 | <property stdset="1"> | 147 | <property stdset="1"> |
198 | <name>name</name> | 148 | <name>name</name> |
199 | <cstring>channel8</cstring> | 149 | <cstring>channel8</cstring> |
200 | </property> | 150 | </property> |
201 | <property stdset="1"> | 151 | <property stdset="1"> |
202 | <name>text</name> | 152 | <name>text</name> |
203 | <string>8</string> | 153 | <string>8</string> |
204 | </property> | 154 | </property> |
205 | </widget> | 155 | </widget> |
206 | <widget row="0" column="2" > | 156 | <widget row="0" column="2" > |
207 | <class>QCheckBox</class> | 157 | <class>QCheckBox</class> |
208 | <property stdset="1"> | 158 | <property stdset="1"> |
209 | <name>name</name> | 159 | <name>name</name> |
210 | <cstring>channel2</cstring> | 160 | <cstring>channel2</cstring> |
211 | </property> | 161 | </property> |
212 | <property stdset="1"> | 162 | <property stdset="1"> |
213 | <name>text</name> | 163 | <name>text</name> |
214 | <string>2</string> | 164 | <string>2</string> |
215 | </property> | 165 | </property> |
216 | </widget> | 166 | </widget> |
217 | <widget row="1" column="4" > | 167 | <widget row="1" column="4" > |
218 | <class>QCheckBox</class> | 168 | <class>QCheckBox</class> |
219 | <property stdset="1"> | 169 | <property stdset="1"> |
220 | <name>name</name> | 170 | <name>name</name> |
221 | <cstring>channel9</cstring> | 171 | <cstring>channel9</cstring> |
222 | </property> | 172 | </property> |
223 | <property stdset="1"> | 173 | <property stdset="1"> |
224 | <name>text</name> | 174 | <name>text</name> |
225 | <string>9</string> | 175 | <string>9</string> |
226 | </property> | 176 | </property> |
227 | </widget> | 177 | </widget> |
228 | <widget row="0" column="1" > | 178 | <widget row="0" column="1" > |
229 | <class>QCheckBox</class> | 179 | <class>QCheckBox</class> |
230 | <property stdset="1"> | 180 | <property stdset="1"> |
231 | <name>name</name> | 181 | <name>name</name> |
232 | <cstring>channel1</cstring> | 182 | <cstring>channel1</cstring> |
233 | </property> | 183 | </property> |
234 | <property stdset="1"> | 184 | <property stdset="1"> |
235 | <name>text</name> | 185 | <name>text</name> |
236 | <string>1</string> | 186 | <string>1</string> |
237 | </property> | 187 | </property> |
238 | </widget> | 188 | </widget> |
239 | <widget row="0" column="0" > | 189 | <widget row="0" column="0" > |
240 | <class>QCheckBox</class> | 190 | <class>QCheckBox</class> |
241 | <property stdset="1"> | 191 | <property stdset="1"> |
242 | <name>name</name> | 192 | <name>name</name> |
243 | <cstring>channelAll</cstring> | 193 | <cstring>channelAll</cstring> |
244 | </property> | 194 | </property> |
245 | <property stdset="1"> | 195 | <property stdset="1"> |
246 | <name>text</name> | 196 | <name>text</name> |
247 | <string>All</string> | 197 | <string>All</string> |
248 | </property> | 198 | </property> |
249 | </widget> | 199 | </widget> |
250 | <widget row="2" column="1" > | 200 | <widget row="2" column="1" > |
251 | <class>QCheckBox</class> | 201 | <class>QCheckBox</class> |
252 | <property stdset="1"> | 202 | <property stdset="1"> |
253 | <name>name</name> | 203 | <name>name</name> |
254 | <cstring>channel11</cstring> | 204 | <cstring>channel11</cstring> |
255 | </property> | 205 | </property> |
@@ -327,252 +277,317 @@ | |||
327 | <widget row="2" column="3" > | 277 | <widget row="2" column="3" > |
328 | <class>QCheckBox</class> | 278 | <class>QCheckBox</class> |
329 | <property stdset="1"> | 279 | <property stdset="1"> |
330 | <name>name</name> | 280 | <name>name</name> |
331 | <cstring>channel13</cstring> | 281 | <cstring>channel13</cstring> |
332 | </property> | 282 | </property> |
333 | <property stdset="1"> | 283 | <property stdset="1"> |
334 | <name>text</name> | 284 | <name>text</name> |
335 | <string>13</string> | 285 | <string>13</string> |
336 | </property> | 286 | </property> |
337 | </widget> | 287 | </widget> |
338 | <widget row="2" column="4" > | 288 | <widget row="2" column="4" > |
339 | <class>QCheckBox</class> | 289 | <class>QCheckBox</class> |
340 | <property stdset="1"> | 290 | <property stdset="1"> |
341 | <name>name</name> | 291 | <name>name</name> |
342 | <cstring>channel14</cstring> | 292 | <cstring>channel14</cstring> |
343 | </property> | 293 | </property> |
344 | <property stdset="1"> | 294 | <property stdset="1"> |
345 | <name>text</name> | 295 | <name>text</name> |
346 | <string>14</string> | 296 | <string>14</string> |
347 | </property> | 297 | </property> |
348 | </widget> | 298 | </widget> |
349 | </grid> | 299 | </grid> |
350 | </widget> | 300 | </widget> |
351 | <widget row="0" column="1" rowspan="1" colspan="3" > | 301 | <widget row="0" column="1" rowspan="1" colspan="3" > |
352 | <class>QComboBox</class> | 302 | <class>QComboBox</class> |
353 | <property stdset="1"> | 303 | <property stdset="1"> |
354 | <name>name</name> | 304 | <name>name</name> |
355 | <cstring>interfaceName</cstring> | 305 | <cstring>interfaceName</cstring> |
356 | </property> | 306 | </property> |
357 | <property stdset="1"> | 307 | <property stdset="1"> |
358 | <name>enabled</name> | 308 | <name>enabled</name> |
359 | <bool>true</bool> | 309 | <bool>true</bool> |
360 | </property> | 310 | </property> |
361 | <property> | 311 | <property> |
362 | <name>whatsThis</name> | 312 | <name>whatsThis</name> |
363 | <string>Choose the interface used for sniffing.</string> | 313 | <string>Choose the interface used for sniffing.</string> |
364 | </property> | 314 | </property> |
365 | </widget> | 315 | </widget> |
366 | <widget row="1" column="1" rowspan="1" colspan="3" > | 316 | <widget row="1" column="1" rowspan="1" colspan="3" > |
367 | <class>QComboBox</class> | 317 | <class>QComboBox</class> |
368 | <item> | 318 | <item> |
369 | <property> | 319 | <property> |
370 | <name>text</name> | 320 | <name>text</name> |
371 | <string><select></string> | 321 | <string><select></string> |
372 | </property> | 322 | </property> |
373 | </item> | 323 | </item> |
374 | <item> | 324 | <item> |
375 | <property> | 325 | <property> |
376 | <name>text</name> | 326 | <name>text</name> |
377 | <string>cisco</string> | 327 | <string>cisco</string> |
378 | </property> | 328 | </property> |
379 | </item> | 329 | </item> |
380 | <item> | 330 | <item> |
381 | <property> | 331 | <property> |
382 | <name>text</name> | 332 | <name>text</name> |
383 | <string>wlan-ng</string> | 333 | <string>wlan-ng</string> |
384 | </property> | 334 | </property> |
385 | </item> | 335 | </item> |
386 | <item> | 336 | <item> |
387 | <property> | 337 | <property> |
388 | <name>text</name> | 338 | <name>text</name> |
389 | <string>hostap</string> | 339 | <string>hostap</string> |
390 | </property> | 340 | </property> |
391 | </item> | 341 | </item> |
392 | <item> | 342 | <item> |
393 | <property> | 343 | <property> |
394 | <name>text</name> | 344 | <name>text</name> |
395 | <string>orinoco</string> | 345 | <string>orinoco</string> |
396 | </property> | 346 | </property> |
397 | </item> | 347 | </item> |
398 | <item> | 348 | <item> |
399 | <property> | 349 | <property> |
400 | <name>text</name> | 350 | <name>text</name> |
401 | <string><manual></string> | 351 | <string><manual></string> |
402 | </property> | 352 | </property> |
403 | </item> | 353 | </item> |
404 | <item> | 354 | <item> |
405 | <property> | 355 | <property> |
406 | <name>text</name> | 356 | <name>text</name> |
407 | <string><file></string> | 357 | <string><file></string> |
408 | </property> | 358 | </property> |
409 | </item> | 359 | </item> |
410 | <property stdset="1"> | 360 | <property stdset="1"> |
411 | <name>name</name> | 361 | <name>name</name> |
412 | <cstring>deviceType</cstring> | 362 | <cstring>deviceType</cstring> |
413 | </property> | 363 | </property> |
414 | <property stdset="1"> | 364 | <property stdset="1"> |
415 | <name>enabled</name> | 365 | <name>enabled</name> |
416 | <bool>true</bool> | 366 | <bool>true</bool> |
417 | </property> | 367 | </property> |
418 | <property> | 368 | <property> |
419 | <name>whatsThis</name> | 369 | <name>whatsThis</name> |
420 | <string>Choose the type of driver used for sniffing.</string> | 370 | <string>Choose the type of driver used for sniffing.</string> |
421 | </property> | 371 | </property> |
422 | </widget> | 372 | </widget> |
423 | <widget row="4" column="2" > | ||
424 | <class>QLabel</class> | ||
425 | <property stdset="1"> | ||
426 | <name>name</name> | ||
427 | <cstring>TextLabel1</cstring> | ||
428 | </property> | ||
429 | <property stdset="1"> | ||
430 | <name>text</name> | ||
431 | <string>every</string> | ||
432 | </property> | ||
433 | </widget> | ||
434 | <spacer row="3" column="0" > | 373 | <spacer row="3" column="0" > |
435 | <property> | 374 | <property> |
436 | <name>name</name> | 375 | <name>name</name> |
437 | <cstring>Spacer4</cstring> | 376 | <cstring>Spacer4</cstring> |
438 | </property> | 377 | </property> |
439 | <property stdset="1"> | 378 | <property stdset="1"> |
440 | <name>orientation</name> | 379 | <name>orientation</name> |
441 | <enum>Vertical</enum> | 380 | <enum>Vertical</enum> |
442 | </property> | 381 | </property> |
443 | <property stdset="1"> | 382 | <property stdset="1"> |
444 | <name>sizeType</name> | 383 | <name>sizeType</name> |
445 | <enum>Expanding</enum> | 384 | <enum>Expanding</enum> |
446 | </property> | 385 | </property> |
447 | <property> | 386 | <property> |
448 | <name>sizeHint</name> | 387 | <name>sizeHint</name> |
449 | <size> | 388 | <size> |
450 | <width>20</width> | 389 | <width>20</width> |
451 | <height>20</height> | 390 | <height>20</height> |
452 | </size> | 391 | </size> |
453 | </property> | 392 | </property> |
454 | </spacer> | 393 | </spacer> |
394 | <widget row="4" column="2" > | ||
395 | <class>QLabel</class> | ||
396 | <property stdset="1"> | ||
397 | <name>name</name> | ||
398 | <cstring>TextLabel1</cstring> | ||
399 | </property> | ||
400 | <property stdset="1"> | ||
401 | <name>text</name> | ||
402 | <string>every</string> | ||
403 | </property> | ||
404 | </widget> | ||
405 | <widget row="4" column="0" rowspan="1" colspan="2" > | ||
406 | <class>QCheckBox</class> | ||
407 | <property stdset="1"> | ||
408 | <name>name</name> | ||
409 | <cstring>hopChannels</cstring> | ||
410 | </property> | ||
411 | <property stdset="1"> | ||
412 | <name>text</name> | ||
413 | <string>Hop Channels</string> | ||
414 | </property> | ||
415 | <property stdset="1"> | ||
416 | <name>checked</name> | ||
417 | <bool>true</bool> | ||
418 | </property> | ||
419 | </widget> | ||
420 | <widget row="4" column="3" > | ||
421 | <class>QSpinBox</class> | ||
422 | <property stdset="1"> | ||
423 | <name>name</name> | ||
424 | <cstring>hopInterval</cstring> | ||
425 | </property> | ||
426 | <property stdset="1"> | ||
427 | <name>enabled</name> | ||
428 | <bool>true</bool> | ||
429 | </property> | ||
430 | <property stdset="1"> | ||
431 | <name>suffix</name> | ||
432 | <string> ms</string> | ||
433 | </property> | ||
434 | <property stdset="1"> | ||
435 | <name>maxValue</name> | ||
436 | <number>2000</number> | ||
437 | </property> | ||
438 | <property stdset="1"> | ||
439 | <name>minValue</name> | ||
440 | <number>100</number> | ||
441 | </property> | ||
442 | <property stdset="1"> | ||
443 | <name>lineStep</name> | ||
444 | <number>100</number> | ||
445 | </property> | ||
446 | <property stdset="1"> | ||
447 | <name>value</name> | ||
448 | <number>1000</number> | ||
449 | </property> | ||
450 | <property> | ||
451 | <name>whatsThis</name> | ||
452 | <string>Choose the channel hop interval.</string> | ||
453 | </property> | ||
454 | </widget> | ||
455 | <widget row="5" column="0" rowspan="1" colspan="4" > | ||
456 | <class>QCheckBox</class> | ||
457 | <property stdset="1"> | ||
458 | <name>name</name> | ||
459 | <cstring>adaptiveHopping</cstring> | ||
460 | </property> | ||
461 | <property stdset="1"> | ||
462 | <name>text</name> | ||
463 | <string>Use Adaptive(TM) Hop Scheme</string> | ||
464 | </property> | ||
465 | </widget> | ||
455 | </grid> | 466 | </grid> |
456 | </widget> | 467 | </widget> |
457 | <widget> | 468 | <widget> |
458 | <class>QWidget</class> | 469 | <class>QWidget</class> |
459 | <property stdset="1"> | 470 | <property stdset="1"> |
460 | <name>name</name> | 471 | <name>name</name> |
461 | <cstring>tab</cstring> | 472 | <cstring>tab</cstring> |
462 | </property> | 473 | </property> |
463 | <attribute> | 474 | <attribute> |
464 | <name>title</name> | 475 | <name>title</name> |
465 | <string>Capture</string> | 476 | <string>Capture</string> |
466 | </attribute> | 477 | </attribute> |
467 | <grid> | 478 | <grid> |
468 | <property stdset="1"> | 479 | <property stdset="1"> |
469 | <name>margin</name> | 480 | <name>margin</name> |
470 | <number>5</number> | 481 | <number>5</number> |
471 | </property> | 482 | </property> |
472 | <property stdset="1"> | 483 | <property stdset="1"> |
473 | <name>spacing</name> | 484 | <name>spacing</name> |
474 | <number>3</number> | 485 | <number>3</number> |
475 | </property> | 486 | </property> |
476 | <widget row="2" column="0" rowspan="1" colspan="3" > | 487 | <widget row="2" column="0" rowspan="1" colspan="3" > |
477 | <class>ProtocolListView</class> | 488 | <class>ProtocolListView</class> |
478 | <property stdset="1"> | 489 | <property stdset="1"> |
479 | <name>name</name> | 490 | <name>name</name> |
480 | <cstring>capturePackets</cstring> | 491 | <cstring>capturePackets</cstring> |
481 | </property> | 492 | </property> |
482 | <property stdset="1"> | 493 | <property stdset="1"> |
494 | <name>enabled</name> | ||
495 | <bool>false</bool> | ||
496 | </property> | ||
497 | <property stdset="1"> | ||
483 | <name>sizePolicy</name> | 498 | <name>sizePolicy</name> |
484 | <sizepolicy> | 499 | <sizepolicy> |
485 | <hsizetype>7</hsizetype> | 500 | <hsizetype>7</hsizetype> |
486 | <vsizetype>7</vsizetype> | 501 | <vsizetype>7</vsizetype> |
487 | </sizepolicy> | 502 | </sizepolicy> |
488 | </property> | 503 | </property> |
489 | </widget> | 504 | </widget> |
490 | <widget row="1" column="0" rowspan="1" colspan="3" > | 505 | <widget row="1" column="0" rowspan="1" colspan="3" > |
491 | <class>QLineEdit</class> | 506 | <class>QLineEdit</class> |
492 | <property stdset="1"> | 507 | <property stdset="1"> |
493 | <name>name</name> | 508 | <name>name</name> |
494 | <cstring>captureFileName</cstring> | 509 | <cstring>captureFileName</cstring> |
495 | </property> | 510 | </property> |
496 | <property stdset="1"> | 511 | <property stdset="1"> |
497 | <name>enabled</name> | 512 | <name>enabled</name> |
498 | <bool>false</bool> | 513 | <bool>false</bool> |
499 | </property> | 514 | </property> |
500 | <property stdset="1"> | 515 | <property stdset="1"> |
501 | <name>text</name> | 516 | <name>text</name> |
502 | <string>/tmp/capture</string> | 517 | <string>/tmp/capture</string> |
503 | </property> | 518 | </property> |
504 | </widget> | 519 | </widget> |
505 | <widget row="0" column="2" > | 520 | <widget row="0" column="2" > |
506 | <class>QToolButton</class> | 521 | <class>QToolButton</class> |
507 | <property stdset="1"> | 522 | <property stdset="1"> |
508 | <name>name</name> | 523 | <name>name</name> |
509 | <cstring>getCaptureFileName</cstring> | 524 | <cstring>getCaptureFileName</cstring> |
510 | </property> | 525 | </property> |
511 | <property stdset="1"> | 526 | <property stdset="1"> |
512 | <name>enabled</name> | 527 | <name>enabled</name> |
513 | <bool>false</bool> | 528 | <bool>false</bool> |
514 | </property> | 529 | </property> |
515 | <property stdset="1"> | 530 | <property stdset="1"> |
516 | <name>text</name> | 531 | <name>text</name> |
517 | <string>Browse</string> | 532 | <string>Browse</string> |
518 | </property> | 533 | </property> |
519 | </widget> | 534 | </widget> |
520 | <spacer row="0" column="1" > | 535 | <spacer row="0" column="1" > |
521 | <property> | 536 | <property> |
522 | <name>name</name> | 537 | <name>name</name> |
523 | <cstring>Spacer2</cstring> | 538 | <cstring>Spacer2</cstring> |
524 | </property> | 539 | </property> |
525 | <property stdset="1"> | 540 | <property stdset="1"> |
526 | <name>orientation</name> | 541 | <name>orientation</name> |
527 | <enum>Horizontal</enum> | 542 | <enum>Horizontal</enum> |
528 | </property> | 543 | </property> |
529 | <property stdset="1"> | 544 | <property stdset="1"> |
530 | <name>sizeType</name> | 545 | <name>sizeType</name> |
531 | <enum>Expanding</enum> | 546 | <enum>Expanding</enum> |
532 | </property> | 547 | </property> |
533 | <property> | 548 | <property> |
534 | <name>sizeHint</name> | 549 | <name>sizeHint</name> |
535 | <size> | 550 | <size> |
536 | <width>20</width> | 551 | <width>20</width> |
537 | <height>20</height> | 552 | <height>20</height> |
538 | </size> | 553 | </size> |
539 | </property> | 554 | </property> |
540 | </spacer> | 555 | </spacer> |
541 | <widget row="0" column="0" > | 556 | <widget row="0" column="0" > |
542 | <class>QCheckBox</class> | 557 | <class>QCheckBox</class> |
543 | <property stdset="1"> | 558 | <property stdset="1"> |
544 | <name>name</name> | 559 | <name>name</name> |
545 | <cstring>writeCaptureFile</cstring> | 560 | <cstring>writeCaptureFile</cstring> |
546 | </property> | 561 | </property> |
547 | <property stdset="1"> | 562 | <property stdset="1"> |
548 | <name>enabled</name> | 563 | <name>enabled</name> |
549 | <bool>true</bool> | 564 | <bool>true</bool> |
550 | </property> | 565 | </property> |
551 | <property stdset="1"> | 566 | <property stdset="1"> |
552 | <name>text</name> | 567 | <name>text</name> |
553 | <string>Write Capture Files To</string> | 568 | <string>Write Capture Files To</string> |
554 | </property> | 569 | </property> |
555 | </widget> | 570 | </widget> |
556 | </grid> | 571 | </grid> |
557 | </widget> | 572 | </widget> |
558 | <widget> | 573 | <widget> |
559 | <class>QWidget</class> | 574 | <class>QWidget</class> |
560 | <property stdset="1"> | 575 | <property stdset="1"> |
561 | <name>name</name> | 576 | <name>name</name> |
562 | <cstring>tab</cstring> | 577 | <cstring>tab</cstring> |
563 | </property> | 578 | </property> |
564 | <attribute> | 579 | <attribute> |
565 | <name>title</name> | 580 | <name>title</name> |
566 | <string>Parse</string> | 581 | <string>Parse</string> |
567 | </attribute> | 582 | </attribute> |
568 | <grid> | 583 | <grid> |
569 | <property stdset="1"> | 584 | <property stdset="1"> |
570 | <name>margin</name> | 585 | <name>margin</name> |
571 | <number>5</number> | 586 | <number>5</number> |
572 | </property> | 587 | </property> |
573 | <property stdset="1"> | 588 | <property stdset="1"> |
574 | <name>spacing</name> | 589 | <name>spacing</name> |
575 | <number>3</number> | 590 | <number>3</number> |
576 | </property> | 591 | </property> |
577 | <widget row="0" column="0" > | 592 | <widget row="0" column="0" > |
578 | <class>ProtocolListView</class> | 593 | <class>ProtocolListView</class> |
@@ -772,98 +787,104 @@ | |||
772 | <name>text</name> | 787 | <name>text</name> |
773 | <string>192.168.125.1</string> | 788 | <string>192.168.125.1</string> |
774 | </property> | 789 | </property> |
775 | </item> | 790 | </item> |
776 | <item> | 791 | <item> |
777 | <property> | 792 | <property> |
778 | <name>text</name> | 793 | <name>text</name> |
779 | <string><automatic></string> | 794 | <string><automatic></string> |
780 | </property> | 795 | </property> |
781 | </item> | 796 | </item> |
782 | <property stdset="1"> | 797 | <property stdset="1"> |
783 | <name>name</name> | 798 | <name>name</name> |
784 | <cstring>fakeIP</cstring> | 799 | <cstring>fakeIP</cstring> |
785 | </property> | 800 | </property> |
786 | <property stdset="1"> | 801 | <property stdset="1"> |
787 | <name>sizePolicy</name> | 802 | <name>sizePolicy</name> |
788 | <sizepolicy> | 803 | <sizepolicy> |
789 | <hsizetype>7</hsizetype> | 804 | <hsizetype>7</hsizetype> |
790 | <vsizetype>0</vsizetype> | 805 | <vsizetype>0</vsizetype> |
791 | </sizepolicy> | 806 | </sizepolicy> |
792 | </property> | 807 | </property> |
793 | <property stdset="1"> | 808 | <property stdset="1"> |
794 | <name>editable</name> | 809 | <name>editable</name> |
795 | <bool>true</bool> | 810 | <bool>true</bool> |
796 | </property> | 811 | </property> |
797 | <property stdset="1"> | 812 | <property stdset="1"> |
798 | <name>currentItem</name> | 813 | <name>currentItem</name> |
799 | <number>0</number> | 814 | <number>0</number> |
800 | </property> | 815 | </property> |
801 | </widget> | 816 | </widget> |
802 | </grid> | 817 | </grid> |
803 | </widget> | 818 | </widget> |
804 | </grid> | 819 | </grid> |
805 | </widget> | 820 | </widget> |
806 | </widget> | 821 | </widget> |
807 | </grid> | 822 | </grid> |
808 | </widget> | 823 | </widget> |
809 | <customwidgets> | 824 | <customwidgets> |
810 | <customwidget> | 825 | <customwidget> |
811 | <class>ProtocolListView</class> | 826 | <class>ProtocolListView</class> |
812 | <header location="local">protolistview.h</header> | 827 | <header location="local">protolistview.h</header> |
813 | <sizehint> | 828 | <sizehint> |
814 | <width>100</width> | 829 | <width>100</width> |
815 | <height>100</height> | 830 | <height>100</height> |
816 | </sizehint> | 831 | </sizehint> |
817 | <container>0</container> | 832 | <container>0</container> |
818 | <sizepolicy> | 833 | <sizepolicy> |
819 | <hordata>3</hordata> | 834 | <hordata>3</hordata> |
820 | <verdata>3</verdata> | 835 | <verdata>3</verdata> |
821 | </sizepolicy> | 836 | </sizepolicy> |
822 | <pixmap>image0</pixmap> | 837 | <pixmap>image0</pixmap> |
823 | </customwidget> | 838 | </customwidget> |
824 | </customwidgets> | 839 | </customwidgets> |
825 | <images> | 840 | <images> |
826 | <image> | 841 | <image> |
827 | <name>image0</name> | 842 | <name>image0</name> |
828 | <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> | 843 | <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> |
829 | </image> | 844 | </image> |
830 | </images> | 845 | </images> |
831 | <connections> | 846 | <connections> |
832 | <connection> | 847 | <connection> |
833 | <sender>hopChannels</sender> | 848 | <sender>hopChannels</sender> |
834 | <signal>toggled(bool)</signal> | 849 | <signal>toggled(bool)</signal> |
835 | <receiver>hopInterval</receiver> | 850 | <receiver>hopInterval</receiver> |
836 | <slot>setEnabled(bool)</slot> | 851 | <slot>setEnabled(bool)</slot> |
837 | </connection> | 852 | </connection> |
838 | <connection> | 853 | <connection> |
839 | <sender>hopChannels</sender> | 854 | <sender>hopChannels</sender> |
840 | <signal>toggled(bool)</signal> | 855 | <signal>toggled(bool)</signal> |
841 | <receiver>TextLabel1</receiver> | 856 | <receiver>TextLabel1</receiver> |
842 | <slot>setEnabled(bool)</slot> | 857 | <slot>setEnabled(bool)</slot> |
843 | </connection> | 858 | </connection> |
844 | <connection> | 859 | <connection> |
845 | <sender>enableActiveScanning</sender> | 860 | <sender>enableActiveScanning</sender> |
846 | <signal>toggled(bool)</signal> | 861 | <signal>toggled(bool)</signal> |
847 | <receiver>GroupBox3</receiver> | 862 | <receiver>GroupBox3</receiver> |
848 | <slot>setEnabled(bool)</slot> | 863 | <slot>setEnabled(bool)</slot> |
849 | </connection> | 864 | </connection> |
850 | <connection> | 865 | <connection> |
851 | <sender>enableActiveScanning</sender> | 866 | <sender>enableActiveScanning</sender> |
852 | <signal>toggled(bool)</signal> | 867 | <signal>toggled(bool)</signal> |
853 | <receiver>GroupBox4</receiver> | 868 | <receiver>GroupBox4</receiver> |
854 | <slot>setEnabled(bool)</slot> | 869 | <slot>setEnabled(bool)</slot> |
855 | </connection> | 870 | </connection> |
856 | <connection> | 871 | <connection> |
857 | <sender>writeCaptureFile</sender> | 872 | <sender>writeCaptureFile</sender> |
858 | <signal>toggled(bool)</signal> | 873 | <signal>toggled(bool)</signal> |
859 | <receiver>getCaptureFileName</receiver> | 874 | <receiver>getCaptureFileName</receiver> |
860 | <slot>setEnabled(bool)</slot> | 875 | <slot>setEnabled(bool)</slot> |
861 | </connection> | 876 | </connection> |
862 | <connection> | 877 | <connection> |
863 | <sender>writeCaptureFile</sender> | 878 | <sender>writeCaptureFile</sender> |
864 | <signal>toggled(bool)</signal> | 879 | <signal>toggled(bool)</signal> |
865 | <receiver>captureFileName</receiver> | 880 | <receiver>captureFileName</receiver> |
866 | <slot>setEnabled(bool)</slot> | 881 | <slot>setEnabled(bool)</slot> |
867 | </connection> | 882 | </connection> |
883 | <connection> | ||
884 | <sender>writeCaptureFile</sender> | ||
885 | <signal>toggled(bool)</signal> | ||
886 | <receiver>capturePackets</receiver> | ||
887 | <slot>setEnabled(bool)</slot> | ||
888 | </connection> | ||
868 | </connections> | 889 | </connections> |
869 | </UI> | 890 | </UI> |
diff --git a/noncore/net/wellenreiter/gui/graphwindow.cpp b/noncore/net/wellenreiter/gui/graphwindow.cpp index 7e1f378..b116b91 100644 --- a/noncore/net/wellenreiter/gui/graphwindow.cpp +++ b/noncore/net/wellenreiter/gui/graphwindow.cpp | |||
@@ -1,159 +1,187 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Opie 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 | **********************************************************************/ | 14 | **********************************************************************/ |
15 | 15 | ||
16 | #include "graphwindow.h" | 16 | #include "graphwindow.h" |
17 | 17 | ||
18 | #include <qpainter.h> | 18 | #include <qpainter.h> |
19 | #include <qpixmap.h> | 19 | #include <qpixmap.h> |
20 | #include <qtimer.h> | 20 | #include <qtimer.h> |
21 | 21 | ||
22 | MFrequencySpectrum::MFrequencySpectrum( int channels, QWidget* parent, const char* name, WFlags f) | 22 | MFrequencySpectrum::MFrequencySpectrum( int channels, QWidget* parent, const char* name, WFlags f) |
23 | :QWidget( parent, name,f ), _channels( channels ) | 23 | :QWidget( parent, name,f ), _channels( channels ) |
24 | { | 24 | { |
25 | _values = new int[_channels]; | 25 | _values = new int[_channels]; |
26 | _dirty = new bool[_channels]; | 26 | _dirty = new bool[_channels]; |
27 | for ( int i = 0; i < channels; ++i ) | 27 | for ( int i = 0; i < channels; ++i ) |
28 | { _values[i] = 0; | 28 | { _values[i] = 0; |
29 | _dirty[i] = true; | 29 | _dirty[i] = true; |
30 | } | 30 | } |
31 | 31 | ||
32 | // we draw everything alone | 32 | // we draw everything on our own |
33 | setBackgroundMode( QWidget::NoBackground ); | 33 | setBackgroundMode( QWidget::NoBackground ); |
34 | } | 34 | } |
35 | 35 | ||
36 | 36 | ||
37 | void MFrequencySpectrum::drawTopLine( QPainter* p, int x, int y, int width, const QColor& c ) | ||
38 | { | ||
39 | p->setPen( c.light() ); | ||
40 | p->drawLine( x, y, x+width-1, y ); | ||
41 | } | ||
42 | |||
43 | |||
44 | void MFrequencySpectrum::drawBottomLine( QPainter* p, int x, int y, int width, const QColor& c ) | ||
45 | { | ||
46 | p->setPen( c.dark() ); | ||
47 | p->drawLine( x, y, x+width-1, y ); | ||
48 | } | ||
49 | |||
50 | |||
37 | void MFrequencySpectrum::drawLine( QPainter* p, int x, int y, int width, const QColor& c ) | 51 | void MFrequencySpectrum::drawLine( QPainter* p, int x, int y, int width, const QColor& c ) |
38 | { | 52 | { |
39 | p->setPen( c.light() ); | 53 | p->setPen( c.light() ); |
40 | p->drawPoint( x++, y ); | 54 | p->drawPoint( x++, y ); |
41 | p->setPen( c ); | 55 | p->setPen( c ); |
42 | p->drawLine( x, y, x+width-2, y ); | 56 | p->drawLine( x, y, x+width-2, y ); |
43 | p->setPen( c.dark() ); | 57 | p->setPen( c.dark() ); |
44 | p->drawPoint( x+width-1, y ); | 58 | p->drawPoint( x+width-1, y ); |
45 | } | 59 | } |
46 | 60 | ||
47 | 61 | ||
48 | void MFrequencySpectrum::drawBar( QPainter* p, int x, int y, int width, int height, int maxheight ) | 62 | void MFrequencySpectrum::drawBar( QPainter* p, int x, int y, int width, int height, int maxheight ) |
49 | { | 63 | { |
50 | int h1 = 133; int h2 = 0; | 64 | int h1 = 133; int h2 = 0; |
51 | int s1 = 200; int s2 = 255; | 65 | int s1 = 200; int s2 = 255; |
52 | int v1 = 140; int v2 = 255; | 66 | int v1 = 140; int v2 = 255; |
53 | 67 | ||
54 | /*int h1 = 196; int h2 = 194; | 68 | /*int h1 = 196; int h2 = 194; |
55 | int s1 = 85; int s2 = 15; | 69 | int s1 = 85; int s2 = 15; |
56 | int v1 = 95; int v2 = 237;*/ | 70 | int v1 = 95; int v2 = 237;*/ |
57 | 71 | ||
58 | QColor c( 120, 60, 200 ); | 72 | QColor c( 120, 60, 200 ); |
59 | for ( int i = 0; i < height; ++i ) | 73 | for ( int i = 0; i < height; ++i ) |
60 | { | 74 | { |
61 | int h = (h2-h1)*i/maxheight + h1; | 75 | int h = (h2-h1)*i/maxheight + h1; |
62 | int s = (s2-s1)*i/maxheight + s1; | 76 | int s = (s2-s1)*i/maxheight + s1; |
63 | int v = (v2-v1)*i/maxheight + v1; | 77 | int v = (v2-v1)*i/maxheight + v1; |
64 | drawLine( p, x, y-i, width, QColor( h,s,v, QColor::Hsv ) ); | 78 | if ( i == 0 ) |
79 | drawBottomLine( p, x, y-i, width, QColor( h,s,v, QColor::Hsv ) ); | ||
80 | else if ( i == height-1 ) | ||
81 | drawTopLine( p, x, y-i, width, QColor( h,s,v, QColor::Hsv ) ); | ||
82 | else | ||
83 | drawLine( p, x, y-i, width, QColor( h,s,v, QColor::Hsv ) ); | ||
65 | } | 84 | } |
66 | |||
67 | /*for ( int i = height; i < maxheight; ++i ) | ||
68 | drawLine( p, x, y-i, width, QColor( 47, 68, 76 ) );*/ | ||
69 | |||
70 | } | 85 | } |
71 | 86 | ||
72 | 87 | ||
73 | void MFrequencySpectrum::paintEvent( QPaintEvent* e ) | 88 | void MFrequencySpectrum::paintEvent( QPaintEvent* e ) |
74 | { | 89 | { |
75 | QPixmap pm( size() ); | 90 | QPixmap pm( size() ); |
76 | QPainter p; | 91 | QPainter p; |
77 | p.begin( &pm ); | 92 | p.begin( &pm ); |
78 | p.drawTiledPixmap( 0, 0, size().width(), size().height(), QPixmap( (const char**) &background ) ); | 93 | p.drawTiledPixmap( 0, 0, size().width(), size().height(), QPixmap( (const char**) &background ) ); |
79 | 94 | ||
80 | int xmargin = 5; | 95 | int xmargin = 5; |
81 | int ymargin = 2; | 96 | int ymargin = 2; |
82 | int y = size().height() - 2 * ymargin; | 97 | int y = size().height() - 2 * ymargin; |
83 | int x = 0; | 98 | int x = 0; |
84 | int width = ( size().width() - 2 * xmargin ) / _channels; | 99 | int width = ( size().width() - 2 * xmargin ) / _channels; |
85 | 100 | ||
86 | for ( int i = 0; i < _channels; ++i ) | 101 | for ( int i = 0; i < _channels; ++i ) |
87 | { | 102 | { |
88 | if ( _dirty[i] ) | 103 | if ( _dirty[i] ) |
89 | { | 104 | { |
90 | drawBar( &p, xmargin + x, y - ymargin, width-3, _values[i]*y/100, y ); | 105 | drawBar( &p, xmargin + x, y - ymargin, width-3, _values[i]*y/100, y ); |
91 | _dirty[i] = false; | 106 | _dirty[i] = false; |
92 | } | 107 | } |
93 | x+= width; | 108 | x+= width; |
94 | } | 109 | } |
95 | 110 | ||
96 | p.end(); | 111 | p.end(); |
97 | bitBlt( this, 0, 0, &pm ); | 112 | bitBlt( this, 0, 0, &pm ); |
98 | } | 113 | } |
99 | 114 | ||
100 | 115 | ||
116 | void MFrequencySpectrum::mousePressEvent( QMouseEvent* e ) | ||
117 | { | ||
118 | int xmargin = 5; | ||
119 | int ymargin = 2; | ||
120 | int y = size().height() - 2 * ymargin; | ||
121 | int x = 0; | ||
122 | int width = ( size().width() - 2 * xmargin ) / _channels; | ||
123 | |||
124 | QPoint pos = e->pos(); | ||
125 | int channel = ( pos.x()-xmargin ) / width; | ||
126 | int height = 100 - ( pos.y()-ymargin )*100/y; | ||
127 | if ( channel < 15 ) _values[channel] = height; | ||
128 | |||
129 | } | ||
130 | |||
131 | |||
101 | Legende::Legende( int channels, QWidget* parent, const char* name, WFlags f ) | 132 | Legende::Legende( int channels, QWidget* parent, const char* name, WFlags f ) |
102 | :QFrame( parent, name, f ), _channels( channels ) | 133 | :QFrame( parent, name, f ), _channels( channels ) |
103 | { | 134 | { |
104 | setLineWidth( 2 ); | 135 | setLineWidth( 2 ); |
105 | setFrameStyle( Panel + Sunken ); | 136 | setFrameStyle( Panel + Sunken ); |
106 | setFixedHeight( 16 ); | 137 | setFixedHeight( 16 ); |
107 | 138 | ||
108 | } | 139 | } |
109 | 140 | ||
110 | 141 | ||
111 | void Legende::drawContents( QPainter* p ) | 142 | void Legende::drawContents( QPainter* p ) |
112 | { | 143 | { |
113 | int xmargin = 5; | 144 | int xmargin = 5; |
114 | int ymargin = 2; | 145 | int ymargin = 2; |
115 | int x = 0; | 146 | int x = 0; |
116 | int width = ( contentsRect().width() - 2 * xmargin ) / _channels; | 147 | int width = ( contentsRect().width() - 2 * xmargin ) / _channels; |
117 | 148 | ||
118 | for ( int i = 0; i < _channels; ++i ) | 149 | for ( int i = 0; i < _channels; ++i ) |
119 | p->drawText( xmargin + (width*i), 12, QString().sprintf( "%02d", i+1 ) ); | 150 | p->drawText( xmargin + (width*i), 12, QString().sprintf( "%02d", i+1 ) ); |
120 | } | 151 | } |
121 | 152 | ||
122 | 153 | ||
123 | MGraphWindow::MGraphWindow( QWidget* parent, const char* name, WFlags f ) | 154 | MGraphWindow::MGraphWindow( QWidget* parent, const char* name, WFlags f ) |
124 | :QVBox( parent, name, f ) | 155 | :QVBox( parent, name, f ) |
125 | { | 156 | { |
126 | spectrum = new MFrequencySpectrum( 14, this ); | 157 | spectrum = new MFrequencySpectrum( 14, this ); |
127 | legende = new Legende( 14, this ); | 158 | legende = new Legende( 14, this ); |
128 | startTimer( 50 ); //FIXME: tweak | 159 | startTimer( 50 ); |
129 | |||
130 | //testGraph(); | ||
131 | |||
132 | }; | 160 | }; |
133 | 161 | ||
134 | 162 | ||
135 | void MGraphWindow::testGraph() | 163 | void MGraphWindow::testGraph() |
136 | { | 164 | { |
137 | static int i = 0; | 165 | static int i = 0; |
138 | spectrum->setValue( i++, 100 ); | 166 | spectrum->setValue( i++, 100 ); |
139 | if ( i == 14 ) i = 0; | 167 | if ( i == 14 ) i = 0; |
140 | QTimer::singleShot( 2000, this, SLOT( testGraph() ) ); | 168 | QTimer::singleShot( 2000, this, SLOT( testGraph() ) ); |
141 | 169 | ||
142 | } | 170 | } |
143 | 171 | ||
144 | 172 | ||
145 | void MGraphWindow::timerEvent( QTimerEvent* e ) | 173 | void MGraphWindow::timerEvent( QTimerEvent* e ) |
146 | { | 174 | { |
147 | for ( int i = 0; i < 14; i++ ) | 175 | for ( int i = 0; i < 14; i++ ) |
148 | { | 176 | { |
149 | spectrum->decrease( i, 1 ); //TODO: make this customizable? | 177 | spectrum->decrease( i, 1 ); |
150 | } | 178 | } |
151 | spectrum->repaint(); | 179 | spectrum->repaint(); |
152 | } | 180 | } |
153 | 181 | ||
154 | 182 | ||
155 | void MGraphWindow::traffic( int channel, int signal ) | 183 | void MGraphWindow::traffic( int channel, int signal ) |
156 | { | 184 | { |
157 | spectrum->setValue( channel-1, signal ); | 185 | spectrum->setValue( channel-1, signal ); |
158 | } | 186 | } |
159 | 187 | ||
diff --git a/noncore/net/wellenreiter/gui/graphwindow.h b/noncore/net/wellenreiter/gui/graphwindow.h index 4050065..1e00ae7 100644 --- a/noncore/net/wellenreiter/gui/graphwindow.h +++ b/noncore/net/wellenreiter/gui/graphwindow.h | |||
@@ -1,118 +1,121 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Opie 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 | **********************************************************************/ | 14 | **********************************************************************/ |
15 | 15 | ||
16 | #ifndef GRAPHWINDOW_H | 16 | #ifndef GRAPHWINDOW_H |
17 | #define GRAPHWINDOW_H | 17 | #define GRAPHWINDOW_H |
18 | 18 | ||
19 | #include <qwidget.h> | 19 | #include <qwidget.h> |
20 | #include <qvbox.h> | 20 | #include <qvbox.h> |
21 | 21 | ||
22 | class MFrequencySpectrum : public QWidget | 22 | class MFrequencySpectrum : public QWidget |
23 | { | 23 | { |
24 | public: | 24 | public: |
25 | MFrequencySpectrum( int channels, QWidget* parent = 0, const char* name = "MFrequencySpectrum", WFlags f = 0 ); | 25 | MFrequencySpectrum( int channels, QWidget* parent = 0, const char* name = "MFrequencySpectrum", WFlags f = 0 ); |
26 | int value( int channel ) const { return _values[channel]; }; | 26 | int value( int channel ) const { return _values[channel]; }; |
27 | void setValue( int channel, int value ) | 27 | void setValue( int channel, int value ) |
28 | { | 28 | { |
29 | if ( value > _values[channel] ) | 29 | if ( value > _values[channel] ) |
30 | { | 30 | { |
31 | _values[channel] = value; | 31 | _values[channel] = value; |
32 | _dirty[channel] = true; | 32 | _dirty[channel] = true; |
33 | } | 33 | } |
34 | }; | 34 | }; |
35 | void decrease( int channel, int amount ) | 35 | void decrease( int channel, int amount ) |
36 | { | 36 | { |
37 | if ( _values[channel] >= amount ) | 37 | if ( _values[channel] >= amount ) |
38 | { | 38 | { |
39 | _values[channel] -= amount; | 39 | _values[channel] -= amount; |
40 | _dirty[channel] = true; | 40 | _dirty[channel] = true; |
41 | } | 41 | } |
42 | }; | 42 | }; |
43 | 43 | ||
44 | protected: | 44 | protected: |
45 | virtual void paintEvent( QPaintEvent* ); | 45 | virtual void paintEvent( QPaintEvent* ); |
46 | virtual void mousePressEvent( QMouseEvent* ); | ||
46 | 47 | ||
47 | void drawLine( QPainter* p, int x, int y, int width, const QColor& c ); | 48 | void drawLine( QPainter* p, int x, int y, int width, const QColor& c ); |
49 | void drawTopLine( QPainter* p, int x, int y, int width, const QColor& c ); | ||
50 | void drawBottomLine( QPainter* p, int x, int y, int width, const QColor& c ); | ||
48 | void MFrequencySpectrum::drawBar( QPainter* p, int x, int y, int width, int height, int maxheight ); | 51 | void MFrequencySpectrum::drawBar( QPainter* p, int x, int y, int width, int height, int maxheight ); |
49 | 52 | ||
50 | private: | 53 | private: |
51 | int _channels; | 54 | int _channels; |
52 | int* _values; | 55 | int* _values; |
53 | bool* _dirty; | 56 | bool* _dirty; |
54 | }; | 57 | }; |
55 | 58 | ||
56 | 59 | ||
57 | class Legende : public QFrame | 60 | class Legende : public QFrame |
58 | { | 61 | { |
59 | public: | 62 | public: |
60 | Legende( int channels, QWidget* parent = 0, const char* name = "Legende", WFlags f = 0 ); | 63 | Legende( int channels, QWidget* parent = 0, const char* name = "Legende", WFlags f = 0 ); |
61 | 64 | ||
62 | protected: | 65 | protected: |
63 | virtual void drawContents( QPainter* ); | 66 | virtual void drawContents( QPainter* ); |
64 | 67 | ||
65 | private: | 68 | private: |
66 | int _channels; | 69 | int _channels; |
67 | }; | 70 | }; |
68 | 71 | ||
69 | 72 | ||
70 | class MGraphWindow : public QVBox | 73 | class MGraphWindow : public QVBox |
71 | { | 74 | { |
72 | Q_OBJECT | 75 | Q_OBJECT |
73 | 76 | ||
74 | public: | 77 | public: |
75 | MGraphWindow( QWidget* parent = 0, const char* name = "MGraphWindow", WFlags f = 0 ); | 78 | MGraphWindow( QWidget* parent = 0, const char* name = "MGraphWindow", WFlags f = 0 ); |
76 | void traffic( int channel, int signal ); | 79 | void traffic( int channel, int signal ); |
77 | 80 | ||
78 | protected: | 81 | protected: |
79 | virtual void timerEvent( QTimerEvent* e ); | 82 | virtual void timerEvent( QTimerEvent* e ); |
80 | 83 | ||
81 | protected slots: | 84 | protected slots: |
82 | virtual void testGraph(); | 85 | virtual void testGraph(); |
83 | 86 | ||
84 | protected: | 87 | protected: |
85 | MFrequencySpectrum* spectrum; | 88 | MFrequencySpectrum* spectrum; |
86 | Legende* legende; | 89 | Legende* legende; |
87 | 90 | ||
88 | }; | 91 | }; |
89 | 92 | ||
90 | /* XPM */ | 93 | /* XPM */ |
91 | static char * background[] = { | 94 | static char * background[] = { |
92 | "16 16 6 1", | 95 | "16 16 6 1", |
93 | " c None", | 96 | " c None", |
94 | ".c #52676E", | 97 | ".c #52676E", |
95 | "+c #3F545B", | 98 | "+c #3F545B", |
96 | "@c #394E56", | 99 | "@c #394E56", |
97 | "#c #2F454C", | 100 | "#c #2F454C", |
98 | "$c #364B52", | 101 | "$c #364B52", |
99 | ".+++++++++++++++", | 102 | ".+++++++++++++++", |
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 | #endif | 120 | #endif |
118 | 121 | ||
diff --git a/noncore/net/wellenreiter/gui/protolistview.cpp b/noncore/net/wellenreiter/gui/protolistview.cpp index d4b0dfe..f4b45d0 100644 --- a/noncore/net/wellenreiter/gui/protolistview.cpp +++ b/noncore/net/wellenreiter/gui/protolistview.cpp | |||
@@ -1,117 +1,124 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Opie 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 | **********************************************************************/ | 14 | **********************************************************************/ |
15 | 15 | ||
16 | /* LOCAL */ | 16 | /* LOCAL */ |
17 | #include "protolistview.h" | 17 | #include "protolistview.h" |
18 | 18 | ||
19 | #include <qcheckbox.h> | 19 | #include <qcheckbox.h> |
20 | #include <qcombobox.h> | 20 | #include <qcombobox.h> |
21 | #include <qhbox.h> | 21 | #include <qhbox.h> |
22 | #include <qvbox.h> | 22 | #include <qvbox.h> |
23 | #include <qpalette.h> | 23 | #include <qpalette.h> |
24 | #include <qcolor.h> | 24 | #include <qcolor.h> |
25 | #include <qlabel.h> | 25 | #include <qlabel.h> |
26 | #include <qframe.h> | 26 | #include <qframe.h> |
27 | 27 | ||
28 | ProtocolListView::ProtocolListView( QWidget* parent, const char* name, WFlags f ) | 28 | ProtocolListView::ProtocolListView( QWidget* parent, const char* name, WFlags f ) |
29 | :QScrollView( parent, name, f ) | 29 | :QScrollView( parent, name, f ) |
30 | { | 30 | { |
31 | actions = ( QString( "parsePackets" ) == QString( name ) ); | 31 | parse = ( QString( "parsePackets" ) == QString( name ) ); |
32 | 32 | ||
33 | setMargins( 3, 3, 0, 0 ); | 33 | setMargins( 3, 3, 0, 0 ); |
34 | viewport()->setBackgroundColor( QCheckBox(0).palette().color( QPalette::Active, QColorGroup::Background ) ); | 34 | viewport()->setBackgroundColor( QCheckBox(0).palette().color( QPalette::Active, QColorGroup::Background ) ); |
35 | 35 | ||
36 | vbox = new QVBox( viewport() ); | 36 | vbox = new QVBox( viewport() ); |
37 | vbox->setSpacing( 1 ); | 37 | vbox->setSpacing( 1 ); |
38 | addChild( vbox ); | 38 | addChild( vbox ); |
39 | 39 | ||
40 | QHBox* hbox = new QHBox( vbox ); | 40 | QHBox* hbox = new QHBox( vbox ); |
41 | hbox->setSpacing( 40 ); | 41 | hbox->setSpacing( 40 ); |
42 | new QLabel( tr( "Protocol Family" ), hbox ); | 42 | new QLabel( tr( "Protocol Family" ), hbox ); |
43 | if ( actions ) new QLabel( tr( "Perform Action" ), hbox ); | 43 | new QLabel( tr( "Perform Action" ), hbox ); |
44 | QFrame* frame = new QFrame( vbox ); | 44 | QFrame* frame = new QFrame( vbox ); |
45 | frame->setFrameStyle( QFrame::HLine + QFrame::Sunken ); | 45 | frame->setFrameStyle( QFrame::HLine + QFrame::Sunken ); |
46 | 46 | ||
47 | //TODO: hardcoded for now...a protocol database would be nice!? | 47 | //TODO: hardcoded for now...a protocol database would be nice!? |
48 | 48 | ||
49 | //addProtocol( "Ethernet" ); | 49 | //addProtocol( "Ethernet" ); |
50 | addProtocol( "Prism" ); | 50 | addProtocol( "Prism" ); |
51 | //addProtocol( "802.11" ); | 51 | //addProtocol( "802.11" ); |
52 | addProtocol( "802.11 Management" ); | 52 | addProtocol( "802.11 Management" ); |
53 | addProtocol( "802.11 SSID" ); | 53 | addProtocol( "802.11 SSID" ); |
54 | addProtocol( "802.11 Rates" ); | 54 | addProtocol( "802.11 Rates" ); |
55 | addProtocol( "802.11 CF" ); | 55 | addProtocol( "802.11 CF" ); |
56 | addProtocol( "802.11 FH" ); | 56 | addProtocol( "802.11 FH" ); |
57 | addProtocol( "802.11 DS" ); | 57 | addProtocol( "802.11 DS" ); |
58 | addProtocol( "802.11 Tim" ); | 58 | addProtocol( "802.11 Tim" ); |
59 | addProtocol( "802.11 IBSS" ); | 59 | addProtocol( "802.11 IBSS" ); |
60 | addProtocol( "802.11 Challenge" ); | 60 | addProtocol( "802.11 Challenge" ); |
61 | addProtocol( "802.11 Data" ); | 61 | addProtocol( "802.11 Data" ); |
62 | addProtocol( "802.11 LLC" ); | 62 | addProtocol( "802.11 LLC" ); |
63 | addProtocol( "802.11 Data" ); | 63 | addProtocol( "802.11 Data" ); |
64 | addProtocol( "IP" ); | 64 | addProtocol( "IP" ); |
65 | addProtocol( "ARP" ); | 65 | addProtocol( "ARP" ); |
66 | addProtocol( "UDP" ); | 66 | addProtocol( "UDP" ); |
67 | addProtocol( "TCP" ); | 67 | addProtocol( "TCP" ); |
68 | } | 68 | } |
69 | 69 | ||
70 | 70 | ||
71 | ProtocolListView::~ProtocolListView() | 71 | ProtocolListView::~ProtocolListView() |
72 | { | 72 | { |
73 | } | 73 | } |
74 | 74 | ||
75 | 75 | ||
76 | void ProtocolListView::addProtocol( const QString& name ) | 76 | void ProtocolListView::addProtocol( const QString& name ) |
77 | { | 77 | { |
78 | QHBox* hbox = new QHBox( vbox ); | 78 | QHBox* hbox = new QHBox( vbox ); |
79 | new QCheckBox( name, hbox, (const char*) name ); | 79 | new QCheckBox( name, hbox, (const char*) name ); |
80 | 80 | ||
81 | if ( actions ) | 81 | if ( parse ) |
82 | { | 82 | { |
83 | QComboBox* combo = new QComboBox( hbox, (const char*) name ); | 83 | QComboBox* combo = new QComboBox( hbox, (const char*) name ); |
84 | #ifdef QWS | 84 | #ifdef QWS |
85 | combo->setFixedWidth( 75 ); | 85 | combo->setFixedWidth( 75 ); |
86 | #endif | 86 | #endif |
87 | combo->insertItem( "Ignore" ); | 87 | combo->insertItem( "Ignore" ); |
88 | combo->insertItem( "Discard!" ); | ||
88 | combo->insertItem( "TouchSound" ); | 89 | combo->insertItem( "TouchSound" ); |
89 | combo->insertItem( "AlarmSound" ); | 90 | combo->insertItem( "AlarmSound" ); |
90 | combo->insertItem( "KeySound" ); | 91 | combo->insertItem( "KeySound" ); |
91 | combo->insertItem( "LedOn" ); | 92 | combo->insertItem( "LedOn" ); |
92 | combo->insertItem( "LedOff" ); | 93 | combo->insertItem( "LedOff" ); |
93 | combo->insertItem( "LogMessage" ); | 94 | combo->insertItem( "LogMessage" ); |
94 | combo->insertItem( "MessageBox" ); | 95 | combo->insertItem( "MessageBox" ); |
95 | } | 96 | } |
97 | else | ||
98 | { | ||
99 | QComboBox* combo = new QComboBox( hbox, (const char*) name ); | ||
100 | #ifdef QWS | ||
101 | combo->setFixedWidth( 75 ); | ||
102 | #endif | ||
103 | combo->insertItem( "Pass" ); | ||
104 | combo->insertItem( "Discard!" ); | ||
105 | } | ||
96 | } | 106 | } |
97 | 107 | ||
98 | 108 | ||
99 | bool ProtocolListView::isProtocolChecked( const QString& name ) | 109 | bool ProtocolListView::isProtocolChecked( const QString& name ) |
100 | { | 110 | { |
101 | QCheckBox* box = (QCheckBox*) child( (const char*) name ); | 111 | QCheckBox* box = (QCheckBox*) child( (const char*) name ); |
102 | return ( box && box->isOn() ); | 112 | return ( box && box->isOn() ); |
103 | } | 113 | } |
104 | 114 | ||
105 | 115 | ||
106 | QString ProtocolListView::protocolAction( const QString& name ) | 116 | QString ProtocolListView::protocolAction( const QString& name ) |
107 | { | 117 | { |
108 | //QObject * child ( const char * objName, const char * inheritsClass = 0, | ||
109 | // bool recursiveSearch = TRUE ) | ||
110 | |||
111 | QComboBox* combo = (QComboBox*) child( (const char*) name, "QComboBox" ); | 118 | QComboBox* combo = (QComboBox*) child( (const char*) name, "QComboBox" ); |
112 | if ( combo ) | 119 | if ( combo ) |
113 | return combo->currentText(); | 120 | return combo->currentText(); |
114 | else | 121 | else |
115 | return "<unknown>"; | 122 | return "<unknown>"; |
116 | } | 123 | } |
117 | 124 | ||
diff --git a/noncore/net/wellenreiter/gui/protolistview.h b/noncore/net/wellenreiter/gui/protolistview.h index 166b648..8b460cb 100644 --- a/noncore/net/wellenreiter/gui/protolistview.h +++ b/noncore/net/wellenreiter/gui/protolistview.h | |||
@@ -1,47 +1,45 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Opie 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 | **********************************************************************/ | 14 | **********************************************************************/ |
15 | 15 | ||
16 | #ifndef PROTOLISTVIEW_H | 16 | #ifndef PROTOLISTVIEW_H |
17 | #define PROTOLISTVIEW_H | 17 | #define PROTOLISTVIEW_H |
18 | 18 | ||
19 | #include <qscrollview.h> | 19 | #include <qscrollview.h> |
20 | #include <qdict.h> | 20 | #include <qdict.h> |
21 | //#include <qcheckbox.h> | ||
22 | //#include <qcombobox.h> | ||
23 | class QCheckBox; | 21 | class QCheckBox; |
24 | class QComboBox; | 22 | class QComboBox; |
25 | 23 | ||
26 | class QVBox; | 24 | class QVBox; |
27 | 25 | ||
28 | class ProtocolListView : public QScrollView | 26 | class ProtocolListView : public QScrollView |
29 | { | 27 | { |
30 | public: | 28 | public: |
31 | ProtocolListView( QWidget* parent = 0, const char* name = 0, WFlags f = 0 ); | 29 | ProtocolListView( QWidget* parent = 0, const char* name = 0, WFlags f = 0 ); |
32 | virtual ~ProtocolListView(); | 30 | virtual ~ProtocolListView(); |
33 | 31 | ||
34 | bool isProtocolChecked( const QString& name ); | 32 | bool isProtocolChecked( const QString& name ); |
35 | QString protocolAction( const QString& name ); | 33 | QString protocolAction( const QString& name ); |
36 | 34 | ||
37 | protected: | 35 | protected: |
38 | virtual void addProtocol( const QString& name ); | 36 | virtual void addProtocol( const QString& name ); |
39 | 37 | ||
40 | private: | 38 | private: |
41 | QVBox* vbox; | 39 | QVBox* vbox; |
42 | bool actions; | 40 | bool parse; |
43 | }; | 41 | }; |
44 | 42 | ||
45 | 43 | ||
46 | 44 | ||
47 | #endif // PROTOLISTVIEW_H | 45 | #endif // PROTOLISTVIEW_H |
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index edf7dcf..965f6b0 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp | |||
@@ -58,429 +58,475 @@ using namespace Opie; | |||
58 | 58 | ||
59 | #include <assert.h> | 59 | #include <assert.h> |
60 | #include <errno.h> | 60 | #include <errno.h> |
61 | #include <unistd.h> | 61 | #include <unistd.h> |
62 | #include <string.h> | 62 | #include <string.h> |
63 | #include <sys/types.h> | 63 | #include <sys/types.h> |
64 | #include <stdlib.h> | 64 | #include <stdlib.h> |
65 | 65 | ||
66 | Wellenreiter::Wellenreiter( QWidget* parent ) | 66 | Wellenreiter::Wellenreiter( QWidget* parent ) |
67 | : WellenreiterBase( parent, 0, 0 ), | 67 | : WellenreiterBase( parent, 0, 0 ), |
68 | sniffing( false ), iface( 0 ), manufacturerdb( 0 ), configwindow( 0 ) | 68 | sniffing( false ), iface( 0 ), manufacturerdb( 0 ), configwindow( 0 ) |
69 | { | 69 | { |
70 | 70 | ||
71 | // | 71 | // |
72 | // construct manufacturer database | 72 | // construct manufacturer database |
73 | // | 73 | // |
74 | 74 | ||
75 | QString manufile; | 75 | QString manufile; |
76 | #ifdef QWS | 76 | #ifdef QWS |
77 | manufile.sprintf( "%s/share/wellenreiter/manufacturers.dat", (const char*) QPEApplication::qpeDir() ); | 77 | manufile.sprintf( "%s/share/wellenreiter/manufacturers.dat", (const char*) QPEApplication::qpeDir() ); |
78 | #else | 78 | #else |
79 | manufile.sprintf( "/usr/local/share/wellenreiter/manufacturers.dat" ); | 79 | manufile.sprintf( "/usr/local/share/wellenreiter/manufacturers.dat" ); |
80 | #endif | 80 | #endif |
81 | manufacturerdb = new ManufacturerDB( manufile ); | 81 | manufacturerdb = new ManufacturerDB( manufile ); |
82 | 82 | ||
83 | logwindow->log( "(i) Wellenreiter has been started." ); | 83 | logwindow->log( "(i) Wellenreiter has been started." ); |
84 | 84 | ||
85 | // | 85 | // |
86 | // detect operating system | 86 | // detect operating system |
87 | // | 87 | // |
88 | 88 | ||
89 | #ifdef QWS | 89 | #ifdef QWS |
90 | QString sys; | 90 | QString sys; |
91 | sys.sprintf( "(i) Running on '%s'.", (const char*) ODevice::inst()->systemString() ); | 91 | sys.sprintf( "(i) Running on '%s'.", (const char*) ODevice::inst()->systemString() ); |
92 | _system = ODevice::inst()->system(); | 92 | _system = ODevice::inst()->system(); |
93 | logwindow->log( sys ); | 93 | logwindow->log( sys ); |
94 | #endif | 94 | #endif |
95 | 95 | ||
96 | // setup GUI | 96 | // setup GUI |
97 | netview->setColumnWidthMode( 1, QListView::Manual ); | 97 | netview->setColumnWidthMode( 1, QListView::Manual ); |
98 | 98 | ||
99 | if ( manufacturerdb ) | 99 | if ( manufacturerdb ) |
100 | netview->setManufacturerDB( manufacturerdb ); | 100 | netview->setManufacturerDB( manufacturerdb ); |
101 | 101 | ||
102 | pcap = new OPacketCapturer(); | 102 | pcap = new OPacketCapturer(); |
103 | 103 | ||
104 | } | 104 | } |
105 | 105 | ||
106 | 106 | ||
107 | Wellenreiter::~Wellenreiter() | 107 | Wellenreiter::~Wellenreiter() |
108 | { | 108 | { |
109 | // no need to delete child widgets, Qt does it all for us | 109 | // no need to delete child widgets, Qt does it all for us |
110 | 110 | ||
111 | delete manufacturerdb; | 111 | delete manufacturerdb; |
112 | delete pcap; | 112 | delete pcap; |
113 | } | 113 | } |
114 | 114 | ||
115 | 115 | ||
116 | void Wellenreiter::setConfigWindow( WellenreiterConfigWindow* cw ) | 116 | void Wellenreiter::setConfigWindow( WellenreiterConfigWindow* cw ) |
117 | { | 117 | { |
118 | configwindow = cw; | 118 | configwindow = cw; |
119 | } | 119 | } |
120 | 120 | ||
121 | 121 | ||
122 | void Wellenreiter::channelHopped(int c) | 122 | void Wellenreiter::channelHopped(int c) |
123 | { | 123 | { |
124 | QString title = "Wellenreiter II -scan- ["; | 124 | QString title = "Wellenreiter II -scan- ["; |
125 | QString left; | 125 | QString left; |
126 | if ( c > 1 ) left.fill( '.', c-1 ); | 126 | if ( c > 1 ) left.fill( '.', c-1 ); |
127 | title.append( left ); | 127 | title.append( left ); |
128 | title.append( '|' ); | 128 | title.append( '|' ); |
129 | if ( c < iface->channels() ) | 129 | if ( c < iface->channels() ) |
130 | { | 130 | { |
131 | QString right; | 131 | QString right; |
132 | right.fill( '.', iface->channels()-c ); | 132 | right.fill( '.', iface->channels()-c ); |
133 | title.append( right ); | 133 | title.append( right ); |
134 | } | 134 | } |
135 | title.append( "]" ); | 135 | title.append( "]" ); |
136 | //title.append( QString().sprintf( " %02d", c ) ); | 136 | //title.append( QString().sprintf( " %02d", c ) ); |
137 | assert( parent() ); | 137 | assert( parent() ); |
138 | ( (QMainWindow*) parent() )->setCaption( title ); | 138 | ( (QMainWindow*) parent() )->setCaption( title ); |
139 | } | 139 | } |
140 | 140 | ||
141 | 141 | ||
142 | void Wellenreiter::handleNotification( OPacket* p ) | 142 | void Wellenreiter::handleNotification( OPacket* p ) |
143 | { | 143 | { |
144 | QObjectList* l = p->queryList(); | 144 | QObjectList* l = p->queryList(); |
145 | QObjectListIt it( *l ); | 145 | QObjectListIt it( *l ); |
146 | QObject* o; | 146 | QObject* o; |
147 | 147 | ||
148 | while ( (o = it.current()) != 0 ) | 148 | while ( (o = it.current()) != 0 ) |
149 | { | 149 | { |
150 | QString name = it.current()->name(); | 150 | QString name = it.current()->name(); |
151 | if ( configwindow->parsePackets->isProtocolChecked( name ) ) | 151 | if ( configwindow->parsePackets->isProtocolChecked( name ) ) |
152 | { | 152 | { |
153 | QString action = configwindow->parsePackets->protocolAction( name ); | 153 | QString action = configwindow->parsePackets->protocolAction( name ); |
154 | qDebug( "action for '%s' seems to be '%s'", (const char*) name, (const char*) action ); | 154 | qDebug( "parsePacket-action for '%s' seems to be '%s'", (const char*) name, (const char*) action ); |
155 | doAction( action, name, p ); | 155 | doAction( action, name, p ); |
156 | } | 156 | } |
157 | else | 157 | else |
158 | { | 158 | { |
159 | qDebug( "protocol '%s' not checked.", (const char*) name ); | 159 | qDebug( "protocol '%s' not checked in parsePackets.", (const char*) name ); |
160 | } | 160 | } |
161 | ++it; | 161 | ++it; |
162 | } | 162 | } |
163 | } | 163 | } |
164 | 164 | ||
165 | 165 | ||
166 | void Wellenreiter::handleBeacon( OPacket* p, OWaveLanManagementPacket* beacon ) | 166 | void Wellenreiter::handleBeacon( OPacket* p, OWaveLanManagementPacket* beacon ) |
167 | { | 167 | { |
168 | QString type; | 168 | QString type; |
169 | if ( beacon->canIBSS() ) | 169 | if ( beacon->canIBSS() ) |
170 | { | 170 | { |
171 | type = "adhoc"; | 171 | type = "adhoc"; |
172 | } | 172 | } |
173 | else if ( beacon->canESS() ) | 173 | else if ( beacon->canESS() ) |
174 | { | 174 | { |
175 | type = "managed"; | 175 | type = "managed"; |
176 | } | 176 | } |
177 | else | 177 | else |
178 | { | 178 | { |
179 | qWarning( "Wellenreiter::invalid frame [possibly noise] detected!" ); | 179 | qWarning( "Wellenreiter::invalid frame [possibly noise] detected!" ); |
180 | return; | 180 | return; |
181 | } | 181 | } |
182 | 182 | ||
183 | OWaveLanManagementSSID* ssid = static_cast<OWaveLanManagementSSID*>( p->child( "802.11 SSID" ) ); | 183 | OWaveLanManagementSSID* ssid = static_cast<OWaveLanManagementSSID*>( p->child( "802.11 SSID" ) ); |
184 | QString essid = ssid ? ssid->ID() : QString("<unknown>"); | 184 | QString essid = ssid ? ssid->ID() : QString("<unknown>"); |
185 | OWaveLanManagementDS* ds = static_cast<OWaveLanManagementDS*>( p->child( "802.11 DS" ) ); | 185 | OWaveLanManagementDS* ds = static_cast<OWaveLanManagementDS*>( p->child( "802.11 DS" ) ); |
186 | int channel = ds ? ds->channel() : -1; | 186 | int channel = ds ? ds->channel() : -1; |
187 | 187 | ||
188 | OWaveLanPacket* header = static_cast<OWaveLanPacket*>( p->child( "802.11" ) ); | 188 | OWaveLanPacket* header = static_cast<OWaveLanPacket*>( p->child( "802.11" ) ); |
189 | netView()->addNewItem( type, essid, header->macAddress2().toString(), beacon->canPrivacy(), channel, 0 ); | 189 | netView()->addNewItem( type, essid, header->macAddress2().toString(), beacon->canPrivacy(), channel, 0 ); |
190 | 190 | ||
191 | // update graph window | 191 | // update graph window |
192 | if ( ds ) | 192 | if ( ds ) |
193 | { | 193 | { |
194 | OPrismHeaderPacket* prism = static_cast<OPrismHeaderPacket*>( p->child( "Prism" ) ); | 194 | OPrismHeaderPacket* prism = static_cast<OPrismHeaderPacket*>( p->child( "Prism" ) ); |
195 | if ( prism ) | 195 | if ( prism ) |
196 | graphwindow->traffic( ds->channel(), prism->signalStrength() ); | 196 | graphwindow->traffic( ds->channel(), prism->signalStrength() ); |
197 | else | 197 | else |
198 | graphwindow->traffic( ds->channel(), 95 ); | 198 | graphwindow->traffic( ds->channel(), 95 ); |
199 | } | 199 | } |
200 | } | 200 | } |
201 | 201 | ||
202 | 202 | ||
203 | void Wellenreiter::handleData( OPacket* p, OWaveLanDataPacket* data ) | 203 | void Wellenreiter::handleData( OPacket* p, OWaveLanDataPacket* data ) |
204 | { | 204 | { |
205 | OWaveLanPacket* wlan = (OWaveLanPacket*) p->child( "802.11" ); | 205 | OWaveLanPacket* wlan = (OWaveLanPacket*) p->child( "802.11" ); |
206 | if ( wlan->fromDS() && !wlan->toDS() ) | 206 | if ( wlan->fromDS() && !wlan->toDS() ) |
207 | { | 207 | { |
208 | qDebug( "FromDS traffic: '%s' -> '%s' via '%s'", | 208 | qDebug( "FromDS traffic: '%s' -> '%s' via '%s'", |
209 | (const char*) wlan->macAddress3().toString(true), | 209 | (const char*) wlan->macAddress3().toString(true), |
210 | (const char*) wlan->macAddress1().toString(true), | 210 | (const char*) wlan->macAddress1().toString(true), |
211 | (const char*) wlan->macAddress2().toString(true) ); | 211 | (const char*) wlan->macAddress2().toString(true) ); |
212 | netView()->fromDStraffic( wlan->macAddress3().toString(), | 212 | netView()->fromDStraffic( wlan->macAddress3().toString(), |
213 | wlan->macAddress1().toString(), | 213 | wlan->macAddress1().toString(), |
214 | wlan->macAddress2().toString() ); | 214 | wlan->macAddress2().toString() ); |
215 | } | 215 | } |
216 | else | 216 | else |
217 | if ( !wlan->fromDS() && wlan->toDS() ) | 217 | if ( !wlan->fromDS() && wlan->toDS() ) |
218 | { | 218 | { |
219 | qDebug( "ToDS traffic: '%s' -> '%s' via '%s'", | 219 | qDebug( "ToDS traffic: '%s' -> '%s' via '%s'", |
220 | (const char*) wlan->macAddress2().toString(true), | 220 | (const char*) wlan->macAddress2().toString(true), |
221 | (const char*) wlan->macAddress3().toString(true), | 221 | (const char*) wlan->macAddress3().toString(true), |
222 | (const char*) wlan->macAddress1().toString(true) ); | 222 | (const char*) wlan->macAddress1().toString(true) ); |
223 | netView()->toDStraffic( wlan->macAddress2().toString(), | 223 | netView()->toDStraffic( wlan->macAddress2().toString(), |
224 | wlan->macAddress3().toString(), | 224 | wlan->macAddress3().toString(), |
225 | wlan->macAddress1().toString() ); | 225 | wlan->macAddress1().toString() ); |
226 | } | 226 | } |
227 | else | 227 | else |
228 | if ( wlan->fromDS() && wlan->toDS() ) | 228 | if ( wlan->fromDS() && wlan->toDS() ) |
229 | { | 229 | { |
230 | qDebug( "WDS(bridge) traffic: '%s' -> '%s' via '%s' and '%s'", | 230 | qDebug( "WDS(bridge) traffic: '%s' -> '%s' via '%s' and '%s'", |
231 | (const char*) wlan->macAddress4().toString(true), | 231 | (const char*) wlan->macAddress4().toString(true), |
232 | (const char*) wlan->macAddress3().toString(true), | 232 | (const char*) wlan->macAddress3().toString(true), |
233 | (const char*) wlan->macAddress1().toString(true), | 233 | (const char*) wlan->macAddress1().toString(true), |
234 | (const char*) wlan->macAddress2().toString(true) ); | 234 | (const char*) wlan->macAddress2().toString(true) ); |
235 | netView()->WDStraffic( wlan->macAddress4().toString(), | 235 | netView()->WDStraffic( wlan->macAddress4().toString(), |
236 | wlan->macAddress3().toString(), | 236 | wlan->macAddress3().toString(), |
237 | wlan->macAddress1().toString(), | 237 | wlan->macAddress1().toString(), |
238 | wlan->macAddress2().toString() ); | 238 | wlan->macAddress2().toString() ); |
239 | } | 239 | } |
240 | else | 240 | else |
241 | { | 241 | { |
242 | qDebug( "IBSS(AdHoc) traffic: '%s' -> '%s' (Cell: '%s')'", | 242 | qDebug( "IBSS(AdHoc) traffic: '%s' -> '%s' (Cell: '%s')'", |
243 | (const char*) wlan->macAddress2().toString(true), | 243 | (const char*) wlan->macAddress2().toString(true), |
244 | (const char*) wlan->macAddress1().toString(true), | 244 | (const char*) wlan->macAddress1().toString(true), |
245 | (const char*) wlan->macAddress3().toString(true) ); | 245 | (const char*) wlan->macAddress3().toString(true) ); |
246 | netView()->IBSStraffic( wlan->macAddress2().toString(), | 246 | netView()->IBSStraffic( wlan->macAddress2().toString(), |
247 | wlan->macAddress1().toString(), | 247 | wlan->macAddress1().toString(), |
248 | wlan->macAddress3().toString() ); | 248 | wlan->macAddress3().toString() ); |
249 | } | 249 | } |
250 | 250 | ||
251 | OARPPacket* arp = (OARPPacket*) p->child( "ARP" ); | 251 | OARPPacket* arp = (OARPPacket*) p->child( "ARP" ); |
252 | if ( arp ) | 252 | if ( arp ) |
253 | { | 253 | { |
254 | qDebug( "Received ARP traffic (type '%s'): ", (const char*) arp->type() ); | 254 | qDebug( "Received ARP traffic (type '%s'): ", (const char*) arp->type() ); |
255 | if ( arp->type() == "REQUEST" ) | 255 | if ( arp->type() == "REQUEST" ) |
256 | { | 256 | { |
257 | netView()->identify( arp->senderMacAddress().toString(), arp->senderIPV4Address().toString() ); | 257 | netView()->identify( arp->senderMacAddress().toString(), arp->senderIPV4Address().toString() ); |
258 | } | 258 | } |
259 | else if ( arp->type() == "REPLY" ) | 259 | else if ( arp->type() == "REPLY" ) |
260 | { | 260 | { |
261 | netView()->identify( arp->senderMacAddress().toString(), arp->senderIPV4Address().toString() ); | 261 | netView()->identify( arp->senderMacAddress().toString(), arp->senderIPV4Address().toString() ); |
262 | netView()->identify( arp->targetMacAddress().toString(), arp->targetIPV4Address().toString() ); | 262 | netView()->identify( arp->targetMacAddress().toString(), arp->targetIPV4Address().toString() ); |
263 | } | 263 | } |
264 | } | 264 | } |
265 | 265 | ||
266 | OIPPacket* ip = (OIPPacket*) p->child( "IP" ); | 266 | OIPPacket* ip = (OIPPacket*) p->child( "IP" ); |
267 | if ( ip ) | 267 | if ( ip ) |
268 | { | 268 | { |
269 | qDebug( "Received IP packet." ); | 269 | qDebug( "Received IP packet." ); |
270 | } | 270 | } |
271 | } | 271 | } |
272 | 272 | ||
273 | 273 | ||
274 | QObject* childIfToParse( OPacket* p, const QString& protocol ) | 274 | QObject* Wellenreiter::childIfToParse( OPacket* p, const QString& protocol ) |
275 | { | 275 | { |
276 | //FIXME: Implement | 276 | if ( configwindow->parsePackets->isProtocolChecked( protocol ) ) |
277 | if ( configwindow->parsePackets->protocolAction( protocol ) == "Discard!" ) | ||
278 | return 0; | ||
279 | |||
280 | return p->child( protocol ); | ||
281 | } | ||
282 | |||
283 | |||
284 | bool Wellenreiter::checkDumpPacket( OPacket* p ) | ||
285 | { | ||
286 | // go through all child packets and see if one is inside the child hierarchy for p | ||
287 | // if so, do what the user requested (protocolAction), e.g. pass or discard | ||
288 | if ( !configwindow->writeCaptureFile->isOn() ) | ||
289 | return false; | ||
290 | |||
291 | QObjectList* l = p->queryList(); | ||
292 | QObjectListIt it( *l ); | ||
293 | QObject* o; | ||
294 | |||
295 | while ( (o = it.current()) != 0 ) | ||
296 | { | ||
297 | QString name = it.current()->name(); | ||
298 | if ( configwindow->capturePackets->isProtocolChecked( name ) ) | ||
299 | { | ||
300 | QString action = configwindow->capturePackets->protocolAction( name ); | ||
301 | qDebug( "capturePackets-action for '%s' seems to be '%s'", (const char*) name, (const char*) action ); | ||
302 | if ( action == "Discard" ) | ||
303 | { | ||
304 | logwindow->log( QString().sprintf( "(i) dump-discarding of '%s' packet requested.", (const char*) name ) ); | ||
305 | return false; | ||
306 | } | ||
307 | } | ||
308 | else | ||
309 | { | ||
310 | qDebug( "protocol '%s' not checked in capturePackets.", (const char*) name ); | ||
311 | } | ||
312 | ++it; | ||
313 | } | ||
314 | return true; | ||
277 | } | 315 | } |
278 | 316 | ||
279 | 317 | ||
280 | void Wellenreiter::receivePacket( OPacket* p ) | 318 | void Wellenreiter::receivePacket( OPacket* p ) |
281 | { | 319 | { |
282 | hexWindow()->log( p->dump( 8 ) ); | 320 | hexWindow()->log( p->dump( 8 ) ); |
283 | 321 | ||
284 | handleNotification( p ); | 322 | if ( checkDumpPacket( p ) ) |
323 | { | ||
324 | pcap->dump( p ); | ||
325 | } | ||
285 | 326 | ||
286 | // check if we received a beacon frame | 327 | // check if we received a beacon frame |
287 | OWaveLanManagementPacket* beacon = static_cast<OWaveLanManagementPacket*>( p->child( "802.11 Management" ) ); | 328 | OWaveLanManagementPacket* beacon = static_cast<OWaveLanManagementPacket*>( childIfToParse( p, "802.11 Management" ) ); |
288 | if ( beacon && beacon->managementType() == "Beacon" ) | 329 | if ( beacon && beacon->managementType() == "Beacon" ) |
289 | { | 330 | { |
290 | handleBeacon( p, beacon ); | 331 | handleBeacon( p, beacon ); |
291 | return; | 332 | return; |
292 | } | 333 | } |
293 | 334 | ||
294 | //TODO: WEP check here | 335 | //TODO: WEP check here |
295 | 336 | ||
296 | // check for a data frame | 337 | // check for a data frame |
297 | OWaveLanDataPacket* data = static_cast<OWaveLanDataPacket*>( p->child( "802.11 Data" ) ); | 338 | OWaveLanDataPacket* data = static_cast<OWaveLanDataPacket*>( childIfToParse( p, "802.11 Data" ) ); |
298 | if ( data ) | 339 | if ( data ) |
299 | { | 340 | { |
300 | handleData( p, data ); | 341 | handleData( p, data ); |
301 | } | 342 | } |
343 | |||
344 | handleNotification( p ); | ||
345 | |||
302 | } | 346 | } |
303 | 347 | ||
304 | 348 | ||
305 | void Wellenreiter::stopClicked() | 349 | void Wellenreiter::stopClicked() |
306 | { | 350 | { |
307 | if ( iface ) | 351 | if ( iface ) |
308 | { | 352 | { |
309 | disconnect( SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) ); | 353 | disconnect( SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) ); |
310 | disconnect( SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) ); | 354 | disconnect( SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) ); |
311 | iface->setChannelHopping(); // stop hopping channels | 355 | iface->setChannelHopping(); // stop hopping channels |
312 | } | 356 | } |
313 | else | 357 | else |
314 | killTimers(); | 358 | killTimers(); |
315 | 359 | ||
316 | pcap->close(); | 360 | pcap->close(); |
317 | sniffing = false; | 361 | sniffing = false; |
318 | 362 | ||
319 | if ( iface ) | 363 | if ( iface ) |
320 | { | 364 | { |
321 | // switch off monitor mode | 365 | // switch off monitor mode |
322 | iface->setMonitorMode( false ); | 366 | iface->setMonitorMode( false ); |
323 | // switch off promisc flag | 367 | // switch off promisc flag |
324 | iface->setPromiscuousMode( false ); | 368 | iface->setPromiscuousMode( false ); |
325 | 369 | ||
326 | system( "cardctl reset; sleep 1" ); //FIXME: Use OProcess | 370 | system( "cardctl reset; sleep 1" ); //FIXME: Use OProcess |
327 | } | 371 | } |
328 | 372 | ||
329 | logwindow->log( "(i) Stopped Scanning." ); | 373 | logwindow->log( "(i) Stopped Scanning." ); |
330 | assert( parent() ); | 374 | assert( parent() ); |
331 | ( (QMainWindow*) parent() )->setCaption( "Wellenreiter II" ); | 375 | ( (QMainWindow*) parent() )->setCaption( "Wellenreiter II" ); |
332 | 376 | ||
333 | // message the user | 377 | // message the user |
334 | QMessageBox::information( this, "Wellenreiter II", | 378 | QMessageBox::information( this, "Wellenreiter II", |
335 | tr( "Your wireless card\nshould now be usable again." ) ); | 379 | tr( "Your wireless card\nshould now be usable again." ) ); |
336 | 380 | ||
337 | sniffing = false; | 381 | sniffing = false; |
338 | emit( stoppedSniffing() ); | 382 | emit( stoppedSniffing() ); |
339 | 383 | ||
340 | // print out statistics | 384 | // print out statistics |
341 | for( QMap<QString,int>::ConstIterator it = pcap->statistics().begin(); it != pcap->statistics().end(); ++it ) | 385 | for( QMap<QString,int>::ConstIterator it = pcap->statistics().begin(); it != pcap->statistics().end(); ++it ) |
342 | statwindow->updateCounter( it.key(), it.data() ); | 386 | statwindow->updateCounter( it.key(), it.data() ); |
343 | } | 387 | } |
344 | 388 | ||
345 | 389 | ||
346 | void Wellenreiter::startClicked() | 390 | void Wellenreiter::startClicked() |
347 | { | 391 | { |
348 | // get configuration from config window | 392 | // get configuration from config window |
349 | 393 | ||
350 | const QString& interface = configwindow->interfaceName->currentText(); | 394 | const QString& interface = configwindow->interfaceName->currentText(); |
351 | const int cardtype = configwindow->driverType(); | 395 | const int cardtype = configwindow->driverType(); |
352 | const int interval = configwindow->hoppingInterval(); | 396 | const int interval = configwindow->hoppingInterval(); |
353 | 397 | ||
354 | if ( ( interface == "" ) || ( cardtype == 0 ) ) | 398 | if ( ( interface == "" ) || ( cardtype == 0 ) ) |
355 | { | 399 | { |
356 | QMessageBox::information( this, "Wellenreiter II", | 400 | QMessageBox::information( this, "Wellenreiter II", |
357 | tr( "Your device is not\nproperly configured. Please reconfigure!" ) ); | 401 | tr( "Your device is not\nproperly configured. Please reconfigure!" ) ); |
358 | return; | 402 | return; |
359 | } | 403 | } |
360 | 404 | ||
361 | // configure device | 405 | // configure device |
362 | 406 | ||
363 | ONetwork* net = ONetwork::instance(); | 407 | ONetwork* net = ONetwork::instance(); |
364 | iface = static_cast<OWirelessNetworkInterface*>(net->interface( interface )); | 408 | iface = static_cast<OWirelessNetworkInterface*>(net->interface( interface )); |
365 | 409 | ||
366 | // set monitor mode | 410 | // set monitor mode |
367 | 411 | ||
368 | bool usePrism = configwindow->usePrismHeader(); | 412 | bool usePrism = configwindow->usePrismHeader(); |
369 | 413 | ||
370 | switch ( cardtype ) | 414 | switch ( cardtype ) |
371 | { | 415 | { |
372 | case DEVTYPE_CISCO: iface->setMonitoring( new OCiscoMonitoringInterface( iface, usePrism ) ); break; | 416 | case DEVTYPE_CISCO: iface->setMonitoring( new OCiscoMonitoringInterface( iface, usePrism ) ); break; |
373 | case DEVTYPE_WLAN_NG: iface->setMonitoring( new OWlanNGMonitoringInterface( iface, usePrism ) ); break; | 417 | case DEVTYPE_WLAN_NG: iface->setMonitoring( new OWlanNGMonitoringInterface( iface, usePrism ) ); break; |
374 | case DEVTYPE_HOSTAP: iface->setMonitoring( new OHostAPMonitoringInterface( iface, usePrism ) ); break; | 418 | case DEVTYPE_HOSTAP: iface->setMonitoring( new OHostAPMonitoringInterface( iface, usePrism ) ); break; |
375 | case DEVTYPE_ORINOCO: iface->setMonitoring( new OOrinocoMonitoringInterface( iface, usePrism ) ); break; | 419 | case DEVTYPE_ORINOCO: iface->setMonitoring( new OOrinocoMonitoringInterface( iface, usePrism ) ); break; |
376 | case DEVTYPE_MANUAL: QMessageBox::information( this, "Wellenreiter II", tr( "Bring your device into\nmonitor mode now." ) ); break; | 420 | case DEVTYPE_MANUAL: QMessageBox::information( this, "Wellenreiter II", tr( "Bring your device into\nmonitor mode now." ) ); break; |
377 | case DEVTYPE_FILE: qDebug( "Wellenreiter: Capturing from file '%s'", (const char*) interface ); break; | 421 | case DEVTYPE_FILE: qDebug( "Wellenreiter: Capturing from file '%s'", (const char*) interface ); break; |
378 | default: assert( 0 ); // shouldn't reach this | 422 | default: assert( 0 ); // shouldn't reach this |
379 | } | 423 | } |
380 | 424 | ||
381 | // switch device into monitor mode | 425 | // switch device into monitor mode |
382 | if ( cardtype < DEVTYPE_FILE ) | 426 | if ( cardtype < DEVTYPE_FILE ) |
383 | { | 427 | { |
384 | if ( cardtype != DEVTYPE_MANUAL ) | 428 | if ( cardtype != DEVTYPE_MANUAL ) |
385 | iface->setMonitorMode( true ); | 429 | iface->setMonitorMode( true ); |
386 | if ( !iface->monitorMode() ) | 430 | if ( !iface->monitorMode() ) |
387 | { | 431 | { |
388 | QMessageBox::warning( this, "Wellenreiter II", | 432 | QMessageBox::warning( this, "Wellenreiter II", |
389 | tr( "Can't set device into monitor mode." ) ); | 433 | tr( "Can't set device into monitor mode." ) ); |
390 | return; | 434 | return; |
391 | } | 435 | } |
392 | } | 436 | } |
393 | 437 | ||
394 | // open pcap and start sniffing | 438 | // open pcap and start sniffing |
395 | if ( cardtype != DEVTYPE_FILE ) | 439 | if ( cardtype != DEVTYPE_FILE ) |
396 | { | 440 | { |
397 | if ( configwindow->writeCaptureFile->isEnabled() ) //FIXME: bug!? | 441 | pcap->open( interface ); |
442 | |||
443 | if ( configwindow->writeCaptureFile->isOn() ) | ||
398 | { | 444 | { |
399 | QString dumpname( configwindow->captureFileName->text() ); | 445 | QString dumpname( configwindow->captureFileName->text() ); |
400 | dumpname.append( '-' ); | 446 | dumpname.append( '-' ); |
401 | dumpname.append( QTime::currentTime().toString().replace( QRegExp( ":" ), "-" ) ); | 447 | dumpname.append( QTime::currentTime().toString().replace( QRegExp( ":" ), "-" ) ); |
402 | dumpname.append( ".wellenreiter" ); | 448 | dumpname.append( ".wellenreiter" ); |
403 | pcap->open( interface, dumpname ); | 449 | pcap->openDumpFile( dumpname ); |
404 | } | 450 | } |
405 | else | 451 | else |
406 | { | 452 | { |
407 | pcap->open( interface ); | 453 | pcap->open( interface ); |
408 | } | 454 | } |
409 | } | 455 | } |
410 | else | 456 | else |
411 | { | 457 | { |
412 | pcap->open( QFile( interface ) ); | 458 | pcap->open( QFile( interface ) ); |
413 | } | 459 | } |
414 | 460 | ||
415 | if ( !pcap->isOpen() ) | 461 | if ( !pcap->isOpen() ) |
416 | { | 462 | { |
417 | QMessageBox::warning( this, "Wellenreiter II", | 463 | QMessageBox::warning( this, "Wellenreiter II", |
418 | tr( "Can't open packet capturer:\n" ) + QString(strerror( errno ) )); | 464 | tr( "Can't open packet capturer:\n" ) + QString(strerror( errno ) )); |
419 | return; | 465 | return; |
420 | } | 466 | } |
421 | 467 | ||
422 | // set capturer to non-blocking mode | 468 | // set capturer to non-blocking mode |
423 | pcap->setBlocking( false ); | 469 | pcap->setBlocking( false ); |
424 | 470 | ||
425 | // start channel hopper | 471 | // start channel hopper |
426 | if ( cardtype != DEVTYPE_FILE ) | 472 | if ( cardtype != DEVTYPE_FILE ) |
427 | iface->setChannelHopping( 1000 ); //use interval from config window | 473 | iface->setChannelHopping( 1000 ); //use interval from config window |
428 | 474 | ||
429 | if ( cardtype != DEVTYPE_FILE ) | 475 | if ( cardtype != DEVTYPE_FILE ) |
430 | { | 476 | { |
431 | // connect socket notifier and start channel hopper | 477 | // connect socket notifier and start channel hopper |
432 | connect( pcap, SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) ); | 478 | connect( pcap, SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) ); |
433 | connect( iface->channelHopper(), SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) ); | 479 | connect( iface->channelHopper(), SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) ); |
434 | } | 480 | } |
435 | else | 481 | else |
436 | { | 482 | { |
437 | // start timer for reading packets | 483 | // start timer for reading packets |
438 | startTimer( 100 ); | 484 | startTimer( 100 ); |
439 | } | 485 | } |
440 | 486 | ||
441 | logwindow->log( "(i) Started Scanning." ); | 487 | logwindow->log( "(i) Started Scanning." ); |
442 | sniffing = true; | 488 | sniffing = true; |
443 | emit( startedSniffing() ); | 489 | emit( startedSniffing() ); |
444 | if ( cardtype != DEVTYPE_FILE ) channelHopped( 6 ); // set title | 490 | if ( cardtype != DEVTYPE_FILE ) channelHopped( 6 ); // set title |
445 | else | 491 | else |
446 | { | 492 | { |
447 | assert( parent() ); | 493 | assert( parent() ); |
448 | ( (QMainWindow*) parent() )->setCaption( tr( "Wellenreiter II - replaying capture file..." ) ); | 494 | ( (QMainWindow*) parent() )->setCaption( tr( "Wellenreiter II - replaying capture file..." ) ); |
449 | } | 495 | } |
450 | } | 496 | } |
451 | 497 | ||
452 | 498 | ||
453 | void Wellenreiter::timerEvent( QTimerEvent* ) | 499 | void Wellenreiter::timerEvent( QTimerEvent* ) |
454 | { | 500 | { |
455 | qDebug( "Wellenreiter::timerEvent()" ); | 501 | qDebug( "Wellenreiter::timerEvent()" ); |
456 | OPacket* p = pcap->next(); | 502 | OPacket* p = pcap->next(); |
457 | if ( !p ) // no more packets available | 503 | if ( !p ) // no more packets available |
458 | { | 504 | { |
459 | stopClicked(); | 505 | stopClicked(); |
460 | } | 506 | } |
461 | else | 507 | else |
462 | { | 508 | { |
463 | receivePacket( p ); | 509 | receivePacket( p ); |
464 | delete p; | 510 | delete p; |
465 | } | 511 | } |
466 | } | 512 | } |
467 | 513 | ||
468 | 514 | ||
469 | void Wellenreiter::doAction( const QString& action, const QString& protocol, OPacket* p ) | 515 | void Wellenreiter::doAction( const QString& action, const QString& protocol, OPacket* p ) |
470 | { | 516 | { |
471 | if ( action == "TouchSound" ) | 517 | if ( action == "TouchSound" ) |
472 | ODevice::inst()->touchSound(); | 518 | ODevice::inst()->touchSound(); |
473 | else if ( action == "AlarmSound" ) | 519 | else if ( action == "AlarmSound" ) |
474 | ODevice::inst()->alarmSound(); | 520 | ODevice::inst()->alarmSound(); |
475 | else if ( action == "KeySound" ) | 521 | else if ( action == "KeySound" ) |
476 | ODevice::inst()->keySound(); | 522 | ODevice::inst()->keySound(); |
477 | else if ( action == "LedOn" ) | 523 | else if ( action == "LedOn" ) |
478 | ODevice::inst()->setLedState( Led_Mail, Led_On ); | 524 | ODevice::inst()->setLedState( Led_Mail, Led_On ); |
479 | else if ( action == "LedOff" ) | 525 | else if ( action == "LedOff" ) |
480 | ODevice::inst()->setLedState( Led_Mail, Led_Off ); | 526 | ODevice::inst()->setLedState( Led_Mail, Led_Off ); |
481 | else if ( action == "LogMessage" ) | 527 | else if ( action == "LogMessage" ) |
482 | logwindow->log( QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) ); | 528 | logwindow->log( QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) ); |
483 | else if ( action == "MessageBox" ) | 529 | else if ( action == "MessageBox" ) |
484 | QMessageBox::information ( this, "Notification!", | 530 | QMessageBox::information ( this, "Notification!", |
485 | QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) ); | 531 | QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) ); |
486 | } | 532 | } |
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.h b/noncore/net/wellenreiter/gui/wellenreiter.h index e227a24..37e692c 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.h +++ b/noncore/net/wellenreiter/gui/wellenreiter.h | |||
@@ -1,89 +1,90 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Opie 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 | **********************************************************************/ | 14 | **********************************************************************/ |
15 | 15 | ||
16 | #ifndef WELLENREITER_H | 16 | #ifndef WELLENREITER_H |
17 | #define WELLENREITER_H | 17 | #define WELLENREITER_H |
18 | 18 | ||
19 | #include "wellenreiterbase.h" | 19 | #include "wellenreiterbase.h" |
20 | 20 | ||
21 | #ifdef QWS | 21 | #ifdef QWS |
22 | #include <opie/odevice.h> | 22 | #include <opie/odevice.h> |
23 | using namespace Opie; | 23 | using namespace Opie; |
24 | #endif | 24 | #endif |
25 | 25 | ||
26 | class QTimerEvent; | 26 | class QTimerEvent; |
27 | class QPixmap; | 27 | class QPixmap; |
28 | class OPacket; | 28 | class OPacket; |
29 | class OWaveLanManagementPacket; | 29 | class OWaveLanManagementPacket; |
30 | class OWaveLanDataPacket; | 30 | class OWaveLanDataPacket; |
31 | class OPacketCapturer; | 31 | class OPacketCapturer; |
32 | class OWirelessNetworkInterface; | 32 | class OWirelessNetworkInterface; |
33 | class ManufacturerDB; | 33 | class ManufacturerDB; |
34 | class WellenreiterConfigWindow; | 34 | class WellenreiterConfigWindow; |
35 | class MLogWindow; | 35 | class MLogWindow; |
36 | class MHexWindow; | 36 | class MHexWindow; |
37 | 37 | ||
38 | class Wellenreiter : public WellenreiterBase { | 38 | class Wellenreiter : public WellenreiterBase { |
39 | Q_OBJECT | 39 | Q_OBJECT |
40 | 40 | ||
41 | public: | 41 | public: |
42 | Wellenreiter( QWidget* parent = 0 ); | 42 | Wellenreiter( QWidget* parent = 0 ); |
43 | ~Wellenreiter(); | 43 | ~Wellenreiter(); |
44 | 44 | ||
45 | void setConfigWindow( WellenreiterConfigWindow* cw ); | 45 | void setConfigWindow( WellenreiterConfigWindow* cw ); |
46 | MScanListView* netView() const { return netview; }; | 46 | MScanListView* netView() const { return netview; }; |
47 | MLogWindow* logWindow() const { return logwindow; }; | 47 | MLogWindow* logWindow() const { return logwindow; }; |
48 | MHexWindow* hexWindow() const { return hexwindow; }; | 48 | MHexWindow* hexWindow() const { return hexwindow; }; |
49 | bool isDaemonRunning() const { return sniffing; }; | 49 | bool isDaemonRunning() const { return sniffing; }; |
50 | 50 | ||
51 | bool sniffing; | 51 | bool sniffing; |
52 | 52 | ||
53 | protected: | 53 | protected: |
54 | virtual void timerEvent( QTimerEvent* ); | 54 | virtual void timerEvent( QTimerEvent* ); |
55 | 55 | ||
56 | public slots: | 56 | public slots: |
57 | void channelHopped(int); | 57 | void channelHopped(int); |
58 | void receivePacket(OPacket*); | 58 | void receivePacket(OPacket*); |
59 | void startClicked(); | 59 | void startClicked(); |
60 | void stopClicked(); | 60 | void stopClicked(); |
61 | 61 | ||
62 | signals: | 62 | signals: |
63 | void startedSniffing(); | 63 | void startedSniffing(); |
64 | void stoppedSniffing(); | 64 | void stoppedSniffing(); |
65 | 65 | ||
66 | private: | 66 | private: |
67 | void handleBeacon( OPacket* p, OWaveLanManagementPacket* beacon ); | 67 | void handleBeacon( OPacket* p, OWaveLanManagementPacket* beacon ); |
68 | void handleData( OPacket* p, OWaveLanDataPacket* data ); | 68 | void handleData( OPacket* p, OWaveLanDataPacket* data ); |
69 | void handleNotification( OPacket* p ); | 69 | void handleNotification( OPacket* p ); |
70 | void doAction( const QString& action, const QString& protocol, OPacket* p ); | 70 | void doAction( const QString& action, const QString& protocol, OPacket* p ); |
71 | QObject* childIfToParse( OPacket* p, const QString& protocol ); | 71 | QObject* childIfToParse( OPacket* p, const QString& protocol ); |
72 | 72 | bool checkDumpPacket( OPacket* p ); | |
73 | |||
73 | private: | 74 | private: |
74 | #ifdef QWS | 75 | #ifdef QWS |
75 | OSystem _system; // Opie Operating System identifier | 76 | OSystem _system; // Opie Operating System identifier |
76 | #endif | 77 | #endif |
77 | 78 | ||
78 | OWirelessNetworkInterface* iface; | 79 | OWirelessNetworkInterface* iface; |
79 | OPacketCapturer* pcap; | 80 | OPacketCapturer* pcap; |
80 | ManufacturerDB* manufacturerdb; | 81 | ManufacturerDB* manufacturerdb; |
81 | WellenreiterConfigWindow* configwindow; | 82 | WellenreiterConfigWindow* configwindow; |
82 | 83 | ||
83 | //void readConfig(); | 84 | //void readConfig(); |
84 | //void writeConfig(); | 85 | //void writeConfig(); |
85 | }; | 86 | }; |
86 | 87 | ||
87 | 88 | ||
88 | 89 | ||
89 | #endif | 90 | #endif |