From 0996b7f1bcbdb05db00eadb0cdd60b2066cdd899 Mon Sep 17 00:00:00 2001 From: conber Date: Thu, 20 Jun 2002 17:19:56 +0000 Subject: little usability improvement in accounteditor --- (limited to 'noncore/unsupported/mail2') 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 @@ -2,10 +2,13 @@ #include #include #include +#include #include #include #include +#include + #include "accounteditor.h" #include "miscfunctions.h" @@ -13,10 +16,22 @@ AccountEditor::AccountEditor(Account account, QWidget *parent, const char *name, : 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; 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 @@ -15,6 +15,7 @@ public: 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 @@ -11,7 +11,7 @@ 0 0 - 243 + 239 320 @@ -65,22 +65,11 @@ spacing 3 - - QLabel - - name - TextLabel2 - - - text - <b>IMAP: - - - + QLineEdit name - imapServer + imapPort @@ -94,11 +83,22 @@ <b>Port: - + + QLabel + + name + TextLabel2 + + + text + <b>IMAP: + + + QLineEdit name - imapPort + imapServer @@ -122,14 +122,37 @@ - + + QToolButton + + name + showPasswd + + + text + [--] + + + pixmap + + + + toggleButton + true + + + toggleButton + true + + + QLineEdit name smtpPort - + QLineEdit name @@ -191,14 +214,14 @@ Password - + QLineEdit name user - + Line name @@ -209,7 +232,7 @@ Horizontal - + Line name -- cgit v0.9.0.2