author | conber <conber> | 2002-06-20 17:19:56 (UTC) |
---|---|---|
committer | conber <conber> | 2002-06-20 17:19:56 (UTC) |
commit | 0996b7f1bcbdb05db00eadb0cdd60b2066cdd899 (patch) (side-by-side diff) | |
tree | d2b3d8dc734c5957bb4ed86dbca80ce8e975a5e6 | |
parent | e0eec50bf3992d95d7060af74fa98e9630abfa4e (diff) | |
download | opie-0996b7f1bcbdb05db00eadb0cdd60b2066cdd899.zip opie-0996b7f1bcbdb05db00eadb0cdd60b2066cdd899.tar.gz opie-0996b7f1bcbdb05db00eadb0cdd60b2066cdd899.tar.bz2 |
little usability improvement in accounteditor
-rw-r--r-- | noncore/unsupported/mail2/accounteditor.cpp | 15 | ||||
-rw-r--r-- | noncore/unsupported/mail2/accounteditor.h | 1 | ||||
-rw-r--r-- | noncore/unsupported/mail2/accounteditorbase.ui | 65 | ||||
-rw-r--r-- | pics/mail/showpasswd.png | bin | 0 -> 217 bytes |
4 files changed, 60 insertions, 21 deletions
diff --git a/noncore/unsupported/mail2/accounteditor.cpp b/noncore/unsupported/mail2/accounteditor.cpp index 8230a69..5d80693 100644 --- a/noncore/unsupported/mail2/accounteditor.cpp +++ b/noncore/unsupported/mail2/accounteditor.cpp @@ -1,23 +1,38 @@ #include <qmultilineedit.h> #include <qbuttongroup.h> #include <qradiobutton.h> #include <qmessagebox.h> +#include <qtoolbutton.h> #include <qtabwidget.h> #include <qlineedit.h> #include <qcheckbox.h> +#include <qpe/resource.h> + #include "accounteditor.h" #include "miscfunctions.h" AccountEditor::AccountEditor(Account account, QWidget *parent, const char *name, bool modal, WFlags fl) : AccountEditorBase(parent, name, modal, fl), _account(account) { TabWidget2->removePage(sslTab); + showPasswd->setPixmap(Resource::loadPixmap("mail/showpasswd")); + + connect(showPasswd, SIGNAL(toggled(bool)), + SLOT(showPasswdToggled(bool))); fillValues(); } +void AccountEditor::showPasswdToggled(bool toggled) +{ + if (toggled) + pass->setEchoMode(QLineEdit::Normal); + else + pass->setEchoMode(QLineEdit::Password); +} + void AccountEditor::accept() { int numLf = 0; for (unsigned int i = 0; i <= signature->text().length(); i++) { diff --git a/noncore/unsupported/mail2/accounteditor.h b/noncore/unsupported/mail2/accounteditor.h index 4a2bda3..9acca2d 100644 --- a/noncore/unsupported/mail2/accounteditor.h +++ b/noncore/unsupported/mail2/accounteditor.h @@ -14,8 +14,9 @@ public: Account _account; protected slots: void accept(); + void showPasswdToggled(bool toggled); protected: void fillValues(); diff --git a/noncore/unsupported/mail2/accounteditorbase.ui b/noncore/unsupported/mail2/accounteditorbase.ui index fe9f2a4..8341e72 100644 --- a/noncore/unsupported/mail2/accounteditorbase.ui +++ b/noncore/unsupported/mail2/accounteditorbase.ui @@ -10,9 +10,9 @@ <name>geometry</name> <rect> <x>0</x> <y>0</y> - <width>243</width> + <width>239</width> <height>320</height> </rect> </property> <property stdset="1"> @@ -64,24 +64,13 @@ <property stdset="1"> <name>spacing</name> <number>3</number> </property> - <widget row="0" column="0" > - <class>QLabel</class> - <property stdset="1"> - <name>name</name> - <cstring>TextLabel2</cstring> - </property> - <property stdset="1"> - <name>text</name> - <string><b>IMAP:</string> - </property> - </widget> - <widget row="0" column="1" > + <widget row="1" column="1" rowspan="1" colspan="2" > <class>QLineEdit</class> <property stdset="1"> <name>name</name> - <cstring>imapServer</cstring> + <cstring>imapPort</cstring> </property> </widget> <widget row="1" column="0" > <class>QLabel</class> @@ -93,13 +82,24 @@ <name>text</name> <string><b>Port:</string> </property> </widget> - <widget row="1" column="1" > + <widget row="0" column="0" > + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>TextLabel2</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string><b>IMAP:</string> + </property> + </widget> + <widget row="0" column="1" rowspan="1" colspan="2" > <class>QLineEdit</class> <property stdset="1"> <name>name</name> - <cstring>imapPort</cstring> + <cstring>imapServer</cstring> </property> </widget> <spacer row="8" column="1" > <property> @@ -121,16 +121,39 @@ <height>20</height> </size> </property> </spacer> - <widget row="7" column="1" > + <widget row="4" column="2" > + <class>QToolButton</class> + <property stdset="1"> + <name>name</name> + <cstring>showPasswd</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>[--]</string> + </property> + <property stdset="1"> + <name>pixmap</name> + <pixmap></pixmap> + </property> + <property stdset="1"> + <name>toggleButton</name> + <bool>true</bool> + </property> + <property stdset="1"> + <name>toggleButton</name> + <bool>true</bool> + </property> + </widget> + <widget row="7" column="1" rowspan="1" colspan="2" > <class>QLineEdit</class> <property stdset="1"> <name>name</name> <cstring>smtpPort</cstring> </property> </widget> - <widget row="6" column="1" > + <widget row="6" column="1" rowspan="1" colspan="2" > <class>QLineEdit</class> <property stdset="1"> <name>name</name> <cstring>smtpServer</cstring> @@ -190,16 +213,16 @@ <name>echoMode</name> <enum>Password</enum> </property> </widget> - <widget row="3" column="1" > + <widget row="3" column="1" rowspan="1" colspan="2" > <class>QLineEdit</class> <property stdset="1"> <name>name</name> <cstring>user</cstring> </property> </widget> - <widget row="2" column="0" rowspan="1" colspan="2" > + <widget row="2" column="0" rowspan="1" colspan="3" > <class>Line</class> <property stdset="1"> <name>name</name> <cstring>Line1</cstring> @@ -208,9 +231,9 @@ <name>orientation</name> <enum>Horizontal</enum> </property> </widget> - <widget row="5" column="0" rowspan="1" colspan="2" > + <widget row="5" column="0" rowspan="1" colspan="3" > <class>Line</class> <property stdset="1"> <name>name</name> <cstring>Line2</cstring> diff --git a/pics/mail/showpasswd.png b/pics/mail/showpasswd.png Binary files differnew file mode 100644 index 0000000..7d5c08b --- a/dev/null +++ b/pics/mail/showpasswd.png |