author | zautrix <zautrix> | 2004-09-15 06:15:59 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-15 06:15:59 (UTC) |
commit | 35b8948c6c203473866c74f1d13185a848454e04 (patch) (unidiff) | |
tree | b6d8eca9863cbca8e24d474d8c895065faa17458 /kmicromail/settingsdialog.cpp | |
parent | f1f43030eefa765950cb501aece6cc71fb4e9859 (diff) | |
download | kdepimpi-35b8948c6c203473866c74f1d13185a848454e04.zip kdepimpi-35b8948c6c203473866c74f1d13185a848454e04.tar.gz kdepimpi-35b8948c6c203473866c74f1d13185a848454e04.tar.bz2 |
Mail config added
Diffstat (limited to 'kmicromail/settingsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kmicromail/settingsdialog.cpp | 48 |
1 files changed, 44 insertions, 4 deletions
diff --git a/kmicromail/settingsdialog.cpp b/kmicromail/settingsdialog.cpp index 061ea72..c593b48 100644 --- a/kmicromail/settingsdialog.cpp +++ b/kmicromail/settingsdialog.cpp | |||
@@ -1,46 +1,86 @@ | |||
1 | #include <qcheckbox.h> | 1 | #include <qcheckbox.h> |
2 | #include <qspinbox.h> | 2 | #include <qspinbox.h> |
3 | #include <qlayout.h> | ||
4 | #include <qtabwidget.h> | ||
3 | 5 | ||
4 | #include <qpe/config.h> | 6 | #include <kconfig.h> |
7 | #include <kprefs.h> | ||
8 | #include <klocale.h> | ||
9 | #include <kglobal.h> | ||
10 | #include <kfontdialog.h> | ||
5 | 11 | ||
6 | #include "settingsdialog.h" | 12 | #include "settingsdialog.h" |
7 | 13 | ||
8 | 14 | ||
9 | SettingsDialog::SettingsDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) | 15 | SettingsDialog::SettingsDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) |
10 | : SettingsDialogUI( parent, name, modal, fl ) { | 16 | : SettingsDialogUI( parent, name, modal, fl ) { |
11 | 17 | ||
12 | readConfig(); | 18 | #if 0 |
19 | QTabWidget *topFrame = TabWidget2; | ||
20 | |||
21 | QGridLayout *topLayout = new QGridLayout(topFrame,3,3); | ||
22 | topLayout->setSpacing(2); | ||
23 | topLayout->setMargin(3); | ||
24 | KPrefsWidFont * tVFont; | ||
25 | int i = 0; | ||
26 | KPrefsWidFont *timeLabelsFont = | ||
27 | addWidFont(i18n("OK"),i18n("Application(nr):"), | ||
28 | &(mAppFont),topFrame); | ||
29 | topLayout->addWidget(timeLabelsFont->label(),i,0); | ||
30 | topLayout->addWidget(timeLabelsFont->preview(),i,1); | ||
31 | topLayout->addWidget(timeLabelsFont->button(),i,2); | ||
32 | ++i; | ||
33 | |||
34 | |||
35 | timeLabelsFont = | ||
36 | addWidFont(i18n("Mon 15"),i18n("Compose Mail:"), | ||
37 | &(mComposeFont),topFrame); | ||
38 | topLayout->addWidget(timeLabelsFont->label(),i,0); | ||
39 | topLayout->addWidget(timeLabelsFont->preview(),i,1); | ||
40 | topLayout->addWidget(timeLabelsFont->button(),i,2); | ||
41 | ++i; | ||
42 | |||
43 | KPrefsWidFont *timeBarFont = | ||
44 | addWidFont(i18n("Mon 15"),i18n("Read Mail:"), | ||
45 | &(mReadFont),topFrame); | ||
46 | topLayout->addWidget(timeBarFont->label(),i,0); | ||
47 | topLayout->addWidget(timeBarFont->preview(),i,1); | ||
48 | topLayout->addWidget(timeBarFont->button(),i,2); | ||
49 | ++i; | ||
50 | |||
51 | readConfig(); | ||
52 | #endif | ||
13 | } | 53 | } |
14 | 54 | ||
15 | SettingsDialog::~SettingsDialog() { | 55 | SettingsDialog::~SettingsDialog() { |
16 | 56 | ||
17 | } | 57 | } |
18 | 58 | ||
19 | void SettingsDialog::readConfig() { | 59 | void SettingsDialog::readConfig() { |
20 | Config cfg("mail"); | 60 | KConfig cfg = ( locateLocal("config","kopiemailrc" )); |
21 | cfg.setGroup( "Settings" ); | 61 | cfg.setGroup( "Settings" ); |
22 | showHtmlButton->setChecked( cfg.readBoolEntry( "showHtml", false ) ); | 62 | showHtmlButton->setChecked( cfg.readBoolEntry( "showHtml", false ) ); |
23 | cfg.setGroup( "Compose" ); | 63 | cfg.setGroup( "Compose" ); |
24 | checkBoxLater->setChecked( cfg.readBoolEntry( "sendLater", false ) ); | 64 | checkBoxLater->setChecked( cfg.readBoolEntry( "sendLater", false ) ); |
25 | cfg.setGroup( "Applet" ); | 65 | cfg.setGroup( "Applet" ); |
26 | cbEnableTaskbarApplet->setChecked( cfg.readBoolEntry( "Disabled", false ) ); | 66 | cbEnableTaskbarApplet->setChecked( cfg.readBoolEntry( "Disabled", false ) ); |
27 | spCheckOften->setValue( cfg.readNumEntry( "CheckEvery", 5 ) ); | 67 | spCheckOften->setValue( cfg.readNumEntry( "CheckEvery", 5 ) ); |
28 | cbBlinkLed->setChecked( cfg.readBoolEntry( "BlinkLed", true ) ); | 68 | cbBlinkLed->setChecked( cfg.readBoolEntry( "BlinkLed", true ) ); |
29 | cbPlaySound->setChecked( cfg.readBoolEntry( "PlaySound", false ) ); | 69 | cbPlaySound->setChecked( cfg.readBoolEntry( "PlaySound", false ) ); |
30 | 70 | ||
31 | } | 71 | } |
32 | 72 | ||
33 | void SettingsDialog::writeConfig() { | 73 | void SettingsDialog::writeConfig() { |
34 | Config cfg( "mail" ); | 74 | KConfig cfg ( locateLocal("config","kopiemailrc" )); |
35 | cfg.setGroup( "Settings" ); | 75 | cfg.setGroup( "Settings" ); |
36 | cfg.writeEntry( "showHtml", showHtmlButton->isChecked() ); | 76 | cfg.writeEntry( "showHtml", showHtmlButton->isChecked() ); |
37 | cfg.setGroup( "Compose" ); | 77 | cfg.setGroup( "Compose" ); |
38 | cfg.writeEntry( "sendLater", checkBoxLater->isChecked() ); | 78 | cfg.writeEntry( "sendLater", checkBoxLater->isChecked() ); |
39 | cfg.setGroup( "Applet" ); | 79 | cfg.setGroup( "Applet" ); |
40 | cfg.writeEntry( "Disabled", cbEnableTaskbarApplet->isChecked() ); | 80 | cfg.writeEntry( "Disabled", cbEnableTaskbarApplet->isChecked() ); |
41 | cfg.writeEntry( "CheckEvery", spCheckOften->value() ); | 81 | cfg.writeEntry( "CheckEvery", spCheckOften->value() ); |
42 | cfg.writeEntry( "BlinkLed", cbBlinkLed->isChecked() ); | 82 | cfg.writeEntry( "BlinkLed", cbBlinkLed->isChecked() ); |
43 | cfg.writeEntry( "PlaySound", cbPlaySound->isChecked() ); | 83 | cfg.writeEntry( "PlaySound", cbPlaySound->isChecked() ); |
44 | } | 84 | } |
45 | 85 | ||
46 | void SettingsDialog::accept() { | 86 | void SettingsDialog::accept() { |