QSettingsDialog  1.0.0
A Qt library to easily create a settings dialog for user configurable settings
qsettingspropertyloader.h
1 #ifndef QSETTINGSPROPERTYLOADER_H
2 #define QSETTINGSPROPERTYLOADER_H
3 
4 #include "qsettingsdialog_global.h"
5 #include <QObject>
6 #include <QMetaProperty>
7 #include <QScopedPointer>
8 #include "qsettingsloader.h"
9 
10 class QSettingsPropertyLoaderPrivate;
12 class QSETTINGSDIALOGSHARED_EXPORT QSettingsPropertyLoader : public QAsyncSettingsLoader
13 {
14  Q_OBJECT
15 
16 public:
18  explicit QSettingsPropertyLoader(const char *propertyName, QObject *object);
20  explicit QSettingsPropertyLoader(const QMetaProperty &metaProperty, QObject *object);
22  explicit QSettingsPropertyLoader(const char *propertyName, QMetaObject *metaObject, void *gadget);
24  explicit QSettingsPropertyLoader(const QMetaProperty &metaProperty, void *gadget);
27 
29  int metatypeId() const;
31  bool isValid() const;
32 
33 public slots:
34  // QAsyncSettingsLoader interface
35  void loadData() override;
36  void saveData(const QVariant &data) override;
37  void resetData() override;
38 
39 private:
41 };
42 
43 #endif // QSETTINGSPROPERTYLOADER_H
A loader to load properties from objects and gadgets.
Definition: qsettingspropertyloader.h:12
virtual void saveData(const QVariant &data)=0
Will be called asynchronously to save data to the objects thread.
Defines an asynchronous loader, that can load settings from any thread with any delay.
Definition: qsettingsloader.h:53
virtual void resetData()=0
Will be called asynchronously to reset data to the objects thread.
virtual void loadData()=0
Will be called asynchronously to load data from the objects thread.