kpilot Library API Documentation

knotes-setup.cc

00001 /* knotes-setup.cc                      KPilot
00002 **
00003 ** Copyright (C) 2001 by Dan Pilone
00004 **
00005 ** This file defines the setup dialog for the knotes-conduit plugin.
00006 */
00007  
00008 /*
00009 ** This program is free software; you can redistribute it and/or modify
00010 ** it under the terms of the GNU General Public License as published by
00011 ** the Free Software Foundation; either version 2 of the License, or
00012 ** (at your option) any later version.
00013 **
00014 ** This program is distributed in the hope that it will be useful,
00015 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00017 ** GNU General Public License for more details.
00018 **
00019 ** You should have received a copy of the GNU General Public License
00020 ** along with this program in a file called COPYING; if not, write to
00021 ** the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
00022 ** MA 02111-1307, USA.
00023 */
00024  
00025 /*
00026 ** Bug reports and questions can be sent to kde-pim@kde.org
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 /* virtual */ 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 /* virtual */ 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 
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 15 11:40:43 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001