summaryrefslogtreecommitdiff
authorkergoth <kergoth>2003-04-15 02:35:50 (UTC)
committer kergoth <kergoth>2003-04-15 02:35:50 (UTC)
commit114383b92b066aa06bc6a3ed4e04e87baa0dc990 (patch) (unidiff)
tree48556717e33ca8c22a7ac274b1b05f03a3443b1f
parentd2f7c238e852eb60fdcfe3e4024823480713e50e (diff)
downloadopie-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.
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings/wlan/keyedit.cpp21
-rw-r--r--noncore/settings/networksettings/wlan/keyedit.h21
-rw-r--r--noncore/settings/networksettings/wlan/wlan.pro4
-rw-r--r--noncore/settings/networksettings/wlan/wlan.ui179
-rw-r--r--noncore/settings/networksettings/wlan/wlanimp2.cpp1
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
4KeyEdit::KeyEdit(QWidget* parent, const char* name) :
5 QLineEdit(parent, name)
6{
7}
8
9KeyEdit::~KeyEdit()
10{
11}
12
13void KeyEdit::focusInEvent(QFocusEvent *event)
14{
15 setEchoMode(Normal);
16}
17
18void 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
6class KeyEdit : public QLineEdit {
7 Q_OBJECT
8
9public:
10 KeyEdit(QWidget* parent = 0, const char* name = 0);
11 ~KeyEdit();
12
13protected:
14 void focusInEvent(QFocusEvent *event);
15 void focusOutEvent(QFocusEvent *event);
16
17private:
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
@@ -2,8 +2,8 @@ TEMPLATE = lib
2CONFIG += qt warn_on release 2CONFIG += qt warn_on release
3 #CONFIG += qt warn_on debug 3 #CONFIG += qt warn_on debug
4DESTDIR = $(OPIEDIR)/plugins/networksettings 4DESTDIR = $(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
9LIBS += -lqpe -L../interfaces/ -linterfaces 9LIBS += -lqpe -L../interfaces/ -linterfaces
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
@@ -11,7 +11,7 @@
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>
@@ -396,27 +396,6 @@
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">
@@ -451,96 +430,124 @@
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 &amp;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 &amp;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 &amp;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 &amp;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 &amp;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 &amp;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 &amp;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 &amp;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>
@@ -608,11 +615,55 @@
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>
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,4 +1,5 @@
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>