summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/mail/composemail.cpp11
-rw-r--r--noncore/net/mail/composemailui.ui21
-rw-r--r--noncore/net/mail/settingsdialog.cpp6
-rw-r--r--noncore/net/mail/settingsdialogui.ui48
4 files changed, 77 insertions, 9 deletions
diff --git a/noncore/net/mail/composemail.cpp b/noncore/net/mail/composemail.cpp
index 048fa85..f680f5c 100644
--- a/noncore/net/mail/composemail.cpp
+++ b/noncore/net/mail/composemail.cpp
@@ -2,6 +2,7 @@
2 2
3#include <opie/ofiledialog.h> 3#include <opie/ofiledialog.h>
4#include <qpe/resource.h> 4#include <qpe/resource.h>
5#include <qpe/config.h>
5 6
6#include "composemail.h" 7#include "composemail.h"
7#include "smtpwrapper.h" 8#include "smtpwrapper.h"
@@ -11,6 +12,10 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m
11{ 12{
12 settings = s; 13 settings = s;
13 14
15 Config cfg( "mail" );
16 cfg.setGroup( "Compose" );
17 checkBoxLater->setChecked( cfg.readBoolEntry( "sendLater", false ) );
18
14 attList->addColumn( tr( "Name" ) ); 19 attList->addColumn( tr( "Name" ) );
15 attList->addColumn( tr( "Size" ) ); 20 attList->addColumn( tr( "Size" ) );
16 21
@@ -30,6 +35,7 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m
30 QMessageBox::information( this, tr( "Problem" ), 35 QMessageBox::information( this, tr( "Problem" ),
31 tr( "<p>Please create an SMTP account first.</p>" ), 36 tr( "<p>Please create an SMTP account first.</p>" ),
32 tr( "Ok" ) ); 37 tr( "Ok" ) );
38 return;
33 } 39 }
34 40
35 connect( fromBox, SIGNAL( activated( int ) ), SLOT( fillValues( int ) ) ); 41 connect( fromBox, SIGNAL( activated( int ) ), SLOT( fillValues( int ) ) );
@@ -153,6 +159,11 @@ void ComposeMail::removeAttachment()
153 159
154void ComposeMail::accept() 160void ComposeMail::accept()
155{ 161{
162 if ( checkBoxLater->isChecked() ) {
163 qDebug( "Send later" );
164 }
165
166
156 qDebug( "Sending Mail with " + 167 qDebug( "Sending Mail with " +
157 smtpAccounts.at( fromBox->currentItem() )->getAccountName() ); 168 smtpAccounts.at( fromBox->currentItem() )->getAccountName() );
158 Mail *mail = new Mail(); 169 Mail *mail = new Mail();
diff --git a/noncore/net/mail/composemailui.ui b/noncore/net/mail/composemailui.ui
index 9f5feb9..4d225e4 100644
--- a/noncore/net/mail/composemailui.ui
+++ b/noncore/net/mail/composemailui.ui
@@ -11,7 +11,7 @@
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>264</width> 14 <width>260</width>
15 <height>360</height> 15 <height>360</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
@@ -28,12 +28,23 @@
28 <vbox> 28 <vbox>
29 <property stdset="1"> 29 <property stdset="1">
30 <name>margin</name> 30 <name>margin</name>
31 <number>0</number> 31 <number>3</number>
32 </property> 32 </property>
33 <property stdset="1"> 33 <property stdset="1">
34 <name>spacing</name> 34 <name>spacing</name>
35 <number>0</number> 35 <number>3</number>
36 </property>
37 <widget>
38 <class>QCheckBox</class>
39 <property stdset="1">
40 <name>name</name>
41 <cstring>checkBoxLater</cstring>
36 </property> 42 </property>
43 <property stdset="1">
44 <name>text</name>
45 <string>send later</string>
46 </property>
47 </widget>
37 <widget> 48 <widget>
38 <class>QTabWidget</class> 49 <class>QTabWidget</class>
39 <property stdset="1"> 50 <property stdset="1">
@@ -59,11 +70,11 @@
59 <grid> 70 <grid>
60 <property stdset="1"> 71 <property stdset="1">
61 <name>margin</name> 72 <name>margin</name>
62 <number>4</number> 73 <number>-1</number>
63 </property> 74 </property>
64 <property stdset="1"> 75 <property stdset="1">
65 <name>spacing</name> 76 <name>spacing</name>
66 <number>3</number> 77 <number>-1</number>
67 </property> 78 </property>
68 <widget row="2" column="1" > 79 <widget row="2" column="1" >
69 <class>QLineEdit</class> 80 <class>QLineEdit</class>
diff --git a/noncore/net/mail/settingsdialog.cpp b/noncore/net/mail/settingsdialog.cpp
index 9741e94..f9de405 100644
--- a/noncore/net/mail/settingsdialog.cpp
+++ b/noncore/net/mail/settingsdialog.cpp
@@ -1,4 +1,4 @@
1#include <qradiobutton.h> 1#include <qcheckbox.h>
2 2
3#include <qpe/config.h> 3#include <qpe/config.h>
4 4
@@ -19,12 +19,16 @@ void SettingsDialog::readConfig() {
19 Config cfg("mail"); 19 Config cfg("mail");
20 cfg.setGroup( "Settings" ); 20 cfg.setGroup( "Settings" );
21 showHtmlButton->setChecked( cfg.readBoolEntry( "showHtml", false ) ); 21 showHtmlButton->setChecked( cfg.readBoolEntry( "showHtml", false ) );
22 cfg.setGroup( "Compose" );
23 checkBoxLater->setChecked( cfg.readBoolEntry( "sendLater", false ) );
22} 24}
23 25
24void SettingsDialog::writeConfig() { 26void SettingsDialog::writeConfig() {
25 Config cfg( "mail" ); 27 Config cfg( "mail" );
26 cfg.setGroup( "Settings" ); 28 cfg.setGroup( "Settings" );
27 cfg.writeEntry( "showHtml", showHtmlButton->isChecked() ); 29 cfg.writeEntry( "showHtml", showHtmlButton->isChecked() );
30 cfg.setGroup( "Compose" );
31 cfg.writeEntry( "sendLater", checkBoxLater->isChecked() );;
28 32
29} 33}
30 34
diff --git a/noncore/net/mail/settingsdialogui.ui b/noncore/net/mail/settingsdialogui.ui
index 3b03aeb..c5589dc 100644
--- a/noncore/net/mail/settingsdialogui.ui
+++ b/noncore/net/mail/settingsdialogui.ui
@@ -11,7 +11,7 @@
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>328</width> 14 <width>324</width>
15 <height>379</height> 15 <height>379</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
@@ -66,7 +66,7 @@
66 <number>3</number> 66 <number>3</number>
67 </property> 67 </property>
68 <widget> 68 <widget>
69 <class>QRadioButton</class> 69 <class>QCheckBox</class>
70 <property stdset="1"> 70 <property stdset="1">
71 <name>name</name> 71 <name>name</name>
72 <cstring>showHtmlButton</cstring> 72 <cstring>showHtmlButton</cstring>
@@ -107,8 +107,50 @@
107 </property> 107 </property>
108 <attribute> 108 <attribute>
109 <name>title</name> 109 <name>title</name>
110 <string>Tab 2</string> 110 <string>Compose Mail</string>
111 </attribute> 111 </attribute>
112 <vbox>
113 <property stdset="1">
114 <name>margin</name>
115 <number>3</number>
116 </property>
117 <property stdset="1">
118 <name>spacing</name>
119 <number>3</number>
120 </property>
121 <widget>
122 <class>QCheckBox</class>
123 <property stdset="1">
124 <name>name</name>
125 <cstring>checkBoxLater</cstring>
126 </property>
127 <property stdset="1">
128 <name>text</name>
129 <string>Send mails later ( enqueue in outbox )</string>
130 </property>
131 </widget>
132 <spacer>
133 <property>
134 <name>name</name>
135 <cstring>Spacer2</cstring>
136 </property>
137 <property stdset="1">
138 <name>orientation</name>
139 <enum>Vertical</enum>
140 </property>
141 <property stdset="1">
142 <name>sizeType</name>
143 <enum>Expanding</enum>
144 </property>
145 <property>
146 <name>sizeHint</name>
147 <size>
148 <width>20</width>
149 <height>20</height>
150 </size>
151 </property>
152 </spacer>
153 </vbox>
112 </widget> 154 </widget>
113 </widget> 155 </widget>
114 </vbox> 156 </vbox>