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,7 +1,13 @@ | |||
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 | ||
@@ -9,7 +15,41 @@ | |||
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() { |
@@ -17,7 +57,7 @@ SettingsDialog::~SettingsDialog() { | |||
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" ); |
@@ -31,7 +71,7 @@ void SettingsDialog::readConfig() { | |||
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" ); |