QSettingsDialog  1.0.0
A Qt library to easily create a settings dialog for user configurable settings
qsettingsloaderentry.h
1 #ifndef QSETTINGSLOADERENTRY_H
2 #define QSETTINGSLOADERENTRY_H
3 
4 #include "qsettingsdialog_global.h"
5 #include "qsettingsentry.h"
6 #include "qsettingsloader.h"
7 
10 {
11 public:
14  QSettingsEntry(displaytype, nullptr)
15  {}
18  const QString &name,
19  bool optional = false,
20  const QString &tooltip = QString(),
21  const UiPropertyMap &properties = UiPropertyMap()) :
22  QSettingsEntry(displaytype, nullptr, name, optional, tooltip, properties)
23  {}
25  template<typename... Args>
26  QSettingsLoaderEntry(int displaytype,
27  const QString &name,
28  bool optional,
29  const QString &tooltip,
30  Args... properties) :
31  QSettingsEntry(displaytype, nullptr, name, optional, tooltip, properties...)
32  {}
33 
34  inline QSettingsLoader *getLoader() final {
35  return this;
36  }
37  inline void freeLoader(QSettingsLoader *) final {}
38 };
39 
40 #endif // QSETTINGSLOADERENTRY_H
QSettingsLoaderEntry(int displaytype, const QString &name, bool optional=false, const QString &tooltip=QString(), const UiPropertyMap &properties=UiPropertyMap())
Creates a new loader entry from a display id and it&#39;s properties.
Definition: qsettingsloaderentry.h:17
QSettingsLoaderEntry(int displaytype)
Creates a new loader entry from a display id.
Definition: qsettingsloaderentry.h:13
Defines a simple, synchronous loader.
Definition: qsettingsloader.h:39
A combination of a QSettingsEntry and a QSimpleSettingsLoader in one class.
Definition: qsettingsloaderentry.h:9
QString tooltip() const
Returns the tooltip this entry has.
QSettingsLoaderEntry(int displaytype, const QString &name, bool optional, const QString &tooltip, Args...properties)
Creates a new loader entry from a display id and it&#39;s properties.
Definition: qsettingsloaderentry.h:26
void freeLoader(QSettingsLoader *) final
Will be called to remove a reference to the loader this entry holds.
Definition: qsettingsloaderentry.h:37
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
The basic settings loader class. Serves as utility class.
Definition: qsettingsloader.h:16
QSettingsLoader * getLoader() final
Will be called to get a reference to loader this entry holds.
Definition: qsettingsloaderentry.h:34
virtual int displaytype()
Returns the display type id for this entry.