summaryrefslogtreecommitdiff
path: root/noncore/net
authorharlekin <harlekin>2003-12-21 13:29:48 (UTC)
committer harlekin <harlekin>2003-12-21 13:29:48 (UTC)
commit1281563b998508efeaa63739fb2c7c92e8316e9c (patch) (side-by-side diff)
treeff9aa7202b0fa81e0eec727414aef69ba82b7780 /noncore/net
parent228ff69db6e535a872a0f397ba157f832567af80 (diff)
downloadopie-1281563b998508efeaa63739fb2c7c92e8316e9c.zip
opie-1281563b998508efeaa63739fb2c7c92e8316e9c.tar.gz
opie-1281563b998508efeaa63739fb2c7c92e8316e9c.tar.bz2
send mail later/ enqueue gui side implementation
Diffstat (limited to 'noncore/net') (more/less context) (ignore 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.ui50
4 files changed, 78 insertions, 10 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
@@ -1,8 +1,9 @@
#include <qt.h>
#include <opie/ofiledialog.h>
#include <qpe/resource.h>
+#include <qpe/config.h>
#include "composemail.h"
#include "smtpwrapper.h"
@@ -10,8 +11,12 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m
: ComposeMailUI( parent, name, modal, flags )
{
settings = s;
+ Config cfg( "mail" );
+ cfg.setGroup( "Compose" );
+ checkBoxLater->setChecked( cfg.readBoolEntry( "sendLater", false ) );
+
attList->addColumn( tr( "Name" ) );
attList->addColumn( tr( "Size" ) );
QList<Account> accounts = settings->getAccounts();
@@ -29,8 +34,9 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m
} else {
QMessageBox::information( this, tr( "Problem" ),
tr( "<p>Please create an SMTP account first.</p>" ),
tr( "Ok" ) );
+ return;
}
connect( fromBox, SIGNAL( activated( int ) ), SLOT( fillValues( int ) ) );
connect( toButton, SIGNAL( clicked() ), SLOT( pickAddressTo() ) );
@@ -152,8 +158,13 @@ void ComposeMail::removeAttachment()
}
void ComposeMail::accept()
{
+ if ( checkBoxLater->isChecked() ) {
+ qDebug( "Send later" );
+ }
+
+
qDebug( "Sending Mail with " +
smtpAccounts.at( fromBox->currentItem() )->getAccountName() );
Mail *mail = new Mail();
SMTPaccount *smtp = smtpAccounts.at( fromBox->currentItem() );
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
@@ -10,9 +10,9 @@
<name>geometry</name>
<rect>
<x>0</x>
<y>0</y>
- <width>264</width>
+ <width>260</width>
<height>360</height>
</rect>
</property>
<property stdset="1">
@@ -27,15 +27,26 @@
</property>
<vbox>
<property stdset="1">
<name>margin</name>
- <number>0</number>
+ <number>3</number>
</property>
<property stdset="1">
<name>spacing</name>
- <number>0</number>
+ <number>3</number>
</property>
<widget>
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>checkBoxLater</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>send later</string>
+ </property>
+ </widget>
+ <widget>
<class>QTabWidget</class>
<property stdset="1">
<name>name</name>
<cstring>tabWidget</cstring>
@@ -58,13 +69,13 @@
</attribute>
<grid>
<property stdset="1">
<name>margin</name>
- <number>4</number>
+ <number>-1</number>
</property>
<property stdset="1">
<name>spacing</name>
- <number>3</number>
+ <number>-1</number>
</property>
<widget row="2" column="1" >
<class>QLineEdit</class>
<property stdset="1">
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,5 +1,5 @@
-#include <qradiobutton.h>
+#include <qcheckbox.h>
#include <qpe/config.h>
#include "settingsdialog.h"
@@ -18,14 +18,18 @@ SettingsDialog::~SettingsDialog() {
void SettingsDialog::readConfig() {
Config cfg("mail");
cfg.setGroup( "Settings" );
showHtmlButton->setChecked( cfg.readBoolEntry( "showHtml", false ) );
+ cfg.setGroup( "Compose" );
+ checkBoxLater->setChecked( cfg.readBoolEntry( "sendLater", false ) );
}
void SettingsDialog::writeConfig() {
Config cfg( "mail" );
cfg.setGroup( "Settings" );
cfg.writeEntry( "showHtml", showHtmlButton->isChecked() );
+ cfg.setGroup( "Compose" );
+ cfg.writeEntry( "sendLater", checkBoxLater->isChecked() );;
}
void SettingsDialog::accept() {
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
@@ -10,9 +10,9 @@
<name>geometry</name>
<rect>
<x>0</x>
<y>0</y>
- <width>328</width>
+ <width>324</width>
<height>379</height>
</rect>
</property>
<property stdset="1">
@@ -65,16 +65,16 @@
<name>spacing</name>
<number>3</number>
</property>
<widget>
- <class>QRadioButton</class>
+ <class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>showHtmlButton</cstring>
</property>
<property stdset="1">
<name>text</name>
- <string>View mail as Html </string>
+ <string>View mail as Html</string>
</property>
</widget>
<spacer>
<property>
@@ -106,10 +106,52 @@
<cstring>tab</cstring>
</property>
<attribute>
<name>title</name>
- <string>Tab 2</string>
+ <string>Compose Mail</string>
</attribute>
+ <vbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>3</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>3</number>
+ </property>
+ <widget>
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>checkBoxLater</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Send mails later ( enqueue in outbox )</string>
+ </property>
+ </widget>
+ <spacer>
+ <property>
+ <name>name</name>
+ <cstring>Spacer2</cstring>
+ </property>
+ <property stdset="1">
+ <name>orientation</name>
+ <enum>Vertical</enum>
+ </property>
+ <property stdset="1">
+ <name>sizeType</name>
+ <enum>Expanding</enum>
+ </property>
+ <property>
+ <name>sizeHint</name>
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
</widget>
</widget>
</vbox>
</widget>