summaryrefslogtreecommitdiffabout
path: root/kmicromail/settingsdialog.cpp
authorzautrix <zautrix>2004-07-03 16:33:12 (UTC)
committer zautrix <zautrix>2004-07-03 16:33:12 (UTC)
commite3b89230f065c48c84b48c88edb6eb088374c487 (patch) (unidiff)
tree162ea2ef909a6f82ccfcedf45d80d6c821174912 /kmicromail/settingsdialog.cpp
parent2dd6ac0b2d24c91d35ce674a6c26351352df2b15 (diff)
downloadkdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.zip
kdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.tar.gz
kdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.tar.bz2
Initial revision
Diffstat (limited to 'kmicromail/settingsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/settingsdialog.cpp49
1 files changed, 49 insertions, 0 deletions
diff --git a/kmicromail/settingsdialog.cpp b/kmicromail/settingsdialog.cpp
new file mode 100644
index 0000000..061ea72
--- a/dev/null
+++ b/kmicromail/settingsdialog.cpp
@@ -0,0 +1,49 @@
1#include <qcheckbox.h>
2#include <qspinbox.h>
3
4#include <qpe/config.h>
5
6#include "settingsdialog.h"
7
8
9SettingsDialog::SettingsDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
10 : SettingsDialogUI( parent, name, modal, fl ) {
11
12 readConfig();
13}
14
15SettingsDialog::~SettingsDialog() {
16
17}
18
19void SettingsDialog::readConfig() {
20 Config cfg("mail");
21 cfg.setGroup( "Settings" );
22 showHtmlButton->setChecked( cfg.readBoolEntry( "showHtml", false ) );
23 cfg.setGroup( "Compose" );
24 checkBoxLater->setChecked( cfg.readBoolEntry( "sendLater", false ) );
25 cfg.setGroup( "Applet" );
26 cbEnableTaskbarApplet->setChecked( cfg.readBoolEntry( "Disabled", false ) );
27 spCheckOften->setValue( cfg.readNumEntry( "CheckEvery", 5 ) );
28 cbBlinkLed->setChecked( cfg.readBoolEntry( "BlinkLed", true ) );
29 cbPlaySound->setChecked( cfg.readBoolEntry( "PlaySound", false ) );
30
31}
32
33void SettingsDialog::writeConfig() {
34 Config cfg( "mail" );
35 cfg.setGroup( "Settings" );
36 cfg.writeEntry( "showHtml", showHtmlButton->isChecked() );
37 cfg.setGroup( "Compose" );
38 cfg.writeEntry( "sendLater", checkBoxLater->isChecked() );
39 cfg.setGroup( "Applet" );
40 cfg.writeEntry( "Disabled", cbEnableTaskbarApplet->isChecked() );
41 cfg.writeEntry( "CheckEvery", spCheckOften->value() );
42 cfg.writeEntry( "BlinkLed", cbBlinkLed->isChecked() );
43 cfg.writeEntry( "PlaySound", cbPlaySound->isChecked() );
44}
45
46void SettingsDialog::accept() {
47 writeConfig();
48 QDialog::accept();
49}