knotes-setup.cc
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.moc"
00043
00044
00045 KNotesWidgetSetup::KNotesWidgetSetup(QWidget *w, const char *n,
00046 const QStringList & a) :
00047 ConduitConfig(w,n,a)
00048 {
00049 FUNCTIONSETUP;
00050
00051 fConfigWidget = new KNotesWidget(widget());
00052 setTabWidget(fConfigWidget->tabWidget);
00053 addAboutPage(false,KNotesConduitFactory::about());
00054
00055 fConfigWidget->tabWidget->adjustSize();
00056 fConfigWidget->resize(fConfigWidget->tabWidget->size());
00057 }
00058
00059 KNotesWidgetSetup::~KNotesWidgetSetup()
00060 {
00061 FUNCTIONSETUP;
00062 }
00063
00064 void KNotesWidgetSetup::commitChanges()
00065 {
00066 FUNCTIONSETUP;
00067
00068 if (!fConfig) return;
00069
00070 KConfigGroupSaver s(fConfig,KNotesConduitFactory::group);
00071
00072 fConfig->writeEntry(KNotesConduitFactory::matchDeletes,
00073 fConfigWidget->fDeleteNoteForMemo->isChecked());
00074 }
00075
00076 void KNotesWidgetSetup::readSettings()
00077 {
00078 FUNCTIONSETUP;
00079
00080 if (!fConfig) return;
00081
00082 KConfigGroupSaver s(fConfig,KNotesConduitFactory::group);
00083
00084 fConfigWidget->fDeleteNoteForMemo->setChecked(
00085 fConfig->readBoolEntry(KNotesConduitFactory::matchDeletes,false));
00086 }
00087
This file is part of the documentation for kdelibs Version 3.1.5.