kconfigdialogmanager.h
/*
* This file is part of the KDE libraries
* Copyright (C) 2003 Benjamin C Meyer (ben+kdelibs at meyerhome dot net)
* Copyright (C) 2003 Waldo Bastian <bastian@kde.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef KCONFIGDIALOGMANAGER_H
#define KCONFIGDIALOGMANAGER_H
#include <qobject.h>
#include <qptrlist.h>
#include "kdelibs_export.h"
class KConfigSkeleton;
class KConfigSkeletonItem;
class QWidget;
class QSqlPropertyMap;
class KDECORE_EXPORT KConfigDialogManager : public QObject {
Q_OBJECT
signals:
void settingsChanged();
void settingsChanged( QWidget *widget );
void widgetModified();
public:
KConfigDialogManager(QWidget *parent, KConfigSkeleton *conf, const char *name=0);
~KConfigDialogManager();
void addWidget(QWidget *widget);
bool hasChanged();
bool isDefault();
public slots:
void updateSettings();
void updateWidgets();
void updateWidgetsDefault();
protected:
void init(bool trackChanges);
bool parseChildren(const QWidget *widget, bool trackChanges);
void setProperty(QWidget *w, const QVariant &v);
QVariant property(QWidget *w);
void setupWidget(QWidget *widget, KConfigSkeletonItem *item);
protected:
KConfigSkeleton *m_conf;
QWidget *m_dialog;
QSqlPropertyMap *propertyMap;
QMap<QString, QCString> changedMap;
private:
class Private;
Private *d;
};
#endif // KCONFIGDIALOGMANAGER_H
KConfigDialogManager::changedMap
QMap< QString, QCString > changedMap
Map of the classes and the signals that they emit when changed.
Definition: kconfigdialogmanager.h:224
KConfigDialogManager
Provides a means of automatically retrieving, saving and resetting KConfigSkeleton based settings in ...
Definition: kconfigdialogmanager.h:78
KConfigSkeleton
Class for handling preferences settings for an application.
Definition: kconfigskeleton.h:365
KConfigDialogManager::propertyMap
QSqlPropertyMap * propertyMap
Pointer to the property map for easy access.
Definition: kconfigdialogmanager.h:219
KConfigDialogManager::m_dialog
QWidget * m_dialog
Dialog being managed.
Definition: kconfigdialogmanager.h:214
KConfigDialogManager::m_conf
KConfigSkeleton * m_conf
KConfigSkeleton object used to store settings.
Definition: kconfigdialogmanager.h:209
KConfigSkeletonItem
Class for storing a preferences setting.
Definition: kconfigskeleton.h:50

KDE Home | KDE Accessibility Home | Description of Access Keys