summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/settingsdialog.cpp34
-rw-r--r--noncore/net/mail/settingsdialog.h29
-rw-r--r--noncore/net/mail/settingsdialogui.ui116
-rw-r--r--noncore/net/mail/statuswidget.cpp33
-rw-r--r--noncore/net/mail/statuswidget.h24
-rw-r--r--noncore/net/mail/statuswidgetui.ui71
6 files changed, 307 insertions, 0 deletions
diff --git a/noncore/net/mail/settingsdialog.cpp b/noncore/net/mail/settingsdialog.cpp
new file mode 100644
index 0000000..9741e94
--- a/dev/null
+++ b/noncore/net/mail/settingsdialog.cpp
@@ -0,0 +1,34 @@
1#include <qradiobutton.h>
2
3#include <qpe/config.h>
4
5#include "settingsdialog.h"
6
7
8SettingsDialog::SettingsDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
9 : SettingsDialogUI( parent, name, modal, fl ) {
10
11 readConfig();
12}
13
14SettingsDialog::~SettingsDialog() {
15
16}
17
18void SettingsDialog::readConfig() {
19 Config cfg("mail");
20 cfg.setGroup( "Settings" );
21 showHtmlButton->setChecked( cfg.readBoolEntry( "showHtml", false ) );
22}
23
24void SettingsDialog::writeConfig() {
25 Config cfg( "mail" );
26 cfg.setGroup( "Settings" );
27 cfg.writeEntry( "showHtml", showHtmlButton->isChecked() );
28
29}
30
31void SettingsDialog::accept() {
32 writeConfig();
33 QDialog::accept();
34}
diff --git a/noncore/net/mail/settingsdialog.h b/noncore/net/mail/settingsdialog.h
new file mode 100644
index 0000000..6b4d456
--- a/dev/null
+++ b/noncore/net/mail/settingsdialog.h
@@ -0,0 +1,29 @@
1#ifndef SETTINGS_DIALOG_H
2#define SETTINGS_DIALOG_H
3
4#include <qwidget.h>
5
6#include "settingsdialogui.h"
7
8class SettingsDialog : public SettingsDialogUI {
9
10Q_OBJECT
11
12public:
13 SettingsDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
14 ~SettingsDialog();
15
16private:
17 void readConfig();
18 void writeConfig();
19
20
21private slots:
22 void accept();
23
24
25};
26
27
28
29#endif
diff --git a/noncore/net/mail/settingsdialogui.ui b/noncore/net/mail/settingsdialogui.ui
new file mode 100644
index 0000000..3b03aeb
--- a/dev/null
+++ b/noncore/net/mail/settingsdialogui.ui
@@ -0,0 +1,116 @@
1<!DOCTYPE UI><UI>
2<class>SettingsDialogUI</class>
3<widget>
4 <class>QDialog</class>
5 <property stdset="1">
6 <name>name</name>
7 <cstring>SettingsDialogUI</cstring>
8 </property>
9 <property stdset="1">
10 <name>geometry</name>
11 <rect>
12 <x>0</x>
13 <y>0</y>
14 <width>328</width>
15 <height>379</height>
16 </rect>
17 </property>
18 <property stdset="1">
19 <name>caption</name>
20 <string>Settings Dialog</string>
21 </property>
22 <property>
23 <name>layoutMargin</name>
24 </property>
25 <property>
26 <name>layoutSpacing</name>
27 </property>
28 <vbox>
29 <property stdset="1">
30 <name>margin</name>
31 <number>3</number>
32 </property>
33 <property stdset="1">
34 <name>spacing</name>
35 <number>3</number>
36 </property>
37 <widget>
38 <class>QTabWidget</class>
39 <property stdset="1">
40 <name>name</name>
41 <cstring>TabWidget2</cstring>
42 </property>
43 <property>
44 <name>layoutMargin</name>
45 </property>
46 <property>
47 <name>layoutSpacing</name>
48 </property>
49 <widget>
50 <class>QWidget</class>
51 <property stdset="1">
52 <name>name</name>
53 <cstring>tab</cstring>
54 </property>
55 <attribute>
56 <name>title</name>
57 <string>View Mail</string>
58 </attribute>
59 <vbox>
60 <property stdset="1">
61 <name>margin</name>
62 <number>3</number>
63 </property>
64 <property stdset="1">
65 <name>spacing</name>
66 <number>3</number>
67 </property>
68 <widget>
69 <class>QRadioButton</class>
70 <property stdset="1">
71 <name>name</name>
72 <cstring>showHtmlButton</cstring>
73 </property>
74 <property stdset="1">
75 <name>text</name>
76 <string>View mail as Html </string>
77 </property>
78 </widget>
79 <spacer>
80 <property>
81 <name>name</name>
82 <cstring>Spacer1</cstring>
83 </property>
84 <property stdset="1">
85 <name>orientation</name>
86 <enum>Vertical</enum>
87 </property>
88 <property stdset="1">
89 <name>sizeType</name>
90 <enum>Expanding</enum>
91 </property>
92 <property>
93 <name>sizeHint</name>
94 <size>
95 <width>20</width>
96 <height>20</height>
97 </size>
98 </property>
99 </spacer>
100 </vbox>
101 </widget>
102 <widget>
103 <class>QWidget</class>
104 <property stdset="1">
105 <name>name</name>
106 <cstring>tab</cstring>
107 </property>
108 <attribute>
109 <name>title</name>
110 <string>Tab 2</string>
111 </attribute>
112 </widget>
113 </widget>
114 </vbox>
115</widget>
116</UI>
diff --git a/noncore/net/mail/statuswidget.cpp b/noncore/net/mail/statuswidget.cpp
new file mode 100644
index 0000000..19cf635
--- a/dev/null
+++ b/noncore/net/mail/statuswidget.cpp
@@ -0,0 +1,33 @@
1#include <qtimer.h>
2#include <qprogressbar.h>
3#include <qlabel.h>
4
5#include "statuswidget.h"
6
7// the current problem I see is "locking": used exclusive by one sender
8
9
10StatusWidget::StatusWidget( QWidget* parent, const char* name,WFlags fl )
11 : StatusWidgetUI( parent, name, fl ) {
12
13 setMaximumHeight( 15 );
14 // hide for now since nothing reports decent progress data yet.
15 statusProgress->hide();
16 }
17
18StatusWidget::~StatusWidget() {
19}
20
21void StatusWidget::setText( const QString& text ) {
22 show();
23 statusText->setText( text );
24 QTimer::singleShot( 5000, this, SLOT( hide() ) );
25}
26
27void StatusWidget::setProgress( int progress ) {
28 show();
29 statusProgress->setProgress( progress );
30 if ( progress == 100 ) {
31 hide();
32 }
33}
diff --git a/noncore/net/mail/statuswidget.h b/noncore/net/mail/statuswidget.h
new file mode 100644
index 0000000..73f0d75
--- a/dev/null
+++ b/noncore/net/mail/statuswidget.h
@@ -0,0 +1,24 @@
1#ifndef STATUS_WIDGET_H
2#define STATUS_WIDGET_H
3
4#include <qwidget.h>
5#include "statuswidgetui.h"
6
7class StatusWidget : public StatusWidgetUI {
8
9Q_OBJECT
10
11public:
12 StatusWidget( QWidget* parent = 0, const char* name = 0,WFlags fl = 0 );
13 ~StatusWidget();
14
15
16public slots:
17
18 void setText( const QString& text );
19 void setProgress( int progress );
20};
21
22
23#endif
24
diff --git a/noncore/net/mail/statuswidgetui.ui b/noncore/net/mail/statuswidgetui.ui
new file mode 100644
index 0000000..ffe3528
--- a/dev/null
+++ b/noncore/net/mail/statuswidgetui.ui
@@ -0,0 +1,71 @@
1<!DOCTYPE UI><UI>
2<class>StatusWidgetUI</class>
3<widget>
4 <class>QWidget</class>
5 <property stdset="1">
6 <name>name</name>
7 <cstring>StatusWidgetUI</cstring>
8 </property>
9 <property stdset="1">
10 <name>geometry</name>
11 <rect>
12 <x>0</x>
13 <y>0</y>
14 <width>596</width>
15 <height>480</height>
16 </rect>
17 </property>
18 <property stdset="1">
19 <name>caption</name>
20 <string>Form1</string>
21 </property>
22 <property>
23 <name>layoutMargin</name>
24 </property>
25 <property>
26 <name>layoutSpacing</name>
27 </property>
28 <hbox>
29 <property stdset="1">
30 <name>margin</name>
31 <number>3</number>
32 </property>
33 <property stdset="1">
34 <name>spacing</name>
35 <number>3</number>
36 </property>
37 <widget>
38 <class>QProgressBar</class>
39 <property stdset="1">
40 <name>name</name>
41 <cstring>statusProgress</cstring>
42 </property>
43 <property stdset="1">
44 <name>sizePolicy</name>
45 <sizepolicy>
46 <hsizetype>5</hsizetype>
47 <vsizetype>0</vsizetype>
48 </sizepolicy>
49 </property>
50 </widget>
51 <widget>
52 <class>QLabel</class>
53 <property stdset="1">
54 <name>name</name>
55 <cstring>statusText</cstring>
56 </property>
57 <property stdset="1">
58 <name>sizePolicy</name>
59 <sizepolicy>
60 <hsizetype>5</hsizetype>
61 <vsizetype>1</vsizetype>
62 </sizepolicy>
63 </property>
64 <property stdset="1">
65 <name>text</name>
66 <string>TextLabel1</string>
67 </property>
68 </widget>
69 </hbox>
70</widget>
71</UI>