kpilot
knotes-setup.ccGo to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #include "options.h"
00030
00031 #include <qtabwidget.h>
00032 #include <qcheckbox.h>
00033 #include <qmap.h>
00034 #include <qtimer.h>
00035
00036 #include <kapplication.h>
00037 #include <kconfig.h>
00038
00039 #include "setup_base.h"
00040
00041 #include "knotes-factory.h"
00042 #include "knotes-setup.h"
00043 #include "knotesconduitSettings.h"
00044
00045
00046 KNotesConfigBase::KNotesConfigBase(QWidget *w, const char *n) :
00047 ConduitConfigBase(w,n),
00048 fConfigWidget(0L)
00049 {
00050 fConfigWidget = new KNotesWidget(w);
00051 ConduitConfigBase::addAboutPage(fConfigWidget->tabWidget,KNotesConduitFactory::about());
00052 fWidget = fConfigWidget;
00053 QObject::connect(fConfigWidget->fDeleteNoteForMemo,SIGNAL(clicked()),
00054 this,SLOT(modified()));
00055 QObject::connect(fConfigWidget->fSuppressConfirm,SIGNAL(clicked()),
00056 this,SLOT(modified()));
00057 QObject::connect(fConfigWidget->fDeleteNoteForMemo,SIGNAL(toggled(bool)),
00058 fConfigWidget->fSuppressConfirm,SLOT(setEnabled(bool)));
00059 fConduitName=i18n("KNotes");
00060 }
00061
00062 void KNotesConfigBase::commit()
00063 {
00064 KNotesConduitSettings::setDeleteNoteForMemo( fConfigWidget->fDeleteNoteForMemo->isChecked() );
00065 KNotesConduitSettings::setSuppressKNotesConfirm(fConfigWidget->fSuppressConfirm->isChecked());
00066 KNotesConduitSettings::self()->writeConfig();
00067 unmodified();
00068 }
00069
00070 void KNotesConfigBase::load()
00071 {
00072 KNotesConduitSettings::self()->readConfig();
00073 fConfigWidget->fDeleteNoteForMemo->setChecked(KNotesConduitSettings::deleteNoteForMemo() );
00074 fConfigWidget->fSuppressConfirm->setChecked(KNotesConduitSettings::suppressKNotesConfirm() );
00075 fConfigWidget->fSuppressConfirm->setEnabled(KNotesConduitSettings::deleteNoteForMemo());
00076 unmodified();
00077 }
00078
00079 ConduitConfigBase *KNotesConfigBase::create(QWidget *w, const char *n)
00080 {
00081 return new KNotesConfigBase(w,n);
00082 }
00083
|