kpilot Library API Documentation

knotes-setup.cc

00001 /* knotes-setup.cc                      KPilot
00002 **
00003 ** Copyright (C) 2001,2003 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.h"
00043 
00044 
00045 KNotesConfigBase::KNotesConfigBase(QWidget *w, const char *n) :
00046     ConduitConfigBase(w,n),
00047     fConfigWidget(0L)
00048 {
00049     fConfigWidget = new KNotesWidget(w);
00050     UIDialog::addAboutPage(fConfigWidget->tabWidget,KNotesConduitFactory::about());
00051     fWidget = fConfigWidget;
00052     QObject::connect(fConfigWidget->fDeleteNoteForMemo,SIGNAL(clicked()),
00053         this,SLOT(modified()));
00054     fConduitName=i18n("KNotes");
00055 }
00056 
00057 void KNotesConfigBase::commit(KConfig *fConfig)
00058 {
00059     KConfigGroupSaver s(fConfig,KNotesConduitFactory::group);
00060 
00061     fConfig->writeEntry(KNotesConduitFactory::matchDeletes,
00062         fConfigWidget->fDeleteNoteForMemo->isChecked());
00063 }
00064 
00065 void KNotesConfigBase::load(KConfig *fConfig)
00066 {
00067     KConfigGroupSaver s(fConfig,KNotesConduitFactory::group);
00068 
00069     fConfigWidget->fDeleteNoteForMemo->setChecked(
00070         fConfig->readBoolEntry(KNotesConduitFactory::matchDeletes,false));
00071 }
00072 
00073 /* static */ ConduitConfigBase *KNotesConfigBase::create(QWidget *w, const char *n)
00074 {
00075     return new KNotesConfigBase(w,n);
00076 }
00077 
KDE Logo
This file is part of the documentation for kpilot Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 1 11:36:47 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003