1#ifndef DIALOGS_QT_UTILITIES_QTSETTINGS_H
2#define DIALOGS_QT_UTILITIES_QTSETTINGS_H
6#if defined(QT_UTILITIES_GUI_QTWIDGETS)
14QT_FORWARD_DECLARE_CLASS(QFontDialog)
15QT_FORWARD_DECLARE_CLASS(QSettings)
22#if defined(QT_UTILITIES_GUI_QTWIDGETS)
25explicit QtAppearanceOptionPage(
QtSettingsData &settings, QWidget *parentWidget =
nullptr);
30QFontDialog *m_fontDialog;
35explicit QtLanguageOptionPage(
QtSettingsData &settings, QWidget *parentWidget =
nullptr);
44explicit QtEnvOptionPage(
QtSettingsData &settings, QWidget *parentWidget =
nullptr);
57#if defined(QT_UTILITIES_GUI_QTWIDGETS)
58 void disableNotices();
59 void setRetranslatable(
bool retranslatable);
61 void restore(QSettings &settings);
62 void save(QSettings &settings)
const;
74 std::unique_ptr<QtSettingsData> m_d;
78#if defined(QT_UTILITIES_GUI_QTWIDGETS)
The OptionCategory class wraps associated option pages.
void save(QSettings &settings) const
Saves the settings to the specified QSettings object.
OptionCategory * category()
QtSettings()
Creates a new settings object.
void reapplyDefaultIconTheme(bool isPaletteDark)
Re-applies default icon theme assuming the palette is dark or not depending on isPaletteDark.
void restore(QSettings &settings)
Restores the settings from the specified QSettings object.
bool hasLocaleChanged() const
Returns whether the last apply() call has changed the default locale.
bool isPaletteDark()
Returns whether the palette is dark.
bool hasCustomFont() const
Returns whether a custom font is set.
void apply()
Applies the current configuration.
void reevaluatePaletteAndDefaultIconTheme()
Re-evaluates whether the palette is dark and re-applies default icon theme.
#define QT_UTILITIES_EXPORT
Marks the symbol to be exported by the qtutilities library.
#define DECLARE_EXTERN_UI_FILE_BASED_OPTION_PAGE(SomeClass)
Declares external instantiation of class declared with BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE in a c...
#define BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE_CUSTOM_CTOR(SomeClass)
Declares a class inheriting from Dialogs::UiFileBasedOptionPage in a convenient way.
#define END_DECLARE_OPTION_PAGE
Must be used after BEGIN_DECLARE_OPTION_PAGE and BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE.
#define DECLARE_SETUP_WIDGETS
Declares the method setupWidget() in a convenient way.