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

KDEUI

  • kdeui
  • dialogs
kconfigdialog.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 KCONFIGDIALOG_H
22#define KCONFIGDIALOG_H
23
24#include <kpagedialog.h>
25
26class KConfig;
27class KCoreConfigSkeleton;
28class KConfigSkeleton;
29class KConfigDialogManager;
30
73class KDEUI_EXPORT KConfigDialog : public KPageDialog {
74Q_OBJECT
75
76Q_SIGNALS:
80 void widgetModified();
81
87 void settingsChanged(const QString& dialogName);
88
89public:
102 KConfigDialog( QWidget *parent, const QString& name,
103 KConfigSkeleton *config );
104
119 KConfigDialog( QWidget *parent, const QString& name,
120 KCoreConfigSkeleton *config );
121
127 ~KConfigDialog();
128
145 KPageWidgetItem* addPage( QWidget *page, const QString &itemName,
146 const QString &pixmapName=QString(),
147 const QString &header=QString(),
148 bool manage=true );
149
168 KPageWidgetItem* addPage( QWidget *page, KConfigSkeleton *config,
169 const QString &itemName,
170 const QString &pixmapName=QString(),
171 const QString &header=QString() );
172
179 static KConfigDialog* exists( const QString& name );
180
187 static bool showDialog( const QString& name );
188
189
190protected Q_SLOTS:
197 virtual void updateSettings();
198
206 virtual void updateWidgets();
207
214 virtual void updateWidgetsDefault();
215
216
223 void updateButtons();
224
230 void settingsChangedSlot();
231
232protected:
233
239 virtual bool hasChanged();
240
245 virtual bool isDefault();
246
250 virtual void showEvent(QShowEvent *e);
251
252private Q_SLOTS:
256 void onPageRemoved(KPageWidgetItem* item);
257
258private:
259 class KConfigDialogPrivate;
260 friend class KConfigDialogPrivate;
261
262 KConfigDialogPrivate *const d;
263
264 Q_PRIVATE_SLOT( d, void _k_updateButtons() )
265 Q_PRIVATE_SLOT( d, void _k_settingsChangedSlot() )
266
267 Q_DISABLE_COPY(KConfigDialog)
268};
269
270#endif //KCONFIGDIALOG_H
271
KConfigDialogManager
Provides a means of automatically retrieving, saving and resetting KConfigSkeleton based settings in ...
Definition kconfigdialogmanager.h:85
KConfigDialog::isDefault
virtual bool isDefault()
Returns whether the current state of the dialog is the same as the default configuration.
Definition kconfigdialog.cpp:316
KConfigDialog::showEvent
virtual void showEvent(QShowEvent *e)
Definition kconfigdialog.cpp:264
KConfigDialog::showDialog
static bool showDialog(const QString &name)
Attempts to show the dialog with the name 'name'.
Definition kconfigdialog.cpp:217
KConfigDialog::settingsChangedSlot
void settingsChangedSlot()
Some setting was changed.
Definition kconfigdialog.cpp:326
KConfigDialog::updateSettings
virtual void updateSettings()
Update the settings from the dialog.
Definition kconfigdialog.cpp:299
KConfigDialog::exists
static KConfigDialog * exists(const QString &name)
See if a dialog with the name 'name' already exists.
Definition kconfigdialog.cpp:209
KConfigDialog::hasChanged
virtual bool hasChanged()
Returns whether the current state of the dialog is different from the current configuration.
Definition kconfigdialog.cpp:311
KConfigDialog::widgetModified
void widgetModified()
A widget in the dialog was modified.
KConfigDialog::updateWidgets
virtual void updateWidgets()
Update the dialog based on the settings.
Definition kconfigdialog.cpp:303
KConfigDialog::updateButtons
void updateButtons()
Updates the Apply and Default buttons.
Definition kconfigdialog.cpp:321
KConfigDialog::KConfigDialog
KConfigDialog(QWidget *parent, const QString &name, KConfigSkeleton *config)
Definition kconfigdialog.cpp:94
KConfigDialog::settingsChanged
void settingsChanged(const QString &dialogName)
One or more of the settings have been permanently changed such as if the user clicked on the Apply or...
KConfigDialog::updateWidgetsDefault
virtual void updateWidgetsDefault()
Update the dialog based on the default settings.
Definition kconfigdialog.cpp:307
KConfigSkeleton
Class for handling preferences settings for an application.
Definition kconfigskeleton.h:41
KConfig
KCoreConfigSkeleton
KPageDialog::addPage
KPageWidgetItem * addPage(QWidget *widget, const QString &name)
Adds a new top level page to the dialog.
Definition kpagedialog.cpp:73
KPageDialog::KPageDialog
KPageDialog(QWidget *parent=0, Qt::WindowFlags flags=0)
Creates a new page dialog.
Definition kpagedialog.cpp:31
KPageWidgetItem
KPageWidgetItem is used by KPageWidget and represents a page.
Definition kpagewidgetmodel.h:51
QWidget
header
const char header[]
kpagedialog.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Tue Mar 25 2025 00:00:00 by doxygen 1.14.0 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