QSettingsDialog  1.0.0
A Qt library to easily create a settings dialog for user configurable settings
qsettingssettingsloader.h
1 #ifndef QSETTINGSSETTINGSLOADER_H
2 #define QSETTINGSSETTINGSLOADER_H
3 
4 #include "qsettingsdialog_global.h"
5 #include "qsettingsloader.h"
6 #include <QSettings>
7 #include <QScopedPointer>
8 
9 class QSettingsSettingsLoaderPrivate;
11 class QSETTINGSDIALOGSHARED_EXPORT QSettingsSettingsLoader : public QSimpleSettingsLoader
12 {
13 public:
15  QSettingsSettingsLoader(const QString &key);
17  QSettingsSettingsLoader(QSettings *settings, const QString &key, bool ownSettings = false);
20 
21  // QSimpleSettingsLoader interface
22  bool load(QVariant outParam data, bool outParam userEdited) override;
23  bool save(const QVariant &data) override;
24  bool reset() override;
25 
27  static QHash<QString, QSettingsSettingsLoader*> createLoaders(QSettings *settings,
28  const QString &rootKey = QString(),
29  bool recursive = false);
30 
31 private:
33 
34  static QHash<QString, QSettingsSettingsLoader*> createLoadersImpl(QSettings *settings,
35  const QString &rootKey,
36  bool recursive);
37 };
38 
39 #endif // QSETTINGSSETTINGSLOADER_H
virtual bool reset()=0
Will be called to reset the data this loader manages.
virtual bool save(const QVariant &data)=0
Will be called to save settings from the dialog to this loader.
A loader to load data from QSettings.
Definition: qsettingssettingsloader.h:11
Defines a simple, synchronous loader.
Definition: qsettingsloader.h:39
virtual bool load(QVariant outParam data, bool outParam userEdited)=0
Will be called if settings need to be loaded form this loader.
#define outParam
Simple define for "&" to mark parameters as out-parameter.
Definition: qsettingsdialog_global.h:17