QSettingsDialog  1.0.0
A Qt library to easily create a settings dialog for user configurable settings
qsettingspropertyentry.h
1 #ifndef QSETTINGSPROPERTYENTRY_H
2 #define QSETTINGSPROPERTYENTRY_H
3 
4 #include "qsettingsdialog_global.h"
5 #include "qsettingsentry.h"
7 
9 class QSETTINGSDIALOGSHARED_EXPORT QSettingsPropertyEntry : public QSettingsEntry
10 {
11 public:
13  explicit QSettingsPropertyEntry(const char *propertyName, QObject *object);
15  explicit QSettingsPropertyEntry(const QMetaProperty &metaProperty, QObject *object);
17  explicit QSettingsPropertyEntry(const char *propertyName, QMetaObject *metaObject, void *gadget);
19  explicit QSettingsPropertyEntry(const QMetaProperty &metaProperty, void *gadget);
20 
22  explicit QSettingsPropertyEntry(const char *propertyName,
23  QObject *object,
24  const QString &name,
25  bool optional = false,
26  const QString &tooltip = QString(),
27  const UiPropertyMap &properties = UiPropertyMap());
29  explicit QSettingsPropertyEntry(const QMetaProperty &metaProperty,
30  QObject *object,
31  const QString &name,
32  bool optional = false,
33  const QString &tooltip = QString(),
34  const UiPropertyMap &properties = UiPropertyMap());
36  explicit QSettingsPropertyEntry(const char *propertyName,
37  QMetaObject *metaObject,
38  void *gadget,
39  const QString &name,
40  bool optional = false,
41  const QString &tooltip = QString(),
42  const UiPropertyMap &properties = UiPropertyMap());
44  explicit QSettingsPropertyEntry(const QMetaProperty &metaProperty,
45  void *gadget,
46  const QString &name,
47  bool optional = false,
48  const QString &tooltip = QString(),
49  const UiPropertyMap &properties = UiPropertyMap());
50 
52  template<typename... Args>
53  explicit QSettingsPropertyEntry(const char *propertyName,
54  QObject *object,
55  const QString &name,
56  bool optional,
57  const QString &tooltip,
58  Args... properties);
60  template<typename... Args>
61  explicit QSettingsPropertyEntry(const QMetaProperty &metaProperty,
62  QObject *object,
63  const QString &name,
64  bool optional,
65  const QString &tooltip,
66  Args... properties);
68  template<typename... Args>
69  explicit QSettingsPropertyEntry(const char *propertyName,
70  QMetaObject *metaObject,
71  void *gadget,
72  const QString &name,
73  bool optional,
74  const QString &tooltip,
75  Args... properties);
77  template<typename... Args>
78  explicit QSettingsPropertyEntry(const QMetaProperty &metaProperty,
79  void *gadget,
80  const QString &name,
81  bool optional,
82  const QString &tooltip,
83  Args... properties);
84 
85  int displaytype() override;
86 };
87 
88 
89 template<typename... Args>
90 QSettingsPropertyEntry::QSettingsPropertyEntry(const char *propertyName, QObject *object, const QString &name, bool optional, const QString &tooltip, Args... properties) :
91  QSettingsPropertyEntry(propertyName, object, name, optional, tooltip, mapWrapper(properties...))
92 {}
93 
94 template<typename... Args>
95 QSettingsPropertyEntry::QSettingsPropertyEntry(const QMetaProperty &metaProperty, QObject *object, const QString &name, bool optional, const QString &tooltip, Args... properties) :
96  QSettingsPropertyEntry(metaProperty, object, name, optional, tooltip, mapWrapper(properties...))
97 {}
98 
99 template<typename... Args>
100 QSettingsPropertyEntry::QSettingsPropertyEntry(const char *propertyName, QMetaObject *metaObject, void *gadget, const QString &name, bool optional, const QString &tooltip, Args... properties) :
101  QSettingsPropertyEntry(propertyName, metaObject, gadget, name, optional, tooltip, mapWrapper(properties...))
102 {}
103 
104 template<typename... Args>
105 QSettingsPropertyEntry::QSettingsPropertyEntry(const QMetaProperty &metaProperty, void *gadget, const QString &name, bool optional, const QString &tooltip, Args... properties) :
106  QSettingsPropertyEntry(metaProperty, gadget, name, optional, tooltip, mapWrapper(properties...))
107 {}
108 
109 #endif // QSETTINGSPROPERTYENTRY_H
A loader to load properties from objects and gadgets.
Definition: qsettingspropertyloader.h:12
QString tooltip() const
Returns the tooltip this entry has.
QSettingsPropertyEntry(const char *propertyName, QObject *object)
Creates a property entry for a property on an object.
Represents one settings entry within the settings dialog.
Definition: qsettingsentry.h:11
QHash< QString, QVariant > UiPropertyMap
a Hash for strings to variant, to provide properties for edit widgets
Definition: qsettingsdialog_global.h:42
A class that combines the QSettingsEntry and the QSettingsPropertyLoader.
Definition: qsettingspropertyentry.h:9
virtual int displaytype()
Returns the display type id for this entry.