kdecore Library API Documentation

kconfigdialogmanager.h

00001 /*
00002  *  This file is part of the KDE libraries
00003  *  Copyright (C) 2003 Benjamin C Meyer (ben+kdelibs at meyerhome dot net)
00004  *  Copyright (C) 2003 Waldo Bastian <bastian@kde.org>
00005  *
00006  *  This library is free software; you can redistribute it and/or
00007  *  modify it under the terms of the GNU Library General Public
00008  *  License as published by the Free Software Foundation; either
00009  *  version 2 of the License, or (at your option) any later version.
00010  *
00011  *  This library is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  *  Library General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU Library General Public License
00017  *  along with this library; see the file COPYING.LIB.  If not, write to
00018  *  the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00019  *  Boston, MA 02111-1307, USA.
00020  */
00021 #ifndef KCONFIGDIALOGMANAGER_H
00022 #define KCONFIGDIALOGMANAGER_H
00023 
00024 #include <qobject.h>
00025 #include <qptrlist.h>
00026 
00027 class KConfigSkeleton;
00028 class KConfigSkeletonItem;
00029 class QWidget;
00030 class QSqlPropertyMap;
00031 
00077 class KConfigDialogManager : public QObject {
00078 
00079 Q_OBJECT
00080 
00081 signals:
00087   void settingsChanged();
00088 
00096   void settingsChanged( QWidget *widget );
00097 
00105   void widgetModified();
00106 
00107 
00108 public:
00109 
00116    KConfigDialogManager(QWidget *parent, KConfigSkeleton *conf, const char *name=0);
00117 
00121   ~KConfigDialogManager();
00122 
00127   void addWidget(QWidget *widget);
00128   
00133   bool hasChanged();
00134 
00139   bool isDefault();
00140 
00141 public slots:
00148   void updateSettings();
00149 
00157   void updateWidgets();
00158 
00165   void updateWidgetsDefault();
00166 
00167 protected:
00168 
00175   void init(bool trackChanges);
00176   
00187   bool parseChildren(const QWidget *widget, bool trackChanges);
00188 
00192   void setProperty(QWidget *w, const QVariant &v);
00193 
00197   QVariant property(QWidget *w);
00198 
00202   void setupWidget(QWidget *widget, KConfigSkeletonItem *item);
00203 
00204 protected:
00208   KConfigSkeleton *m_conf;
00209 
00213   QWidget *m_dialog;
00214 
00218   QSqlPropertyMap *propertyMap;
00219 
00223   QMap<QString, QCString> changedMap;
00224 
00225 private:
00226   class Private;
00230   Private *d;
00231 
00232 };
00233 
00234 #endif // KCONFIGDIALOGMANAGER_H
00235 
KDE Logo
This file is part of the documentation for kdecore Library Version 3.2.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Mar 4 22:43:29 2004 by doxygen 1.3.6-20040222 written by Dimitri van Heesch, © 1997-2003