-rw-r--r-- | noncore/unsupported/mail2/passdiag.cpp | 38 | ||||
-rw-r--r-- | noncore/unsupported/mail2/passdiag.h | 21 | ||||
-rw-r--r-- | noncore/unsupported/mail2/passdiagbase.ui | 115 |
3 files changed, 0 insertions, 174 deletions
diff --git a/noncore/unsupported/mail2/passdiag.cpp b/noncore/unsupported/mail2/passdiag.cpp deleted file mode 100644 index d3daa2c..0000000 --- a/noncore/unsupported/mail2/passdiag.cpp +++ b/dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | #include <qmessagebox.h> | ||
2 | #include <qpushbutton.h> | ||
3 | #include <qlineedit.h> | ||
4 | #include <qlabel.h> | ||
5 | |||
6 | #include "passdiag.h" | ||
7 | |||
8 | PassDiag::PassDiag(QString text, QWidget *parent, const char *name, bool modal, WFlags fl) | ||
9 | : PassDiagBase(parent, name, modal, fl) | ||
10 | { | ||
11 | infoLabel->setText(text); | ||
12 | |||
13 | connect(ok, SIGNAL(clicked()), SLOT(accept())); | ||
14 | connect(cancel, SIGNAL(clicked()), SLOT(close())); | ||
15 | } | ||
16 | |||
17 | void PassDiag::accept() | ||
18 | { | ||
19 | if (password->text().isEmpty()) { | ||
20 | QMessageBox::information(this, tr("Error"), tr("<p>You have to enter a password or click on cancel.</p>"), tr("Ok")); | ||
21 | return; | ||
22 | } | ||
23 | |||
24 | QDialog::accept(); | ||
25 | } | ||
26 | |||
27 | QString PassDiag::getPassword(QWidget *parent, QString text) | ||
28 | { | ||
29 | PassDiag *diag = new PassDiag(text, parent, 0, true); | ||
30 | diag->show(); | ||
31 | |||
32 | if (QDialog::Accepted == diag->exec()) { | ||
33 | return diag->password->text(); | ||
34 | } | ||
35 | |||
36 | return 0; | ||
37 | } | ||
38 | |||
diff --git a/noncore/unsupported/mail2/passdiag.h b/noncore/unsupported/mail2/passdiag.h deleted file mode 100644 index b611dd5..0000000 --- a/noncore/unsupported/mail2/passdiag.h +++ b/dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | #ifndef PASSDIAG_H | ||
2 | #define PASSDIAG_H | ||
3 | |||
4 | #include "passdiagbase.h" | ||
5 | |||
6 | class PassDiag : public PassDiagBase | ||
7 | { | ||
8 | Q_OBJECT | ||
9 | |||
10 | public: | ||
11 | static QString getPassword(QWidget *parent, QString text); | ||
12 | |||
13 | protected: | ||
14 | PassDiag(QString text, QWidget *parent, const char *name = 0, bool modal = false, WFlags fl = 0); | ||
15 | |||
16 | protected slots: | ||
17 | void accept(); | ||
18 | |||
19 | }; | ||
20 | |||
21 | #endif | ||
diff --git a/noncore/unsupported/mail2/passdiagbase.ui b/noncore/unsupported/mail2/passdiagbase.ui deleted file mode 100644 index daf8bad..0000000 --- a/noncore/unsupported/mail2/passdiagbase.ui +++ b/dev/null | |||
@@ -1,115 +0,0 @@ | |||
1 | <!DOCTYPE UI><UI> | ||
2 | <class>PassDiagBase</class> | ||
3 | <widget> | ||
4 | <class>QDialog</class> | ||
5 | <property stdset="1"> | ||
6 | <name>name</name> | ||
7 | <cstring>PassDiagBase</cstring> | ||
8 | </property> | ||
9 | <property stdset="1"> | ||
10 | <name>geometry</name> | ||
11 | <rect> | ||
12 | <x>0</x> | ||
13 | <y>0</y> | ||
14 | <width>216</width> | ||
15 | <height>120</height> | ||
16 | </rect> | ||
17 | </property> | ||
18 | <property stdset="1"> | ||
19 | <name>caption</name> | ||
20 | <string>Enter your Password</string> | ||
21 | </property> | ||
22 | <property> | ||
23 | <name>layoutMargin</name> | ||
24 | </property> | ||
25 | <property> | ||
26 | <name>layoutSpacing</name> | ||
27 | </property> | ||
28 | <grid> | ||
29 | <property stdset="1"> | ||
30 | <name>margin</name> | ||
31 | <number>4</number> | ||
32 | </property> | ||
33 | <property stdset="1"> | ||
34 | <name>spacing</name> | ||
35 | <number>3</number> | ||
36 | </property> | ||
37 | <widget row="0" column="0" rowspan="1" colspan="4" > | ||
38 | <class>QLabel</class> | ||
39 | <property stdset="1"> | ||
40 | <name>name</name> | ||
41 | <cstring>infoLabel</cstring> | ||
42 | </property> | ||
43 | <property stdset="1"> | ||
44 | <name>text</name> | ||
45 | <string>Please enter your GPG passphrase:</string> | ||
46 | </property> | ||
47 | </widget> | ||
48 | <widget row="1" column="0" rowspan="1" colspan="4" > | ||
49 | <class>QLineEdit</class> | ||
50 | <property stdset="1"> | ||
51 | <name>name</name> | ||
52 | <cstring>password</cstring> | ||
53 | </property> | ||
54 | <property stdset="1"> | ||
55 | <name>echoMode</name> | ||
56 | <enum>Password</enum> | ||
57 | </property> | ||
58 | </widget> | ||
59 | <widget row="2" column="0" rowspan="1" colspan="4" > | ||
60 | <class>QCheckBox</class> | ||
61 | <property stdset="1"> | ||
62 | <name>name</name> | ||
63 | <cstring>showPasswd</cstring> | ||
64 | </property> | ||
65 | <property stdset="1"> | ||
66 | <name>text</name> | ||
67 | <string>Show Password</string> | ||
68 | </property> | ||
69 | </widget> | ||
70 | <widget row="4" column="1" > | ||
71 | <class>QPushButton</class> | ||
72 | <property stdset="1"> | ||
73 | <name>name</name> | ||
74 | <cstring>ok</cstring> | ||
75 | </property> | ||
76 | <property stdset="1"> | ||
77 | <name>text</name> | ||
78 | <string>Ok</string> | ||
79 | </property> | ||
80 | </widget> | ||
81 | <widget row="4" column="2" > | ||
82 | <class>QPushButton</class> | ||
83 | <property stdset="1"> | ||
84 | <name>name</name> | ||
85 | <cstring>cancel</cstring> | ||
86 | </property> | ||
87 | <property stdset="1"> | ||
88 | <name>text</name> | ||
89 | <string>Cancel</string> | ||
90 | </property> | ||
91 | </widget> | ||
92 | <spacer row="3" column="2" > | ||
93 | <property> | ||
94 | <name>name</name> | ||
95 | <cstring>Spacer3</cstring> | ||
96 | </property> | ||
97 | <property stdset="1"> | ||
98 | <name>orientation</name> | ||
99 | <enum>Vertical</enum> | ||
100 | </property> | ||
101 | <property stdset="1"> | ||
102 | <name>sizeType</name> | ||
103 | <enum>Expanding</enum> | ||
104 | </property> | ||
105 | <property> | ||
106 | <name>sizeHint</name> | ||
107 | <size> | ||
108 | <width>20</width> | ||
109 | <height>20</height> | ||
110 | </size> | ||
111 | </property> | ||
112 | </spacer> | ||
113 | </grid> | ||
114 | </widget> | ||
115 | </UI> | ||