From e3b89230f065c48c84b48c88edb6eb088374c487 Mon Sep 17 00:00:00 2001 From: zautrix Date: Sat, 03 Jul 2004 16:33:12 +0000 Subject: Initial revision --- (limited to 'kmicromail/settingsdialog.cpp') 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 @@ +#include +#include + +#include + +#include "settingsdialog.h" + + +SettingsDialog::SettingsDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) + : SettingsDialogUI( parent, name, modal, fl ) { + + readConfig(); +} + +SettingsDialog::~SettingsDialog() { + +} + +void SettingsDialog::readConfig() { + Config cfg("mail"); + cfg.setGroup( "Settings" ); + showHtmlButton->setChecked( cfg.readBoolEntry( "showHtml", false ) ); + cfg.setGroup( "Compose" ); + checkBoxLater->setChecked( cfg.readBoolEntry( "sendLater", false ) ); + cfg.setGroup( "Applet" ); + cbEnableTaskbarApplet->setChecked( cfg.readBoolEntry( "Disabled", false ) ); + spCheckOften->setValue( cfg.readNumEntry( "CheckEvery", 5 ) ); + cbBlinkLed->setChecked( cfg.readBoolEntry( "BlinkLed", true ) ); + cbPlaySound->setChecked( cfg.readBoolEntry( "PlaySound", false ) ); + +} + +void SettingsDialog::writeConfig() { + Config cfg( "mail" ); + cfg.setGroup( "Settings" ); + cfg.writeEntry( "showHtml", showHtmlButton->isChecked() ); + cfg.setGroup( "Compose" ); + cfg.writeEntry( "sendLater", checkBoxLater->isChecked() ); + cfg.setGroup( "Applet" ); + cfg.writeEntry( "Disabled", cbEnableTaskbarApplet->isChecked() ); + cfg.writeEntry( "CheckEvery", spCheckOften->value() ); + cfg.writeEntry( "BlinkLed", cbBlinkLed->isChecked() ); + cfg.writeEntry( "PlaySound", cbPlaySound->isChecked() ); +} + +void SettingsDialog::accept() { + writeConfig(); + QDialog::accept(); +} -- cgit v0.9.0.2