-rw-r--r-- | noncore/net/mail/composemail.cpp | 11 | ||||
-rw-r--r-- | noncore/net/mail/composemailui.ui | 21 | ||||
-rw-r--r-- | noncore/net/mail/settingsdialog.cpp | 6 | ||||
-rw-r--r-- | noncore/net/mail/settingsdialogui.ui | 48 |
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 @@ -3,4 +3,5 @@ #include <opie/ofiledialog.h> #include <qpe/resource.h> +#include <qpe/config.h> #include "composemail.h" @@ -12,4 +13,8 @@ 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" ) ); @@ -31,4 +36,5 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m tr( "<p>Please create an SMTP account first.</p>" ), tr( "Ok" ) ); + return; } @@ -154,4 +160,9 @@ void ComposeMail::removeAttachment() void ComposeMail::accept() { + if ( checkBoxLater->isChecked() ) { + qDebug( "Send later" ); + } + + qDebug( "Sending Mail with " + smtpAccounts.at( fromBox->currentItem() )->getAccountName() ); 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 @@ -12,5 +12,5 @@ <x>0</x> <y>0</y> - <width>264</width> + <width>260</width> <height>360</height> </rect> @@ -29,10 +29,21 @@ <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> @@ -60,9 +71,9 @@ <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" > 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,3 +1,3 @@ -#include <qradiobutton.h> +#include <qcheckbox.h> #include <qpe/config.h> @@ -20,4 +20,6 @@ void SettingsDialog::readConfig() { cfg.setGroup( "Settings" ); showHtmlButton->setChecked( cfg.readBoolEntry( "showHtml", false ) ); + cfg.setGroup( "Compose" ); + checkBoxLater->setChecked( cfg.readBoolEntry( "sendLater", false ) ); } @@ -26,4 +28,6 @@ void SettingsDialog::writeConfig() { 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 @@ -12,5 +12,5 @@ <x>0</x> <y>0</y> - <width>328</width> + <width>324</width> <height>379</height> </rect> @@ -67,5 +67,5 @@ </property> <widget> - <class>QRadioButton</class> + <class>QCheckBox</class> <property stdset="1"> <name>name</name> @@ -108,6 +108,48 @@ <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> |