KConfigWidgets

kconfigdialog.h
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 <[email protected]>
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 
26 #include "kconfigwidgets_export.h"
27 
28 class KConfig;
31 
76 class KCONFIGWIDGETS_EXPORT KConfigDialog : public KPageDialog
77 {
78  Q_OBJECT
79 
80 Q_SIGNALS:
84  void widgetModified();
85 
91  void settingsChanged(const QString &dialogName);
92 
93 public:
106  KConfigDialog(QWidget *parent, const QString &name,
107  KCoreConfigSkeleton *config);
108 
114  ~KConfigDialog() override;
115 
132  KPageWidgetItem *addPage(QWidget *page, const QString &itemName,
133  const QString &pixmapName = QString(),
134  const QString &header = QString(),
135  bool manage = true);
136 
156  const QString &itemName,
157  const QString &pixmapName = QString(),
158  const QString &header = QString());
159 
166  static KConfigDialog *exists(const QString &name);
167 
174  static bool showDialog(const QString &name);
175 
176 protected Q_SLOTS:
183  virtual void updateSettings();
184 
192  virtual void updateWidgets();
193 
200  virtual void updateWidgetsDefault();
201 
208  void updateButtons();
209 
215  void settingsChangedSlot();
216 
229  void setHelp(const QString &anchor, const QString &appname = QString());
230 
231 
236  virtual void showHelp();
237 
238 protected:
239 
245  virtual bool hasChanged();
246 
251  virtual bool isDefault();
252 
256  void showEvent(QShowEvent *e) override;
257 
258 private Q_SLOTS:
262  void onPageRemoved(KPageWidgetItem *item);
263 
264 private:
265  class KConfigDialogPrivate;
266  friend class KConfigDialogPrivate;
267 
268  KConfigDialogPrivate *const d;
269 
270  Q_PRIVATE_SLOT(d, void _k_updateButtons())
271  Q_PRIVATE_SLOT(d, void _k_settingsChangedSlot())
272 
274 };
275 
276 #endif //KCONFIGDIALOG_H
277 
Provides a means of automatically retrieving, saving and resetting KConfigSkeleton based settings in ...
Standard KDE configuration dialog class.
Definition: kconfigdialog.h:76
KPageWidgetItem * addPage(QWidget *widget, const QString &name)
Q_DISABLE_COPY(Class)
virtual void showEvent(QShowEvent *event) override
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Jul 4 2020 22:44:07 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.