summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/mail2/accounteditor.cpp15
-rw-r--r--noncore/unsupported/mail2/accounteditor.h1
-rw-r--r--noncore/unsupported/mail2/accounteditorbase.ui65
-rw-r--r--pics/mail/showpasswd.pngbin0 -> 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
@@ -3,8 +3,11 @@
#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"
@@ -14,8 +17,20 @@ AccountEditor::AccountEditor(Account account, QWidget *parent, const char *name,
{
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()
{
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
@@ -16,4 +16,5 @@ public:
protected slots:
void accept();
+ void showPasswdToggled(bool toggled);
protected:
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
@@ -12,5 +12,5 @@
<x>0</x>
<y>0</y>
- <width>243</width>
+ <width>239</width>
<height>320</height>
</rect>
@@ -66,20 +66,9 @@
<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>&lt;b&gt;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>
@@ -95,9 +84,20 @@
</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>&lt;b&gt;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>
@@ -123,5 +123,28 @@
</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">
@@ -130,5 +153,5 @@
</property>
</widget>
- <widget row="6" column="1" >
+ <widget row="6" column="1" rowspan="1" colspan="2" >
<class>QLineEdit</class>
<property stdset="1">
@@ -192,5 +215,5 @@
</property>
</widget>
- <widget row="3" column="1" >
+ <widget row="3" column="1" rowspan="1" colspan="2" >
<class>QLineEdit</class>
<property stdset="1">
@@ -199,5 +222,5 @@
</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">
@@ -210,5 +233,5 @@
</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">
diff --git a/pics/mail/showpasswd.png b/pics/mail/showpasswd.png
new file mode 100644
index 0000000..7d5c08b
--- a/dev/null
+++ b/pics/mail/showpasswd.png
Binary files differ