author | kergoth <kergoth> | 2003-04-15 02:35:50 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2003-04-15 02:35:50 (UTC) |
commit | 114383b92b066aa06bc6a3ed4e04e87baa0dc990 (patch) (side-by-side diff) | |
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 @@ +#include "keyedit.h" +#include <qlineedit.h> + +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 <qlineedit.h> + +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 @@ -1,26 +1,26 @@ 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 INTERFACES = wlan.ui info.ui TARGET = wlanplugin VERSION = 1.0.0 #CONFIG += wirelessopts wirelessopts { HEADERS += wlanimp.h SOURCES += wlanimp.cpp } ! wirelessopts { HEADERS += wlanimp2.h SOURCES += wlanimp2.cpp } 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,38 +1,38 @@ <!DOCTYPE UI><UI> <class>WLAN</class> <widget> <class>QDialog</class> <property stdset="1"> <name>name</name> <cstring>WLAN</cstring> </property> <property stdset="1"> <name>geometry</name> <rect> <x>0</x> <y>0</y> - <width>255</width> + <width>251</width> <height>299</height> </rect> </property> <property stdset="1"> <name>caption</name> <string>Wireless Configuration</string> </property> <property stdset="1"> <name>sizeGripEnabled</name> <bool>true</bool> </property> <property> <name>layoutMargin</name> </property> <vbox> <property stdset="1"> <name>margin</name> <number>0</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> <widget> @@ -375,193 +375,200 @@ <name>duplicatesEnabled</name> <bool>false</bool> </property> </widget> </widget> <widget> <class>QWidget</class> <property stdset="1"> <name>name</name> <cstring>WepPage</cstring> </property> <attribute> <name>title</name> <string>Encryption</string> </attribute> <grid> <property stdset="1"> <name>margin</name> <number>11</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> - <spacer row="0" column="0" > - <property> - <name>name</name> - <cstring>Spacer30</cstring> - </property> - <property stdset="1"> - <name>orientation</name> - <enum>Vertical</enum> - </property> - <property stdset="1"> - <name>sizeType</name> - <enum>Expanding</enum> - </property> - <property> - <name>sizeHint</name> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - </spacer> <widget row="0" column="0" > <class>QCheckBox</class> <property stdset="1"> <name>name</name> <cstring>wepEnabled</cstring> </property> <property stdset="1"> <name>text</name> <string>&Enable Encryption</string> </property> </widget> <widget row="1" column="0" > <class>QButtonGroup</class> <property stdset="1"> <name>name</name> <cstring>KeyButtonGroup</cstring> </property> <property stdset="1"> <name>enabled</name> <bool>false</bool> </property> <property stdset="1"> <name>title</name> <string>&Key Setting</string> </property> <grid> <property stdset="1"> <name>margin</name> <number>11</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> - <widget row="0" column="1" > - <class>QLineEdit</class> + <widget row="0" column="0" > + <class>QRadioButton</class> <property stdset="1"> <name>name</name> - <cstring>keyLineEdit0</cstring> + <cstring>keyRadio0</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>Key &1</string> </property> <property stdset="1"> - <name>echoMode</name> - <enum>Password</enum> + <name>checked</name> + <bool>true</bool> </property> </widget> - <widget row="1" column="1" > - <class>QLineEdit</class> + <widget row="1" column="0" > + <class>QRadioButton</class> <property stdset="1"> <name>name</name> - <cstring>keyLineEdit1</cstring> + <cstring>keyRadio1</cstring> </property> <property stdset="1"> - <name>echoMode</name> - <enum>Password</enum> + <name>text</name> + <string>Key &2</string> </property> </widget> - <widget row="2" column="1" > - <class>QLineEdit</class> + <widget row="2" column="0" > + <class>QRadioButton</class> <property stdset="1"> <name>name</name> - <cstring>keyLineEdit2</cstring> + <cstring>keyRadio2</cstring> </property> <property stdset="1"> - <name>echoMode</name> - <enum>Password</enum> + <name>text</name> + <string>Key &3</string> </property> </widget> - <widget row="3" column="1" > - <class>QLineEdit</class> + <widget row="3" column="0" > + <class>QRadioButton</class> <property stdset="1"> <name>name</name> - <cstring>keyLineEdit3</cstring> + <cstring>keyRadio3</cstring> </property> <property stdset="1"> - <name>echoMode</name> - <enum>Password</enum> + <name>text</name> + <string>Key &4</string> </property> </widget> - <widget row="0" column="0" > - <class>QRadioButton</class> + <widget row="0" column="1" > + <class>KeyEdit</class> <property stdset="1"> <name>name</name> - <cstring>keyRadio0</cstring> + <cstring>keyLineEdit0</cstring> </property> <property stdset="1"> - <name>text</name> - <string>Key &1</string> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>3</hsizetype> + <vsizetype>5</vsizetype> + </sizepolicy> </property> <property stdset="1"> - <name>checked</name> - <bool>true</bool> + <name>focusPolicy</name> + <enum>StrongFocus</enum> </property> </widget> - <widget row="1" column="0" > - <class>QRadioButton</class> + <widget row="1" column="1" > + <class>KeyEdit</class> <property stdset="1"> <name>name</name> - <cstring>keyRadio1</cstring> + <cstring>keyLineEdit1</cstring> </property> <property stdset="1"> - <name>text</name> - <string>Key &2</string> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>3</hsizetype> + <vsizetype>5</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>focusPolicy</name> + <enum>StrongFocus</enum> </property> </widget> - <widget row="2" column="0" > - <class>QRadioButton</class> + <widget row="2" column="1" > + <class>KeyEdit</class> <property stdset="1"> <name>name</name> - <cstring>keyRadio2</cstring> + <cstring>keyLineEdit2</cstring> </property> <property stdset="1"> - <name>text</name> - <string>Key &3</string> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>3</hsizetype> + <vsizetype>5</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>focusPolicy</name> + <enum>StrongFocus</enum> </property> </widget> - <widget row="3" column="0" > - <class>QRadioButton</class> + <widget row="3" column="1" > + <class>KeyEdit</class> <property stdset="1"> <name>name</name> - <cstring>keyRadio3</cstring> + <cstring>keyLineEdit3</cstring> </property> <property stdset="1"> - <name>text</name> - <string>Key &4</string> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>3</hsizetype> + <vsizetype>5</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>focusPolicy</name> + <enum>StrongFocus</enum> </property> </widget> </grid> </widget> <widget row="2" column="0" > <class>QButtonGroup</class> <property stdset="1"> <name>name</name> <cstring>NonEncButtonGroup</cstring> </property> <property stdset="1"> <name>enabled</name> <bool>false</bool> </property> <property stdset="1"> <name>title</name> <string>Non-encrypted Packets</string> </property> <property stdset="1"> <name>radioButtonExclusive</name> <bool>true</bool> </property> <grid> <property stdset="1"> @@ -587,53 +594,97 @@ <bool>true</bool> </property> <property stdset="1"> <name>buttonGroupId</name> <number>0</number> </property> </widget> <widget row="0" column="1" > <class>QRadioButton</class> <property stdset="1"> <name>name</name> <cstring>rejectNonEnc</cstring> </property> <property stdset="1"> <name>text</name> <string>&Reject</string> </property> <property stdset="1"> <name>buttonGroupId</name> <number>1</number> </property> </widget> </grid> </widget> + <spacer row="3" column="0" > + <property> + <name>name</name> + <cstring>Spacer30</cstring> + </property> + <property stdset="1"> + <name>orientation</name> + <enum>Vertical</enum> + </property> + <property stdset="1"> + <name>sizeType</name> + <enum>Expanding</enum> + </property> + <property> + <name>sizeHint</name> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> </grid> </widget> </widget> </vbox> </widget> +<customwidgets> + <customwidget> + <class>KeyEdit</class> + <header location="global">/usr/src/opie/noncore/net/networksettings/wlan/keyedit.h</header> + <sizehint> + <width>-1</width> + <height>-1</height> + </sizehint> + <container>0</container> + <sizepolicy> + <hordata>5</hordata> + <verdata>5</verdata> + </sizepolicy> + <pixmap>image0</pixmap> + <slot access="public">setEnabled(bool)</slot> + </customwidget> +</customwidgets> +<images> + <image> + <name>image0</name> + <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1ddec44f503c0ae2a154410f53d0ed20e2bf6bdb656dd6861dd23d9a66591b0587fd1654235ebded6f0edcd53e419d87ae7b1f4f9b8f906d0bfe012317426a70b07bdc2f3ec77f8ed6b89559061a0343d06a124cc105596482585094bc0ae599b04646c9018926491b2205e140c485cace25755c175d0a967b622ff900b8cc9c7d29af594ea722d589167f813aa852ba07d94b9dce296e883fe7bb163f23896753</data> + </image> +</images> <connections> <connection> <sender>specifyAp</sender> <signal>toggled(bool)</signal> <receiver>macLabel</receiver> <slot>setEnabled(bool)</slot> </connection> <connection> <sender>specifyAp</sender> <signal>toggled(bool)</signal> <receiver>macEdit</receiver> <slot>setEnabled(bool)</slot> </connection> <connection> <sender>specifyChan</sender> <signal>toggled(bool)</signal> <receiver>networkChannel</receiver> <slot>setEnabled(bool)</slot> </connection> <connection> <sender>wepEnabled</sender> <signal>toggled(bool)</signal> <receiver>KeyButtonGroup</receiver> <slot>setEnabled(bool)</slot> 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,25 +1,26 @@ #include "wlanimp2.h" +#include "keyedit.h" #include "interfacesetupimp.h" #include <qfile.h> #include <qdir.h> #include <qtextstream.h> #include <qmessagebox.h> #include <qlineedit.h> #include <qlabel.h> #include <qspinbox.h> #include <qradiobutton.h> #include <qcheckbox.h> #include <qtabwidget.h> #include <qcombobox.h> #ifdef QWS #include <opie/oprocess.h> #else #define OProcess KProcess #include <kprocess.h> #endif #define WIRELESS_OPTS "/etc/pcmcia/wireless.opts" #define PREUP "/etc/netwrok/if-pre-up.d/wireless-tools" |