• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDEUI

  • kdeui
  • dialogs
kconfigdialogmanager.h
Go to the documentation of this file.
1 /*
2  * This file is part of the KDE libraries
3  * Copyright (C) 2003 Benjamin C Meyer (ben+kdelibs at meyerhome dot net)
4  * Copyright (C) 2003 Waldo Bastian <bastian@kde.org>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public License
17  * along with this library; see the file COPYING.LIB. If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  */
21 #ifndef KCONFIGDIALOGMANAGER_H
22 #define KCONFIGDIALOGMANAGER_H
23 
24 #include <kdeui_export.h>
25 
26 #include <QtCore/QObject>
27 #include <QtCore/QHash>
28 
29 class KCoreConfigSkeleton;
30 class KConfigSkeleton;
31 class KConfigSkeletonItem;
32 class QWidget;
33 
85 class KDEUI_EXPORT KConfigDialogManager : public QObject {
86 
87 Q_OBJECT
88 
89 Q_SIGNALS:
95  void settingsChanged();
96 
104  void settingsChanged( QWidget *widget );
105 
113  void widgetModified();
114 
115 
116 public:
117 
123  KConfigDialogManager(QWidget *parent, KCoreConfigSkeleton *conf);
124 
130  KConfigDialogManager(QWidget *parent, KConfigSkeleton *conf);
131 
135  ~KConfigDialogManager();
136 
141  void addWidget(QWidget *widget);
142 
147  bool hasChanged() const;
148 
153  bool isDefault() const;
154 
158  static QHash<QString, QByteArray> *propertyMap();
159 
163  static QHash<QString, QByteArray> *changedMap();
164 
165 public Q_SLOTS:
172  void updateSettings();
173 
181  void updateWidgets();
182 
189  void updateWidgetsDefault();
190 
191 protected:
192 
199  void init(bool trackChanges);
200 
211  bool parseChildren(const QWidget *widget, bool trackChanges);
212 
217  QByteArray getUserProperty(const QWidget *widget) const;
218 
225  QByteArray getCustomProperty(const QWidget *widget) const;
226 
230  void setProperty(QWidget *w, const QVariant &v);
231 
235  QVariant property(QWidget *w) const;
236 
240  void setupWidget(QWidget *widget, KConfigSkeletonItem *item);
241 
245  static void initMaps();
246 
247 private:
248  class Private;
249  friend class Private;
250 
254  Private *const d;
255 
256  Q_DISABLE_COPY(KConfigDialogManager)
257 };
258 
259 #endif // KCONFIGDIALOGMANAGER_H
260 
KConfigDialogManager
Provides a means of automatically retrieving, saving and resetting KConfigSkeleton based settings in ...
Definition: kconfigdialogmanager.h:85
KConfigDialogManager::widgetModified
void widgetModified()
If retrieveSettings() was told to track changes then if any known setting was changed this signal wil...
KConfigDialogManager::settingsChanged
void settingsChanged(QWidget *widget)
TODO: Verify One or more of the settings have been changed.
KConfigDialogManager::settingsChanged
void settingsChanged()
One or more of the settings have been saved (such as when the user clicks on the Apply button).
KConfigSkeletonItem
KConfigSkeleton
Class for handling preferences settings for an application.
Definition: kconfigskeleton.h:41
QHash
QObject
QWidget
kdeui_export.h
KCoreConfigSkeleton
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Jan 26 2021 00:00:00 by doxygen 1.9.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal