author | kergoth <kergoth> | 2003-04-15 02:35:50 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2003-04-15 02:35:50 (UTC) |
commit | 114383b92b066aa06bc6a3ed4e04e87baa0dc990 (patch) (unidiff) | |
tree | 48556717e33ca8c22a7ac274b1b05f03a3443b1f | |
parent | d2f7c238e852eb60fdcfe3e4024823480713e50e (diff) | |
download | opie-114383b92b066aa06bc6a3ed4e04e87baa0dc990.zip opie-114383b92b066aa06bc6a3ed4e04e87baa0dc990.tar.gz opie-114383b92b066aa06bc6a3ed4e04e87baa0dc990.tar.bz2 |
Implement feature request. Only asterisk out the WEP key when the lineedit
does not have focus.
-rw-r--r-- | noncore/settings/networksettings/wlan/keyedit.cpp | 21 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/keyedit.h | 21 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlan.pro | 4 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlan.ui | 179 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanimp2.cpp | 1 |
5 files changed, 160 insertions, 66 deletions
diff --git a/noncore/settings/networksettings/wlan/keyedit.cpp b/noncore/settings/networksettings/wlan/keyedit.cpp new file mode 100644 index 0000000..ad9ecae --- a/dev/null +++ b/noncore/settings/networksettings/wlan/keyedit.cpp | |||
@@ -0,0 +1,21 @@ | |||
1 | #include "keyedit.h" | ||
2 | #include <qlineedit.h> | ||
3 | |||
4 | KeyEdit::KeyEdit(QWidget* parent, const char* name) : | ||
5 | QLineEdit(parent, name) | ||
6 | { | ||
7 | } | ||
8 | |||
9 | KeyEdit::~KeyEdit() | ||
10 | { | ||
11 | } | ||
12 | |||
13 | void KeyEdit::focusInEvent(QFocusEvent *event) | ||
14 | { | ||
15 | setEchoMode(Normal); | ||
16 | } | ||
17 | |||
18 | void KeyEdit::focusOutEvent(QFocusEvent *event) | ||
19 | { | ||
20 | setEchoMode(Password); | ||
21 | } | ||
diff --git a/noncore/settings/networksettings/wlan/keyedit.h b/noncore/settings/networksettings/wlan/keyedit.h new file mode 100644 index 0000000..7d418a6 --- a/dev/null +++ b/noncore/settings/networksettings/wlan/keyedit.h | |||
@@ -0,0 +1,21 @@ | |||
1 | #ifndef KEYEDIT_H | ||
2 | #define KEYEDIT_H | ||
3 | |||
4 | #include <qlineedit.h> | ||
5 | |||
6 | class KeyEdit : public QLineEdit { | ||
7 | Q_OBJECT | ||
8 | |||
9 | public: | ||
10 | KeyEdit(QWidget* parent = 0, const char* name = 0); | ||
11 | ~KeyEdit(); | ||
12 | |||
13 | protected: | ||
14 | void focusInEvent(QFocusEvent *event); | ||
15 | void focusOutEvent(QFocusEvent *event); | ||
16 | |||
17 | private: | ||
18 | }; | ||
19 | |||
20 | #endif | ||
21 | |||
diff --git a/noncore/settings/networksettings/wlan/wlan.pro b/noncore/settings/networksettings/wlan/wlan.pro index 9ddc154..7a55a8e 100644 --- a/noncore/settings/networksettings/wlan/wlan.pro +++ b/noncore/settings/networksettings/wlan/wlan.pro | |||
@@ -1,26 +1,26 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt warn_on release |
3 | #CONFIG += qt warn_on debug | 3 | #CONFIG += qt warn_on debug |
4 | DESTDIR = $(OPIEDIR)/plugins/networksettings | 4 | DESTDIR = $(OPIEDIR)/plugins/networksettings |
5 | HEADERS = infoimp.h wlanmodule.h wextensions.h | 5 | HEADERS = infoimp.h wlanmodule.h wextensions.h keyedit.h |
6 | SOURCES = infoimp.cpp wlanmodule.cpp wextensions.cpp | 6 | SOURCES = infoimp.cpp wlanmodule.cpp wextensions.cpp keyedit.cpp |
7 | INCLUDEPATH+= $(OPIEDIR)/include ../ ../interfaces/ | 7 | INCLUDEPATH+= $(OPIEDIR)/include ../ ../interfaces/ |
8 | DEPENDPATH+= $(OPIEDIR)/include | 8 | DEPENDPATH+= $(OPIEDIR)/include |
9 | LIBS += -lqpe -L../interfaces/ -linterfaces | 9 | LIBS += -lqpe -L../interfaces/ -linterfaces |
10 | INTERFACES= wlan.ui info.ui | 10 | INTERFACES= wlan.ui info.ui |
11 | TARGET = wlanplugin | 11 | TARGET = wlanplugin |
12 | VERSION = 1.0.0 | 12 | VERSION = 1.0.0 |
13 | 13 | ||
14 | #CONFIG += wirelessopts | 14 | #CONFIG += wirelessopts |
15 | 15 | ||
16 | wirelessopts { | 16 | wirelessopts { |
17 | HEADERS+= wlanimp.h | 17 | HEADERS+= wlanimp.h |
18 | SOURCES+= wlanimp.cpp | 18 | SOURCES+= wlanimp.cpp |
19 | } | 19 | } |
20 | 20 | ||
21 | ! wirelessopts { | 21 | ! wirelessopts { |
22 | HEADERS+= wlanimp2.h | 22 | HEADERS+= wlanimp2.h |
23 | SOURCES += wlanimp2.cpp | 23 | SOURCES += wlanimp2.cpp |
24 | } | 24 | } |
25 | 25 | ||
26 | include ( $(OPIEDIR)/include.pro ) | 26 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/settings/networksettings/wlan/wlan.ui b/noncore/settings/networksettings/wlan/wlan.ui index e7c8dbb..2e2d4d7 100644 --- a/noncore/settings/networksettings/wlan/wlan.ui +++ b/noncore/settings/networksettings/wlan/wlan.ui | |||
@@ -1,110 +1,110 @@ | |||
1 | <!DOCTYPE UI><UI> | 1 | <!DOCTYPE UI><UI> |
2 | <class>WLAN</class> | 2 | <class>WLAN</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>WLAN</cstring> | 7 | <cstring>WLAN</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>255</width> | 14 | <width>251</width> |
15 | <height>299</height> | 15 | <height>299</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>Wireless Configuration</string> | 20 | <string>Wireless Configuration</string> |
21 | </property> | 21 | </property> |
22 | <property stdset="1"> | 22 | <property stdset="1"> |
23 | <name>sizeGripEnabled</name> | 23 | <name>sizeGripEnabled</name> |
24 | <bool>true</bool> | 24 | <bool>true</bool> |
25 | </property> | 25 | </property> |
26 | <property> | 26 | <property> |
27 | <name>layoutMargin</name> | 27 | <name>layoutMargin</name> |
28 | </property> | 28 | </property> |
29 | <vbox> | 29 | <vbox> |
30 | <property stdset="1"> | 30 | <property stdset="1"> |
31 | <name>margin</name> | 31 | <name>margin</name> |
32 | <number>0</number> | 32 | <number>0</number> |
33 | </property> | 33 | </property> |
34 | <property stdset="1"> | 34 | <property stdset="1"> |
35 | <name>spacing</name> | 35 | <name>spacing</name> |
36 | <number>6</number> | 36 | <number>6</number> |
37 | </property> | 37 | </property> |
38 | <widget> | 38 | <widget> |
39 | <class>QTabWidget</class> | 39 | <class>QTabWidget</class> |
40 | <property stdset="1"> | 40 | <property stdset="1"> |
41 | <name>name</name> | 41 | <name>name</name> |
42 | <cstring>tabWidget</cstring> | 42 | <cstring>tabWidget</cstring> |
43 | </property> | 43 | </property> |
44 | <property stdset="1"> | 44 | <property stdset="1"> |
45 | <name>enabled</name> | 45 | <name>enabled</name> |
46 | <bool>true</bool> | 46 | <bool>true</bool> |
47 | </property> | 47 | </property> |
48 | <widget> | 48 | <widget> |
49 | <class>QWidget</class> | 49 | <class>QWidget</class> |
50 | <property stdset="1"> | 50 | <property stdset="1"> |
51 | <name>name</name> | 51 | <name>name</name> |
52 | <cstring>ConfigPage</cstring> | 52 | <cstring>ConfigPage</cstring> |
53 | </property> | 53 | </property> |
54 | <attribute> | 54 | <attribute> |
55 | <name>title</name> | 55 | <name>title</name> |
56 | <string>General</string> | 56 | <string>General</string> |
57 | </attribute> | 57 | </attribute> |
58 | <spacer> | 58 | <spacer> |
59 | <property> | 59 | <property> |
60 | <name>name</name> | 60 | <name>name</name> |
61 | <cstring>Spacer31</cstring> | 61 | <cstring>Spacer31</cstring> |
62 | </property> | 62 | </property> |
63 | <property stdset="1"> | 63 | <property stdset="1"> |
64 | <name>orientation</name> | 64 | <name>orientation</name> |
65 | <enum>Vertical</enum> | 65 | <enum>Vertical</enum> |
66 | </property> | 66 | </property> |
67 | <property stdset="1"> | 67 | <property stdset="1"> |
68 | <name>sizeType</name> | 68 | <name>sizeType</name> |
69 | <enum>Expanding</enum> | 69 | <enum>Expanding</enum> |
70 | </property> | 70 | </property> |
71 | <property> | 71 | <property> |
72 | <name>sizeHint</name> | 72 | <name>sizeHint</name> |
73 | <size> | 73 | <size> |
74 | <width>20</width> | 74 | <width>20</width> |
75 | <height>20</height> | 75 | <height>20</height> |
76 | </size> | 76 | </size> |
77 | </property> | 77 | </property> |
78 | </spacer> | 78 | </spacer> |
79 | <widget> | 79 | <widget> |
80 | <class>QLabel</class> | 80 | <class>QLabel</class> |
81 | <property stdset="1"> | 81 | <property stdset="1"> |
82 | <name>name</name> | 82 | <name>name</name> |
83 | <cstring>modeLabel</cstring> | 83 | <cstring>modeLabel</cstring> |
84 | </property> | 84 | </property> |
85 | <property stdset="1"> | 85 | <property stdset="1"> |
86 | <name>enabled</name> | 86 | <name>enabled</name> |
87 | <bool>true</bool> | 87 | <bool>true</bool> |
88 | </property> | 88 | </property> |
89 | <property stdset="1"> | 89 | <property stdset="1"> |
90 | <name>geometry</name> | 90 | <name>geometry</name> |
91 | <rect> | 91 | <rect> |
92 | <x>11</x> | 92 | <x>11</x> |
93 | <y>11</y> | 93 | <y>11</y> |
94 | <width>84</width> | 94 | <width>84</width> |
95 | <height>29</height> | 95 | <height>29</height> |
96 | </rect> | 96 | </rect> |
97 | </property> | 97 | </property> |
98 | <property stdset="1"> | 98 | <property stdset="1"> |
99 | <name>sizePolicy</name> | 99 | <name>sizePolicy</name> |
100 | <sizepolicy> | 100 | <sizepolicy> |
101 | <hsizetype>1</hsizetype> | 101 | <hsizetype>1</hsizetype> |
102 | <vsizetype>1</vsizetype> | 102 | <vsizetype>1</vsizetype> |
103 | </sizepolicy> | 103 | </sizepolicy> |
104 | </property> | 104 | </property> |
105 | <property stdset="1"> | 105 | <property stdset="1"> |
106 | <name>text</name> | 106 | <name>text</name> |
107 | <string>Mode</string> | 107 | <string>Mode</string> |
108 | </property> | 108 | </property> |
109 | </widget> | 109 | </widget> |
110 | <widget> | 110 | <widget> |
@@ -303,365 +303,416 @@ | |||
303 | </property> | 303 | </property> |
304 | </item> | 304 | </item> |
305 | <property stdset="1"> | 305 | <property stdset="1"> |
306 | <name>name</name> | 306 | <name>name</name> |
307 | <cstring>mode</cstring> | 307 | <cstring>mode</cstring> |
308 | </property> | 308 | </property> |
309 | <property stdset="1"> | 309 | <property stdset="1"> |
310 | <name>enabled</name> | 310 | <name>enabled</name> |
311 | <bool>true</bool> | 311 | <bool>true</bool> |
312 | </property> | 312 | </property> |
313 | <property stdset="1"> | 313 | <property stdset="1"> |
314 | <name>geometry</name> | 314 | <name>geometry</name> |
315 | <rect> | 315 | <rect> |
316 | <x>101</x> | 316 | <x>101</x> |
317 | <y>11</y> | 317 | <y>11</y> |
318 | <width>103</width> | 318 | <width>103</width> |
319 | <height>29</height> | 319 | <height>29</height> |
320 | </rect> | 320 | </rect> |
321 | </property> | 321 | </property> |
322 | <property stdset="1"> | 322 | <property stdset="1"> |
323 | <name>sizePolicy</name> | 323 | <name>sizePolicy</name> |
324 | <sizepolicy> | 324 | <sizepolicy> |
325 | <hsizetype>1</hsizetype> | 325 | <hsizetype>1</hsizetype> |
326 | <vsizetype>0</vsizetype> | 326 | <vsizetype>0</vsizetype> |
327 | </sizepolicy> | 327 | </sizepolicy> |
328 | </property> | 328 | </property> |
329 | </widget> | 329 | </widget> |
330 | <widget> | 330 | <widget> |
331 | <class>QComboBox</class> | 331 | <class>QComboBox</class> |
332 | <item> | 332 | <item> |
333 | <property> | 333 | <property> |
334 | <name>text</name> | 334 | <name>text</name> |
335 | <string>any</string> | 335 | <string>any</string> |
336 | </property> | 336 | </property> |
337 | </item> | 337 | </item> |
338 | <property stdset="1"> | 338 | <property stdset="1"> |
339 | <name>name</name> | 339 | <name>name</name> |
340 | <cstring>essid</cstring> | 340 | <cstring>essid</cstring> |
341 | </property> | 341 | </property> |
342 | <property stdset="1"> | 342 | <property stdset="1"> |
343 | <name>geometry</name> | 343 | <name>geometry</name> |
344 | <rect> | 344 | <rect> |
345 | <x>101</x> | 345 | <x>101</x> |
346 | <y>46</y> | 346 | <y>46</y> |
347 | <width>103</width> | 347 | <width>103</width> |
348 | <height>29</height> | 348 | <height>29</height> |
349 | </rect> | 349 | </rect> |
350 | </property> | 350 | </property> |
351 | <property stdset="1"> | 351 | <property stdset="1"> |
352 | <name>sizePolicy</name> | 352 | <name>sizePolicy</name> |
353 | <sizepolicy> | 353 | <sizepolicy> |
354 | <hsizetype>7</hsizetype> | 354 | <hsizetype>7</hsizetype> |
355 | <vsizetype>0</vsizetype> | 355 | <vsizetype>0</vsizetype> |
356 | </sizepolicy> | 356 | </sizepolicy> |
357 | </property> | 357 | </property> |
358 | <property stdset="1"> | 358 | <property stdset="1"> |
359 | <name>editable</name> | 359 | <name>editable</name> |
360 | <bool>true</bool> | 360 | <bool>true</bool> |
361 | </property> | 361 | </property> |
362 | <property stdset="1"> | 362 | <property stdset="1"> |
363 | <name>currentItem</name> | 363 | <name>currentItem</name> |
364 | <number>0</number> | 364 | <number>0</number> |
365 | </property> | 365 | </property> |
366 | <property stdset="1"> | 366 | <property stdset="1"> |
367 | <name>sizeLimit</name> | 367 | <name>sizeLimit</name> |
368 | <number>5</number> | 368 | <number>5</number> |
369 | </property> | 369 | </property> |
370 | <property stdset="1"> | 370 | <property stdset="1"> |
371 | <name>autoCompletion</name> | 371 | <name>autoCompletion</name> |
372 | <bool>true</bool> | 372 | <bool>true</bool> |
373 | </property> | 373 | </property> |
374 | <property stdset="1"> | 374 | <property stdset="1"> |
375 | <name>duplicatesEnabled</name> | 375 | <name>duplicatesEnabled</name> |
376 | <bool>false</bool> | 376 | <bool>false</bool> |
377 | </property> | 377 | </property> |
378 | </widget> | 378 | </widget> |
379 | </widget> | 379 | </widget> |
380 | <widget> | 380 | <widget> |
381 | <class>QWidget</class> | 381 | <class>QWidget</class> |
382 | <property stdset="1"> | 382 | <property stdset="1"> |
383 | <name>name</name> | 383 | <name>name</name> |
384 | <cstring>WepPage</cstring> | 384 | <cstring>WepPage</cstring> |
385 | </property> | 385 | </property> |
386 | <attribute> | 386 | <attribute> |
387 | <name>title</name> | 387 | <name>title</name> |
388 | <string>Encryption</string> | 388 | <string>Encryption</string> |
389 | </attribute> | 389 | </attribute> |
390 | <grid> | 390 | <grid> |
391 | <property stdset="1"> | 391 | <property stdset="1"> |
392 | <name>margin</name> | 392 | <name>margin</name> |
393 | <number>11</number> | 393 | <number>11</number> |
394 | </property> | 394 | </property> |
395 | <property stdset="1"> | 395 | <property stdset="1"> |
396 | <name>spacing</name> | 396 | <name>spacing</name> |
397 | <number>6</number> | 397 | <number>6</number> |
398 | </property> | 398 | </property> |
399 | <spacer row="0" column="0" > | ||
400 | <property> | ||
401 | <name>name</name> | ||
402 | <cstring>Spacer30</cstring> | ||
403 | </property> | ||
404 | <property stdset="1"> | ||
405 | <name>orientation</name> | ||
406 | <enum>Vertical</enum> | ||
407 | </property> | ||
408 | <property stdset="1"> | ||
409 | <name>sizeType</name> | ||
410 | <enum>Expanding</enum> | ||
411 | </property> | ||
412 | <property> | ||
413 | <name>sizeHint</name> | ||
414 | <size> | ||
415 | <width>20</width> | ||
416 | <height>20</height> | ||
417 | </size> | ||
418 | </property> | ||
419 | </spacer> | ||
420 | <widget row="0" column="0" > | 399 | <widget row="0" column="0" > |
421 | <class>QCheckBox</class> | 400 | <class>QCheckBox</class> |
422 | <property stdset="1"> | 401 | <property stdset="1"> |
423 | <name>name</name> | 402 | <name>name</name> |
424 | <cstring>wepEnabled</cstring> | 403 | <cstring>wepEnabled</cstring> |
425 | </property> | 404 | </property> |
426 | <property stdset="1"> | 405 | <property stdset="1"> |
427 | <name>text</name> | 406 | <name>text</name> |
428 | <string>&Enable Encryption</string> | 407 | <string>&Enable Encryption</string> |
429 | </property> | 408 | </property> |
430 | </widget> | 409 | </widget> |
431 | <widget row="1" column="0" > | 410 | <widget row="1" column="0" > |
432 | <class>QButtonGroup</class> | 411 | <class>QButtonGroup</class> |
433 | <property stdset="1"> | 412 | <property stdset="1"> |
434 | <name>name</name> | 413 | <name>name</name> |
435 | <cstring>KeyButtonGroup</cstring> | 414 | <cstring>KeyButtonGroup</cstring> |
436 | </property> | 415 | </property> |
437 | <property stdset="1"> | 416 | <property stdset="1"> |
438 | <name>enabled</name> | 417 | <name>enabled</name> |
439 | <bool>false</bool> | 418 | <bool>false</bool> |
440 | </property> | 419 | </property> |
441 | <property stdset="1"> | 420 | <property stdset="1"> |
442 | <name>title</name> | 421 | <name>title</name> |
443 | <string>&Key Setting</string> | 422 | <string>&Key Setting</string> |
444 | </property> | 423 | </property> |
445 | <grid> | 424 | <grid> |
446 | <property stdset="1"> | 425 | <property stdset="1"> |
447 | <name>margin</name> | 426 | <name>margin</name> |
448 | <number>11</number> | 427 | <number>11</number> |
449 | </property> | 428 | </property> |
450 | <property stdset="1"> | 429 | <property stdset="1"> |
451 | <name>spacing</name> | 430 | <name>spacing</name> |
452 | <number>6</number> | 431 | <number>6</number> |
453 | </property> | 432 | </property> |
454 | <widget row="0" column="1" > | 433 | <widget row="0" column="0" > |
455 | <class>QLineEdit</class> | 434 | <class>QRadioButton</class> |
456 | <property stdset="1"> | 435 | <property stdset="1"> |
457 | <name>name</name> | 436 | <name>name</name> |
458 | <cstring>keyLineEdit0</cstring> | 437 | <cstring>keyRadio0</cstring> |
438 | </property> | ||
439 | <property stdset="1"> | ||
440 | <name>text</name> | ||
441 | <string>Key &1</string> | ||
459 | </property> | 442 | </property> |
460 | <property stdset="1"> | 443 | <property stdset="1"> |
461 | <name>echoMode</name> | 444 | <name>checked</name> |
462 | <enum>Password</enum> | 445 | <bool>true</bool> |
463 | </property> | 446 | </property> |
464 | </widget> | 447 | </widget> |
465 | <widget row="1" column="1" > | 448 | <widget row="1" column="0" > |
466 | <class>QLineEdit</class> | 449 | <class>QRadioButton</class> |
467 | <property stdset="1"> | 450 | <property stdset="1"> |
468 | <name>name</name> | 451 | <name>name</name> |
469 | <cstring>keyLineEdit1</cstring> | 452 | <cstring>keyRadio1</cstring> |
470 | </property> | 453 | </property> |
471 | <property stdset="1"> | 454 | <property stdset="1"> |
472 | <name>echoMode</name> | 455 | <name>text</name> |
473 | <enum>Password</enum> | 456 | <string>Key &2</string> |
474 | </property> | 457 | </property> |
475 | </widget> | 458 | </widget> |
476 | <widget row="2" column="1" > | 459 | <widget row="2" column="0" > |
477 | <class>QLineEdit</class> | 460 | <class>QRadioButton</class> |
478 | <property stdset="1"> | 461 | <property stdset="1"> |
479 | <name>name</name> | 462 | <name>name</name> |
480 | <cstring>keyLineEdit2</cstring> | 463 | <cstring>keyRadio2</cstring> |
481 | </property> | 464 | </property> |
482 | <property stdset="1"> | 465 | <property stdset="1"> |
483 | <name>echoMode</name> | 466 | <name>text</name> |
484 | <enum>Password</enum> | 467 | <string>Key &3</string> |
485 | </property> | 468 | </property> |
486 | </widget> | 469 | </widget> |
487 | <widget row="3" column="1" > | 470 | <widget row="3" column="0" > |
488 | <class>QLineEdit</class> | 471 | <class>QRadioButton</class> |
489 | <property stdset="1"> | 472 | <property stdset="1"> |
490 | <name>name</name> | 473 | <name>name</name> |
491 | <cstring>keyLineEdit3</cstring> | 474 | <cstring>keyRadio3</cstring> |
492 | </property> | 475 | </property> |
493 | <property stdset="1"> | 476 | <property stdset="1"> |
494 | <name>echoMode</name> | 477 | <name>text</name> |
495 | <enum>Password</enum> | 478 | <string>Key &4</string> |
496 | </property> | 479 | </property> |
497 | </widget> | 480 | </widget> |
498 | <widget row="0" column="0" > | 481 | <widget row="0" column="1" > |
499 | <class>QRadioButton</class> | 482 | <class>KeyEdit</class> |
500 | <property stdset="1"> | 483 | <property stdset="1"> |
501 | <name>name</name> | 484 | <name>name</name> |
502 | <cstring>keyRadio0</cstring> | 485 | <cstring>keyLineEdit0</cstring> |
503 | </property> | 486 | </property> |
504 | <property stdset="1"> | 487 | <property stdset="1"> |
505 | <name>text</name> | 488 | <name>sizePolicy</name> |
506 | <string>Key &1</string> | 489 | <sizepolicy> |
490 | <hsizetype>3</hsizetype> | ||
491 | <vsizetype>5</vsizetype> | ||
492 | </sizepolicy> | ||
507 | </property> | 493 | </property> |
508 | <property stdset="1"> | 494 | <property stdset="1"> |
509 | <name>checked</name> | 495 | <name>focusPolicy</name> |
510 | <bool>true</bool> | 496 | <enum>StrongFocus</enum> |
511 | </property> | 497 | </property> |
512 | </widget> | 498 | </widget> |
513 | <widget row="1" column="0" > | 499 | <widget row="1" column="1" > |
514 | <class>QRadioButton</class> | 500 | <class>KeyEdit</class> |
515 | <property stdset="1"> | 501 | <property stdset="1"> |
516 | <name>name</name> | 502 | <name>name</name> |
517 | <cstring>keyRadio1</cstring> | 503 | <cstring>keyLineEdit1</cstring> |
518 | </property> | 504 | </property> |
519 | <property stdset="1"> | 505 | <property stdset="1"> |
520 | <name>text</name> | 506 | <name>sizePolicy</name> |
521 | <string>Key &2</string> | 507 | <sizepolicy> |
508 | <hsizetype>3</hsizetype> | ||
509 | <vsizetype>5</vsizetype> | ||
510 | </sizepolicy> | ||
511 | </property> | ||
512 | <property stdset="1"> | ||
513 | <name>focusPolicy</name> | ||
514 | <enum>StrongFocus</enum> | ||
522 | </property> | 515 | </property> |
523 | </widget> | 516 | </widget> |
524 | <widget row="2" column="0" > | 517 | <widget row="2" column="1" > |
525 | <class>QRadioButton</class> | 518 | <class>KeyEdit</class> |
526 | <property stdset="1"> | 519 | <property stdset="1"> |
527 | <name>name</name> | 520 | <name>name</name> |
528 | <cstring>keyRadio2</cstring> | 521 | <cstring>keyLineEdit2</cstring> |
529 | </property> | 522 | </property> |
530 | <property stdset="1"> | 523 | <property stdset="1"> |
531 | <name>text</name> | 524 | <name>sizePolicy</name> |
532 | <string>Key &3</string> | 525 | <sizepolicy> |
526 | <hsizetype>3</hsizetype> | ||
527 | <vsizetype>5</vsizetype> | ||
528 | </sizepolicy> | ||
529 | </property> | ||
530 | <property stdset="1"> | ||
531 | <name>focusPolicy</name> | ||
532 | <enum>StrongFocus</enum> | ||
533 | </property> | 533 | </property> |
534 | </widget> | 534 | </widget> |
535 | <widget row="3" column="0" > | 535 | <widget row="3" column="1" > |
536 | <class>QRadioButton</class> | 536 | <class>KeyEdit</class> |
537 | <property stdset="1"> | 537 | <property stdset="1"> |
538 | <name>name</name> | 538 | <name>name</name> |
539 | <cstring>keyRadio3</cstring> | 539 | <cstring>keyLineEdit3</cstring> |
540 | </property> | 540 | </property> |
541 | <property stdset="1"> | 541 | <property stdset="1"> |
542 | <name>text</name> | 542 | <name>sizePolicy</name> |
543 | <string>Key &4</string> | 543 | <sizepolicy> |
544 | <hsizetype>3</hsizetype> | ||
545 | <vsizetype>5</vsizetype> | ||
546 | </sizepolicy> | ||
547 | </property> | ||
548 | <property stdset="1"> | ||
549 | <name>focusPolicy</name> | ||
550 | <enum>StrongFocus</enum> | ||
544 | </property> | 551 | </property> |
545 | </widget> | 552 | </widget> |
546 | </grid> | 553 | </grid> |
547 | </widget> | 554 | </widget> |
548 | <widget row="2" column="0" > | 555 | <widget row="2" column="0" > |
549 | <class>QButtonGroup</class> | 556 | <class>QButtonGroup</class> |
550 | <property stdset="1"> | 557 | <property stdset="1"> |
551 | <name>name</name> | 558 | <name>name</name> |
552 | <cstring>NonEncButtonGroup</cstring> | 559 | <cstring>NonEncButtonGroup</cstring> |
553 | </property> | 560 | </property> |
554 | <property stdset="1"> | 561 | <property stdset="1"> |
555 | <name>enabled</name> | 562 | <name>enabled</name> |
556 | <bool>false</bool> | 563 | <bool>false</bool> |
557 | </property> | 564 | </property> |
558 | <property stdset="1"> | 565 | <property stdset="1"> |
559 | <name>title</name> | 566 | <name>title</name> |
560 | <string>Non-encrypted Packets</string> | 567 | <string>Non-encrypted Packets</string> |
561 | </property> | 568 | </property> |
562 | <property stdset="1"> | 569 | <property stdset="1"> |
563 | <name>radioButtonExclusive</name> | 570 | <name>radioButtonExclusive</name> |
564 | <bool>true</bool> | 571 | <bool>true</bool> |
565 | </property> | 572 | </property> |
566 | <grid> | 573 | <grid> |
567 | <property stdset="1"> | 574 | <property stdset="1"> |
568 | <name>margin</name> | 575 | <name>margin</name> |
569 | <number>11</number> | 576 | <number>11</number> |
570 | </property> | 577 | </property> |
571 | <property stdset="1"> | 578 | <property stdset="1"> |
572 | <name>spacing</name> | 579 | <name>spacing</name> |
573 | <number>6</number> | 580 | <number>6</number> |
574 | </property> | 581 | </property> |
575 | <widget row="0" column="0" > | 582 | <widget row="0" column="0" > |
576 | <class>QRadioButton</class> | 583 | <class>QRadioButton</class> |
577 | <property stdset="1"> | 584 | <property stdset="1"> |
578 | <name>name</name> | 585 | <name>name</name> |
579 | <cstring>acceptNonEnc</cstring> | 586 | <cstring>acceptNonEnc</cstring> |
580 | </property> | 587 | </property> |
581 | <property stdset="1"> | 588 | <property stdset="1"> |
582 | <name>text</name> | 589 | <name>text</name> |
583 | <string>&Accept</string> | 590 | <string>&Accept</string> |
584 | </property> | 591 | </property> |
585 | <property stdset="1"> | 592 | <property stdset="1"> |
586 | <name>checked</name> | 593 | <name>checked</name> |
587 | <bool>true</bool> | 594 | <bool>true</bool> |
588 | </property> | 595 | </property> |
589 | <property stdset="1"> | 596 | <property stdset="1"> |
590 | <name>buttonGroupId</name> | 597 | <name>buttonGroupId</name> |
591 | <number>0</number> | 598 | <number>0</number> |
592 | </property> | 599 | </property> |
593 | </widget> | 600 | </widget> |
594 | <widget row="0" column="1" > | 601 | <widget row="0" column="1" > |
595 | <class>QRadioButton</class> | 602 | <class>QRadioButton</class> |
596 | <property stdset="1"> | 603 | <property stdset="1"> |
597 | <name>name</name> | 604 | <name>name</name> |
598 | <cstring>rejectNonEnc</cstring> | 605 | <cstring>rejectNonEnc</cstring> |
599 | </property> | 606 | </property> |
600 | <property stdset="1"> | 607 | <property stdset="1"> |
601 | <name>text</name> | 608 | <name>text</name> |
602 | <string>&Reject</string> | 609 | <string>&Reject</string> |
603 | </property> | 610 | </property> |
604 | <property stdset="1"> | 611 | <property stdset="1"> |
605 | <name>buttonGroupId</name> | 612 | <name>buttonGroupId</name> |
606 | <number>1</number> | 613 | <number>1</number> |
607 | </property> | 614 | </property> |
608 | </widget> | 615 | </widget> |
609 | </grid> | 616 | </grid> |
610 | </widget> | 617 | </widget> |
618 | <spacer row="3" column="0" > | ||
619 | <property> | ||
620 | <name>name</name> | ||
621 | <cstring>Spacer30</cstring> | ||
622 | </property> | ||
623 | <property stdset="1"> | ||
624 | <name>orientation</name> | ||
625 | <enum>Vertical</enum> | ||
626 | </property> | ||
627 | <property stdset="1"> | ||
628 | <name>sizeType</name> | ||
629 | <enum>Expanding</enum> | ||
630 | </property> | ||
631 | <property> | ||
632 | <name>sizeHint</name> | ||
633 | <size> | ||
634 | <width>20</width> | ||
635 | <height>20</height> | ||
636 | </size> | ||
637 | </property> | ||
638 | </spacer> | ||
611 | </grid> | 639 | </grid> |
612 | </widget> | 640 | </widget> |
613 | </widget> | 641 | </widget> |
614 | </vbox> | 642 | </vbox> |
615 | </widget> | 643 | </widget> |
644 | <customwidgets> | ||
645 | <customwidget> | ||
646 | <class>KeyEdit</class> | ||
647 | <header location="global">/usr/src/opie/noncore/net/networksettings/wlan/keyedit.h</header> | ||
648 | <sizehint> | ||
649 | <width>-1</width> | ||
650 | <height>-1</height> | ||
651 | </sizehint> | ||
652 | <container>0</container> | ||
653 | <sizepolicy> | ||
654 | <hordata>5</hordata> | ||
655 | <verdata>5</verdata> | ||
656 | </sizepolicy> | ||
657 | <pixmap>image0</pixmap> | ||
658 | <slot access="public">setEnabled(bool)</slot> | ||
659 | </customwidget> | ||
660 | </customwidgets> | ||
661 | <images> | ||
662 | <image> | ||
663 | <name>image0</name> | ||
664 | <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1ddec44f503c0ae2a154410f53d0ed20e2bf6bdb656dd6861dd23d9a66591b0587fd1654235ebded6f0edcd53e419d87ae7b1f4f9b8f906d0bfe012317426a70b07bdc2f3ec77f8ed6b89559061a0343d06a124cc105596482585094bc0ae599b04646c9018926491b2205e140c485cace25755c175d0a967b622ff900b8cc9c7d29af594ea722d589167f813aa852ba07d94b9dce296e883fe7bb163f23896753</data> | ||
665 | </image> | ||
666 | </images> | ||
616 | <connections> | 667 | <connections> |
617 | <connection> | 668 | <connection> |
618 | <sender>specifyAp</sender> | 669 | <sender>specifyAp</sender> |
619 | <signal>toggled(bool)</signal> | 670 | <signal>toggled(bool)</signal> |
620 | <receiver>macLabel</receiver> | 671 | <receiver>macLabel</receiver> |
621 | <slot>setEnabled(bool)</slot> | 672 | <slot>setEnabled(bool)</slot> |
622 | </connection> | 673 | </connection> |
623 | <connection> | 674 | <connection> |
624 | <sender>specifyAp</sender> | 675 | <sender>specifyAp</sender> |
625 | <signal>toggled(bool)</signal> | 676 | <signal>toggled(bool)</signal> |
626 | <receiver>macEdit</receiver> | 677 | <receiver>macEdit</receiver> |
627 | <slot>setEnabled(bool)</slot> | 678 | <slot>setEnabled(bool)</slot> |
628 | </connection> | 679 | </connection> |
629 | <connection> | 680 | <connection> |
630 | <sender>specifyChan</sender> | 681 | <sender>specifyChan</sender> |
631 | <signal>toggled(bool)</signal> | 682 | <signal>toggled(bool)</signal> |
632 | <receiver>networkChannel</receiver> | 683 | <receiver>networkChannel</receiver> |
633 | <slot>setEnabled(bool)</slot> | 684 | <slot>setEnabled(bool)</slot> |
634 | </connection> | 685 | </connection> |
635 | <connection> | 686 | <connection> |
636 | <sender>wepEnabled</sender> | 687 | <sender>wepEnabled</sender> |
637 | <signal>toggled(bool)</signal> | 688 | <signal>toggled(bool)</signal> |
638 | <receiver>KeyButtonGroup</receiver> | 689 | <receiver>KeyButtonGroup</receiver> |
639 | <slot>setEnabled(bool)</slot> | 690 | <slot>setEnabled(bool)</slot> |
640 | </connection> | 691 | </connection> |
641 | <connection> | 692 | <connection> |
642 | <sender>wepEnabled</sender> | 693 | <sender>wepEnabled</sender> |
643 | <signal>toggled(bool)</signal> | 694 | <signal>toggled(bool)</signal> |
644 | <receiver>NonEncButtonGroup</receiver> | 695 | <receiver>NonEncButtonGroup</receiver> |
645 | <slot>setEnabled(bool)</slot> | 696 | <slot>setEnabled(bool)</slot> |
646 | </connection> | 697 | </connection> |
647 | </connections> | 698 | </connections> |
648 | <tabstops> | 699 | <tabstops> |
649 | <tabstop>tabWidget</tabstop> | 700 | <tabstop>tabWidget</tabstop> |
650 | <tabstop>wepEnabled</tabstop> | 701 | <tabstop>wepEnabled</tabstop> |
651 | <tabstop>keyRadio0</tabstop> | 702 | <tabstop>keyRadio0</tabstop> |
652 | <tabstop>keyLineEdit0</tabstop> | 703 | <tabstop>keyLineEdit0</tabstop> |
653 | <tabstop>keyRadio1</tabstop> | 704 | <tabstop>keyRadio1</tabstop> |
654 | <tabstop>keyLineEdit1</tabstop> | 705 | <tabstop>keyLineEdit1</tabstop> |
655 | <tabstop>keyRadio2</tabstop> | 706 | <tabstop>keyRadio2</tabstop> |
656 | <tabstop>keyLineEdit2</tabstop> | 707 | <tabstop>keyLineEdit2</tabstop> |
657 | <tabstop>keyRadio3</tabstop> | 708 | <tabstop>keyRadio3</tabstop> |
658 | <tabstop>keyLineEdit3</tabstop> | 709 | <tabstop>keyLineEdit3</tabstop> |
659 | <tabstop>acceptNonEnc</tabstop> | 710 | <tabstop>acceptNonEnc</tabstop> |
660 | <tabstop>mode</tabstop> | 711 | <tabstop>mode</tabstop> |
661 | <tabstop>essid</tabstop> | 712 | <tabstop>essid</tabstop> |
662 | <tabstop>specifyAp</tabstop> | 713 | <tabstop>specifyAp</tabstop> |
663 | <tabstop>macEdit</tabstop> | 714 | <tabstop>macEdit</tabstop> |
664 | <tabstop>specifyChan</tabstop> | 715 | <tabstop>specifyChan</tabstop> |
665 | <tabstop>networkChannel</tabstop> | 716 | <tabstop>networkChannel</tabstop> |
666 | </tabstops> | 717 | </tabstops> |
667 | </UI> | 718 | </UI> |
diff --git a/noncore/settings/networksettings/wlan/wlanimp2.cpp b/noncore/settings/networksettings/wlan/wlanimp2.cpp index 73afc92..e7b842b 100644 --- a/noncore/settings/networksettings/wlan/wlanimp2.cpp +++ b/noncore/settings/networksettings/wlan/wlanimp2.cpp | |||
@@ -1,97 +1,98 @@ | |||
1 | #include "wlanimp2.h" | 1 | #include "wlanimp2.h" |
2 | #include "keyedit.h" | ||
2 | #include "interfacesetupimp.h" | 3 | #include "interfacesetupimp.h" |
3 | 4 | ||
4 | #include <qfile.h> | 5 | #include <qfile.h> |
5 | #include <qdir.h> | 6 | #include <qdir.h> |
6 | #include <qtextstream.h> | 7 | #include <qtextstream.h> |
7 | #include <qmessagebox.h> | 8 | #include <qmessagebox.h> |
8 | #include <qlineedit.h> | 9 | #include <qlineedit.h> |
9 | #include <qlabel.h> | 10 | #include <qlabel.h> |
10 | #include <qspinbox.h> | 11 | #include <qspinbox.h> |
11 | #include <qradiobutton.h> | 12 | #include <qradiobutton.h> |
12 | #include <qcheckbox.h> | 13 | #include <qcheckbox.h> |
13 | #include <qtabwidget.h> | 14 | #include <qtabwidget.h> |
14 | #include <qcombobox.h> | 15 | #include <qcombobox.h> |
15 | 16 | ||
16 | #ifdef QWS | 17 | #ifdef QWS |
17 | #include <opie/oprocess.h> | 18 | #include <opie/oprocess.h> |
18 | #else | 19 | #else |
19 | #define OProcess KProcess | 20 | #define OProcess KProcess |
20 | #include <kprocess.h> | 21 | #include <kprocess.h> |
21 | #endif | 22 | #endif |
22 | 23 | ||
23 | #define WIRELESS_OPTS "/etc/pcmcia/wireless.opts" | 24 | #define WIRELESS_OPTS "/etc/pcmcia/wireless.opts" |
24 | #define PREUP "/etc/netwrok/if-pre-up.d/wireless-tools" | 25 | #define PREUP "/etc/netwrok/if-pre-up.d/wireless-tools" |
25 | 26 | ||
26 | /** | 27 | /** |
27 | * Constructor, read in the wireless.opts file for parsing later. | 28 | * Constructor, read in the wireless.opts file for parsing later. |
28 | */ | 29 | */ |
29 | WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, WFlags fl) : WLAN(parent, name, modal, fl), currentProfile("*"), interface(i) { | 30 | WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, WFlags fl) : WLAN(parent, name, modal, fl), currentProfile("*"), interface(i) { |
30 | interfaces = new Interfaces; | 31 | interfaces = new Interfaces; |
31 | interfaceSetup = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i, interfaces); | 32 | interfaceSetup = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i, interfaces); |
32 | tabWidget->insertTab(interfaceSetup, "TCP/IP"); | 33 | tabWidget->insertTab(interfaceSetup, "TCP/IP"); |
33 | 34 | ||
34 | // Check sanity - the existance of the wireless-tools if-pre-up script | 35 | // Check sanity - the existance of the wireless-tools if-pre-up script |
35 | QFile file(QString(PREUP)); | 36 | QFile file(QString(PREUP)); |
36 | if (file.exists()) { | 37 | if (file.exists()) { |
37 | qWarning(QString("WLANImp: Unable to open /etc/network/if-pre-up.d/wireless-tools")); | 38 | qWarning(QString("WLANImp: Unable to open /etc/network/if-pre-up.d/wireless-tools")); |
38 | } | 39 | } |
39 | } | 40 | } |
40 | 41 | ||
41 | WLANImp::~WLANImp() { | 42 | WLANImp::~WLANImp() { |
42 | delete interfaces; | 43 | delete interfaces; |
43 | } | 44 | } |
44 | 45 | ||
45 | /** | 46 | /** |
46 | * Change the profile for both wireless settings and network settings. | 47 | * Change the profile for both wireless settings and network settings. |
47 | */ | 48 | */ |
48 | void WLANImp::setProfile(const QString &profile){ | 49 | void WLANImp::setProfile(const QString &profile){ |
49 | interfaceSetup->setProfile(profile); | 50 | interfaceSetup->setProfile(profile); |
50 | parseOpts(); | 51 | parseOpts(); |
51 | } | 52 | } |
52 | 53 | ||
53 | void WLANImp::parseOpts() { | 54 | void WLANImp::parseOpts() { |
54 | bool error; | 55 | bool error; |
55 | QString opt; | 56 | QString opt; |
56 | 57 | ||
57 | if (! interfaces->isInterfaceSet()) | 58 | if (! interfaces->isInterfaceSet()) |
58 | return; | 59 | return; |
59 | 60 | ||
60 | 61 | ||
61 | opt = interfaces->getInterfaceOption("wireless_essid", error); | 62 | opt = interfaces->getInterfaceOption("wireless_essid", error); |
62 | if(opt == "any" || opt == "off" || opt.isNull()){ | 63 | if(opt == "any" || opt == "off" || opt.isNull()){ |
63 | essid->setEditText("any"); | 64 | essid->setEditText("any"); |
64 | } else { | 65 | } else { |
65 | essid->setEditText(opt); | 66 | essid->setEditText(opt); |
66 | } | 67 | } |
67 | 68 | ||
68 | opt = interfaces->getInterfaceOption("wireless_mode", error).simplifyWhiteSpace(); | 69 | opt = interfaces->getInterfaceOption("wireless_mode", error).simplifyWhiteSpace(); |
69 | if (opt == "Auto") { | 70 | if (opt == "Auto") { |
70 | mode->setCurrentItem(0); | 71 | mode->setCurrentItem(0); |
71 | } else if (opt == "Ad-Hoc") { | 72 | } else if (opt == "Ad-Hoc") { |
72 | mode->setCurrentItem(2); | 73 | mode->setCurrentItem(2); |
73 | } else { | 74 | } else { |
74 | // Managed/Infrastructure mode | 75 | // Managed/Infrastructure mode |
75 | mode->setCurrentItem(1); | 76 | mode->setCurrentItem(1); |
76 | } | 77 | } |
77 | 78 | ||
78 | opt = interfaces->getInterfaceOption("wireless_ap", error).simplifyWhiteSpace(); | 79 | opt = interfaces->getInterfaceOption("wireless_ap", error).simplifyWhiteSpace(); |
79 | if (! opt.isNull()) { | 80 | if (! opt.isNull()) { |
80 | specifyAp->setChecked(true); | 81 | specifyAp->setChecked(true); |
81 | macEdit->setText(opt); | 82 | macEdit->setText(opt); |
82 | } | 83 | } |
83 | 84 | ||
84 | opt = interfaces->getInterfaceOption("wireless_channel", error).simplifyWhiteSpace(); | 85 | opt = interfaces->getInterfaceOption("wireless_channel", error).simplifyWhiteSpace(); |
85 | if (! opt.isNull()) { | 86 | if (! opt.isNull()) { |
86 | specifyChan->setChecked(true); | 87 | specifyChan->setChecked(true); |
87 | networkChannel->setValue(opt.toInt()); | 88 | networkChannel->setValue(opt.toInt()); |
88 | } | 89 | } |
89 | 90 | ||
90 | opt = interfaces->getInterfaceOption("wireless_key", error).simplifyWhiteSpace(); | 91 | opt = interfaces->getInterfaceOption("wireless_key", error).simplifyWhiteSpace(); |
91 | if (opt.isNull()) | 92 | if (opt.isNull()) |
92 | opt = interfaces->getInterfaceOption("wireless_enc", error).simplifyWhiteSpace(); | 93 | opt = interfaces->getInterfaceOption("wireless_enc", error).simplifyWhiteSpace(); |
93 | parseKeyStr(opt); | 94 | parseKeyStr(opt); |
94 | } | 95 | } |
95 | 96 | ||
96 | void WLANImp::parseKeyStr(QString keystr) { | 97 | void WLANImp::parseKeyStr(QString keystr) { |
97 | int loc = 0; | 98 | int loc = 0; |