summaryrefslogtreecommitdiffabout
path: root/kmicromail/settingsdialog.cpp
authorzautrix <zautrix>2004-09-15 06:15:59 (UTC)
committer zautrix <zautrix>2004-09-15 06:15:59 (UTC)
commit35b8948c6c203473866c74f1d13185a848454e04 (patch) (unidiff)
treeb6d8eca9863cbca8e24d474d8c895065faa17458 /kmicromail/settingsdialog.cpp
parentf1f43030eefa765950cb501aece6cc71fb4e9859 (diff)
downloadkdepimpi-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.cpp48
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,26 +1,66 @@
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
9SettingsDialog::SettingsDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) 15SettingsDialog::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
15SettingsDialog::~SettingsDialog() { 55SettingsDialog::~SettingsDialog() {
16 56
17} 57}
18 58
19void SettingsDialog::readConfig() { 59void 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 ) );
@@ -28,13 +68,13 @@ void SettingsDialog::readConfig() {
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
33void SettingsDialog::writeConfig() { 73void 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() );