From 114383b92b066aa06bc6a3ed4e04e87baa0dc990 Mon Sep 17 00:00:00 2001 From: kergoth Date: Tue, 15 Apr 2003 02:35:50 +0000 Subject: Implement feature request. Only asterisk out the WEP key when the lineedit does not have focus. --- (limited to 'noncore') 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 @@ +#include "keyedit.h" +#include + +KeyEdit::KeyEdit(QWidget* parent, const char* name) : + QLineEdit(parent, name) +{ +} + +KeyEdit::~KeyEdit() +{ +} + +void KeyEdit::focusInEvent(QFocusEvent *event) +{ + setEchoMode(Normal); +} + +void KeyEdit::focusOutEvent(QFocusEvent *event) +{ + setEchoMode(Password); +} 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 @@ +#ifndef KEYEDIT_H +#define KEYEDIT_H + +#include + +class KeyEdit : public QLineEdit { + Q_OBJECT + +public: + KeyEdit(QWidget* parent = 0, const char* name = 0); + ~KeyEdit(); + +protected: + void focusInEvent(QFocusEvent *event); + void focusOutEvent(QFocusEvent *event); + +private: +}; + +#endif + 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 CONFIG += qt warn_on release #CONFIG += qt warn_on debug DESTDIR = $(OPIEDIR)/plugins/networksettings -HEADERS = infoimp.h wlanmodule.h wextensions.h -SOURCES = infoimp.cpp wlanmodule.cpp wextensions.cpp +HEADERS = infoimp.h wlanmodule.h wextensions.h keyedit.h +SOURCES = infoimp.cpp wlanmodule.cpp wextensions.cpp keyedit.cpp INCLUDEPATH += $(OPIEDIR)/include ../ ../interfaces/ DEPENDPATH += $(OPIEDIR)/include LIBS += -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 @@ 0 0 - 255 + 251 299 @@ -396,27 +396,6 @@ spacing 6 - - - name - Spacer30 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - QCheckBox @@ -451,96 +430,124 @@ spacing 6 - - QLineEdit + + QRadioButton name - keyLineEdit0 + keyRadio0 + + + text + Key &1 - echoMode - Password + checked + true - - QLineEdit + + QRadioButton name - keyLineEdit1 + keyRadio1 - echoMode - Password + text + Key &2 - - QLineEdit + + QRadioButton name - keyLineEdit2 + keyRadio2 - echoMode - Password + text + Key &3 - - QLineEdit + + QRadioButton name - keyLineEdit3 + keyRadio3 - echoMode - Password + text + Key &4 - - QRadioButton + + KeyEdit name - keyRadio0 + keyLineEdit0 - text - Key &1 + sizePolicy + + 3 + 5 + - checked - true + focusPolicy + StrongFocus - - QRadioButton + + KeyEdit name - keyRadio1 + keyLineEdit1 - text - Key &2 + sizePolicy + + 3 + 5 + + + + focusPolicy + StrongFocus - - QRadioButton + + KeyEdit name - keyRadio2 + keyLineEdit2 - text - Key &3 + sizePolicy + + 3 + 5 + + + + focusPolicy + StrongFocus - - QRadioButton + + KeyEdit name - keyRadio3 + keyLineEdit3 - text - Key &4 + sizePolicy + + 3 + 5 + + + + focusPolicy + StrongFocus @@ -608,11 +615,55 @@ + + + name + Spacer30 + + + orientation + Vertical + + + sizeType + Expanding + + + sizeHint + + 20 + 20 + + + + + + KeyEdit +
/usr/src/opie/noncore/net/networksettings/wlan/keyedit.h
+ + -1 + -1 + + 0 + + 5 + 5 + + image0 + setEnabled(bool) +
+
+ + + image0 + 789c6dd2c10ac2300c00d07bbf2234b7229d1ddec44f503c0ae2a154410f53d0ed20e2bf6bdb656dd6861dd23d9a66591b0587fd1654235ebded6f0edcd53e419d87ae7b1f4f9b8f906d0bfe012317426a70b07bdc2f3ec77f8ed6b89559061a0343d06a124cc105596482585094bc0ae599b04646c9018926491b2205e140c485cace25755c175d0a967b622ff900b8cc9c7d29af594ea722d589167f813aa852ba07d94b9dce296e883fe7bb163f23896753 + + specifyAp 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 @@ #include "wlanimp2.h" +#include "keyedit.h" #include "interfacesetupimp.h" #include -- cgit v0.9.0.2