author | mickeyl <mickeyl> | 2003-05-05 22:27:02 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-05-05 22:27:02 (UTC) |
commit | 58a78cbe1bc5ded219ba23432041f20e03404403 (patch) (unidiff) | |
tree | e06706f3cbd0303cdcd52ab4a94650b2059ed07c | |
parent | 3f8c29b3cbbb32864694fe9c95b43d1cb777360e (diff) | |
download | opie-58a78cbe1bc5ded219ba23432041f20e03404403.zip opie-58a78cbe1bc5ded219ba23432041f20e03404403.tar.gz opie-58a78cbe1bc5ded219ba23432041f20e03404403.tar.bz2 |
major overhaul of the configuration window - showing what will come soon...
-rw-r--r-- | noncore/net/wellenreiter/gui/configbase.ui | 1213 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/configbasenew.ui | 814 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/configwindow.cpp | 146 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/configwindow.h | 59 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/graphwindow.cpp | 12 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/gui.pro | 8 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/mainwindow.cpp | 3 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/protolistview.cpp | 95 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/protolistview.h | 44 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 4 |
10 files changed, 909 insertions, 1489 deletions
diff --git a/noncore/net/wellenreiter/gui/configbase.ui b/noncore/net/wellenreiter/gui/configbase.ui index a8b55bb..d85956e 100644 --- a/noncore/net/wellenreiter/gui/configbase.ui +++ b/noncore/net/wellenreiter/gui/configbase.ui | |||
@@ -1,554 +1,853 @@ | |||
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>232</width> | 14 | <width>209</width> |
15 | <height>342</height> | 15 | <height>287</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>Form1</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>6</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>5</number> | 35 | <number>3</number> |
36 | </property> | 36 | </property> |
37 | <widget row="0" column="0" rowspan="1" colspan="3" > | 37 | <widget row="0" column="0" > |
38 | <class>QLayoutWidget</class> | 38 | <class>QTabWidget</class> |
39 | <property stdset="1"> | 39 | <property stdset="1"> |
40 | <name>name</name> | 40 | <name>name</name> |
41 | <cstring>Layout5</cstring> | 41 | <cstring>tab</cstring> |
42 | </property> | 42 | </property> |
43 | <property> | 43 | <property> |
44 | <name>layoutSpacing</name> | 44 | <name>layoutMargin</name> |
45 | </property> | ||
46 | <hbox> | ||
47 | <property stdset="1"> | ||
48 | <name>margin</name> | ||
49 | <number>0</number> | ||
50 | </property> | ||
51 | <property stdset="1"> | ||
52 | <name>spacing</name> | ||
53 | <number>2</number> | ||
54 | </property> | ||
55 | <widget> | ||
56 | <class>QLabel</class> | ||
57 | <property stdset="1"> | ||
58 | <name>name</name> | ||
59 | <cstring>TextLabel3_2</cstring> | ||
60 | </property> | ||
61 | <property stdset="1"> | ||
62 | <name>sizePolicy</name> | ||
63 | <sizepolicy> | ||
64 | <hsizetype>4</hsizetype> | ||
65 | <vsizetype>1</vsizetype> | ||
66 | </sizepolicy> | ||
67 | </property> | ||
68 | <property stdset="1"> | ||
69 | <name>text</name> | ||
70 | <string>Sniffer</string> | ||
71 | </property> | ||
72 | </widget> | ||
73 | <widget> | ||
74 | <class>Line</class> | ||
75 | <property stdset="1"> | ||
76 | <name>name</name> | ||
77 | <cstring>Line9</cstring> | ||
78 | </property> | ||
79 | <property stdset="1"> | ||
80 | <name>orientation</name> | ||
81 | <enum>Horizontal</enum> | ||
82 | </property> | ||
83 | </widget> | ||
84 | </hbox> | ||
85 | </widget> | ||
86 | <widget row="1" column="0" rowspan="1" colspan="2" > | ||
87 | <class>QComboBox</class> | ||
88 | <property stdset="1"> | ||
89 | <name>name</name> | ||
90 | <cstring>interfaceName</cstring> | ||
91 | </property> | ||
92 | <property stdset="1"> | ||
93 | <name>enabled</name> | ||
94 | <bool>true</bool> | ||
95 | </property> | ||
96 | <property> | ||
97 | <name>whatsThis</name> | ||
98 | <string>Choose the interface used for sniffing.</string> | ||
99 | </property> | ||
100 | </widget> | ||
101 | <widget row="2" column="0" rowspan="1" colspan="2" > | ||
102 | <class>QComboBox</class> | ||
103 | <item> | ||
104 | <property> | ||
105 | <name>text</name> | ||
106 | <string><select></string> | ||
107 | </property> | ||
108 | </item> | ||
109 | <item> | ||
110 | <property> | ||
111 | <name>text</name> | ||
112 | <string>cisco</string> | ||
113 | </property> | ||
114 | </item> | ||
115 | <item> | ||
116 | <property> | ||
117 | <name>text</name> | ||
118 | <string>wlan-ng</string> | ||
119 | </property> | ||
120 | </item> | ||
121 | <item> | ||
122 | <property> | ||
123 | <name>text</name> | ||
124 | <string>hostap</string> | ||
125 | </property> | ||
126 | </item> | ||
127 | <item> | ||
128 | <property> | ||
129 | <name>text</name> | ||
130 | <string>orinoco</string> | ||
131 | </property> | ||
132 | </item> | ||
133 | <item> | ||
134 | <property> | ||
135 | <name>text</name> | ||
136 | <string><manual></string> | ||
137 | </property> | ||
138 | </item> | ||
139 | <item> | ||
140 | <property> | ||
141 | <name>text</name> | ||
142 | <string><file></string> | ||
143 | </property> | ||
144 | </item> | ||
145 | <property stdset="1"> | ||
146 | <name>name</name> | ||
147 | <cstring>deviceType</cstring> | ||
148 | </property> | ||
149 | <property stdset="1"> | ||
150 | <name>enabled</name> | ||
151 | <bool>true</bool> | ||
152 | </property> | 45 | </property> |
153 | <property> | 46 | <property> |
154 | <name>whatsThis</name> | 47 | <name>layoutSpacing</name> |
155 | <string>Choose the type of driver used for sniffing.</string> | ||
156 | </property> | ||
157 | </widget> | ||
158 | <widget row="3" column="0" rowspan="1" colspan="2" > | ||
159 | <class>QSpinBox</class> | ||
160 | <property stdset="1"> | ||
161 | <name>name</name> | ||
162 | <cstring>hopInterval</cstring> | ||
163 | </property> | ||
164 | <property stdset="1"> | ||
165 | <name>enabled</name> | ||
166 | <bool>true</bool> | ||
167 | </property> | ||
168 | <property stdset="1"> | ||
169 | <name>suffix</name> | ||
170 | <string> ms</string> | ||
171 | </property> | ||
172 | <property stdset="1"> | ||
173 | <name>maxValue</name> | ||
174 | <number>2000</number> | ||
175 | </property> | ||
176 | <property stdset="1"> | ||
177 | <name>minValue</name> | ||
178 | <number>100</number> | ||
179 | </property> | ||
180 | <property stdset="1"> | ||
181 | <name>lineStep</name> | ||
182 | <number>100</number> | ||
183 | </property> | ||
184 | <property> | ||
185 | <name>whatsThis</name> | ||
186 | <string>Choose the channel hop interval.</string> | ||
187 | </property> | ||
188 | </widget> | ||
189 | <widget row="3" column="2" > | ||
190 | <class>QLabel</class> | ||
191 | <property stdset="1"> | ||
192 | <name>name</name> | ||
193 | <cstring>TextLabel3_3</cstring> | ||
194 | </property> | ||
195 | <property stdset="1"> | ||
196 | <name>enabled</name> | ||
197 | <bool>true</bool> | ||
198 | </property> | ||
199 | <property stdset="1"> | ||
200 | <name>text</name> | ||
201 | <string>Hop Interval</string> | ||
202 | </property> | ||
203 | </widget> | ||
204 | <widget row="2" column="2" > | ||
205 | <class>QLabel</class> | ||
206 | <property stdset="1"> | ||
207 | <name>name</name> | ||
208 | <cstring>TextLabel2_3</cstring> | ||
209 | </property> | ||
210 | <property stdset="1"> | ||
211 | <name>enabled</name> | ||
212 | <bool>true</bool> | ||
213 | </property> | ||
214 | <property stdset="1"> | ||
215 | <name>text</name> | ||
216 | <string>Device Type</string> | ||
217 | </property> | ||
218 | </widget> | ||
219 | <widget row="1" column="2" > | ||
220 | <class>QLabel</class> | ||
221 | <property stdset="1"> | ||
222 | <name>name</name> | ||
223 | <cstring>TextLabel1_2</cstring> | ||
224 | </property> | ||
225 | <property stdset="1"> | ||
226 | <name>enabled</name> | ||
227 | <bool>true</bool> | ||
228 | </property> | ||
229 | <property stdset="1"> | ||
230 | <name>text</name> | ||
231 | <string>Interface Name</string> | ||
232 | </property> | ||
233 | </widget> | ||
234 | <widget row="5" column="0" > | ||
235 | <class>QLabel</class> | ||
236 | <property stdset="1"> | ||
237 | <name>name</name> | ||
238 | <cstring>TextLabel1_5</cstring> | ||
239 | </property> | ||
240 | <property stdset="1"> | ||
241 | <name>text</name> | ||
242 | <string>Fake MAC:</string> | ||
243 | </property> | ||
244 | </widget> | ||
245 | <widget row="5" column="1" rowspan="1" colspan="2" > | ||
246 | <class>QLineEdit</class> | ||
247 | <property stdset="1"> | ||
248 | <name>name</name> | ||
249 | <cstring>MAC</cstring> | ||
250 | </property> | ||
251 | <property stdset="1"> | ||
252 | <name>enabled</name> | ||
253 | <bool>false</bool> | ||
254 | </property> | ||
255 | <property stdset="1"> | ||
256 | <name>text</name> | ||
257 | <string>44:44:44:44:44:44</string> | ||
258 | </property> | ||
259 | </widget> | ||
260 | <widget row="4" column="0" rowspan="1" colspan="3" > | ||
261 | <class>QCheckBox</class> | ||
262 | <property stdset="1"> | ||
263 | <name>name</name> | ||
264 | <cstring>activeScanning</cstring> | ||
265 | </property> | ||
266 | <property stdset="1"> | ||
267 | <name>enabled</name> | ||
268 | <bool>false</bool> | ||
269 | </property> | ||
270 | <property stdset="1"> | ||
271 | <name>text</name> | ||
272 | <string>Active Scanning (caution!)</string> | ||
273 | </property> | ||
274 | </widget> | ||
275 | <widget row="10" column="0" rowspan="1" colspan="3" > | ||
276 | <class>QLayoutWidget</class> | ||
277 | <property stdset="1"> | ||
278 | <name>name</name> | ||
279 | <cstring>Layout5</cstring> | ||
280 | </property> | 48 | </property> |
281 | <grid> | 49 | <widget> |
282 | <property stdset="1"> | 50 | <class>QWidget</class> |
283 | <name>margin</name> | ||
284 | <number>0</number> | ||
285 | </property> | ||
286 | <property stdset="1"> | 51 | <property stdset="1"> |
287 | <name>spacing</name> | 52 | <name>name</name> |
288 | <number>6</number> | 53 | <cstring>tab</cstring> |
289 | </property> | 54 | </property> |
290 | <widget row="0" column="1" > | 55 | <attribute> |
291 | <class>QLabel</class> | 56 | <name>title</name> |
57 | <string>Interface</string> | ||
58 | </attribute> | ||
59 | <grid> | ||
292 | <property stdset="1"> | 60 | <property stdset="1"> |
293 | <name>name</name> | 61 | <name>margin</name> |
294 | <cstring>TextLabel1</cstring> | 62 | <number>5</number> |
295 | </property> | 63 | </property> |
296 | <property stdset="1"> | 64 | <property stdset="1"> |
297 | <name>text</name> | 65 | <name>spacing</name> |
298 | <string>sound on new net</string> | 66 | <number>3</number> |
299 | </property> | 67 | </property> |
300 | </widget> | 68 | <widget row="0" column="0" > |
301 | <widget row="1" column="0" > | 69 | <class>QLabel</class> |
302 | <class>QComboBox</class> | 70 | <property stdset="1"> |
303 | <item> | 71 | <name>name</name> |
304 | <property> | 72 | <cstring>TextLabel1_2</cstring> |
73 | </property> | ||
74 | <property stdset="1"> | ||
75 | <name>enabled</name> | ||
76 | <bool>true</bool> | ||
77 | </property> | ||
78 | <property stdset="1"> | ||
305 | <name>text</name> | 79 | <name>text</name> |
306 | <string>Ignore</string> | 80 | <string>Name:</string> |
307 | </property> | 81 | </property> |
308 | </item> | 82 | </widget> |
309 | <item> | 83 | <widget row="1" column="0" > |
310 | <property> | 84 | <class>QLabel</class> |
85 | <property stdset="1"> | ||
86 | <name>name</name> | ||
87 | <cstring>TextLabel2_3</cstring> | ||
88 | </property> | ||
89 | <property stdset="1"> | ||
90 | <name>enabled</name> | ||
91 | <bool>true</bool> | ||
92 | </property> | ||
93 | <property stdset="1"> | ||
311 | <name>text</name> | 94 | <name>text</name> |
312 | <string>Touch</string> | 95 | <string>Driver:</string> |
313 | </property> | 96 | </property> |
314 | </item> | 97 | </widget> |
315 | <item> | 98 | <widget row="4" column="0" rowspan="1" colspan="2" > |
316 | <property> | 99 | <class>QCheckBox</class> |
100 | <property stdset="1"> | ||
101 | <name>name</name> | ||
102 | <cstring>hopChannels</cstring> | ||
103 | </property> | ||
104 | <property stdset="1"> | ||
317 | <name>text</name> | 105 | <name>text</name> |
318 | <string>Key</string> | 106 | <string>Hop Channels</string> |
319 | </property> | 107 | </property> |
320 | </item> | 108 | <property stdset="1"> |
321 | <item> | 109 | <name>checked</name> |
322 | <property> | 110 | <bool>true</bool> |
111 | </property> | ||
112 | </widget> | ||
113 | <widget row="2" column="0" rowspan="1" colspan="4" > | ||
114 | <class>QCheckBox</class> | ||
115 | <property stdset="1"> | ||
116 | <name>name</name> | ||
117 | <cstring>prismHeader</cstring> | ||
118 | </property> | ||
119 | <property stdset="1"> | ||
323 | <name>text</name> | 120 | <name>text</name> |
324 | <string>Alarm</string> | 121 | <string>Use additional PRISM header</string> |
122 | </property> | ||
123 | </widget> | ||
124 | <widget row="4" column="3" > | ||
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> | ||
325 | </property> | 153 | </property> |
326 | </item> | ||
327 | <property stdset="1"> | ||
328 | <name>name</name> | ||
329 | <cstring>beaconSound</cstring> | ||
330 | </property> | ||
331 | </widget> | ||
332 | <widget row="0" column="0" > | ||
333 | <class>QComboBox</class> | ||
334 | <item> | ||
335 | <property> | 154 | <property> |
336 | <name>text</name> | 155 | <name>whatsThis</name> |
337 | <string>Ignore</string> | 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> | ||
161 | <property stdset="1"> | ||
162 | <name>name</name> | ||
163 | <cstring>GroupBox1</cstring> | ||
164 | </property> | ||
165 | <property stdset="1"> | ||
166 | <name>title</name> | ||
167 | <string>Scan on channel</string> | ||
338 | </property> | 168 | </property> |
339 | </item> | ||
340 | <item> | ||
341 | <property> | 169 | <property> |
342 | <name>text</name> | 170 | <name>layoutMargin</name> |
343 | <string>Touch</string> | ||
344 | </property> | 171 | </property> |
345 | </item> | ||
346 | <item> | ||
347 | <property> | 172 | <property> |
348 | <name>text</name> | 173 | <name>layoutSpacing</name> |
349 | <string>Key</string> | 174 | </property> |
175 | <grid> | ||
176 | <property stdset="1"> | ||
177 | <name>margin</name> | ||
178 | <number>4</number> | ||
179 | </property> | ||
180 | <property stdset="1"> | ||
181 | <name>spacing</name> | ||
182 | <number>2</number> | ||
183 | </property> | ||
184 | <widget row="1" column="1" > | ||
185 | <class>QCheckBox</class> | ||
186 | <property stdset="1"> | ||
187 | <name>name</name> | ||
188 | <cstring>channel6</cstring> | ||
189 | </property> | ||
190 | <property stdset="1"> | ||
191 | <name>text</name> | ||
192 | <string>6</string> | ||
193 | </property> | ||
194 | </widget> | ||
195 | <widget row="1" column="3" > | ||
196 | <class>QCheckBox</class> | ||
197 | <property stdset="1"> | ||
198 | <name>name</name> | ||
199 | <cstring>channel8</cstring> | ||
200 | </property> | ||
201 | <property stdset="1"> | ||
202 | <name>text</name> | ||
203 | <string>8</string> | ||
204 | </property> | ||
205 | </widget> | ||
206 | <widget row="0" column="2" > | ||
207 | <class>QCheckBox</class> | ||
208 | <property stdset="1"> | ||
209 | <name>name</name> | ||
210 | <cstring>channel2</cstring> | ||
211 | </property> | ||
212 | <property stdset="1"> | ||
213 | <name>text</name> | ||
214 | <string>2</string> | ||
215 | </property> | ||
216 | </widget> | ||
217 | <widget row="1" column="4" > | ||
218 | <class>QCheckBox</class> | ||
219 | <property stdset="1"> | ||
220 | <name>name</name> | ||
221 | <cstring>channel9</cstring> | ||
222 | </property> | ||
223 | <property stdset="1"> | ||
224 | <name>text</name> | ||
225 | <string>9</string> | ||
226 | </property> | ||
227 | </widget> | ||
228 | <widget row="0" column="1" > | ||
229 | <class>QCheckBox</class> | ||
230 | <property stdset="1"> | ||
231 | <name>name</name> | ||
232 | <cstring>channel1</cstring> | ||
233 | </property> | ||
234 | <property stdset="1"> | ||
235 | <name>text</name> | ||
236 | <string>1</string> | ||
237 | </property> | ||
238 | </widget> | ||
239 | <widget row="0" column="0" > | ||
240 | <class>QCheckBox</class> | ||
241 | <property stdset="1"> | ||
242 | <name>name</name> | ||
243 | <cstring>channelAll</cstring> | ||
244 | </property> | ||
245 | <property stdset="1"> | ||
246 | <name>text</name> | ||
247 | <string>All</string> | ||
248 | </property> | ||
249 | </widget> | ||
250 | <widget row="2" column="1" > | ||
251 | <class>QCheckBox</class> | ||
252 | <property stdset="1"> | ||
253 | <name>name</name> | ||
254 | <cstring>channel11</cstring> | ||
255 | </property> | ||
256 | <property stdset="1"> | ||
257 | <name>text</name> | ||
258 | <string>11</string> | ||
259 | </property> | ||
260 | </widget> | ||
261 | <widget row="2" column="0" > | ||
262 | <class>QCheckBox</class> | ||
263 | <property stdset="1"> | ||
264 | <name>name</name> | ||
265 | <cstring>channel10</cstring> | ||
266 | </property> | ||
267 | <property stdset="1"> | ||
268 | <name>text</name> | ||
269 | <string>10</string> | ||
270 | </property> | ||
271 | </widget> | ||
272 | <widget row="1" column="2" > | ||
273 | <class>QCheckBox</class> | ||
274 | <property stdset="1"> | ||
275 | <name>name</name> | ||
276 | <cstring>channel7</cstring> | ||
277 | </property> | ||
278 | <property stdset="1"> | ||
279 | <name>text</name> | ||
280 | <string>7</string> | ||
281 | </property> | ||
282 | </widget> | ||
283 | <widget row="0" column="3" > | ||
284 | <class>QCheckBox</class> | ||
285 | <property stdset="1"> | ||
286 | <name>name</name> | ||
287 | <cstring>channel3</cstring> | ||
288 | </property> | ||
289 | <property stdset="1"> | ||
290 | <name>text</name> | ||
291 | <string>3</string> | ||
292 | </property> | ||
293 | </widget> | ||
294 | <widget row="1" column="0" > | ||
295 | <class>QCheckBox</class> | ||
296 | <property stdset="1"> | ||
297 | <name>name</name> | ||
298 | <cstring>channel5</cstring> | ||
299 | </property> | ||
300 | <property stdset="1"> | ||
301 | <name>text</name> | ||
302 | <string>5</string> | ||
303 | </property> | ||
304 | </widget> | ||
305 | <widget row="0" column="4" > | ||
306 | <class>QCheckBox</class> | ||
307 | <property stdset="1"> | ||
308 | <name>name</name> | ||
309 | <cstring>channel4</cstring> | ||
310 | </property> | ||
311 | <property stdset="1"> | ||
312 | <name>text</name> | ||
313 | <string>4</string> | ||
314 | </property> | ||
315 | </widget> | ||
316 | <widget row="2" column="2" > | ||
317 | <class>QCheckBox</class> | ||
318 | <property stdset="1"> | ||
319 | <name>name</name> | ||
320 | <cstring>channel12</cstring> | ||
321 | </property> | ||
322 | <property stdset="1"> | ||
323 | <name>text</name> | ||
324 | <string>12</string> | ||
325 | </property> | ||
326 | </widget> | ||
327 | <widget row="2" column="3" > | ||
328 | <class>QCheckBox</class> | ||
329 | <property stdset="1"> | ||
330 | <name>name</name> | ||
331 | <cstring>channel13</cstring> | ||
332 | </property> | ||
333 | <property stdset="1"> | ||
334 | <name>text</name> | ||
335 | <string>13</string> | ||
336 | </property> | ||
337 | </widget> | ||
338 | <widget row="2" column="4" > | ||
339 | <class>QCheckBox</class> | ||
340 | <property stdset="1"> | ||
341 | <name>name</name> | ||
342 | <cstring>channel14</cstring> | ||
343 | </property> | ||
344 | <property stdset="1"> | ||
345 | <name>text</name> | ||
346 | <string>14</string> | ||
347 | </property> | ||
348 | </widget> | ||
349 | </grid> | ||
350 | </widget> | ||
351 | <widget row="0" column="1" rowspan="1" colspan="3" > | ||
352 | <class>QComboBox</class> | ||
353 | <property stdset="1"> | ||
354 | <name>name</name> | ||
355 | <cstring>interfaceName</cstring> | ||
356 | </property> | ||
357 | <property stdset="1"> | ||
358 | <name>enabled</name> | ||
359 | <bool>true</bool> | ||
350 | </property> | 360 | </property> |
351 | </item> | ||
352 | <item> | ||
353 | <property> | 361 | <property> |
362 | <name>whatsThis</name> | ||
363 | <string>Choose the interface used for sniffing.</string> | ||
364 | </property> | ||
365 | </widget> | ||
366 | <widget row="1" column="1" rowspan="1" colspan="3" > | ||
367 | <class>QComboBox</class> | ||
368 | <item> | ||
369 | <property> | ||
370 | <name>text</name> | ||
371 | <string><select></string> | ||
372 | </property> | ||
373 | </item> | ||
374 | <item> | ||
375 | <property> | ||
376 | <name>text</name> | ||
377 | <string>cisco</string> | ||
378 | </property> | ||
379 | </item> | ||
380 | <item> | ||
381 | <property> | ||
382 | <name>text</name> | ||
383 | <string>wlan-ng</string> | ||
384 | </property> | ||
385 | </item> | ||
386 | <item> | ||
387 | <property> | ||
388 | <name>text</name> | ||
389 | <string>hostap</string> | ||
390 | </property> | ||
391 | </item> | ||
392 | <item> | ||
393 | <property> | ||
394 | <name>text</name> | ||
395 | <string>orinoco</string> | ||
396 | </property> | ||
397 | </item> | ||
398 | <item> | ||
399 | <property> | ||
400 | <name>text</name> | ||
401 | <string><manual></string> | ||
402 | </property> | ||
403 | </item> | ||
404 | <item> | ||
405 | <property> | ||
406 | <name>text</name> | ||
407 | <string><file></string> | ||
408 | </property> | ||
409 | </item> | ||
410 | <property stdset="1"> | ||
411 | <name>name</name> | ||
412 | <cstring>deviceType</cstring> | ||
413 | </property> | ||
414 | <property stdset="1"> | ||
415 | <name>enabled</name> | ||
416 | <bool>true</bool> | ||
417 | </property> | ||
418 | <property> | ||
419 | <name>whatsThis</name> | ||
420 | <string>Choose the type of driver used for sniffing.</string> | ||
421 | </property> | ||
422 | </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"> | ||
354 | <name>text</name> | 430 | <name>text</name> |
355 | <string>Alarm</string> | 431 | <string>every</string> |
356 | </property> | 432 | </property> |
357 | </item> | 433 | </widget> |
358 | <property stdset="1"> | 434 | <spacer row="3" column="0" > |
359 | <name>name</name> | 435 | <property> |
360 | <cstring>netSound</cstring> | 436 | <name>name</name> |
361 | </property> | 437 | <cstring>Spacer4</cstring> |
362 | </widget> | 438 | </property> |
363 | <widget row="1" column="1" > | 439 | <property stdset="1"> |
364 | <class>QLabel</class> | 440 | <name>orientation</name> |
365 | <property stdset="1"> | 441 | <enum>Vertical</enum> |
366 | <name>name</name> | 442 | </property> |
367 | <cstring>TextLabel1_3</cstring> | 443 | <property stdset="1"> |
368 | </property> | 444 | <name>sizeType</name> |
369 | <property stdset="1"> | 445 | <enum>Expanding</enum> |
370 | <name>text</name> | 446 | </property> |
371 | <string>sound on beacon</string> | 447 | <property> |
372 | </property> | 448 | <name>sizeHint</name> |
373 | </widget> | 449 | <size> |
374 | </grid> | 450 | <width>20</width> |
375 | </widget> | 451 | <height>20</height> |
376 | <widget row="8" column="0" rowspan="1" colspan="3" > | 452 | </size> |
377 | <class>QLayoutWidget</class> | 453 | </property> |
378 | <property stdset="1"> | 454 | </spacer> |
379 | <name>name</name> | 455 | </grid> |
380 | <cstring>Layout7</cstring> | 456 | </widget> |
381 | </property> | 457 | <widget> |
382 | <hbox> | 458 | <class>QWidget</class> |
383 | <property stdset="1"> | ||
384 | <name>margin</name> | ||
385 | <number>0</number> | ||
386 | </property> | ||
387 | <property stdset="1"> | 459 | <property stdset="1"> |
388 | <name>spacing</name> | 460 | <name>name</name> |
389 | <number>6</number> | 461 | <cstring>tab</cstring> |
390 | </property> | 462 | </property> |
391 | <widget> | 463 | <attribute> |
392 | <class>QCheckBox</class> | 464 | <name>title</name> |
393 | <property stdset="1"> | 465 | <string>Capture</string> |
394 | <name>name</name> | 466 | </attribute> |
395 | <cstring>writeCaptureFile</cstring> | 467 | <grid> |
396 | </property> | ||
397 | <property stdset="1"> | ||
398 | <name>enabled</name> | ||
399 | <bool>true</bool> | ||
400 | </property> | ||
401 | <property stdset="1"> | 468 | <property stdset="1"> |
402 | <name>text</name> | 469 | <name>margin</name> |
403 | <string>Write Capture File</string> | 470 | <number>5</number> |
404 | </property> | 471 | </property> |
405 | </widget> | ||
406 | <widget> | ||
407 | <class>QToolButton</class> | ||
408 | <property stdset="1"> | 472 | <property stdset="1"> |
409 | <name>name</name> | 473 | <name>spacing</name> |
410 | <cstring>getCaptureFileName</cstring> | 474 | <number>3</number> |
411 | </property> | 475 | </property> |
412 | <property stdset="1"> | 476 | <widget row="2" column="0" rowspan="1" colspan="3" > |
413 | <name>enabled</name> | 477 | <class>ProtocolListView</class> |
414 | <bool>false</bool> | 478 | <property stdset="1"> |
415 | </property> | 479 | <name>name</name> |
416 | <property stdset="1"> | 480 | <cstring>capturePackets</cstring> |
417 | <name>text</name> | 481 | </property> |
418 | <string>...</string> | 482 | <property stdset="1"> |
419 | </property> | 483 | <name>sizePolicy</name> |
420 | </widget> | 484 | <sizepolicy> |
421 | </hbox> | 485 | <hsizetype>7</hsizetype> |
422 | </widget> | 486 | <vsizetype>7</vsizetype> |
423 | <widget row="7" column="0" rowspan="1" colspan="3" > | 487 | </sizepolicy> |
424 | <class>QLayoutWidget</class> | 488 | </property> |
425 | <property stdset="1"> | 489 | </widget> |
426 | <name>name</name> | 490 | <widget row="1" column="0" rowspan="1" colspan="3" > |
427 | <cstring>Layout6</cstring> | 491 | <class>QLineEdit</class> |
428 | </property> | 492 | <property stdset="1"> |
429 | <property> | 493 | <name>name</name> |
430 | <name>layoutSpacing</name> | 494 | <cstring>captureFileName</cstring> |
431 | </property> | 495 | </property> |
432 | <hbox> | 496 | <property stdset="1"> |
433 | <property stdset="1"> | 497 | <name>enabled</name> |
434 | <name>margin</name> | 498 | <bool>false</bool> |
435 | <number>0</number> | 499 | </property> |
436 | </property> | 500 | </widget> |
501 | <widget row="0" column="2" > | ||
502 | <class>QToolButton</class> | ||
503 | <property stdset="1"> | ||
504 | <name>name</name> | ||
505 | <cstring>getCaptureFileName</cstring> | ||
506 | </property> | ||
507 | <property stdset="1"> | ||
508 | <name>enabled</name> | ||
509 | <bool>false</bool> | ||
510 | </property> | ||
511 | <property stdset="1"> | ||
512 | <name>text</name> | ||
513 | <string>Browse</string> | ||
514 | </property> | ||
515 | </widget> | ||
516 | <spacer row="0" column="1" > | ||
517 | <property> | ||
518 | <name>name</name> | ||
519 | <cstring>Spacer2</cstring> | ||
520 | </property> | ||
521 | <property stdset="1"> | ||
522 | <name>orientation</name> | ||
523 | <enum>Horizontal</enum> | ||
524 | </property> | ||
525 | <property stdset="1"> | ||
526 | <name>sizeType</name> | ||
527 | <enum>Expanding</enum> | ||
528 | </property> | ||
529 | <property> | ||
530 | <name>sizeHint</name> | ||
531 | <size> | ||
532 | <width>20</width> | ||
533 | <height>20</height> | ||
534 | </size> | ||
535 | </property> | ||
536 | </spacer> | ||
537 | <widget row="0" column="0" > | ||
538 | <class>QCheckBox</class> | ||
539 | <property stdset="1"> | ||
540 | <name>name</name> | ||
541 | <cstring>writeCaptureFile</cstring> | ||
542 | </property> | ||
543 | <property stdset="1"> | ||
544 | <name>enabled</name> | ||
545 | <bool>true</bool> | ||
546 | </property> | ||
547 | <property stdset="1"> | ||
548 | <name>text</name> | ||
549 | <string>Write Capture Files To</string> | ||
550 | </property> | ||
551 | </widget> | ||
552 | </grid> | ||
553 | </widget> | ||
554 | <widget> | ||
555 | <class>QWidget</class> | ||
437 | <property stdset="1"> | 556 | <property stdset="1"> |
438 | <name>spacing</name> | 557 | <name>name</name> |
439 | <number>2</number> | 558 | <cstring>tab</cstring> |
440 | </property> | 559 | </property> |
441 | <widget> | 560 | <attribute> |
442 | <class>QLabel</class> | 561 | <name>title</name> |
443 | <property stdset="1"> | 562 | <string>Parse</string> |
444 | <name>name</name> | 563 | </attribute> |
445 | <cstring>TextLabel3_2_2</cstring> | 564 | <grid> |
446 | </property> | ||
447 | <property stdset="1"> | ||
448 | <name>sizePolicy</name> | ||
449 | <sizepolicy> | ||
450 | <hsizetype>4</hsizetype> | ||
451 | <vsizetype>1</vsizetype> | ||
452 | </sizepolicy> | ||
453 | </property> | ||
454 | <property stdset="1"> | ||
455 | <name>text</name> | ||
456 | <string>GUI</string> | ||
457 | </property> | ||
458 | </widget> | ||
459 | <widget> | ||
460 | <class>Line</class> | ||
461 | <property stdset="1"> | 565 | <property stdset="1"> |
462 | <name>name</name> | 566 | <name>margin</name> |
463 | <cstring>Line9_2</cstring> | 567 | <number>5</number> |
464 | </property> | 568 | </property> |
465 | <property stdset="1"> | 569 | <property stdset="1"> |
466 | <name>orientation</name> | 570 | <name>spacing</name> |
467 | <enum>Horizontal</enum> | 571 | <number>3</number> |
468 | </property> | 572 | </property> |
469 | </widget> | 573 | <widget row="0" column="0" > |
470 | </hbox> | 574 | <class>ProtocolListView</class> |
471 | </widget> | 575 | <property stdset="1"> |
472 | <spacer row="6" column="2" > | 576 | <name>name</name> |
473 | <property> | 577 | <cstring>parsePackets</cstring> |
474 | <name>name</name> | 578 | </property> |
475 | <cstring>Spacer1</cstring> | 579 | <property stdset="1"> |
476 | </property> | 580 | <name>sizePolicy</name> |
477 | <property stdset="1"> | 581 | <sizepolicy> |
478 | <name>orientation</name> | 582 | <hsizetype>7</hsizetype> |
479 | <enum>Vertical</enum> | 583 | <vsizetype>7</vsizetype> |
480 | </property> | 584 | </sizepolicy> |
481 | <property stdset="1"> | 585 | </property> |
482 | <name>sizeType</name> | 586 | </widget> |
483 | <enum>Expanding</enum> | 587 | </grid> |
484 | </property> | 588 | </widget> |
485 | <property> | 589 | <widget> |
486 | <name>sizeHint</name> | 590 | <class>QWidget</class> |
487 | <size> | ||
488 | <width>20</width> | ||
489 | <height>20</height> | ||
490 | </size> | ||
491 | </property> | ||
492 | </spacer> | ||
493 | <widget row="9" column="0" rowspan="1" colspan="3" > | ||
494 | <class>QLayoutWidget</class> | ||
495 | <property stdset="1"> | ||
496 | <name>name</name> | ||
497 | <cstring>Layout7</cstring> | ||
498 | </property> | ||
499 | <hbox> | ||
500 | <property stdset="1"> | ||
501 | <name>margin</name> | ||
502 | <number>0</number> | ||
503 | </property> | ||
504 | <property stdset="1"> | 591 | <property stdset="1"> |
505 | <name>spacing</name> | 592 | <name>name</name> |
506 | <number>6</number> | 593 | <cstring>tab</cstring> |
507 | </property> | 594 | </property> |
508 | <widget> | 595 | <attribute> |
509 | <class>QLabel</class> | 596 | <name>title</name> |
510 | <property stdset="1"> | 597 | <string>Intrusion</string> |
511 | <name>name</name> | 598 | </attribute> |
512 | <cstring>TextLabel1_4</cstring> | 599 | <grid> |
513 | </property> | ||
514 | <property stdset="1"> | ||
515 | <name>text</name> | ||
516 | <string>CaptureFile:</string> | ||
517 | </property> | ||
518 | </widget> | ||
519 | <widget> | ||
520 | <class>QLineEdit</class> | ||
521 | <property stdset="1"> | 600 | <property stdset="1"> |
522 | <name>name</name> | 601 | <name>margin</name> |
523 | <cstring>captureFileName</cstring> | 602 | <number>11</number> |
524 | </property> | 603 | </property> |
525 | <property stdset="1"> | 604 | <property stdset="1"> |
526 | <name>enabled</name> | 605 | <name>spacing</name> |
527 | <bool>false</bool> | 606 | <number>6</number> |
528 | </property> | 607 | </property> |
529 | </widget> | 608 | <widget row="1" column="0" > |
530 | </hbox> | 609 | <class>QGroupBox</class> |
610 | <property stdset="1"> | ||
611 | <name>name</name> | ||
612 | <cstring>GroupBox3</cstring> | ||
613 | </property> | ||
614 | <property stdset="1"> | ||
615 | <name>enabled</name> | ||
616 | <bool>false</bool> | ||
617 | </property> | ||
618 | <property stdset="1"> | ||
619 | <name>title</name> | ||
620 | <string>Link Level</string> | ||
621 | </property> | ||
622 | <grid> | ||
623 | <property stdset="1"> | ||
624 | <name>margin</name> | ||
625 | <number>11</number> | ||
626 | </property> | ||
627 | <property stdset="1"> | ||
628 | <name>spacing</name> | ||
629 | <number>6</number> | ||
630 | </property> | ||
631 | <widget row="0" column="0" > | ||
632 | <class>QLabel</class> | ||
633 | <property stdset="1"> | ||
634 | <name>name</name> | ||
635 | <cstring>TextLabel1_5</cstring> | ||
636 | </property> | ||
637 | <property stdset="1"> | ||
638 | <name>text</name> | ||
639 | <string>Fake Mac:</string> | ||
640 | </property> | ||
641 | </widget> | ||
642 | <widget row="1" column="0" rowspan="1" colspan="2" > | ||
643 | <class>QCheckBox</class> | ||
644 | <property stdset="1"> | ||
645 | <name>name</name> | ||
646 | <cstring>sendProbeRequests</cstring> | ||
647 | </property> | ||
648 | <property stdset="1"> | ||
649 | <name>text</name> | ||
650 | <string>Send proble requests</string> | ||
651 | </property> | ||
652 | </widget> | ||
653 | <widget row="0" column="1" > | ||
654 | <class>QComboBox</class> | ||
655 | <item> | ||
656 | <property> | ||
657 | <name>text</name> | ||
658 | <string><automatic></string> | ||
659 | </property> | ||
660 | </item> | ||
661 | <item> | ||
662 | <property> | ||
663 | <name>text</name> | ||
664 | <string>44:44:44:44:44:44</string> | ||
665 | </property> | ||
666 | </item> | ||
667 | <property stdset="1"> | ||
668 | <name>name</name> | ||
669 | <cstring>fakeMac</cstring> | ||
670 | </property> | ||
671 | <property stdset="1"> | ||
672 | <name>sizePolicy</name> | ||
673 | <sizepolicy> | ||
674 | <hsizetype>7</hsizetype> | ||
675 | <vsizetype>0</vsizetype> | ||
676 | </sizepolicy> | ||
677 | </property> | ||
678 | <property stdset="1"> | ||
679 | <name>editable</name> | ||
680 | <bool>true</bool> | ||
681 | </property> | ||
682 | <property stdset="1"> | ||
683 | <name>currentItem</name> | ||
684 | <number>1</number> | ||
685 | </property> | ||
686 | <property stdset="1"> | ||
687 | <name>autoCompletion</name> | ||
688 | <bool>true</bool> | ||
689 | </property> | ||
690 | </widget> | ||
691 | <widget row="2" column="0" rowspan="1" colspan="2" > | ||
692 | <class>QCheckBox</class> | ||
693 | <property stdset="1"> | ||
694 | <name>name</name> | ||
695 | <cstring>tryToAuthenticate</cstring> | ||
696 | </property> | ||
697 | <property stdset="1"> | ||
698 | <name>text</name> | ||
699 | <string>Try to authenticate</string> | ||
700 | </property> | ||
701 | </widget> | ||
702 | </grid> | ||
703 | </widget> | ||
704 | <widget row="0" column="0" > | ||
705 | <class>QCheckBox</class> | ||
706 | <property stdset="1"> | ||
707 | <name>name</name> | ||
708 | <cstring>enableActiveScanning</cstring> | ||
709 | </property> | ||
710 | <property stdset="1"> | ||
711 | <name>enabled</name> | ||
712 | <bool>false</bool> | ||
713 | </property> | ||
714 | <property stdset="1"> | ||
715 | <name>text</name> | ||
716 | <string>Enable active scanning</string> | ||
717 | </property> | ||
718 | </widget> | ||
719 | <widget row="2" column="0" > | ||
720 | <class>QGroupBox</class> | ||
721 | <property stdset="1"> | ||
722 | <name>name</name> | ||
723 | <cstring>GroupBox4</cstring> | ||
724 | </property> | ||
725 | <property stdset="1"> | ||
726 | <name>enabled</name> | ||
727 | <bool>false</bool> | ||
728 | </property> | ||
729 | <property stdset="1"> | ||
730 | <name>title</name> | ||
731 | <string>IP Level</string> | ||
732 | </property> | ||
733 | <grid> | ||
734 | <property stdset="1"> | ||
735 | <name>margin</name> | ||
736 | <number>11</number> | ||
737 | </property> | ||
738 | <property stdset="1"> | ||
739 | <name>spacing</name> | ||
740 | <number>6</number> | ||
741 | </property> | ||
742 | <widget row="1" column="0" rowspan="1" colspan="2" > | ||
743 | <class>QCheckBox</class> | ||
744 | <property stdset="1"> | ||
745 | <name>name</name> | ||
746 | <cstring>CheckBox24</cstring> | ||
747 | </property> | ||
748 | <property stdset="1"> | ||
749 | <name>text</name> | ||
750 | <string>Request DHCP Address</string> | ||
751 | </property> | ||
752 | </widget> | ||
753 | <widget row="0" column="0" > | ||
754 | <class>QLabel</class> | ||
755 | <property stdset="1"> | ||
756 | <name>name</name> | ||
757 | <cstring>TextLabel1_5_2</cstring> | ||
758 | </property> | ||
759 | <property stdset="1"> | ||
760 | <name>text</name> | ||
761 | <string>Fake IP:</string> | ||
762 | </property> | ||
763 | </widget> | ||
764 | <widget row="0" column="1" > | ||
765 | <class>QComboBox</class> | ||
766 | <item> | ||
767 | <property> | ||
768 | <name>text</name> | ||
769 | <string>192.168.125.1</string> | ||
770 | </property> | ||
771 | </item> | ||
772 | <item> | ||
773 | <property> | ||
774 | <name>text</name> | ||
775 | <string><automatic></string> | ||
776 | </property> | ||
777 | </item> | ||
778 | <property stdset="1"> | ||
779 | <name>name</name> | ||
780 | <cstring>fakeIP</cstring> | ||
781 | </property> | ||
782 | <property stdset="1"> | ||
783 | <name>sizePolicy</name> | ||
784 | <sizepolicy> | ||
785 | <hsizetype>7</hsizetype> | ||
786 | <vsizetype>0</vsizetype> | ||
787 | </sizepolicy> | ||
788 | </property> | ||
789 | <property stdset="1"> | ||
790 | <name>editable</name> | ||
791 | <bool>true</bool> | ||
792 | </property> | ||
793 | <property stdset="1"> | ||
794 | <name>currentItem</name> | ||
795 | <number>0</number> | ||
796 | </property> | ||
797 | </widget> | ||
798 | </grid> | ||
799 | </widget> | ||
800 | </grid> | ||
801 | </widget> | ||
531 | </widget> | 802 | </widget> |
532 | </grid> | 803 | </grid> |
533 | </widget> | 804 | </widget> |
805 | <customwidgets> | ||
806 | <customwidget> | ||
807 | <class>ProtocolListView</class> | ||
808 | <header location="local">protolistview.h</header> | ||
809 | <sizehint> | ||
810 | <width>100</width> | ||
811 | <height>100</height> | ||
812 | </sizehint> | ||
813 | <container>0</container> | ||
814 | <sizepolicy> | ||
815 | <hordata>3</hordata> | ||
816 | <verdata>3</verdata> | ||
817 | </sizepolicy> | ||
818 | <pixmap>image0</pixmap> | ||
819 | </customwidget> | ||
820 | </customwidgets> | ||
821 | <images> | ||
822 | <image> | ||
823 | <name>image0</name> | ||
824 | <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> | ||
825 | </image> | ||
826 | </images> | ||
534 | <connections> | 827 | <connections> |
535 | <connection> | 828 | <connection> |
536 | <sender>writeCaptureFile</sender> | 829 | <sender>hopChannels</sender> |
830 | <signal>toggled(bool)</signal> | ||
831 | <receiver>hopInterval</receiver> | ||
832 | <slot>setEnabled(bool)</slot> | ||
833 | </connection> | ||
834 | <connection> | ||
835 | <sender>hopChannels</sender> | ||
537 | <signal>toggled(bool)</signal> | 836 | <signal>toggled(bool)</signal> |
538 | <receiver>getCaptureFileName</receiver> | 837 | <receiver>TextLabel1</receiver> |
539 | <slot>setEnabled(bool)</slot> | 838 | <slot>setEnabled(bool)</slot> |
540 | </connection> | 839 | </connection> |
541 | <connection> | 840 | <connection> |
542 | <sender>activeScanning</sender> | 841 | <sender>enableActiveScanning</sender> |
543 | <signal>toggled(bool)</signal> | 842 | <signal>toggled(bool)</signal> |
544 | <receiver>MAC</receiver> | 843 | <receiver>GroupBox3</receiver> |
545 | <slot>setEnabled(bool)</slot> | 844 | <slot>setEnabled(bool)</slot> |
546 | </connection> | 845 | </connection> |
547 | <connection> | 846 | <connection> |
548 | <sender>writeCaptureFile</sender> | 847 | <sender>enableActiveScanning</sender> |
549 | <signal>toggled(bool)</signal> | 848 | <signal>toggled(bool)</signal> |
550 | <receiver>captureFileName</receiver> | 849 | <receiver>GroupBox4</receiver> |
551 | <slot>setEnabled(bool)</slot> | 850 | <slot>setEnabled(bool)</slot> |
552 | </connection> | 851 | </connection> |
553 | </connections> | 852 | </connections> |
554 | </UI> | 853 | </UI> |
diff --git a/noncore/net/wellenreiter/gui/configbasenew.ui b/noncore/net/wellenreiter/gui/configbasenew.ui deleted file mode 100644 index 1307f00..0000000 --- a/noncore/net/wellenreiter/gui/configbasenew.ui +++ b/dev/null | |||
@@ -1,814 +0,0 @@ | |||
1 | <!DOCTYPE UI><UI> | ||
2 | <class>Form1</class> | ||
3 | <widget> | ||
4 | <class>QDialog</class> | ||
5 | <property stdset="1"> | ||
6 | <name>name</name> | ||
7 | <cstring>Form1</cstring> | ||
8 | </property> | ||
9 | <property stdset="1"> | ||
10 | <name>geometry</name> | ||
11 | <rect> | ||
12 | <x>0</x> | ||
13 | <y>0</y> | ||
14 | <width>280</width> | ||
15 | <height>382</height> | ||
16 | </rect> | ||
17 | </property> | ||
18 | <property stdset="1"> | ||
19 | <name>caption</name> | ||
20 | <string>Form1</string> | ||
21 | </property> | ||
22 | <property> | ||
23 | <name>layoutMargin</name> | ||
24 | </property> | ||
25 | <property> | ||
26 | <name>layoutSpacing</name> | ||
27 | </property> | ||
28 | <grid> | ||
29 | <property stdset="1"> | ||
30 | <name>margin</name> | ||
31 | <number>5</number> | ||
32 | </property> | ||
33 | <property stdset="1"> | ||
34 | <name>spacing</name> | ||
35 | <number>3</number> | ||
36 | </property> | ||
37 | <widget row="0" column="0" > | ||
38 | <class>QTabWidget</class> | ||
39 | <property stdset="1"> | ||
40 | <name>name</name> | ||
41 | <cstring>interface</cstring> | ||
42 | </property> | ||
43 | <property> | ||
44 | <name>layoutMargin</name> | ||
45 | </property> | ||
46 | <property> | ||
47 | <name>layoutSpacing</name> | ||
48 | </property> | ||
49 | <widget> | ||
50 | <class>QWidget</class> | ||
51 | <property stdset="1"> | ||
52 | <name>name</name> | ||
53 | <cstring>tab</cstring> | ||
54 | </property> | ||
55 | <attribute> | ||
56 | <name>title</name> | ||
57 | <string>Interface</string> | ||
58 | </attribute> | ||
59 | <grid> | ||
60 | <property stdset="1"> | ||
61 | <name>margin</name> | ||
62 | <number>11</number> | ||
63 | </property> | ||
64 | <property stdset="1"> | ||
65 | <name>spacing</name> | ||
66 | <number>6</number> | ||
67 | </property> | ||
68 | <widget row="0" column="0" > | ||
69 | <class>QLabel</class> | ||
70 | <property stdset="1"> | ||
71 | <name>name</name> | ||
72 | <cstring>TextLabel1_2</cstring> | ||
73 | </property> | ||
74 | <property stdset="1"> | ||
75 | <name>enabled</name> | ||
76 | <bool>true</bool> | ||
77 | </property> | ||
78 | <property stdset="1"> | ||
79 | <name>text</name> | ||
80 | <string>Name:</string> | ||
81 | </property> | ||
82 | </widget> | ||
83 | <widget row="0" column="1" rowspan="1" colspan="2" > | ||
84 | <class>QComboBox</class> | ||
85 | <property stdset="1"> | ||
86 | <name>name</name> | ||
87 | <cstring>name</cstring> | ||
88 | </property> | ||
89 | <property stdset="1"> | ||
90 | <name>enabled</name> | ||
91 | <bool>true</bool> | ||
92 | </property> | ||
93 | <property> | ||
94 | <name>whatsThis</name> | ||
95 | <string>Choose the interface used for sniffing.</string> | ||
96 | </property> | ||
97 | </widget> | ||
98 | <widget row="1" column="0" > | ||
99 | <class>QLabel</class> | ||
100 | <property stdset="1"> | ||
101 | <name>name</name> | ||
102 | <cstring>TextLabel2_3</cstring> | ||
103 | </property> | ||
104 | <property stdset="1"> | ||
105 | <name>enabled</name> | ||
106 | <bool>true</bool> | ||
107 | </property> | ||
108 | <property stdset="1"> | ||
109 | <name>text</name> | ||
110 | <string>Driver:</string> | ||
111 | </property> | ||
112 | </widget> | ||
113 | <widget row="1" column="1" rowspan="1" colspan="2" > | ||
114 | <class>QComboBox</class> | ||
115 | <item> | ||
116 | <property> | ||
117 | <name>text</name> | ||
118 | <string><select></string> | ||
119 | </property> | ||
120 | </item> | ||
121 | <item> | ||
122 | <property> | ||
123 | <name>text</name> | ||
124 | <string>cisco</string> | ||
125 | </property> | ||
126 | </item> | ||
127 | <item> | ||
128 | <property> | ||
129 | <name>text</name> | ||
130 | <string>wlan-ng</string> | ||
131 | </property> | ||
132 | </item> | ||
133 | <item> | ||
134 | <property> | ||
135 | <name>text</name> | ||
136 | <string>hostap</string> | ||
137 | </property> | ||
138 | </item> | ||
139 | <item> | ||
140 | <property> | ||
141 | <name>text</name> | ||
142 | <string>orinoco</string> | ||
143 | </property> | ||
144 | </item> | ||
145 | <item> | ||
146 | <property> | ||
147 | <name>text</name> | ||
148 | <string><manual></string> | ||
149 | </property> | ||
150 | </item> | ||
151 | <item> | ||
152 | <property> | ||
153 | <name>text</name> | ||
154 | <string><file></string> | ||
155 | </property> | ||
156 | </item> | ||
157 | <property stdset="1"> | ||
158 | <name>name</name> | ||
159 | <cstring>driver</cstring> | ||
160 | </property> | ||
161 | <property stdset="1"> | ||
162 | <name>enabled</name> | ||
163 | <bool>true</bool> | ||
164 | </property> | ||
165 | <property> | ||
166 | <name>whatsThis</name> | ||
167 | <string>Choose the type of driver used for sniffing.</string> | ||
168 | </property> | ||
169 | </widget> | ||
170 | <widget row="4" column="0" > | ||
171 | <class>QCheckBox</class> | ||
172 | <property stdset="1"> | ||
173 | <name>name</name> | ||
174 | <cstring>CheckBox18</cstring> | ||
175 | </property> | ||
176 | <property stdset="1"> | ||
177 | <name>text</name> | ||
178 | <string>Hop Channels</string> | ||
179 | </property> | ||
180 | <property stdset="1"> | ||
181 | <name>checked</name> | ||
182 | <bool>true</bool> | ||
183 | </property> | ||
184 | </widget> | ||
185 | <widget row="4" column="1" > | ||
186 | <class>QLabel</class> | ||
187 | <property stdset="1"> | ||
188 | <name>name</name> | ||
189 | <cstring>TextLabel1</cstring> | ||
190 | </property> | ||
191 | <property stdset="1"> | ||
192 | <name>text</name> | ||
193 | <string>every</string> | ||
194 | </property> | ||
195 | </widget> | ||
196 | <widget row="4" column="2" > | ||
197 | <class>QSpinBox</class> | ||
198 | <property stdset="1"> | ||
199 | <name>name</name> | ||
200 | <cstring>hopInterval</cstring> | ||
201 | </property> | ||
202 | <property stdset="1"> | ||
203 | <name>enabled</name> | ||
204 | <bool>true</bool> | ||
205 | </property> | ||
206 | <property stdset="1"> | ||
207 | <name>suffix</name> | ||
208 | <string> ms</string> | ||
209 | </property> | ||
210 | <property stdset="1"> | ||
211 | <name>maxValue</name> | ||
212 | <number>2000</number> | ||
213 | </property> | ||
214 | <property stdset="1"> | ||
215 | <name>minValue</name> | ||
216 | <number>100</number> | ||
217 | </property> | ||
218 | <property stdset="1"> | ||
219 | <name>lineStep</name> | ||
220 | <number>100</number> | ||
221 | </property> | ||
222 | <property stdset="1"> | ||
223 | <name>value</name> | ||
224 | <number>1000</number> | ||
225 | </property> | ||
226 | <property> | ||
227 | <name>whatsThis</name> | ||
228 | <string>Choose the channel hop interval.</string> | ||
229 | </property> | ||
230 | </widget> | ||
231 | <widget row="5" column="0" rowspan="1" colspan="3" > | ||
232 | <class>QGroupBox</class> | ||
233 | <property stdset="1"> | ||
234 | <name>name</name> | ||
235 | <cstring>GroupBox1</cstring> | ||
236 | </property> | ||
237 | <property stdset="1"> | ||
238 | <name>title</name> | ||
239 | <string>Scan on channel</string> | ||
240 | </property> | ||
241 | <grid> | ||
242 | <property stdset="1"> | ||
243 | <name>margin</name> | ||
244 | <number>11</number> | ||
245 | </property> | ||
246 | <property stdset="1"> | ||
247 | <name>spacing</name> | ||
248 | <number>6</number> | ||
249 | </property> | ||
250 | <widget row="1" column="1" > | ||
251 | <class>QCheckBox</class> | ||
252 | <property stdset="1"> | ||
253 | <name>name</name> | ||
254 | <cstring>channel6</cstring> | ||
255 | </property> | ||
256 | <property stdset="1"> | ||
257 | <name>text</name> | ||
258 | <string>6</string> | ||
259 | </property> | ||
260 | </widget> | ||
261 | <widget row="1" column="3" > | ||
262 | <class>QCheckBox</class> | ||
263 | <property stdset="1"> | ||
264 | <name>name</name> | ||
265 | <cstring>channel8</cstring> | ||
266 | </property> | ||
267 | <property stdset="1"> | ||
268 | <name>text</name> | ||
269 | <string>8</string> | ||
270 | </property> | ||
271 | </widget> | ||
272 | <widget row="0" column="2" > | ||
273 | <class>QCheckBox</class> | ||
274 | <property stdset="1"> | ||
275 | <name>name</name> | ||
276 | <cstring>channel2</cstring> | ||
277 | </property> | ||
278 | <property stdset="1"> | ||
279 | <name>text</name> | ||
280 | <string>2</string> | ||
281 | </property> | ||
282 | </widget> | ||
283 | <widget row="1" column="4" > | ||
284 | <class>QCheckBox</class> | ||
285 | <property stdset="1"> | ||
286 | <name>name</name> | ||
287 | <cstring>channel9</cstring> | ||
288 | </property> | ||
289 | <property stdset="1"> | ||
290 | <name>text</name> | ||
291 | <string>9</string> | ||
292 | </property> | ||
293 | </widget> | ||
294 | <widget row="0" column="1" > | ||
295 | <class>QCheckBox</class> | ||
296 | <property stdset="1"> | ||
297 | <name>name</name> | ||
298 | <cstring>channel1</cstring> | ||
299 | </property> | ||
300 | <property stdset="1"> | ||
301 | <name>text</name> | ||
302 | <string>1</string> | ||
303 | </property> | ||
304 | </widget> | ||
305 | <widget row="0" column="0" > | ||
306 | <class>QCheckBox</class> | ||
307 | <property stdset="1"> | ||
308 | <name>name</name> | ||
309 | <cstring>channelAll</cstring> | ||
310 | </property> | ||
311 | <property stdset="1"> | ||
312 | <name>text</name> | ||
313 | <string>All</string> | ||
314 | </property> | ||
315 | </widget> | ||
316 | <widget row="2" column="1" > | ||
317 | <class>QCheckBox</class> | ||
318 | <property stdset="1"> | ||
319 | <name>name</name> | ||
320 | <cstring>channel11</cstring> | ||
321 | </property> | ||
322 | <property stdset="1"> | ||
323 | <name>text</name> | ||
324 | <string>11</string> | ||
325 | </property> | ||
326 | </widget> | ||
327 | <widget row="2" column="0" > | ||
328 | <class>QCheckBox</class> | ||
329 | <property stdset="1"> | ||
330 | <name>name</name> | ||
331 | <cstring>channel10</cstring> | ||
332 | </property> | ||
333 | <property stdset="1"> | ||
334 | <name>text</name> | ||
335 | <string>10</string> | ||
336 | </property> | ||
337 | </widget> | ||
338 | <widget row="1" column="2" > | ||
339 | <class>QCheckBox</class> | ||
340 | <property stdset="1"> | ||
341 | <name>name</name> | ||
342 | <cstring>channel7</cstring> | ||
343 | </property> | ||
344 | <property stdset="1"> | ||
345 | <name>text</name> | ||
346 | <string>7</string> | ||
347 | </property> | ||
348 | </widget> | ||
349 | <widget row="0" column="3" > | ||
350 | <class>QCheckBox</class> | ||
351 | <property stdset="1"> | ||
352 | <name>name</name> | ||
353 | <cstring>channel3</cstring> | ||
354 | </property> | ||
355 | <property stdset="1"> | ||
356 | <name>text</name> | ||
357 | <string>3</string> | ||
358 | </property> | ||
359 | </widget> | ||
360 | <widget row="1" column="0" > | ||
361 | <class>QCheckBox</class> | ||
362 | <property stdset="1"> | ||
363 | <name>name</name> | ||
364 | <cstring>channel5</cstring> | ||
365 | </property> | ||
366 | <property stdset="1"> | ||
367 | <name>text</name> | ||
368 | <string>5</string> | ||
369 | </property> | ||
370 | </widget> | ||
371 | <widget row="0" column="4" > | ||
372 | <class>QCheckBox</class> | ||
373 | <property stdset="1"> | ||
374 | <name>name</name> | ||
375 | <cstring>channel4</cstring> | ||
376 | </property> | ||
377 | <property stdset="1"> | ||
378 | <name>text</name> | ||
379 | <string>4</string> | ||
380 | </property> | ||
381 | </widget> | ||
382 | <widget row="2" column="2" > | ||
383 | <class>QCheckBox</class> | ||
384 | <property stdset="1"> | ||
385 | <name>name</name> | ||
386 | <cstring>channel12</cstring> | ||
387 | </property> | ||
388 | <property stdset="1"> | ||
389 | <name>text</name> | ||
390 | <string>12</string> | ||
391 | </property> | ||
392 | </widget> | ||
393 | <widget row="2" column="3" > | ||
394 | <class>QCheckBox</class> | ||
395 | <property stdset="1"> | ||
396 | <name>name</name> | ||
397 | <cstring>channel13</cstring> | ||
398 | </property> | ||
399 | <property stdset="1"> | ||
400 | <name>text</name> | ||
401 | <string>13</string> | ||
402 | </property> | ||
403 | </widget> | ||
404 | <widget row="2" column="4" > | ||
405 | <class>QCheckBox</class> | ||
406 | <property stdset="1"> | ||
407 | <name>name</name> | ||
408 | <cstring>channel14</cstring> | ||
409 | </property> | ||
410 | <property stdset="1"> | ||
411 | <name>text</name> | ||
412 | <string>14</string> | ||
413 | </property> | ||
414 | </widget> | ||
415 | </grid> | ||
416 | </widget> | ||
417 | <spacer row="3" column="0" > | ||
418 | <property> | ||
419 | <name>name</name> | ||
420 | <cstring>Spacer4</cstring> | ||
421 | </property> | ||
422 | <property stdset="1"> | ||
423 | <name>orientation</name> | ||
424 | <enum>Vertical</enum> | ||
425 | </property> | ||
426 | <property stdset="1"> | ||
427 | <name>sizeType</name> | ||
428 | <enum>Expanding</enum> | ||
429 | </property> | ||
430 | <property> | ||
431 | <name>sizeHint</name> | ||
432 | <size> | ||
433 | <width>20</width> | ||
434 | <height>20</height> | ||
435 | </size> | ||
436 | </property> | ||
437 | </spacer> | ||
438 | <widget row="2" column="0" rowspan="1" colspan="3" > | ||
439 | <class>QCheckBox</class> | ||
440 | <property stdset="1"> | ||
441 | <name>name</name> | ||
442 | <cstring>usePrismHeader</cstring> | ||
443 | </property> | ||
444 | <property stdset="1"> | ||
445 | <name>text</name> | ||
446 | <string>Use additional PRISM header</string> | ||
447 | </property> | ||
448 | </widget> | ||
449 | </grid> | ||
450 | </widget> | ||
451 | <widget> | ||
452 | <class>QWidget</class> | ||
453 | <property stdset="1"> | ||
454 | <name>name</name> | ||
455 | <cstring>tab</cstring> | ||
456 | </property> | ||
457 | <attribute> | ||
458 | <name>title</name> | ||
459 | <string>Capture</string> | ||
460 | </attribute> | ||
461 | <grid> | ||
462 | <property stdset="1"> | ||
463 | <name>margin</name> | ||
464 | <number>5</number> | ||
465 | </property> | ||
466 | <property stdset="1"> | ||
467 | <name>spacing</name> | ||
468 | <number>3</number> | ||
469 | </property> | ||
470 | <widget row="2" column="0" rowspan="1" colspan="2" > | ||
471 | <class>ProtocolListView</class> | ||
472 | <property stdset="1"> | ||
473 | <name>name</name> | ||
474 | <cstring>MyCustomWidget1</cstring> | ||
475 | </property> | ||
476 | <property stdset="1"> | ||
477 | <name>sizePolicy</name> | ||
478 | <sizepolicy> | ||
479 | <hsizetype>7</hsizetype> | ||
480 | <vsizetype>7</vsizetype> | ||
481 | </sizepolicy> | ||
482 | </property> | ||
483 | </widget> | ||
484 | <widget row="0" column="0" > | ||
485 | <class>QCheckBox</class> | ||
486 | <property stdset="1"> | ||
487 | <name>name</name> | ||
488 | <cstring>writeCaptureFile</cstring> | ||
489 | </property> | ||
490 | <property stdset="1"> | ||
491 | <name>enabled</name> | ||
492 | <bool>true</bool> | ||
493 | </property> | ||
494 | <property stdset="1"> | ||
495 | <name>text</name> | ||
496 | <string>Write Capture Files To</string> | ||
497 | </property> | ||
498 | </widget> | ||
499 | <widget row="0" column="1" > | ||
500 | <class>QToolButton</class> | ||
501 | <property stdset="1"> | ||
502 | <name>name</name> | ||
503 | <cstring>getCaptureFileName</cstring> | ||
504 | </property> | ||
505 | <property stdset="1"> | ||
506 | <name>enabled</name> | ||
507 | <bool>false</bool> | ||
508 | </property> | ||
509 | <property stdset="1"> | ||
510 | <name>text</name> | ||
511 | <string>...</string> | ||
512 | </property> | ||
513 | </widget> | ||
514 | <widget row="1" column="0" rowspan="1" colspan="2" > | ||
515 | <class>QLineEdit</class> | ||
516 | <property stdset="1"> | ||
517 | <name>name</name> | ||
518 | <cstring>captureFileName</cstring> | ||
519 | </property> | ||
520 | <property stdset="1"> | ||
521 | <name>enabled</name> | ||
522 | <bool>false</bool> | ||
523 | </property> | ||
524 | </widget> | ||
525 | </grid> | ||
526 | </widget> | ||
527 | <widget> | ||
528 | <class>QWidget</class> | ||
529 | <property stdset="1"> | ||
530 | <name>name</name> | ||
531 | <cstring>tab</cstring> | ||
532 | </property> | ||
533 | <attribute> | ||
534 | <name>title</name> | ||
535 | <string>Parse</string> | ||
536 | </attribute> | ||
537 | <grid> | ||
538 | <property stdset="1"> | ||
539 | <name>margin</name> | ||
540 | <number>5</number> | ||
541 | </property> | ||
542 | <property stdset="1"> | ||
543 | <name>spacing</name> | ||
544 | <number>3</number> | ||
545 | </property> | ||
546 | <widget row="0" column="0" > | ||
547 | <class>ProtocolListView</class> | ||
548 | <property stdset="1"> | ||
549 | <name>name</name> | ||
550 | <cstring>parsePackets</cstring> | ||
551 | </property> | ||
552 | <property stdset="1"> | ||
553 | <name>sizePolicy</name> | ||
554 | <sizepolicy> | ||
555 | <hsizetype>7</hsizetype> | ||
556 | <vsizetype>7</vsizetype> | ||
557 | </sizepolicy> | ||
558 | </property> | ||
559 | </widget> | ||
560 | </grid> | ||
561 | </widget> | ||
562 | <widget> | ||
563 | <class>QWidget</class> | ||
564 | <property stdset="1"> | ||
565 | <name>name</name> | ||
566 | <cstring>tab</cstring> | ||
567 | </property> | ||
568 | <attribute> | ||
569 | <name>title</name> | ||
570 | <string>Intrusion</string> | ||
571 | </attribute> | ||
572 | <grid> | ||
573 | <property stdset="1"> | ||
574 | <name>margin</name> | ||
575 | <number>11</number> | ||
576 | </property> | ||
577 | <property stdset="1"> | ||
578 | <name>spacing</name> | ||
579 | <number>6</number> | ||
580 | </property> | ||
581 | <widget row="1" column="0" > | ||
582 | <class>QGroupBox</class> | ||
583 | <property stdset="1"> | ||
584 | <name>name</name> | ||
585 | <cstring>GroupBox3</cstring> | ||
586 | </property> | ||
587 | <property stdset="1"> | ||
588 | <name>enabled</name> | ||
589 | <bool>false</bool> | ||
590 | </property> | ||
591 | <property stdset="1"> | ||
592 | <name>title</name> | ||
593 | <string>Link Level</string> | ||
594 | </property> | ||
595 | <grid> | ||
596 | <property stdset="1"> | ||
597 | <name>margin</name> | ||
598 | <number>11</number> | ||
599 | </property> | ||
600 | <property stdset="1"> | ||
601 | <name>spacing</name> | ||
602 | <number>6</number> | ||
603 | </property> | ||
604 | <widget row="0" column="0" > | ||
605 | <class>QLabel</class> | ||
606 | <property stdset="1"> | ||
607 | <name>name</name> | ||
608 | <cstring>TextLabel1_5</cstring> | ||
609 | </property> | ||
610 | <property stdset="1"> | ||
611 | <name>text</name> | ||
612 | <string>Fake Mac:</string> | ||
613 | </property> | ||
614 | </widget> | ||
615 | <widget row="1" column="0" rowspan="1" colspan="2" > | ||
616 | <class>QCheckBox</class> | ||
617 | <property stdset="1"> | ||
618 | <name>name</name> | ||
619 | <cstring>sendProbeRequests</cstring> | ||
620 | </property> | ||
621 | <property stdset="1"> | ||
622 | <name>text</name> | ||
623 | <string>Send proble requests</string> | ||
624 | </property> | ||
625 | </widget> | ||
626 | <widget row="0" column="1" > | ||
627 | <class>QComboBox</class> | ||
628 | <item> | ||
629 | <property> | ||
630 | <name>text</name> | ||
631 | <string>44:44:44:44:44:44</string> | ||
632 | </property> | ||
633 | </item> | ||
634 | <item> | ||
635 | <property> | ||
636 | <name>text</name> | ||
637 | <string><automatic></string> | ||
638 | </property> | ||
639 | </item> | ||
640 | <property stdset="1"> | ||
641 | <name>name</name> | ||
642 | <cstring>fakeMac</cstring> | ||
643 | </property> | ||
644 | <property stdset="1"> | ||
645 | <name>sizePolicy</name> | ||
646 | <sizepolicy> | ||
647 | <hsizetype>7</hsizetype> | ||
648 | <vsizetype>0</vsizetype> | ||
649 | </sizepolicy> | ||
650 | </property> | ||
651 | <property stdset="1"> | ||
652 | <name>editable</name> | ||
653 | <bool>true</bool> | ||
654 | </property> | ||
655 | <property stdset="1"> | ||
656 | <name>autoCompletion</name> | ||
657 | <bool>true</bool> | ||
658 | </property> | ||
659 | </widget> | ||
660 | <widget row="2" column="0" rowspan="1" colspan="2" > | ||
661 | <class>QCheckBox</class> | ||
662 | <property stdset="1"> | ||
663 | <name>name</name> | ||
664 | <cstring>tryToAuthenticate</cstring> | ||
665 | </property> | ||
666 | <property stdset="1"> | ||
667 | <name>text</name> | ||
668 | <string>Try to authenticate</string> | ||
669 | </property> | ||
670 | </widget> | ||
671 | </grid> | ||
672 | </widget> | ||
673 | <widget row="0" column="0" > | ||
674 | <class>QCheckBox</class> | ||
675 | <property stdset="1"> | ||
676 | <name>name</name> | ||
677 | <cstring>enableActiveScanning</cstring> | ||
678 | </property> | ||
679 | <property stdset="1"> | ||
680 | <name>enabled</name> | ||
681 | <bool>false</bool> | ||
682 | </property> | ||
683 | <property stdset="1"> | ||
684 | <name>text</name> | ||
685 | <string>Enable active scanning</string> | ||
686 | </property> | ||
687 | </widget> | ||
688 | <widget row="2" column="0" > | ||
689 | <class>QGroupBox</class> | ||
690 | <property stdset="1"> | ||
691 | <name>name</name> | ||
692 | <cstring>GroupBox4</cstring> | ||
693 | </property> | ||
694 | <property stdset="1"> | ||
695 | <name>enabled</name> | ||
696 | <bool>false</bool> | ||
697 | </property> | ||
698 | <property stdset="1"> | ||
699 | <name>title</name> | ||
700 | <string>IP Level</string> | ||
701 | </property> | ||
702 | <grid> | ||
703 | <property stdset="1"> | ||
704 | <name>margin</name> | ||
705 | <number>11</number> | ||
706 | </property> | ||
707 | <property stdset="1"> | ||
708 | <name>spacing</name> | ||
709 | <number>6</number> | ||
710 | </property> | ||
711 | <widget row="1" column="0" rowspan="1" colspan="2" > | ||
712 | <class>QCheckBox</class> | ||
713 | <property stdset="1"> | ||
714 | <name>name</name> | ||
715 | <cstring>CheckBox24</cstring> | ||
716 | </property> | ||
717 | <property stdset="1"> | ||
718 | <name>text</name> | ||
719 | <string>Request DHCP Address</string> | ||
720 | </property> | ||
721 | </widget> | ||
722 | <widget row="0" column="0" > | ||
723 | <class>QLabel</class> | ||
724 | <property stdset="1"> | ||
725 | <name>name</name> | ||
726 | <cstring>TextLabel1_5_2</cstring> | ||
727 | </property> | ||
728 | <property stdset="1"> | ||
729 | <name>text</name> | ||
730 | <string>Fake IP:</string> | ||
731 | </property> | ||
732 | </widget> | ||
733 | <widget row="0" column="1" > | ||
734 | <class>QComboBox</class> | ||
735 | <item> | ||
736 | <property> | ||
737 | <name>text</name> | ||
738 | <string>192.168.125.1</string> | ||
739 | </property> | ||
740 | </item> | ||
741 | <item> | ||
742 | <property> | ||
743 | <name>text</name> | ||
744 | <string><automatic></string> | ||
745 | </property> | ||
746 | </item> | ||
747 | <property stdset="1"> | ||
748 | <name>name</name> | ||
749 | <cstring>ComboBox10</cstring> | ||
750 | </property> | ||
751 | <property stdset="1"> | ||
752 | <name>sizePolicy</name> | ||
753 | <sizepolicy> | ||
754 | <hsizetype>7</hsizetype> | ||
755 | <vsizetype>0</vsizetype> | ||
756 | </sizepolicy> | ||
757 | </property> | ||
758 | </widget> | ||
759 | </grid> | ||
760 | </widget> | ||
761 | </grid> | ||
762 | </widget> | ||
763 | </widget> | ||
764 | </grid> | ||
765 | </widget> | ||
766 | <customwidgets> | ||
767 | <customwidget> | ||
768 | <class>ProtocolListView</class> | ||
769 | <header location="local">protolistview.h</header> | ||
770 | <sizehint> | ||
771 | <width>100</width> | ||
772 | <height>100</height> | ||
773 | </sizehint> | ||
774 | <container>0</container> | ||
775 | <sizepolicy> | ||
776 | <hordata>3</hordata> | ||
777 | <verdata>3</verdata> | ||
778 | </sizepolicy> | ||
779 | <pixmap>image0</pixmap> | ||
780 | </customwidget> | ||
781 | </customwidgets> | ||
782 | <images> | ||
783 | <image> | ||
784 | <name>image0</name> | ||
785 | <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> | ||
786 | </image> | ||
787 | </images> | ||
788 | <connections> | ||
789 | <connection> | ||
790 | <sender>CheckBox18</sender> | ||
791 | <signal>toggled(bool)</signal> | ||
792 | <receiver>hopInterval</receiver> | ||
793 | <slot>setEnabled(bool)</slot> | ||
794 | </connection> | ||
795 | <connection> | ||
796 | <sender>CheckBox18</sender> | ||
797 | <signal>toggled(bool)</signal> | ||
798 | <receiver>TextLabel1</receiver> | ||
799 | <slot>setEnabled(bool)</slot> | ||
800 | </connection> | ||
801 | <connection> | ||
802 | <sender>enableActiveScanning</sender> | ||
803 | <signal>toggled(bool)</signal> | ||
804 | <receiver>GroupBox3</receiver> | ||
805 | <slot>setEnabled(bool)</slot> | ||
806 | </connection> | ||
807 | <connection> | ||
808 | <sender>enableActiveScanning</sender> | ||
809 | <signal>toggled(bool)</signal> | ||
810 | <receiver>GroupBox4</receiver> | ||
811 | <slot>setEnabled(bool)</slot> | ||
812 | </connection> | ||
813 | </connections> | ||
814 | </UI> | ||
diff --git a/noncore/net/wellenreiter/gui/configwindow.cpp b/noncore/net/wellenreiter/gui/configwindow.cpp deleted file mode 100644 index 92715b4..0000000 --- a/noncore/net/wellenreiter/gui/configwindow.cpp +++ b/dev/null | |||
@@ -1,146 +0,0 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of Opie Environment. | ||
5 | ** | ||
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 | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
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. | ||
13 | ** | ||
14 | **********************************************************************/ | ||
15 | |||
16 | /* LOCAL */ | ||
17 | #include "configwindow.h" | ||
18 | #include "mainwindow.h" | ||
19 | |||
20 | /* QT */ | ||
21 | #include <qapplication.h> | ||
22 | #include <qcombobox.h> | ||
23 | #include <qfile.h> | ||
24 | #include <qlineedit.h> | ||
25 | #include <qlayout.h> | ||
26 | #include <qmap.h> | ||
27 | #include <qpushbutton.h> | ||
28 | #include <qtoolbutton.h> | ||
29 | #include <qspinbox.h> | ||
30 | #include <qtextstream.h> | ||
31 | |||
32 | /* OPIE */ | ||
33 | #include <opie2/onetwork.h> | ||
34 | |||
35 | WellenreiterConfigWindow* WellenreiterConfigWindow::_instance = 0; | ||
36 | |||
37 | WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char * name, WFlags f ) | ||
38 | :WellenreiterConfigBase( parent, name, true, f ) | ||
39 | { | ||
40 | _devicetype[ "cisco" ] = DEVTYPE_CISCO; | ||
41 | _devicetype[ "wlan-ng" ] = DEVTYPE_WLAN_NG; | ||
42 | _devicetype[ "hostap" ] = DEVTYPE_HOSTAP; | ||
43 | _devicetype[ "orinoco" ] = DEVTYPE_ORINOCO; | ||
44 | _devicetype[ "<manual>" ] = DEVTYPE_MANUAL; | ||
45 | _devicetype[ "<file>" ] = DEVTYPE_FILE; | ||
46 | |||
47 | // gather possible interface names from ONetwork | ||
48 | ONetwork* net = ONetwork::instance(); | ||
49 | ONetwork::InterfaceIterator it = net->iterator(); | ||
50 | while ( it.current() ) | ||
51 | { | ||
52 | if ( it.current()->isWireless() ) | ||
53 | interfaceName->insertItem( it.current()->name() ); | ||
54 | ++it; | ||
55 | } | ||
56 | |||
57 | // try to guess device type | ||
58 | QFile m( "/proc/modules" ); | ||
59 | if ( m.open( IO_ReadOnly ) ) | ||
60 | { | ||
61 | int devicetype(0); | ||
62 | QString line; | ||
63 | QTextStream modules( &m ); | ||
64 | while( !modules.atEnd() && !devicetype ) | ||
65 | { | ||
66 | modules >> line; | ||
67 | if ( line.contains( "cisco" ) ) devicetype = DEVTYPE_CISCO; | ||
68 | else if ( line.contains( "hostap" ) ) devicetype = DEVTYPE_HOSTAP; | ||
69 | else if ( line.contains( "prism" ) ) devicetype = DEVTYPE_WLAN_NG; | ||
70 | else if ( line.contains( "orinoco" ) ) devicetype = DEVTYPE_ORINOCO; | ||
71 | } | ||
72 | if ( devicetype ) | ||
73 | { | ||
74 | deviceType->setCurrentItem( devicetype ); | ||
75 | _guess = devicetype; | ||
76 | qDebug( "Wellenreiter: guessed device type to be #%d", devicetype ); | ||
77 | } | ||
78 | } | ||
79 | |||
80 | #ifdef Q_WS_X11 // We're on X11: adding an Ok-Button for the Dialog here | ||
81 | QPushButton* okButton = new QPushButton( "ok", this ); | ||
82 | okButton->show(); | ||
83 | Layout5_2->addWidget( okButton, 0, 3 ); //FIXME: rename this in configbase.ui | ||
84 | connect( okButton, SIGNAL( clicked() ), this, SLOT( accept() ) ); | ||
85 | #endif | ||
86 | |||
87 | WellenreiterConfigWindow::_instance = this; | ||
88 | |||
89 | connect( deviceType, SIGNAL( activated(int) ), this, SLOT( changedDeviceType(int) ) ); | ||
90 | connect( getCaptureFileName, SIGNAL( clicked() ), this, SLOT( getCaptureFileNameClicked() ) ); | ||
91 | }; | ||
92 | |||
93 | |||
94 | int WellenreiterConfigWindow::daemonDeviceType() | ||
95 | { | ||
96 | QString name = deviceType->currentText(); | ||
97 | if ( _devicetype.contains( name ) ) | ||
98 | { | ||
99 | return _devicetype[name]; | ||
100 | } | ||
101 | else | ||
102 | { | ||
103 | return 0; | ||
104 | } | ||
105 | }; | ||
106 | |||
107 | |||
108 | int WellenreiterConfigWindow::daemonHopInterval() | ||
109 | { | ||
110 | return hopInterval->cleanText().toInt(); | ||
111 | } | ||
112 | |||
113 | |||
114 | void WellenreiterConfigWindow::changedDeviceType(int t) | ||
115 | { | ||
116 | if ( t != DEVTYPE_FILE ) return; | ||
117 | QString name = ( (WellenreiterMainWindow*) qApp->mainWidget() )->getFileName(false); | ||
118 | if ( !name.isEmpty() && QFile::exists( name ) ) | ||
119 | { | ||
120 | interfaceName->insertItem( name ); | ||
121 | interfaceName->setCurrentItem( interfaceName->count()-1 ); | ||
122 | } | ||
123 | else | ||
124 | { | ||
125 | deviceType->setCurrentItem( _guess ); | ||
126 | } | ||
127 | |||
128 | } | ||
129 | |||
130 | |||
131 | void WellenreiterConfigWindow::getCaptureFileNameClicked() | ||
132 | { | ||
133 | QString name = ( (WellenreiterMainWindow*) qApp->mainWidget() )->getFileName(true); | ||
134 | qDebug( "name = %s", (const char*) name ); | ||
135 | if ( !name.isEmpty() ) | ||
136 | { | ||
137 | captureFileName->setText( name ); | ||
138 | } | ||
139 | } | ||
140 | |||
141 | |||
142 | bool WellenreiterConfigWindow::usePrismHeader() | ||
143 | { | ||
144 | return true; | ||
145 | //return interface->usePrismHeader(); | ||
146 | } | ||
diff --git a/noncore/net/wellenreiter/gui/configwindow.h b/noncore/net/wellenreiter/gui/configwindow.h deleted file mode 100644 index 11ae5b8..0000000 --- a/noncore/net/wellenreiter/gui/configwindow.h +++ b/dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of Opie Environment. | ||
5 | ** | ||
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 | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
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. | ||
13 | ** | ||
14 | **********************************************************************/ | ||
15 | |||
16 | #ifndef WELLENREITERCONFIGWINDOW_H | ||
17 | #define WELLENREITERCONFIGWINDOW_H | ||
18 | |||
19 | #include "configbase.h" | ||
20 | #include <qmap.h> | ||
21 | #include <qcombobox.h> | ||
22 | #include <qstring.h> | ||
23 | |||
24 | const int DEVTYPE_SELECT = 0; | ||
25 | const int DEVTYPE_CISCO = 1; | ||
26 | const int DEVTYPE_WLAN_NG = 2; | ||
27 | const int DEVTYPE_HOSTAP = 3; | ||
28 | const int DEVTYPE_ORINOCO = 4; | ||
29 | const int DEVTYPE_MANUAL = 5; | ||
30 | const int DEVTYPE_FILE = 6; | ||
31 | |||
32 | class WellenreiterConfigWindow; | ||
33 | |||
34 | class WellenreiterConfigWindow : public WellenreiterConfigBase | ||
35 | { | ||
36 | Q_OBJECT | ||
37 | |||
38 | public: | ||
39 | WellenreiterConfigWindow( QWidget * parent = 0, const char * name = "WellenreiterConfigWindow", WFlags f = 0 ); | ||
40 | int daemonDeviceType(); | ||
41 | int daemonHopInterval(); | ||
42 | const QString soundOnNetwork() const { return netSound->currentText(); }; | ||
43 | const QString soundOnBeacon() const { return beaconSound->currentText(); }; | ||
44 | static WellenreiterConfigWindow* instance() { return _instance; }; | ||
45 | |||
46 | bool usePrismHeader(); | ||
47 | |||
48 | public slots: | ||
49 | void changedDeviceType(int); | ||
50 | void getCaptureFileNameClicked(); | ||
51 | |||
52 | protected: | ||
53 | QMap<QString, int> _devicetype; | ||
54 | static WellenreiterConfigWindow* _instance; | ||
55 | int _guess; | ||
56 | |||
57 | }; | ||
58 | |||
59 | #endif | ||
diff --git a/noncore/net/wellenreiter/gui/graphwindow.cpp b/noncore/net/wellenreiter/gui/graphwindow.cpp index c620fe2..7e1f378 100644 --- a/noncore/net/wellenreiter/gui/graphwindow.cpp +++ b/noncore/net/wellenreiter/gui/graphwindow.cpp | |||
@@ -1,159 +1,159 @@ | |||
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 alone |
33 | setBackgroundMode( QWidget::NoBackground ); | 33 | setBackgroundMode( QWidget::NoBackground ); |
34 | } | 34 | } |
35 | 35 | ||
36 | 36 | ||
37 | void MFrequencySpectrum::drawLine( QPainter* p, int x, int y, int width, const QColor& c ) | 37 | void MFrequencySpectrum::drawLine( QPainter* p, int x, int y, int width, const QColor& c ) |
38 | { | 38 | { |
39 | p->setPen( c.light() ); | 39 | p->setPen( c.light() ); |
40 | p->drawPoint( x++, y ); | 40 | p->drawPoint( x++, y ); |
41 | p->setPen( c ); | 41 | p->setPen( c ); |
42 | p->drawLine( x, y, x+width-2, y ); | 42 | p->drawLine( x, y, x+width-2, y ); |
43 | p->setPen( c.dark() ); | 43 | p->setPen( c.dark() ); |
44 | p->drawPoint( x+width-1, y ); | 44 | p->drawPoint( x+width-1, y ); |
45 | } | 45 | } |
46 | 46 | ||
47 | 47 | ||
48 | void MFrequencySpectrum::drawBar( QPainter* p, int x, int y, int width, int height, int maxheight ) | 48 | void MFrequencySpectrum::drawBar( QPainter* p, int x, int y, int width, int height, int maxheight ) |
49 | { | 49 | { |
50 | /* int h1 = 133; int h2 = 0; | 50 | int h1 = 133; int h2 = 0; |
51 | int s1 = 200; int s2 = 255; | 51 | int s1 = 200; int s2 = 255; |
52 | int v1 = 140; int v2 = 255; */ | 52 | int v1 = 140; int v2 = 255; |
53 | 53 | ||
54 | int h1 = 196; int h2 = 194; | 54 | /*int h1 = 196; int h2 = 194; |
55 | int s1 = 85; int s2 = 15; | 55 | int s1 = 85; int s2 = 15; |
56 | int v1 = 95; int v2 = 237; | 56 | int v1 = 95; int v2 = 237;*/ |
57 | 57 | ||
58 | QColor c( 120, 60, 200 ); | 58 | QColor c( 120, 60, 200 ); |
59 | for ( int i = 0; i < height; ++i ) | 59 | for ( int i = 0; i < height; ++i ) |
60 | { | 60 | { |
61 | int h = (h2-h1)*i/maxheight + h1; | 61 | int h = (h2-h1)*i/maxheight + h1; |
62 | int s = (s2-s1)*i/maxheight + s1; | 62 | int s = (s2-s1)*i/maxheight + s1; |
63 | int v = (v2-v1)*i/maxheight + v1; | 63 | int v = (v2-v1)*i/maxheight + v1; |
64 | drawLine( p, x, y-i, width, QColor( h,s,v, QColor::Hsv ) ); | 64 | drawLine( p, x, y-i, width, QColor( h,s,v, QColor::Hsv ) ); |
65 | } | 65 | } |
66 | 66 | ||
67 | /*for ( int i = height; i < maxheight; ++i ) | 67 | /*for ( int i = height; i < maxheight; ++i ) |
68 | drawLine( p, x, y-i, width, QColor( 47, 68, 76 ) );*/ | 68 | drawLine( p, x, y-i, width, QColor( 47, 68, 76 ) );*/ |
69 | 69 | ||
70 | } | 70 | } |
71 | 71 | ||
72 | 72 | ||
73 | void MFrequencySpectrum::paintEvent( QPaintEvent* e ) | 73 | void MFrequencySpectrum::paintEvent( QPaintEvent* e ) |
74 | { | 74 | { |
75 | QPixmap pm( size() ); | 75 | QPixmap pm( size() ); |
76 | QPainter p; | 76 | QPainter p; |
77 | p.begin( &pm ); | 77 | p.begin( &pm ); |
78 | p.drawTiledPixmap( 0, 0, size().width(), size().height(), QPixmap( (const char**) &background ) ); | 78 | p.drawTiledPixmap( 0, 0, size().width(), size().height(), QPixmap( (const char**) &background ) ); |
79 | 79 | ||
80 | int xmargin = 5; | 80 | int xmargin = 5; |
81 | int ymargin = 2; | 81 | int ymargin = 2; |
82 | int y = size().height() - 2 * ymargin; | 82 | int y = size().height() - 2 * ymargin; |
83 | int x = 0; | 83 | int x = 0; |
84 | int width = ( size().width() - 2 * xmargin ) / _channels; | 84 | int width = ( size().width() - 2 * xmargin ) / _channels; |
85 | 85 | ||
86 | for ( int i = 0; i < _channels; ++i ) | 86 | for ( int i = 0; i < _channels; ++i ) |
87 | { | 87 | { |
88 | if ( _dirty[i] ) | 88 | if ( _dirty[i] ) |
89 | { | 89 | { |
90 | drawBar( &p, xmargin + x, y - ymargin, width-3, _values[i]*y/100, y ); | 90 | drawBar( &p, xmargin + x, y - ymargin, width-3, _values[i]*y/100, y ); |
91 | _dirty[i] = false; | 91 | _dirty[i] = false; |
92 | } | 92 | } |
93 | x+= width; | 93 | x+= width; |
94 | } | 94 | } |
95 | 95 | ||
96 | p.end(); | 96 | p.end(); |
97 | bitBlt( this, 0, 0, &pm ); | 97 | bitBlt( this, 0, 0, &pm ); |
98 | } | 98 | } |
99 | 99 | ||
100 | 100 | ||
101 | Legende::Legende( int channels, QWidget* parent, const char* name, WFlags f ) | 101 | Legende::Legende( int channels, QWidget* parent, const char* name, WFlags f ) |
102 | :QFrame( parent, name, f ), _channels( channels ) | 102 | :QFrame( parent, name, f ), _channels( channels ) |
103 | { | 103 | { |
104 | setLineWidth( 2 ); | 104 | setLineWidth( 2 ); |
105 | setFrameStyle( Panel + Sunken ); | 105 | setFrameStyle( Panel + Sunken ); |
106 | setFixedHeight( 16 ); | 106 | setFixedHeight( 16 ); |
107 | 107 | ||
108 | } | 108 | } |
109 | 109 | ||
110 | 110 | ||
111 | void Legende::drawContents( QPainter* p ) | 111 | void Legende::drawContents( QPainter* p ) |
112 | { | 112 | { |
113 | int xmargin = 5; | 113 | int xmargin = 5; |
114 | int ymargin = 2; | 114 | int ymargin = 2; |
115 | int x = 0; | 115 | int x = 0; |
116 | int width = ( contentsRect().width() - 2 * xmargin ) / _channels; | 116 | int width = ( contentsRect().width() - 2 * xmargin ) / _channels; |
117 | 117 | ||
118 | for ( int i = 0; i < _channels; ++i ) | 118 | for ( int i = 0; i < _channels; ++i ) |
119 | p->drawText( xmargin + (width*i), 12, QString().sprintf( "%02d", i+1 ) ); | 119 | p->drawText( xmargin + (width*i), 12, QString().sprintf( "%02d", i+1 ) ); |
120 | } | 120 | } |
121 | 121 | ||
122 | 122 | ||
123 | MGraphWindow::MGraphWindow( QWidget* parent, const char* name, WFlags f ) | 123 | MGraphWindow::MGraphWindow( QWidget* parent, const char* name, WFlags f ) |
124 | :QVBox( parent, name, f ) | 124 | :QVBox( parent, name, f ) |
125 | { | 125 | { |
126 | spectrum = new MFrequencySpectrum( 14, this ); | 126 | spectrum = new MFrequencySpectrum( 14, this ); |
127 | legende = new Legende( 14, this ); | 127 | legende = new Legende( 14, this ); |
128 | startTimer( 50 ); | 128 | startTimer( 50 ); //FIXME: tweak |
129 | 129 | ||
130 | //testGraph(); | 130 | //testGraph(); |
131 | 131 | ||
132 | }; | 132 | }; |
133 | 133 | ||
134 | 134 | ||
135 | void MGraphWindow::testGraph() | 135 | void MGraphWindow::testGraph() |
136 | { | 136 | { |
137 | static int i = 0; | 137 | static int i = 0; |
138 | spectrum->setValue( i++, 100 ); | 138 | spectrum->setValue( i++, 100 ); |
139 | if ( i == 14 ) i = 0; | 139 | if ( i == 14 ) i = 0; |
140 | QTimer::singleShot( 2000, this, SLOT( testGraph() ) ); | 140 | QTimer::singleShot( 2000, this, SLOT( testGraph() ) ); |
141 | 141 | ||
142 | } | 142 | } |
143 | 143 | ||
144 | 144 | ||
145 | void MGraphWindow::timerEvent( QTimerEvent* e ) | 145 | void MGraphWindow::timerEvent( QTimerEvent* e ) |
146 | { | 146 | { |
147 | for ( int i = 0; i < 14; i++ ) | 147 | for ( int i = 0; i < 14; i++ ) |
148 | { | 148 | { |
149 | spectrum->decrease( i, 4 ); | 149 | spectrum->decrease( i, 1 ); //TODO: make this customizable? |
150 | } | 150 | } |
151 | spectrum->repaint(); | 151 | spectrum->repaint(); |
152 | } | 152 | } |
153 | 153 | ||
154 | 154 | ||
155 | void MGraphWindow::traffic( int channel, int signal ) | 155 | void MGraphWindow::traffic( int channel, int signal ) |
156 | { | 156 | { |
157 | spectrum->setValue( channel-1, signal ); | 157 | spectrum->setValue( channel-1, signal ); |
158 | } | 158 | } |
159 | 159 | ||
diff --git a/noncore/net/wellenreiter/gui/gui.pro b/noncore/net/wellenreiter/gui/gui.pro index a11698f..2c4c6c3 100644 --- a/noncore/net/wellenreiter/gui/gui.pro +++ b/noncore/net/wellenreiter/gui/gui.pro | |||
@@ -1,65 +1,67 @@ | |||
1 | MOC_DIR = ./tmp | 1 | MOC_DIR = ./tmp |
2 | OBJECTS_DIR = ./tmp | 2 | OBJECTS_DIR = ./tmp |
3 | DESTDIR = $(OPIEDIR)/bin | 3 | DESTDIR = $(OPIEDIR)/bin |
4 | TEMPLATE = app | 4 | TEMPLATE = app |
5 | CONFIG = qt warn_on debug | 5 | CONFIG = qt warn_on debug |
6 | 6 | ||
7 | HEADERS = wellenreiterbase.h \ | 7 | HEADERS = wellenreiterbase.h \ |
8 | mainwindow.h \ | 8 | mainwindow.h \ |
9 | wellenreiter.h \ | 9 | wellenreiter.h \ |
10 | scanlist.h \ | 10 | scanlist.h \ |
11 | logwindow.h \ | 11 | logwindow.h \ |
12 | hexwindow.h \ | 12 | hexwindow.h \ |
13 | statwindow.h \ | 13 | statwindow.h \ |
14 | configwindow.h \ | 14 | configwindow.h \ |
15 | manufacturers.h \ | 15 | manufacturers.h \ |
16 | graphwindow.h | 16 | graphwindow.h \ |
17 | protolistview.h | ||
17 | 18 | ||
18 | SOURCES = main.cpp \ | 19 | SOURCES = main.cpp \ |
19 | mainwindow.cpp \ | 20 | mainwindow.cpp \ |
20 | wellenreiterbase.cpp \ | 21 | wellenreiterbase.cpp \ |
21 | wellenreiter.cpp \ | 22 | wellenreiter.cpp \ |
22 | scanlist.cpp \ | 23 | scanlist.cpp \ |
23 | logwindow.cpp \ | 24 | logwindow.cpp \ |
24 | hexwindow.cpp \ | 25 | hexwindow.cpp \ |
25 | statwindow.cpp \ | 26 | statwindow.cpp \ |
26 | configwindow.cpp \ | 27 | configwindow.cpp \ |
27 | manufacturers.cpp \ | 28 | manufacturers.cpp \ |
28 | graphwindow.cpp | 29 | graphwindow.cpp \ |
30 | protolistview.cpp | ||
29 | 31 | ||
30 | INCLUDEPATH += $(OPIEDIR)/include | 32 | INCLUDEPATH += $(OPIEDIR)/include |
31 | DEPENDPATH += $(OPIEDIR)/include | 33 | DEPENDPATH += $(OPIEDIR)/include |
32 | INTERFACES = configbase.ui #configbasenew.ui | 34 | INTERFACES = configbase.ui |
33 | TARGET = wellenreiter | 35 | TARGET = wellenreiter |
34 | 36 | ||
35 | !contains( platform, x11 ) { | 37 | !contains( platform, x11 ) { |
36 | message( qws ) | 38 | message( qws ) |
37 | include ( $(OPIEDIR)/include.pro ) | 39 | include ( $(OPIEDIR)/include.pro ) |
38 | LIBS += -lqpe -lopie -lopiecore2 -lopieui2 -lopienet2 -lstdc++ | 40 | LIBS += -lqpe -lopie -lopiecore2 -lopieui2 -lopienet2 -lstdc++ |
39 | } | 41 | } |
40 | 42 | ||
41 | contains( platform, x11 ) { | 43 | contains( platform, x11 ) { |
42 | LIBS += -L$(OPIEDIR)/output/lib -Wl,-rpath,$(OPIEDIR)/output/lib -Wl,-rpath,/usr/local/lib -lwellenreiter | 44 | LIBS += -L$(OPIEDIR)/output/lib -Wl,-rpath,$(OPIEDIR)/output/lib -Wl,-rpath,/usr/local/lib -lwellenreiter |
43 | SOURCES += resource.cpp | 45 | SOURCES += resource.cpp |
44 | HEADERS += resource.h | 46 | HEADERS += resource.h |
45 | DESTDIR = $(OPIEDIR)/output/bin | 47 | DESTDIR = $(OPIEDIR)/output/bin |
46 | } | 48 | } |
47 | 49 | ||
48 | TRANSLATIONS = ../../../../i18n/de/wellenreiter.ts \ | 50 | TRANSLATIONS = ../../../../i18n/de/wellenreiter.ts \ |
49 | ../../../../i18n/nl/wellenreiter.ts \ | 51 | ../../../../i18n/nl/wellenreiter.ts \ |
50 | ../../../../i18n/da/wellenreiter.ts \ | 52 | ../../../../i18n/da/wellenreiter.ts \ |
51 | ../../../../i18n/xx/wellenreiter.ts \ | 53 | ../../../../i18n/xx/wellenreiter.ts \ |
52 | ../../../../i18n/en/wellenreiter.ts \ | 54 | ../../../../i18n/en/wellenreiter.ts \ |
53 | ../../../../i18n/es/wellenreiter.ts \ | 55 | ../../../../i18n/es/wellenreiter.ts \ |
54 | ../../../../i18n/fr/wellenreiter.ts \ | 56 | ../../../../i18n/fr/wellenreiter.ts \ |
55 | ../../../../i18n/hu/wellenreiter.ts \ | 57 | ../../../../i18n/hu/wellenreiter.ts \ |
56 | ../../../../i18n/ja/wellenreiter.ts \ | 58 | ../../../../i18n/ja/wellenreiter.ts \ |
57 | ../../../../i18n/ko/wellenreiter.ts \ | 59 | ../../../../i18n/ko/wellenreiter.ts \ |
58 | ../../../../i18n/no/wellenreiter.ts \ | 60 | ../../../../i18n/no/wellenreiter.ts \ |
59 | ../../../../i18n/pl/wellenreiter.ts \ | 61 | ../../../../i18n/pl/wellenreiter.ts \ |
60 | ../../../../i18n/pt/wellenreiter.ts \ | 62 | ../../../../i18n/pt/wellenreiter.ts \ |
61 | ../../../../i18n/pt_BR/wellenreiter.ts \ | 63 | ../../../../i18n/pt_BR/wellenreiter.ts \ |
62 | ../../../../i18n/sl/wellenreiter.ts \ | 64 | ../../../../i18n/sl/wellenreiter.ts \ |
63 | ../../../../i18n/zh_CN/wellenreiter.ts \ | 65 | ../../../../i18n/zh_CN/wellenreiter.ts \ |
64 | ../../../../i18n/zh_TW/wellenreiter.ts | 66 | ../../../../i18n/zh_TW/wellenreiter.ts |
65 | 67 | ||
diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp index 773d825..39f5978 100644 --- a/noncore/net/wellenreiter/gui/mainwindow.cpp +++ b/noncore/net/wellenreiter/gui/mainwindow.cpp | |||
@@ -1,362 +1,361 @@ | |||
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 "configwindow.h" | 16 | #include "configwindow.h" |
17 | #include "logwindow.h" | 17 | #include "logwindow.h" |
18 | #include "hexwindow.h" | 18 | #include "hexwindow.h" |
19 | #include "mainwindow.h" | 19 | #include "mainwindow.h" |
20 | #include "wellenreiter.h" | 20 | #include "wellenreiter.h" |
21 | #include "scanlist.h" | 21 | #include "scanlist.h" |
22 | 22 | ||
23 | #include <qcombobox.h> | 23 | #include <qcombobox.h> |
24 | #include <qdatastream.h> | 24 | #include <qdatastream.h> |
25 | #include <qfile.h> | 25 | #include <qfile.h> |
26 | #include <qfileinfo.h> | 26 | #include <qfileinfo.h> |
27 | #include <qiconset.h> | 27 | #include <qiconset.h> |
28 | #include <qmenubar.h> | 28 | #include <qmenubar.h> |
29 | #include <qmessagebox.h> | 29 | #include <qmessagebox.h> |
30 | #include <qpopupmenu.h> | 30 | #include <qpopupmenu.h> |
31 | #include <qstatusbar.h> | 31 | #include <qstatusbar.h> |
32 | #include <qtextstream.h> | 32 | #include <qtextstream.h> |
33 | #include <qtoolbutton.h> | 33 | #include <qtoolbutton.h> |
34 | 34 | ||
35 | #ifdef QWS | 35 | #ifdef QWS |
36 | #include <qpe/resource.h> | 36 | #include <qpe/resource.h> |
37 | #include <opie/ofiledialog.h> | 37 | #include <opie/ofiledialog.h> |
38 | #else | 38 | #else |
39 | #include "resource.h" | 39 | #include "resource.h" |
40 | #include <qapplication.h> | 40 | #include <qapplication.h> |
41 | #include <qfiledialog.h> | 41 | #include <qfiledialog.h> |
42 | #endif | 42 | #endif |
43 | 43 | ||
44 | WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * name, WFlags f ) | 44 | WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * name, WFlags f ) |
45 | :QMainWindow( parent, name, f ) | 45 | :QMainWindow( parent, name, f ) |
46 | { | 46 | { |
47 | cw = new WellenreiterConfigWindow( this ); | 47 | cw = new WellenreiterConfigWindow( this ); |
48 | mw = new Wellenreiter( this ); | 48 | mw = new Wellenreiter( this ); |
49 | mw->setConfigWindow( cw ); | 49 | mw->setConfigWindow( cw ); |
50 | setCentralWidget( mw ); | 50 | setCentralWidget( mw ); |
51 | 51 | ||
52 | // setup application icon | 52 | // setup application icon |
53 | 53 | ||
54 | #ifndef QWS | 54 | #ifndef QWS |
55 | setIcon( Resource::loadPixmap( "wellenreiter/appicon-trans" ) ); | 55 | setIcon( Resource::loadPixmap( "wellenreiter/appicon-trans" ) ); |
56 | setIconText( "Wellenreiter/X11" ); | 56 | setIconText( "Wellenreiter/X11" ); |
57 | #endif | 57 | #endif |
58 | 58 | ||
59 | // setup icon sets | 59 | // setup icon sets |
60 | 60 | ||
61 | infoIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/InfoIcon" ) ); | 61 | infoIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/InfoIcon" ) ); |
62 | settingsIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/SettingsIcon" ) ); | 62 | settingsIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/SettingsIcon" ) ); |
63 | startIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/SearchIcon" ) ); | 63 | startIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/SearchIcon" ) ); |
64 | stopIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/CancelIcon" ) ); | 64 | stopIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/CancelIcon" ) ); |
65 | 65 | ||
66 | // setup tool buttons | 66 | // setup tool buttons |
67 | 67 | ||
68 | startButton = new QToolButton( 0 ); | 68 | startButton = new QToolButton( 0 ); |
69 | #ifdef QWS | 69 | #ifdef QWS |
70 | startButton->setAutoRaise( true ); | 70 | startButton->setAutoRaise( true ); |
71 | #endif | 71 | #endif |
72 | startButton->setIconSet( *startIconSet ); | 72 | startButton->setIconSet( *startIconSet ); |
73 | startButton->setEnabled( false ); | 73 | startButton->setEnabled( false ); |
74 | connect( startButton, SIGNAL( clicked() ), mw, SLOT( startClicked() ) ); | 74 | connect( startButton, SIGNAL( clicked() ), mw, SLOT( startClicked() ) ); |
75 | 75 | ||
76 | stopButton = new QToolButton( 0 ); | 76 | stopButton = new QToolButton( 0 ); |
77 | #ifdef QWS | 77 | #ifdef QWS |
78 | stopButton->setAutoRaise( true ); | 78 | stopButton->setAutoRaise( true ); |
79 | #endif | 79 | #endif |
80 | stopButton->setIconSet( *stopIconSet ); | 80 | stopButton->setIconSet( *stopIconSet ); |
81 | stopButton->setEnabled( false ); | 81 | stopButton->setEnabled( false ); |
82 | connect( stopButton, SIGNAL( clicked() ), mw, SLOT( stopClicked() ) ); | 82 | connect( stopButton, SIGNAL( clicked() ), mw, SLOT( stopClicked() ) ); |
83 | 83 | ||
84 | QToolButton* c = new QToolButton( 0 ); | 84 | QToolButton* c = new QToolButton( 0 ); |
85 | #ifdef QWS | 85 | #ifdef QWS |
86 | c->setAutoRaise( true ); | 86 | c->setAutoRaise( true ); |
87 | #endif | 87 | #endif |
88 | c->setIconSet( *infoIconSet ); | 88 | c->setIconSet( *infoIconSet ); |
89 | c->setEnabled( false ); | 89 | c->setEnabled( false ); |
90 | 90 | ||
91 | QToolButton* d = new QToolButton( 0 ); | 91 | QToolButton* d = new QToolButton( 0 ); |
92 | #ifdef QWS | 92 | #ifdef QWS |
93 | d->setAutoRaise( true ); | 93 | d->setAutoRaise( true ); |
94 | #endif | 94 | #endif |
95 | d->setIconSet( *settingsIconSet ); | 95 | d->setIconSet( *settingsIconSet ); |
96 | connect( d, SIGNAL( clicked() ), this, SLOT( showConfigure() ) ); | 96 | connect( d, SIGNAL( clicked() ), this, SLOT( showConfigure() ) ); |
97 | 97 | ||
98 | // setup menu bar | 98 | // setup menu bar |
99 | 99 | ||
100 | int id; | 100 | int id; |
101 | 101 | ||
102 | QMenuBar* mb = menuBar(); | 102 | QMenuBar* mb = menuBar(); |
103 | 103 | ||
104 | QPopupMenu* fileSave = new QPopupMenu( mb ); | 104 | QPopupMenu* fileSave = new QPopupMenu( mb ); |
105 | fileSave->insertItem( tr( "&Session..." ), this, SLOT( fileSaveSession() ) ); | 105 | fileSave->insertItem( tr( "&Session..." ), this, SLOT( fileSaveSession() ) ); |
106 | fileSave->insertItem( tr( "&Text Log..." ), this, SLOT( fileSaveLog() ) ); | 106 | fileSave->insertItem( tr( "&Text Log..." ), this, SLOT( fileSaveLog() ) ); |
107 | fileSave->insertItem( tr( "&Hex Log..." ), this, SLOT( fileSaveHex() ) ); | 107 | fileSave->insertItem( tr( "&Hex Log..." ), this, SLOT( fileSaveHex() ) ); |
108 | 108 | ||
109 | QPopupMenu* fileLoad = new QPopupMenu( mb ); | 109 | QPopupMenu* fileLoad = new QPopupMenu( mb ); |
110 | fileLoad->insertItem( tr( "&Session..." ), this, SLOT( fileLoadSession() ) ); | 110 | fileLoad->insertItem( tr( "&Session..." ), this, SLOT( fileLoadSession() ) ); |
111 | //fileLoad->insertItem( "&Log", this, SLOT( fileLoadLog() ) ); | 111 | //fileLoad->insertItem( "&Log", this, SLOT( fileLoadLog() ) ); |
112 | 112 | ||
113 | QPopupMenu* file = new QPopupMenu( mb ); | 113 | QPopupMenu* file = new QPopupMenu( mb ); |
114 | file->insertItem( tr( "&New" ), this, SLOT( fileNew() ) ); | 114 | file->insertItem( tr( "&New" ), this, SLOT( fileNew() ) ); |
115 | id = file->insertItem( tr( "&Load" ), fileLoad ); | 115 | id = file->insertItem( tr( "&Load" ), fileLoad ); |
116 | file->insertItem( tr( "&Save" ), fileSave ); | 116 | file->insertItem( tr( "&Save" ), fileSave ); |
117 | file->insertSeparator(); | 117 | file->insertSeparator(); |
118 | file->insertItem( tr( "&Exit" ), qApp, SLOT( quit() ) ); | 118 | file->insertItem( tr( "&Exit" ), qApp, SLOT( quit() ) ); |
119 | 119 | ||
120 | QPopupMenu* view = new QPopupMenu( mb ); | 120 | QPopupMenu* view = new QPopupMenu( mb ); |
121 | view->insertItem( tr( "&Configure..." ) ); | 121 | view->insertItem( tr( "&Configure..." ) ); |
122 | 122 | ||
123 | QPopupMenu* sniffer = new QPopupMenu( mb ); | 123 | QPopupMenu* sniffer = new QPopupMenu( mb ); |
124 | sniffer->insertItem( tr( "&Configure..." ), this, SLOT( showConfigure() ) ); | 124 | sniffer->insertItem( tr( "&Configure..." ), this, SLOT( showConfigure() ) ); |
125 | sniffer->insertSeparator(); | 125 | sniffer->insertSeparator(); |
126 | startID = sniffer->insertItem( tr( "&Start" ), mw, SLOT( startClicked() ) ); | 126 | startID = sniffer->insertItem( tr( "&Start" ), mw, SLOT( startClicked() ) ); |
127 | sniffer->setItemEnabled( startID, false ); | 127 | sniffer->setItemEnabled( startID, false ); |
128 | stopID = sniffer->insertItem( tr( "Sto&p" ), mw, SLOT( stopClicked() ) ); | 128 | stopID = sniffer->insertItem( tr( "Sto&p" ), mw, SLOT( stopClicked() ) ); |
129 | sniffer->setItemEnabled( stopID, false ); | 129 | sniffer->setItemEnabled( stopID, false ); |
130 | 130 | ||
131 | QPopupMenu* demo = new QPopupMenu( mb ); | 131 | QPopupMenu* demo = new QPopupMenu( mb ); |
132 | demo->insertItem( tr( "&Add something" ), this, SLOT( demoAddStations() ) ); | 132 | demo->insertItem( tr( "&Add something" ), this, SLOT( demoAddStations() ) ); |
133 | 133 | ||
134 | id = mb->insertItem( tr( "&File" ), file ); | 134 | id = mb->insertItem( tr( "&File" ), file ); |
135 | //id = mb->insertItem( tr( "&View" ), view ); | 135 | //id = mb->insertItem( tr( "&View" ), view ); |
136 | //mb->setItemEnabled( id, false ); | 136 | //mb->setItemEnabled( id, false ); |
137 | id = mb->insertItem( tr( "&Sniffer" ), sniffer ); | 137 | id = mb->insertItem( tr( "&Sniffer" ), sniffer ); |
138 | //id = mb->insertItem( tr( "&Demo" ), demo ); | 138 | //id = mb->insertItem( tr( "&Demo" ), demo ); |
139 | //mb->setItemEnabled( id, true ); | 139 | //mb->setItemEnabled( id, true ); |
140 | 140 | ||
141 | #ifdef QWS | 141 | #ifdef QWS |
142 | mb->insertItem( startButton ); | 142 | mb->insertItem( startButton ); |
143 | mb->insertItem( stopButton ); | 143 | mb->insertItem( stopButton ); |
144 | mb->insertItem( c ); | 144 | mb->insertItem( c ); |
145 | mb->insertItem( d ); | 145 | mb->insertItem( d ); |
146 | #else // Qt3 changed the insertion order. It's now totally random :( | 146 | #else // Qt3 changed the insertion order. It's now totally random :( |
147 | mb->insertItem( d ); | 147 | mb->insertItem( d ); |
148 | mb->insertItem( c ); | 148 | mb->insertItem( c ); |
149 | mb->insertItem( stopButton ); | 149 | mb->insertItem( stopButton ); |
150 | mb->insertItem( startButton ); | 150 | mb->insertItem( startButton ); |
151 | #endif | 151 | #endif |
152 | 152 | ||
153 | updateToolButtonState(); | 153 | updateToolButtonState(); |
154 | 154 | ||
155 | // setup status bar (for now only on X11) | 155 | // setup status bar (for now only on X11) |
156 | 156 | ||
157 | #ifndef QWS | 157 | #ifndef QWS |
158 | statusBar()->message( tr( "Ready." ) ); | 158 | statusBar()->message( tr( "Ready." ) ); |
159 | #endif | 159 | #endif |
160 | 160 | ||
161 | connect( mw, SIGNAL( startedSniffing() ), this, SLOT( changedSniffingState() ) ); | 161 | connect( mw, SIGNAL( startedSniffing() ), this, SLOT( changedSniffingState() ) ); |
162 | connect( mw, SIGNAL( stoppedSniffing() ), this, SLOT( changedSniffingState() ) ); | 162 | connect( mw, SIGNAL( stoppedSniffing() ), this, SLOT( changedSniffingState() ) ); |
163 | }; | 163 | }; |
164 | 164 | ||
165 | 165 | ||
166 | 166 | ||
167 | void WellenreiterMainWindow::showConfigure() | 167 | void WellenreiterMainWindow::showConfigure() |
168 | { | 168 | { |
169 | qDebug( "show configure..." ); | 169 | qDebug( "show configure..." ); |
170 | cw->setCaption( tr( "Configure" ) ); | 170 | cw->setCaption( tr( "Configure" ) ); |
171 | #ifdef QWS | 171 | #ifdef QWS |
172 | cw->showMaximized(); | 172 | cw->showMaximized(); |
173 | #endif | 173 | #endif |
174 | int result = cw->exec(); | 174 | int result = cw->exec(); |
175 | 175 | ||
176 | if ( result ) updateToolButtonState(); | 176 | if ( result ) updateToolButtonState(); |
177 | } | 177 | } |
178 | 178 | ||
179 | 179 | ||
180 | 180 | ||
181 | void WellenreiterMainWindow::updateToolButtonState() | 181 | void WellenreiterMainWindow::updateToolButtonState() |
182 | { | 182 | { |
183 | const QString& interface = cw->interfaceName->currentText(); | 183 | const QString& interface = cw->interfaceName->currentText(); |
184 | const int cardtype = cw->daemonDeviceType(); | 184 | const int cardtype = cw->driverType(); |
185 | const int interval = cw->daemonHopInterval(); | ||
186 | 185 | ||
187 | if ( ( interface != "<select>" ) && ( cardtype != 0 ) ) | 186 | if ( ( interface != "<select>" ) && ( cardtype != 0 ) ) |
188 | { | 187 | { |
189 | startButton->setEnabled( true ); | 188 | startButton->setEnabled( true ); |
190 | menuBar()->setItemEnabled( startID, true ); | 189 | menuBar()->setItemEnabled( startID, true ); |
191 | } | 190 | } |
192 | else | 191 | else |
193 | { | 192 | { |
194 | startButton->setEnabled( false ); | 193 | startButton->setEnabled( false ); |
195 | menuBar()->setItemEnabled( startID, false ); | 194 | menuBar()->setItemEnabled( startID, false ); |
196 | } | 195 | } |
197 | } | 196 | } |
198 | 197 | ||
199 | 198 | ||
200 | void WellenreiterMainWindow::changedSniffingState() | 199 | void WellenreiterMainWindow::changedSniffingState() |
201 | { | 200 | { |
202 | startButton->setEnabled( !mw->sniffing ); | 201 | startButton->setEnabled( !mw->sniffing ); |
203 | menuBar()->setItemEnabled( startID, !mw->sniffing ); | 202 | menuBar()->setItemEnabled( startID, !mw->sniffing ); |
204 | stopButton->setEnabled( mw->sniffing ); | 203 | stopButton->setEnabled( mw->sniffing ); |
205 | menuBar()->setItemEnabled( stopID, mw->sniffing ); | 204 | menuBar()->setItemEnabled( stopID, mw->sniffing ); |
206 | } | 205 | } |
207 | 206 | ||
208 | 207 | ||
209 | WellenreiterMainWindow::~WellenreiterMainWindow() | 208 | WellenreiterMainWindow::~WellenreiterMainWindow() |
210 | { | 209 | { |
211 | delete infoIconSet; | 210 | delete infoIconSet; |
212 | delete settingsIconSet; | 211 | delete settingsIconSet; |
213 | delete startIconSet; | 212 | delete startIconSet; |
214 | delete stopIconSet; | 213 | delete stopIconSet; |
215 | }; | 214 | }; |
216 | 215 | ||
217 | void WellenreiterMainWindow::demoAddStations() | 216 | void WellenreiterMainWindow::demoAddStations() |
218 | { | 217 | { |
219 | mw->netView()->addNewItem( "managed", "Vanille", "00:00:20:EF:A6:43", true, 6, 80 ); | 218 | mw->netView()->addNewItem( "managed", "Vanille", "00:00:20:EF:A6:43", true, 6, 80 ); |
220 | mw->netView()->addNewItem( "managed", "Vanille", "00:30:6D:EF:A6:23", true, 11, 10 ); | 219 | mw->netView()->addNewItem( "managed", "Vanille", "00:30:6D:EF:A6:23", true, 11, 10 ); |
221 | mw->netView()->addNewItem( "adhoc", "ELAN", "00:A0:F8:E7:16:22", false, 3, 10 ); | 220 | mw->netView()->addNewItem( "adhoc", "ELAN", "00:A0:F8:E7:16:22", false, 3, 10 ); |
222 | mw->netView()->addNewItem( "adhoc", "ELAN", "00:AA:01:E7:56:62", false, 3, 15 ); | 221 | mw->netView()->addNewItem( "adhoc", "ELAN", "00:AA:01:E7:56:62", false, 3, 15 ); |
223 | mw->netView()->addNewItem( "adhoc", "ELAN", "00:B0:8E:E7:56:E2", false, 3, 20 ); | 222 | mw->netView()->addNewItem( "adhoc", "ELAN", "00:B0:8E:E7:56:E2", false, 3, 20 ); |
224 | } | 223 | } |
225 | 224 | ||
226 | 225 | ||
227 | QString WellenreiterMainWindow::getFileName( bool save ) | 226 | QString WellenreiterMainWindow::getFileName( bool save ) |
228 | { | 227 | { |
229 | QMap<QString, QStringList> map; | 228 | QMap<QString, QStringList> map; |
230 | map.insert( tr("All"), QStringList() ); | 229 | map.insert( tr("All"), QStringList() ); |
231 | QStringList text; | 230 | QStringList text; |
232 | text << "text/*"; | 231 | text << "text/*"; |
233 | map.insert( tr("Text"), text ); | 232 | map.insert( tr("Text"), text ); |
234 | text << "*"; | 233 | text << "*"; |
235 | map.insert( tr("All"), text ); | 234 | map.insert( tr("All"), text ); |
236 | 235 | ||
237 | QString str; | 236 | QString str; |
238 | if ( save ) | 237 | if ( save ) |
239 | { | 238 | { |
240 | #ifdef QWS | 239 | #ifdef QWS |
241 | str = OFileDialog::getSaveFileName( 2, "/", QString::null, map ); | 240 | str = OFileDialog::getSaveFileName( 2, "/", QString::null, map ); |
242 | #else | 241 | #else |
243 | str = QFileDialog::getSaveFileName(); | 242 | str = QFileDialog::getSaveFileName(); |
244 | #endif | 243 | #endif |
245 | if ( str.isEmpty() || QFileInfo(str).isDir() ) | 244 | if ( str.isEmpty() || QFileInfo(str).isDir() ) |
246 | return ""; | 245 | return ""; |
247 | } | 246 | } |
248 | else | 247 | else |
249 | { | 248 | { |
250 | #ifdef QWS | 249 | #ifdef QWS |
251 | str = OFileDialog::getOpenFileName( 2, "/", QString::null, map ); | 250 | str = OFileDialog::getOpenFileName( 2, "/", QString::null, map ); |
252 | #else | 251 | #else |
253 | str = QFileDialog::getOpenFileName(); | 252 | str = QFileDialog::getOpenFileName(); |
254 | #endif | 253 | #endif |
255 | if ( str.isEmpty() || !QFile(str).exists() || QFileInfo(str).isDir() ) | 254 | if ( str.isEmpty() || !QFile(str).exists() || QFileInfo(str).isDir() ) |
256 | return ""; | 255 | return ""; |
257 | } | 256 | } |
258 | return str; | 257 | return str; |
259 | } | 258 | } |
260 | 259 | ||
261 | 260 | ||
262 | void WellenreiterMainWindow::fileSaveLog() | 261 | void WellenreiterMainWindow::fileSaveLog() |
263 | { | 262 | { |
264 | QString fname = getFileName( true ); | 263 | QString fname = getFileName( true ); |
265 | if ( !fname.isEmpty() ) | 264 | if ( !fname.isEmpty() ) |
266 | { | 265 | { |
267 | QFile f( fname ); | 266 | QFile f( fname ); |
268 | if ( f.open(IO_WriteOnly) ) | 267 | if ( f.open(IO_WriteOnly) ) |
269 | { | 268 | { |
270 | QTextStream t( &f ); | 269 | QTextStream t( &f ); |
271 | t << mw->logWindow()->getLog(); | 270 | t << mw->logWindow()->getLog(); |
272 | f.close(); | 271 | f.close(); |
273 | qDebug( "Saved log to file '%s'", (const char*) fname ); | 272 | qDebug( "Saved log to file '%s'", (const char*) fname ); |
274 | } | 273 | } |
275 | else | 274 | else |
276 | { | 275 | { |
277 | qDebug( "Problem saving log to file '%s'", (const char*) fname ); | 276 | qDebug( "Problem saving log to file '%s'", (const char*) fname ); |
278 | } | 277 | } |
279 | } | 278 | } |
280 | } | 279 | } |
281 | 280 | ||
282 | void WellenreiterMainWindow::fileSaveSession() | 281 | void WellenreiterMainWindow::fileSaveSession() |
283 | { | 282 | { |
284 | QString fname = getFileName( true ); | 283 | QString fname = getFileName( true ); |
285 | if ( !fname.isEmpty() ) | 284 | if ( !fname.isEmpty() ) |
286 | { | 285 | { |
287 | 286 | ||
288 | QFile f( fname ); | 287 | QFile f( fname ); |
289 | if ( f.open(IO_WriteOnly) ) | 288 | if ( f.open(IO_WriteOnly) ) |
290 | { | 289 | { |
291 | QDataStream t( &f ); | 290 | QDataStream t( &f ); |
292 | t << *mw->netView(); | 291 | t << *mw->netView(); |
293 | f.close(); | 292 | f.close(); |
294 | qDebug( "Saved session to file '%s'", (const char*) fname ); | 293 | qDebug( "Saved session to file '%s'", (const char*) fname ); |
295 | } | 294 | } |
296 | else | 295 | else |
297 | { | 296 | { |
298 | qDebug( "Problem saving session to file '%s'", (const char*) fname ); | 297 | qDebug( "Problem saving session to file '%s'", (const char*) fname ); |
299 | } | 298 | } |
300 | } | 299 | } |
301 | } | 300 | } |
302 | 301 | ||
303 | void WellenreiterMainWindow::fileSaveHex() | 302 | void WellenreiterMainWindow::fileSaveHex() |
304 | { | 303 | { |
305 | QString fname = getFileName( true ); | 304 | QString fname = getFileName( true ); |
306 | if ( !fname.isEmpty() ) | 305 | if ( !fname.isEmpty() ) |
307 | { | 306 | { |
308 | QFile f( fname ); | 307 | QFile f( fname ); |
309 | if ( f.open(IO_WriteOnly) ) | 308 | if ( f.open(IO_WriteOnly) ) |
310 | { | 309 | { |
311 | QTextStream t( &f ); | 310 | QTextStream t( &f ); |
312 | t << mw->hexWindow()->getLog(); | 311 | t << mw->hexWindow()->getLog(); |
313 | f.close(); | 312 | f.close(); |
314 | qDebug( "Saved hex log to file '%s'", (const char*) fname ); | 313 | qDebug( "Saved hex log to file '%s'", (const char*) fname ); |
315 | } | 314 | } |
316 | else | 315 | else |
317 | { | 316 | { |
318 | qDebug( "Problem saving hex log to file '%s'", (const char*) fname ); | 317 | qDebug( "Problem saving hex log to file '%s'", (const char*) fname ); |
319 | } | 318 | } |
320 | } | 319 | } |
321 | } | 320 | } |
322 | 321 | ||
323 | void WellenreiterMainWindow::fileLoadSession() | 322 | void WellenreiterMainWindow::fileLoadSession() |
324 | { | 323 | { |
325 | QString fname = getFileName( false ); | 324 | QString fname = getFileName( false ); |
326 | if ( !fname.isEmpty() ) | 325 | if ( !fname.isEmpty() ) |
327 | { | 326 | { |
328 | QFile f( fname ); | 327 | QFile f( fname ); |
329 | if ( f.open(IO_ReadOnly) ) | 328 | if ( f.open(IO_ReadOnly) ) |
330 | { | 329 | { |
331 | QDataStream t( &f ); | 330 | QDataStream t( &f ); |
332 | t >> *mw->netView(); | 331 | t >> *mw->netView(); |
333 | f.close(); | 332 | f.close(); |
334 | qDebug( "Loaded session from file '%s'", (const char*) fname ); | 333 | qDebug( "Loaded session from file '%s'", (const char*) fname ); |
335 | } | 334 | } |
336 | else | 335 | else |
337 | { | 336 | { |
338 | qDebug( "Problem loading session from file '%s'", (const char*) fname ); | 337 | qDebug( "Problem loading session from file '%s'", (const char*) fname ); |
339 | } | 338 | } |
340 | } | 339 | } |
341 | } | 340 | } |
342 | 341 | ||
343 | void WellenreiterMainWindow::fileNew() | 342 | void WellenreiterMainWindow::fileNew() |
344 | { | 343 | { |
345 | mw->netView()->clear(); | 344 | mw->netView()->clear(); |
346 | mw->logWindow()->clear(); | 345 | mw->logWindow()->clear(); |
347 | mw->hexWindow()->clear(); | 346 | mw->hexWindow()->clear(); |
348 | } | 347 | } |
349 | 348 | ||
350 | void WellenreiterMainWindow::closeEvent( QCloseEvent* e ) | 349 | void WellenreiterMainWindow::closeEvent( QCloseEvent* e ) |
351 | { | 350 | { |
352 | if ( mw->isDaemonRunning() ) | 351 | if ( mw->isDaemonRunning() ) |
353 | { | 352 | { |
354 | QMessageBox::warning( this, "Wellenreiter/Opie", | 353 | QMessageBox::warning( this, "Wellenreiter/Opie", |
355 | tr( "Sniffing in progress!\nPlease stop sniffing before closing." ) ); | 354 | tr( "Sniffing in progress!\nPlease stop sniffing before closing." ) ); |
356 | e->ignore(); | 355 | e->ignore(); |
357 | } | 356 | } |
358 | else | 357 | else |
359 | { | 358 | { |
360 | QMainWindow::closeEvent( e ); | 359 | QMainWindow::closeEvent( e ); |
361 | } | 360 | } |
362 | } | 361 | } |
diff --git a/noncore/net/wellenreiter/gui/protolistview.cpp b/noncore/net/wellenreiter/gui/protolistview.cpp index e69de29..8b86072 100644 --- a/noncore/net/wellenreiter/gui/protolistview.cpp +++ b/noncore/net/wellenreiter/gui/protolistview.cpp | |||
@@ -0,0 +1,95 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of Opie Environment. | ||
5 | ** | ||
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 | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
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. | ||
13 | ** | ||
14 | **********************************************************************/ | ||
15 | |||
16 | /* LOCAL */ | ||
17 | #include "protolistview.h" | ||
18 | |||
19 | #include <qcheckbox.h> | ||
20 | #include <qcombobox.h> | ||
21 | #include <qhbox.h> | ||
22 | #include <qvbox.h> | ||
23 | #include <qpalette.h> | ||
24 | #include <qcolor.h> | ||
25 | #include <qlabel.h> | ||
26 | #include <qframe.h> | ||
27 | |||
28 | ProtocolListView::ProtocolListView( QWidget* parent, const char* name, WFlags f ) | ||
29 | :QScrollView( parent, name, f ) | ||
30 | { | ||
31 | actions = ( QString( "parsePackets" ) == QString( name ) ); | ||
32 | |||
33 | setMargins( 3, 3, 0, 0 ); | ||
34 | viewport()->setBackgroundColor( QCheckBox(0).palette().color( QPalette::Active, QColorGroup::Background ) ); | ||
35 | |||
36 | vbox = new QVBox( viewport() ); | ||
37 | vbox->setSpacing( 1 ); | ||
38 | addChild( vbox ); | ||
39 | |||
40 | QHBox* hbox = new QHBox( vbox ); | ||
41 | hbox->setSpacing( 40 ); | ||
42 | new QLabel( tr( "Protocol Family" ), hbox ); | ||
43 | if ( actions ) new QLabel( tr( "Perform Action" ), hbox ); | ||
44 | QFrame* frame = new QFrame( vbox ); | ||
45 | frame->setFrameStyle( QFrame::HLine + QFrame::Sunken ); | ||
46 | |||
47 | //TODO: hardcoded for now...a protocol database would be nice!? | ||
48 | |||
49 | //addProtocol( "Ethernet" ); | ||
50 | addProtocol( "Prism" ); | ||
51 | //addProtocol( "802.11" ); | ||
52 | addProtocol( "802.11 Management" ); | ||
53 | addProtocol( "802.11 SSID" ); | ||
54 | addProtocol( "802.11 Rates" ); | ||
55 | addProtocol( "802.11 CF" ); | ||
56 | addProtocol( "802.11 FH" ); | ||
57 | addProtocol( "802.11 DS" ); | ||
58 | addProtocol( "802.11 Tim" ); | ||
59 | addProtocol( "802.11 IBSS" ); | ||
60 | addProtocol( "802.11 Challenge" ); | ||
61 | addProtocol( "802.11 Data" ); | ||
62 | addProtocol( "802.11 LLC" ); | ||
63 | addProtocol( "802.11 Data" ); | ||
64 | addProtocol( "IP" ); | ||
65 | addProtocol( "ARP" ); | ||
66 | addProtocol( "UDP" ); | ||
67 | addProtocol( "TCP" ); | ||
68 | } | ||
69 | |||
70 | |||
71 | ProtocolListView::~ProtocolListView() | ||
72 | { | ||
73 | } | ||
74 | |||
75 | |||
76 | void ProtocolListView::addProtocol( const QString& name ) | ||
77 | { | ||
78 | QHBox* hbox = new QHBox( vbox ); | ||
79 | new QCheckBox( name, hbox, (const char*) name ); | ||
80 | |||
81 | if ( actions ) | ||
82 | { | ||
83 | QComboBox* combo = new QComboBox( hbox, (const char*) name ); | ||
84 | #ifdef QWS | ||
85 | combo->setFixedWidth( 75 ); | ||
86 | #endif | ||
87 | combo->insertItem( "Ignore" ); | ||
88 | combo->insertItem( "TouchSound" ); | ||
89 | combo->insertItem( "AlarmSound" ); | ||
90 | combo->insertItem( "KeySound" ); | ||
91 | combo->insertItem( "LedOn" ); | ||
92 | combo->insertItem( "LedOff" ); | ||
93 | } | ||
94 | } | ||
95 | |||
diff --git a/noncore/net/wellenreiter/gui/protolistview.h b/noncore/net/wellenreiter/gui/protolistview.h index e69de29..42aec7d 100644 --- a/noncore/net/wellenreiter/gui/protolistview.h +++ b/noncore/net/wellenreiter/gui/protolistview.h | |||
@@ -0,0 +1,44 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of Opie Environment. | ||
5 | ** | ||
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 | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
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. | ||
13 | ** | ||
14 | **********************************************************************/ | ||
15 | |||
16 | #ifndef PROTOLISTVIEW_H | ||
17 | #define PROTOLISTVIEW_H | ||
18 | |||
19 | #include <qscrollview.h> | ||
20 | #include <qdict.h> | ||
21 | //#include <qcheckbox.h> | ||
22 | //#include <qcombobox.h> | ||
23 | class QCheckBox; | ||
24 | class QComboBox; | ||
25 | |||
26 | class QVBox; | ||
27 | |||
28 | class ProtocolListView : public QScrollView | ||
29 | { | ||
30 | public: | ||
31 | ProtocolListView( QWidget* parent = 0, const char* name = 0, WFlags f = 0 ); | ||
32 | virtual ~ProtocolListView(); | ||
33 | |||
34 | protected: | ||
35 | virtual void addProtocol( const QString& name ); | ||
36 | |||
37 | private: | ||
38 | QVBox* vbox; | ||
39 | bool actions; | ||
40 | }; | ||
41 | |||
42 | |||
43 | |||
44 | #endif // PROTOLISTVIEW_H | ||
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index 705aab6..2f3d093 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp | |||
@@ -1,433 +1,433 @@ | |||
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 | // Opie | 16 | // Opie |
17 | 17 | ||
18 | #ifdef QWS | 18 | #ifdef QWS |
19 | #include <opie/odevice.h> | 19 | #include <opie/odevice.h> |
20 | using namespace Opie; | 20 | using namespace Opie; |
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | #ifdef QWS | 23 | #ifdef QWS |
24 | #include <opie2/oapplication.h> | 24 | #include <opie2/oapplication.h> |
25 | #else | 25 | #else |
26 | #include <qapplication.h> | 26 | #include <qapplication.h> |
27 | #endif | 27 | #endif |
28 | #include <opie2/onetwork.h> | 28 | #include <opie2/onetwork.h> |
29 | #include <opie2/opcap.h> | 29 | #include <opie2/opcap.h> |
30 | 30 | ||
31 | // Qt | 31 | // Qt |
32 | 32 | ||
33 | #include <qcheckbox.h> | 33 | #include <qcheckbox.h> |
34 | #include <qcombobox.h> | 34 | #include <qcombobox.h> |
35 | #include <qdatetime.h> | 35 | #include <qdatetime.h> |
36 | #include <qpushbutton.h> | 36 | #include <qpushbutton.h> |
37 | #include <qlineedit.h> | 37 | #include <qlineedit.h> |
38 | #include <qmessagebox.h> | 38 | #include <qmessagebox.h> |
39 | #include <qregexp.h> | 39 | #include <qregexp.h> |
40 | #include <qspinbox.h> | 40 | #include <qspinbox.h> |
41 | #include <qtoolbutton.h> | 41 | #include <qtoolbutton.h> |
42 | #include <qmainwindow.h> | 42 | #include <qmainwindow.h> |
43 | 43 | ||
44 | // Standard | 44 | // Standard |
45 | 45 | ||
46 | #include <assert.h> | 46 | #include <assert.h> |
47 | #include <errno.h> | 47 | #include <errno.h> |
48 | #include <unistd.h> | 48 | #include <unistd.h> |
49 | #include <string.h> | 49 | #include <string.h> |
50 | #include <sys/types.h> | 50 | #include <sys/types.h> |
51 | #include <stdlib.h> | 51 | #include <stdlib.h> |
52 | 52 | ||
53 | // Local | 53 | // Local |
54 | 54 | ||
55 | #include "wellenreiter.h" | 55 | #include "wellenreiter.h" |
56 | #include "scanlist.h" | 56 | #include "scanlist.h" |
57 | #include "logwindow.h" | 57 | #include "logwindow.h" |
58 | #include "hexwindow.h" | 58 | #include "hexwindow.h" |
59 | #include "configwindow.h" | 59 | #include "configwindow.h" |
60 | #include "statwindow.h" | 60 | #include "statwindow.h" |
61 | #include "graphwindow.h" | 61 | #include "graphwindow.h" |
62 | #include "manufacturers.h" | 62 | #include "manufacturers.h" |
63 | 63 | ||
64 | Wellenreiter::Wellenreiter( QWidget* parent ) | 64 | Wellenreiter::Wellenreiter( QWidget* parent ) |
65 | : WellenreiterBase( parent, 0, 0 ), | 65 | : WellenreiterBase( parent, 0, 0 ), |
66 | sniffing( false ), iface( 0 ), manufacturerdb( 0 ), configwindow( 0 ) | 66 | sniffing( false ), iface( 0 ), manufacturerdb( 0 ), configwindow( 0 ) |
67 | { | 67 | { |
68 | 68 | ||
69 | // | 69 | // |
70 | // construct manufacturer database | 70 | // construct manufacturer database |
71 | // | 71 | // |
72 | 72 | ||
73 | QString manufile; | 73 | QString manufile; |
74 | #ifdef QWS | 74 | #ifdef QWS |
75 | manufile.sprintf( "%s/share/wellenreiter/manufacturers.dat", (const char*) QPEApplication::qpeDir() ); | 75 | manufile.sprintf( "%s/share/wellenreiter/manufacturers.dat", (const char*) QPEApplication::qpeDir() ); |
76 | #else | 76 | #else |
77 | manufile.sprintf( "/usr/local/share/wellenreiter/manufacturers.dat" ); | 77 | manufile.sprintf( "/usr/local/share/wellenreiter/manufacturers.dat" ); |
78 | #endif | 78 | #endif |
79 | manufacturerdb = new ManufacturerDB( manufile ); | 79 | manufacturerdb = new ManufacturerDB( manufile ); |
80 | 80 | ||
81 | logwindow->log( "(i) Wellenreiter has been started." ); | 81 | logwindow->log( "(i) Wellenreiter has been started." ); |
82 | 82 | ||
83 | // | 83 | // |
84 | // detect operating system | 84 | // detect operating system |
85 | // | 85 | // |
86 | 86 | ||
87 | #ifdef QWS | 87 | #ifdef QWS |
88 | QString sys; | 88 | QString sys; |
89 | sys.sprintf( "(i) Running on '%s'.", (const char*) ODevice::inst()->systemString() ); | 89 | sys.sprintf( "(i) Running on '%s'.", (const char*) ODevice::inst()->systemString() ); |
90 | _system = ODevice::inst()->system(); | 90 | _system = ODevice::inst()->system(); |
91 | logwindow->log( sys ); | 91 | logwindow->log( sys ); |
92 | #endif | 92 | #endif |
93 | 93 | ||
94 | // setup GUI | 94 | // setup GUI |
95 | netview->setColumnWidthMode( 1, QListView::Manual ); | 95 | netview->setColumnWidthMode( 1, QListView::Manual ); |
96 | 96 | ||
97 | if ( manufacturerdb ) | 97 | if ( manufacturerdb ) |
98 | netview->setManufacturerDB( manufacturerdb ); | 98 | netview->setManufacturerDB( manufacturerdb ); |
99 | 99 | ||
100 | pcap = new OPacketCapturer(); | 100 | pcap = new OPacketCapturer(); |
101 | 101 | ||
102 | } | 102 | } |
103 | 103 | ||
104 | 104 | ||
105 | Wellenreiter::~Wellenreiter() | 105 | Wellenreiter::~Wellenreiter() |
106 | { | 106 | { |
107 | // no need to delete child widgets, Qt does it all for us | 107 | // no need to delete child widgets, Qt does it all for us |
108 | 108 | ||
109 | delete manufacturerdb; | 109 | delete manufacturerdb; |
110 | delete pcap; | 110 | delete pcap; |
111 | } | 111 | } |
112 | 112 | ||
113 | 113 | ||
114 | void Wellenreiter::setConfigWindow( WellenreiterConfigWindow* cw ) | 114 | void Wellenreiter::setConfigWindow( WellenreiterConfigWindow* cw ) |
115 | { | 115 | { |
116 | configwindow = cw; | 116 | configwindow = cw; |
117 | } | 117 | } |
118 | 118 | ||
119 | 119 | ||
120 | void Wellenreiter::channelHopped(int c) | 120 | void Wellenreiter::channelHopped(int c) |
121 | { | 121 | { |
122 | QString title = "Wellenreiter II -scan- ["; | 122 | QString title = "Wellenreiter II -scan- ["; |
123 | QString left; | 123 | QString left; |
124 | if ( c > 1 ) left.fill( '.', c-1 ); | 124 | if ( c > 1 ) left.fill( '.', c-1 ); |
125 | title.append( left ); | 125 | title.append( left ); |
126 | title.append( '|' ); | 126 | title.append( '|' ); |
127 | if ( c < iface->channels() ) | 127 | if ( c < iface->channels() ) |
128 | { | 128 | { |
129 | QString right; | 129 | QString right; |
130 | right.fill( '.', iface->channels()-c ); | 130 | right.fill( '.', iface->channels()-c ); |
131 | title.append( right ); | 131 | title.append( right ); |
132 | } | 132 | } |
133 | title.append( "]" ); | 133 | title.append( "]" ); |
134 | //title.append( QString().sprintf( " %02d", c ) ); | 134 | //title.append( QString().sprintf( " %02d", c ) ); |
135 | assert( parent() ); | 135 | assert( parent() ); |
136 | ( (QMainWindow*) parent() )->setCaption( title ); | 136 | ( (QMainWindow*) parent() )->setCaption( title ); |
137 | } | 137 | } |
138 | 138 | ||
139 | 139 | ||
140 | void Wellenreiter::handleBeacon( OPacket* p, OWaveLanManagementPacket* beacon ) | 140 | void Wellenreiter::handleBeacon( OPacket* p, OWaveLanManagementPacket* beacon ) |
141 | { | 141 | { |
142 | QString type; | 142 | QString type; |
143 | if ( beacon->canIBSS() ) | 143 | if ( beacon->canIBSS() ) |
144 | { | 144 | { |
145 | type = "adhoc"; | 145 | type = "adhoc"; |
146 | } | 146 | } |
147 | else if ( beacon->canESS() ) | 147 | else if ( beacon->canESS() ) |
148 | { | 148 | { |
149 | type = "managed"; | 149 | type = "managed"; |
150 | } | 150 | } |
151 | else | 151 | else |
152 | { | 152 | { |
153 | qWarning( "Wellenreiter::invalid frame [possibly noise] detected!" ); | 153 | qWarning( "Wellenreiter::invalid frame [possibly noise] detected!" ); |
154 | return; | 154 | return; |
155 | } | 155 | } |
156 | 156 | ||
157 | OWaveLanManagementSSID* ssid = static_cast<OWaveLanManagementSSID*>( p->child( "802.11 SSID" ) ); | 157 | OWaveLanManagementSSID* ssid = static_cast<OWaveLanManagementSSID*>( p->child( "802.11 SSID" ) ); |
158 | QString essid = ssid ? ssid->ID() : QString("<unknown>"); | 158 | QString essid = ssid ? ssid->ID() : QString("<unknown>"); |
159 | OWaveLanManagementDS* ds = static_cast<OWaveLanManagementDS*>( p->child( "802.11 DS" ) ); | 159 | OWaveLanManagementDS* ds = static_cast<OWaveLanManagementDS*>( p->child( "802.11 DS" ) ); |
160 | int channel = ds ? ds->channel() : -1; | 160 | int channel = ds ? ds->channel() : -1; |
161 | 161 | ||
162 | OWaveLanPacket* header = static_cast<OWaveLanPacket*>( p->child( "802.11" ) ); | 162 | OWaveLanPacket* header = static_cast<OWaveLanPacket*>( p->child( "802.11" ) ); |
163 | netView()->addNewItem( type, essid, header->macAddress2().toString(), beacon->canPrivacy(), channel, 0 ); | 163 | netView()->addNewItem( type, essid, header->macAddress2().toString(), beacon->canPrivacy(), channel, 0 ); |
164 | 164 | ||
165 | // update graph window | 165 | // update graph window |
166 | if ( ds ) | 166 | if ( ds ) |
167 | { | 167 | { |
168 | OPrismHeaderPacket* prism = static_cast<OPrismHeaderPacket*>( p->child( "Prism" ) ); | 168 | OPrismHeaderPacket* prism = static_cast<OPrismHeaderPacket*>( p->child( "Prism" ) ); |
169 | if ( prism ) | 169 | if ( prism ) |
170 | graphwindow->traffic( ds->channel(), prism->signalStrength() ); | 170 | graphwindow->traffic( ds->channel(), prism->signalStrength() ); |
171 | else | 171 | else |
172 | graphwindow->traffic( ds->channel(), 95 ); | 172 | graphwindow->traffic( ds->channel(), 95 ); |
173 | } | 173 | } |
174 | } | 174 | } |
175 | 175 | ||
176 | 176 | ||
177 | void Wellenreiter::handleData( OPacket* p, OWaveLanDataPacket* data ) | 177 | void Wellenreiter::handleData( OPacket* p, OWaveLanDataPacket* data ) |
178 | { | 178 | { |
179 | OWaveLanPacket* wlan = (OWaveLanPacket*) p->child( "802.11" ); | 179 | OWaveLanPacket* wlan = (OWaveLanPacket*) p->child( "802.11" ); |
180 | if ( wlan->fromDS() && !wlan->toDS() ) | 180 | if ( wlan->fromDS() && !wlan->toDS() ) |
181 | { | 181 | { |
182 | qDebug( "FromDS traffic: '%s' -> '%s' via '%s'", | 182 | qDebug( "FromDS traffic: '%s' -> '%s' via '%s'", |
183 | (const char*) wlan->macAddress3().toString(true), | 183 | (const char*) wlan->macAddress3().toString(true), |
184 | (const char*) wlan->macAddress1().toString(true), | 184 | (const char*) wlan->macAddress1().toString(true), |
185 | (const char*) wlan->macAddress2().toString(true) ); | 185 | (const char*) wlan->macAddress2().toString(true) ); |
186 | netView()->fromDStraffic( wlan->macAddress3().toString(), | 186 | netView()->fromDStraffic( wlan->macAddress3().toString(), |
187 | wlan->macAddress1().toString(), | 187 | wlan->macAddress1().toString(), |
188 | wlan->macAddress2().toString() ); | 188 | wlan->macAddress2().toString() ); |
189 | } | 189 | } |
190 | else | 190 | else |
191 | if ( !wlan->fromDS() && wlan->toDS() ) | 191 | if ( !wlan->fromDS() && wlan->toDS() ) |
192 | { | 192 | { |
193 | qDebug( "ToDS traffic: '%s' -> '%s' via '%s'", | 193 | qDebug( "ToDS traffic: '%s' -> '%s' via '%s'", |
194 | (const char*) wlan->macAddress2().toString(true), | 194 | (const char*) wlan->macAddress2().toString(true), |
195 | (const char*) wlan->macAddress3().toString(true), | 195 | (const char*) wlan->macAddress3().toString(true), |
196 | (const char*) wlan->macAddress1().toString(true) ); | 196 | (const char*) wlan->macAddress1().toString(true) ); |
197 | netView()->toDStraffic( wlan->macAddress2().toString(), | 197 | netView()->toDStraffic( wlan->macAddress2().toString(), |
198 | wlan->macAddress3().toString(), | 198 | wlan->macAddress3().toString(), |
199 | wlan->macAddress1().toString() ); | 199 | wlan->macAddress1().toString() ); |
200 | } | 200 | } |
201 | else | 201 | else |
202 | if ( wlan->fromDS() && wlan->toDS() ) | 202 | if ( wlan->fromDS() && wlan->toDS() ) |
203 | { | 203 | { |
204 | qDebug( "WDS(bridge) traffic: '%s' -> '%s' via '%s' and '%s'", | 204 | qDebug( "WDS(bridge) traffic: '%s' -> '%s' via '%s' and '%s'", |
205 | (const char*) wlan->macAddress4().toString(true), | 205 | (const char*) wlan->macAddress4().toString(true), |
206 | (const char*) wlan->macAddress3().toString(true), | 206 | (const char*) wlan->macAddress3().toString(true), |
207 | (const char*) wlan->macAddress1().toString(true), | 207 | (const char*) wlan->macAddress1().toString(true), |
208 | (const char*) wlan->macAddress2().toString(true) ); | 208 | (const char*) wlan->macAddress2().toString(true) ); |
209 | netView()->WDStraffic( wlan->macAddress4().toString(), | 209 | netView()->WDStraffic( wlan->macAddress4().toString(), |
210 | wlan->macAddress3().toString(), | 210 | wlan->macAddress3().toString(), |
211 | wlan->macAddress1().toString(), | 211 | wlan->macAddress1().toString(), |
212 | wlan->macAddress2().toString() ); | 212 | wlan->macAddress2().toString() ); |
213 | } | 213 | } |
214 | else | 214 | else |
215 | { | 215 | { |
216 | qDebug( "IBSS(AdHoc) traffic: '%s' -> '%s' (Cell: '%s')'", | 216 | qDebug( "IBSS(AdHoc) traffic: '%s' -> '%s' (Cell: '%s')'", |
217 | (const char*) wlan->macAddress2().toString(true), | 217 | (const char*) wlan->macAddress2().toString(true), |
218 | (const char*) wlan->macAddress1().toString(true), | 218 | (const char*) wlan->macAddress1().toString(true), |
219 | (const char*) wlan->macAddress3().toString(true) ); | 219 | (const char*) wlan->macAddress3().toString(true) ); |
220 | netView()->IBSStraffic( wlan->macAddress2().toString(), | 220 | netView()->IBSStraffic( wlan->macAddress2().toString(), |
221 | wlan->macAddress1().toString(), | 221 | wlan->macAddress1().toString(), |
222 | wlan->macAddress3().toString() ); | 222 | wlan->macAddress3().toString() ); |
223 | } | 223 | } |
224 | 224 | ||
225 | OARPPacket* arp = (OARPPacket*) p->child( "ARP" ); | 225 | OARPPacket* arp = (OARPPacket*) p->child( "ARP" ); |
226 | if ( arp ) | 226 | if ( arp ) |
227 | { | 227 | { |
228 | qDebug( "Received ARP traffic (type '%s'): ", (const char*) arp->type() ); | 228 | qDebug( "Received ARP traffic (type '%s'): ", (const char*) arp->type() ); |
229 | if ( arp->type() == "REQUEST" ) | 229 | if ( arp->type() == "REQUEST" ) |
230 | { | 230 | { |
231 | netView()->identify( arp->senderMacAddress().toString(), arp->senderIPV4Address().toString() ); | 231 | netView()->identify( arp->senderMacAddress().toString(), arp->senderIPV4Address().toString() ); |
232 | } | 232 | } |
233 | else if ( arp->type() == "REPLY" ) | 233 | else if ( arp->type() == "REPLY" ) |
234 | { | 234 | { |
235 | netView()->identify( arp->senderMacAddress().toString(), arp->senderIPV4Address().toString() ); | 235 | netView()->identify( arp->senderMacAddress().toString(), arp->senderIPV4Address().toString() ); |
236 | netView()->identify( arp->targetMacAddress().toString(), arp->targetIPV4Address().toString() ); | 236 | netView()->identify( arp->targetMacAddress().toString(), arp->targetIPV4Address().toString() ); |
237 | } | 237 | } |
238 | } | 238 | } |
239 | 239 | ||
240 | OIPPacket* ip = (OIPPacket*) p->child( "IP" ); | 240 | OIPPacket* ip = (OIPPacket*) p->child( "IP" ); |
241 | if ( ip ) | 241 | if ( ip ) |
242 | { | 242 | { |
243 | qDebug( "Received IP packet." ); | 243 | qDebug( "Received IP packet." ); |
244 | } | 244 | } |
245 | } | 245 | } |
246 | 246 | ||
247 | 247 | ||
248 | void Wellenreiter::receivePacket( OPacket* p ) | 248 | void Wellenreiter::receivePacket( OPacket* p ) |
249 | { | 249 | { |
250 | hexWindow()->log( p->dump( 8 ) ); | 250 | hexWindow()->log( p->dump( 8 ) ); |
251 | 251 | ||
252 | // check if we received a beacon frame | 252 | // check if we received a beacon frame |
253 | OWaveLanManagementPacket* beacon = static_cast<OWaveLanManagementPacket*>( p->child( "802.11 Management" ) ); | 253 | OWaveLanManagementPacket* beacon = static_cast<OWaveLanManagementPacket*>( p->child( "802.11 Management" ) ); |
254 | if ( beacon && beacon->managementType() == "Beacon" ) | 254 | if ( beacon && beacon->managementType() == "Beacon" ) |
255 | { | 255 | { |
256 | handleBeacon( p, beacon ); | 256 | handleBeacon( p, beacon ); |
257 | return; | 257 | return; |
258 | } | 258 | } |
259 | 259 | ||
260 | //TODO: WEP check here | 260 | //TODO: WEP check here |
261 | 261 | ||
262 | // check for a data frame | 262 | // check for a data frame |
263 | OWaveLanDataPacket* data = static_cast<OWaveLanDataPacket*>( p->child( "802.11 Data" ) ); | 263 | OWaveLanDataPacket* data = static_cast<OWaveLanDataPacket*>( p->child( "802.11 Data" ) ); |
264 | if ( data ) | 264 | if ( data ) |
265 | { | 265 | { |
266 | handleData( p, data ); | 266 | handleData( p, data ); |
267 | } | 267 | } |
268 | } | 268 | } |
269 | 269 | ||
270 | 270 | ||
271 | void Wellenreiter::stopClicked() | 271 | void Wellenreiter::stopClicked() |
272 | { | 272 | { |
273 | if ( iface ) | 273 | if ( iface ) |
274 | { | 274 | { |
275 | disconnect( SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) ); | 275 | disconnect( SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) ); |
276 | disconnect( SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) ); | 276 | disconnect( SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) ); |
277 | iface->setChannelHopping(); // stop hopping channels | 277 | iface->setChannelHopping(); // stop hopping channels |
278 | } | 278 | } |
279 | else | 279 | else |
280 | killTimers(); | 280 | killTimers(); |
281 | 281 | ||
282 | pcap->close(); | 282 | pcap->close(); |
283 | sniffing = false; | 283 | sniffing = false; |
284 | 284 | ||
285 | if ( iface ) | 285 | if ( iface ) |
286 | { | 286 | { |
287 | // switch off monitor mode | 287 | // switch off monitor mode |
288 | iface->setMonitorMode( false ); | 288 | iface->setMonitorMode( false ); |
289 | // switch off promisc flag | 289 | // switch off promisc flag |
290 | iface->setPromiscuousMode( false ); | 290 | iface->setPromiscuousMode( false ); |
291 | 291 | ||
292 | system( "cardctl reset; sleep 1" ); //FIXME: Use OProcess | 292 | system( "cardctl reset; sleep 1" ); //FIXME: Use OProcess |
293 | } | 293 | } |
294 | 294 | ||
295 | logwindow->log( "(i) Stopped Scanning." ); | 295 | logwindow->log( "(i) Stopped Scanning." ); |
296 | assert( parent() ); | 296 | assert( parent() ); |
297 | ( (QMainWindow*) parent() )->setCaption( "Wellenreiter II" ); | 297 | ( (QMainWindow*) parent() )->setCaption( "Wellenreiter II" ); |
298 | 298 | ||
299 | // message the user | 299 | // message the user |
300 | QMessageBox::information( this, "Wellenreiter II", | 300 | QMessageBox::information( this, "Wellenreiter II", |
301 | tr( "Your wireless card\nshould now be usable again." ) ); | 301 | tr( "Your wireless card\nshould now be usable again." ) ); |
302 | 302 | ||
303 | sniffing = false; | 303 | sniffing = false; |
304 | emit( stoppedSniffing() ); | 304 | emit( stoppedSniffing() ); |
305 | 305 | ||
306 | // print out statistics | 306 | // print out statistics |
307 | for( QMap<QString,int>::ConstIterator it = pcap->statistics().begin(); it != pcap->statistics().end(); ++it ) | 307 | for( QMap<QString,int>::ConstIterator it = pcap->statistics().begin(); it != pcap->statistics().end(); ++it ) |
308 | statwindow->updateCounter( it.key(), it.data() ); | 308 | statwindow->updateCounter( it.key(), it.data() ); |
309 | } | 309 | } |
310 | 310 | ||
311 | 311 | ||
312 | void Wellenreiter::startClicked() | 312 | void Wellenreiter::startClicked() |
313 | { | 313 | { |
314 | // get configuration from config window | 314 | // get configuration from config window |
315 | 315 | ||
316 | const QString& interface = configwindow->interfaceName->currentText(); | 316 | const QString& interface = configwindow->interfaceName->currentText(); |
317 | const int cardtype = configwindow->daemonDeviceType(); | 317 | const int cardtype = configwindow->driverType(); |
318 | const int interval = configwindow->daemonHopInterval(); | 318 | const int interval = configwindow->hoppingInterval(); |
319 | 319 | ||
320 | if ( ( interface == "" ) || ( cardtype == 0 ) ) | 320 | if ( ( interface == "" ) || ( cardtype == 0 ) ) |
321 | { | 321 | { |
322 | QMessageBox::information( this, "Wellenreiter II", | 322 | QMessageBox::information( this, "Wellenreiter II", |
323 | tr( "Your device is not\nproperly configured. Please reconfigure!" ) ); | 323 | tr( "Your device is not\nproperly configured. Please reconfigure!" ) ); |
324 | return; | 324 | return; |
325 | } | 325 | } |
326 | 326 | ||
327 | // configure device | 327 | // configure device |
328 | 328 | ||
329 | ONetwork* net = ONetwork::instance(); | 329 | ONetwork* net = ONetwork::instance(); |
330 | iface = static_cast<OWirelessNetworkInterface*>(net->interface( interface )); | 330 | iface = static_cast<OWirelessNetworkInterface*>(net->interface( interface )); |
331 | 331 | ||
332 | // set monitor mode | 332 | // set monitor mode |
333 | 333 | ||
334 | bool usePrism = configwindow->usePrismHeader(); | 334 | bool usePrism = configwindow->usePrismHeader(); |
335 | 335 | ||
336 | switch ( cardtype ) | 336 | switch ( cardtype ) |
337 | { | 337 | { |
338 | case DEVTYPE_CISCO: iface->setMonitoring( new OCiscoMonitoringInterface( iface, usePrism ) ); break; | 338 | case DEVTYPE_CISCO: iface->setMonitoring( new OCiscoMonitoringInterface( iface, usePrism ) ); break; |
339 | case DEVTYPE_WLAN_NG: iface->setMonitoring( new OWlanNGMonitoringInterface( iface, usePrism ) ); break; | 339 | case DEVTYPE_WLAN_NG: iface->setMonitoring( new OWlanNGMonitoringInterface( iface, usePrism ) ); break; |
340 | case DEVTYPE_HOSTAP: iface->setMonitoring( new OHostAPMonitoringInterface( iface, usePrism ) ); break; | 340 | case DEVTYPE_HOSTAP: iface->setMonitoring( new OHostAPMonitoringInterface( iface, usePrism ) ); break; |
341 | case DEVTYPE_ORINOCO: iface->setMonitoring( new OOrinocoMonitoringInterface( iface, usePrism ) ); break; | 341 | case DEVTYPE_ORINOCO: iface->setMonitoring( new OOrinocoMonitoringInterface( iface, usePrism ) ); break; |
342 | case DEVTYPE_MANUAL: QMessageBox::information( this, "Wellenreiter II", tr( "Bring your device into\nmonitor mode now." ) ); break; | 342 | case DEVTYPE_MANUAL: QMessageBox::information( this, "Wellenreiter II", tr( "Bring your device into\nmonitor mode now." ) ); break; |
343 | case DEVTYPE_FILE: qDebug( "Wellenreiter: Capturing from file '%s'", (const char*) interface ); break; | 343 | case DEVTYPE_FILE: qDebug( "Wellenreiter: Capturing from file '%s'", (const char*) interface ); break; |
344 | default: assert( 0 ); // shouldn't reach this | 344 | default: assert( 0 ); // shouldn't reach this |
345 | } | 345 | } |
346 | 346 | ||
347 | // switch device into monitor mode | 347 | // switch device into monitor mode |
348 | if ( cardtype < DEVTYPE_FILE ) | 348 | if ( cardtype < DEVTYPE_FILE ) |
349 | { | 349 | { |
350 | if ( cardtype != DEVTYPE_MANUAL ) | 350 | if ( cardtype != DEVTYPE_MANUAL ) |
351 | iface->setMonitorMode( true ); | 351 | iface->setMonitorMode( true ); |
352 | if ( !iface->monitorMode() ) | 352 | if ( !iface->monitorMode() ) |
353 | { | 353 | { |
354 | QMessageBox::warning( this, "Wellenreiter II", | 354 | QMessageBox::warning( this, "Wellenreiter II", |
355 | tr( "Can't set device into monitor mode." ) ); | 355 | tr( "Can't set device into monitor mode." ) ); |
356 | return; | 356 | return; |
357 | } | 357 | } |
358 | } | 358 | } |
359 | 359 | ||
360 | // open pcap and start sniffing | 360 | // open pcap and start sniffing |
361 | if ( cardtype != DEVTYPE_FILE ) | 361 | if ( cardtype != DEVTYPE_FILE ) |
362 | { | 362 | { |
363 | if ( configwindow->writeCaptureFile->isEnabled() ) //FIXME: bug!? | 363 | if ( configwindow->writeCaptureFile->isEnabled() ) //FIXME: bug!? |
364 | { | 364 | { |
365 | QString dumpname( configwindow->captureFileName->text() ); | 365 | QString dumpname( configwindow->captureFileName->text() ); |
366 | dumpname.append( '-' ); | 366 | dumpname.append( '-' ); |
367 | dumpname.append( QTime::currentTime().toString().replace( QRegExp( ":" ), "-" ) ); | 367 | dumpname.append( QTime::currentTime().toString().replace( QRegExp( ":" ), "-" ) ); |
368 | dumpname.append( ".wellenreiter" ); | 368 | dumpname.append( ".wellenreiter" ); |
369 | pcap->open( interface, dumpname ); | 369 | pcap->open( interface, dumpname ); |
370 | } | 370 | } |
371 | else | 371 | else |
372 | { | 372 | { |
373 | pcap->open( interface ); | 373 | pcap->open( interface ); |
374 | } | 374 | } |
375 | } | 375 | } |
376 | else | 376 | else |
377 | { | 377 | { |
378 | pcap->open( QFile( interface ) ); | 378 | pcap->open( QFile( interface ) ); |
379 | } | 379 | } |
380 | 380 | ||
381 | if ( !pcap->isOpen() ) | 381 | if ( !pcap->isOpen() ) |
382 | { | 382 | { |
383 | QMessageBox::warning( this, "Wellenreiter II", | 383 | QMessageBox::warning( this, "Wellenreiter II", |
384 | tr( "Can't open packet capturer:\n" ) + QString(strerror( errno ) )); | 384 | tr( "Can't open packet capturer:\n" ) + QString(strerror( errno ) )); |
385 | return; | 385 | return; |
386 | } | 386 | } |
387 | 387 | ||
388 | // set capturer to non-blocking mode | 388 | // set capturer to non-blocking mode |
389 | pcap->setBlocking( false ); | 389 | pcap->setBlocking( false ); |
390 | 390 | ||
391 | // start channel hopper | 391 | // start channel hopper |
392 | if ( cardtype != DEVTYPE_FILE ) | 392 | if ( cardtype != DEVTYPE_FILE ) |
393 | iface->setChannelHopping( 1000 ); //use interval from config window | 393 | iface->setChannelHopping( 1000 ); //use interval from config window |
394 | 394 | ||
395 | if ( cardtype != DEVTYPE_FILE ) | 395 | if ( cardtype != DEVTYPE_FILE ) |
396 | { | 396 | { |
397 | // connect socket notifier and start channel hopper | 397 | // connect socket notifier and start channel hopper |
398 | connect( pcap, SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) ); | 398 | connect( pcap, SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) ); |
399 | connect( iface->channelHopper(), SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) ); | 399 | connect( iface->channelHopper(), SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) ); |
400 | } | 400 | } |
401 | else | 401 | else |
402 | { | 402 | { |
403 | // start timer for reading packets | 403 | // start timer for reading packets |
404 | startTimer( 100 ); | 404 | startTimer( 100 ); |
405 | } | 405 | } |
406 | 406 | ||
407 | logwindow->log( "(i) Started Scanning." ); | 407 | logwindow->log( "(i) Started Scanning." ); |
408 | sniffing = true; | 408 | sniffing = true; |
409 | emit( startedSniffing() ); | 409 | emit( startedSniffing() ); |
410 | if ( cardtype != DEVTYPE_FILE ) channelHopped( 6 ); // set title | 410 | if ( cardtype != DEVTYPE_FILE ) channelHopped( 6 ); // set title |
411 | else | 411 | else |
412 | { | 412 | { |
413 | assert( parent() ); | 413 | assert( parent() ); |
414 | ( (QMainWindow*) parent() )->setCaption( tr( "Wellenreiter II - replaying capture file..." ) ); | 414 | ( (QMainWindow*) parent() )->setCaption( tr( "Wellenreiter II - replaying capture file..." ) ); |
415 | } | 415 | } |
416 | } | 416 | } |
417 | 417 | ||
418 | 418 | ||
419 | void Wellenreiter::timerEvent( QTimerEvent* ) | 419 | void Wellenreiter::timerEvent( QTimerEvent* ) |
420 | { | 420 | { |
421 | qDebug( "Wellenreiter::timerEvent()" ); | 421 | qDebug( "Wellenreiter::timerEvent()" ); |
422 | OPacket* p = pcap->next(); | 422 | OPacket* p = pcap->next(); |
423 | if ( !p ) // no more packets available | 423 | if ( !p ) // no more packets available |
424 | { | 424 | { |
425 | stopClicked(); | 425 | stopClicked(); |
426 | } | 426 | } |
427 | else | 427 | else |
428 | { | 428 | { |
429 | receivePacket( p ); | 429 | receivePacket( p ); |
430 | delete p; | 430 | delete p; |
431 | } | 431 | } |
432 | } | 432 | } |
433 | 433 | ||