• 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
29class KCoreConfigSkeleton;
30class KConfigSkeleton;
31class KConfigSkeletonItem;
32class QWidget;
33
85class KDEUI_EXPORT KConfigDialogManager : public QObject {
86
87Q_OBJECT
88
89Q_SIGNALS:
95 void settingsChanged();
96
104 void settingsChanged( QWidget *widget );
105
113 void widgetModified();
114
115
116public:
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
165public Q_SLOTS:
172 void updateSettings();
173
181 void updateWidgets();
182
189 void updateWidgetsDefault();
190
191protected:
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
247private:
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::setupWidget
void setupWidget(QWidget *widget, KConfigSkeletonItem *item)
Setup secondary widget properties.
Definition kconfigdialogmanager.cpp:182
KConfigDialogManager::updateWidgetsDefault
void updateWidgetsDefault()
Traverse the specified widgets, sets the state of all known widgets according to the default state in...
Definition kconfigdialogmanager.cpp:371
KConfigDialogManager::property
QVariant property(QWidget *w) const
Retrieve a property.
Definition kconfigdialogmanager.cpp:489
KConfigDialogManager::initMaps
static void initMaps()
Initializes the property maps.
Definition kconfigdialogmanager.cpp:90
KConfigDialogManager::getCustomProperty
QByteArray getCustomProperty(const QWidget *widget) const
Find the property to use for a widget by querying the kcfg_property property of the widget.
Definition kconfigdialogmanager.cpp:436
KConfigDialogManager::getUserProperty
QByteArray getUserProperty(const QWidget *widget) const
Finds the USER property name using Qt's MetaProperty system, and caches it in the property map (the c...
Definition kconfigdialogmanager.cpp:407
KConfigDialogManager::changedMap
static QHash< QString, QByteArray > * changedMap()
Retrieve the widget change map.
Definition kconfigdialogmanager.cpp:162
KConfigDialogManager::widgetModified
void widgetModified()
If retrieveSettings() was told to track changes then if any known setting was changed this signal wil...
KConfigDialogManager::propertyMap
static QHash< QString, QByteArray > * propertyMap()
Retrieve the property map.
Definition kconfigdialogmanager.cpp:156
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).
KConfigDialogManager::updateWidgets
void updateWidgets()
Traverse the specified widgets, sets the state of all known widgets according to the state in the set...
Definition kconfigdialogmanager.cpp:332
KConfigDialogManager::KConfigDialogManager
KConfigDialogManager(QWidget *parent, KCoreConfigSkeleton *conf)
Constructor.
Definition kconfigdialogmanager.cpp:69
KConfigDialogManager::setProperty
void setProperty(QWidget *w, const QVariant &v)
Set a property.
Definition kconfigdialogmanager.cpp:450
KConfigDialogManager::addWidget
void addWidget(QWidget *widget)
Add additional widgets to manage.
Definition kconfigdialogmanager.cpp:177
KConfigDialogManager::hasChanged
bool hasChanged() const
Returns whether the current state of the known widgets are different from the state in the config obj...
Definition kconfigdialogmanager.cpp:517
KConfigDialogManager::parseChildren
bool parseChildren(const QWidget *widget, bool trackChanges)
Recursive function that finds all known children.
Definition kconfigdialogmanager.cpp:225
KConfigDialogManager::updateSettings
void updateSettings()
Traverse the specified widgets, saving the settings of all known widgets in the settings object.
Definition kconfigdialogmanager.cpp:378
KConfigDialogManager::isDefault
bool isDefault() const
Returns whether the current state of the known widgets are the same as the default state in the confi...
Definition kconfigdialogmanager.cpp:539
KConfigDialogManager::init
void init(bool trackChanges)
Definition kconfigdialogmanager.cpp:168
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-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by doxygen 1.13.2 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
  • 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