From 1281563b998508efeaa63739fb2c7c92e8316e9c Mon Sep 17 00:00:00 2001 From: harlekin Date: Sun, 21 Dec 2003 13:29:48 +0000 Subject: send mail later/ enqueue gui side implementation --- 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 @@ #include #include +#include #include "composemail.h" #include "smtpwrapper.h" @@ -11,6 +12,10 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m { settings = s; + Config cfg( "mail" ); + cfg.setGroup( "Compose" ); + checkBoxLater->setChecked( cfg.readBoolEntry( "sendLater", false ) ); + attList->addColumn( tr( "Name" ) ); attList->addColumn( tr( "Size" ) ); @@ -30,6 +35,7 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m QMessageBox::information( this, tr( "Problem" ), tr( "

Please create an SMTP account first.

" ), tr( "Ok" ) ); + return; } connect( fromBox, SIGNAL( activated( int ) ), SLOT( fillValues( int ) ) ); @@ -153,6 +159,11 @@ 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(); 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 @@ 0 0 - 264 + 260 360 @@ -28,13 +28,24 @@ margin - 0 + 3 spacing - 0 + 3 + QCheckBox + + name + checkBoxLater + + + text + send later + + + QTabWidget name @@ -59,11 +70,11 @@ margin - 4 + -1 spacing - 3 + -1 QLineEdit 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 @@ -#include +#include #include @@ -19,12 +19,16 @@ 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() );; } 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 @@ 0 0 - 328 + 324 379 @@ -66,14 +66,14 @@ 3 - QRadioButton + QCheckBox name showHtmlButton text - View mail as Html + View mail as Html @@ -107,8 +107,50 @@ title - Tab 2 + Compose Mail + + + margin + 3 + + + spacing + 3 + + + QCheckBox + + name + checkBoxLater + + + text + Send mails later ( enqueue in outbox ) + + + + + name + Spacer2 + + + orientation + Vertical + + + sizeType + Expanding + + + sizeHint + + 20 + 20 + + + + -- cgit v0.9.0.2