Qt Utilities  5.12.0
Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models
Classes | Namespaces | Macros
optionpage.h File Reference
#include "../global.h"
#include <QObject>
#include <QWidget>
#include <memory>
Include dependency graph for optionpage.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Dialogs::OptionPage
 The OptionPage class is the base class for SettingsDialog pages. More...
 
class  Dialogs::UiFileBasedOptionPage< UiClass >
 The UiFileBasedOptionPage class is the base class for SettingsDialog pages using UI files to describe the widget tree. More...
 

Namespaces

 Dialogs
 Provides common dialogs such as AboutDialog, EnterPasswordDialog and SettingsDialog.
 

Macros

#define BEGIN_DECLARE_OPTION_PAGE(SomeClass)
 Declares a class inheriting from Dialogs::OptionPage in a convenient way. More...
 
#define BEGIN_DECLARE_OPTION_PAGE_CUSTOM_CTOR(SomeClass)
 Declares a class inheriting from Dialogs::OptionPage in a convenient way. More...
 
#define BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE_CUSTOM_CTOR(SomeClass)
 Declares a class inheriting from Dialogs::UiFileBasedOptionPage in a convenient way. More...
 
#define BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE(SomeClass)
 Declares a class inheriting from Dialogs::UiFileBasedOptionPage in a convenient way. More...
 
#define END_DECLARE_OPTION_PAGE
 Must be used after BEGIN_DECLARE_OPTION_PAGE and BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE. More...
 
#define INSTANTIATE_UI_FILE_BASED_OPTION_PAGE(SomeClass)
 Instantiates a class declared with BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE in a convenient way. More...
 
#define INSTANTIATE_UI_FILE_BASED_OPTION_PAGE_NS(SomeNamespace, SomeClass)
 Instantiates a class declared with BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE inside a given namespace in a convenient way. More...
 
#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 convenient way. More...
 
#define DECLARE_EXTERN_UI_FILE_BASED_OPTION_PAGE_NS(SomeNamespace, SomeClass)
 Declares external instantiation of class declared with BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE inside a given namespace in a convenient way. More...
 
#define DECLARE_SETUP_WIDGETS
 Declares the method setupWidget() in a convenient way. More...
 
#define DECLARE_UI_FILE_BASED_OPTION_PAGE(SomeClass)
 Declares a class inheriting from Dialogs::OptionPage in a convenient way. More...
 
#define DECLARE_OPTION_PAGE(SomeClass)
 Declares a class inheriting from Dialogs::OptionPage in a convenient way. More...
 
#define DECLARE_UI_FILE_BASED_OPTION_PAGE_CUSTOM_SETUP(SomeClass)
 Declares a class inheriting from Dialogs::UiFileBasedOptionPage in a convenient way. More...
 

Macro Definition Documentation

◆ BEGIN_DECLARE_OPTION_PAGE

#define BEGIN_DECLARE_OPTION_PAGE (   SomeClass)
Value:
typedef ::Dialogs::OptionPage SomeClass##Base; \
class QT_UTILITIES_EXPORT SomeClass : public ::Dialogs::OptionPage { \
public: \
explicit SomeClass(QWidget *parentWidget = nullptr); \
~SomeClass() override; \
bool apply() override; \
void reset() override; \
\
private:
#define QT_UTILITIES_EXPORT
Marks the symbol to be exported by the qtutilities library.

Declares a class inheriting from Dialogs::OptionPage in a convenient way.

Remarks
Must be closed with END_DECLARE_OPTION_PAGE.

Definition at line 150 of file optionpage.h.

◆ BEGIN_DECLARE_OPTION_PAGE_CUSTOM_CTOR

#define BEGIN_DECLARE_OPTION_PAGE_CUSTOM_CTOR (   SomeClass)
Value:
typedef ::Dialogs::OptionPage SomeClass##Base; \
class QT_UTILITIES_EXPORT SomeClass : public ::Dialogs::OptionPage { \
public: \
~SomeClass() override; \
bool apply() override; \
void reset() override; \
\
private:
#define QT_UTILITIES_EXPORT
Marks the symbol to be exported by the qtutilities library.

Declares a class inheriting from Dialogs::OptionPage in a convenient way.

Remarks
Must be closed with END_DECLARE_OPTION_PAGE.

Definition at line 166 of file optionpage.h.

◆ BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE

#define BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE (   SomeClass)
Value:
public: \
explicit SomeClass(QWidget *parentWidget = nullptr); \
\
private:
#define BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE_CUSTOM_CTOR(SomeClass)
Declares a class inheriting from Dialogs::UiFileBasedOptionPage in a convenient way.
Definition: optionpage.h:181

Declares a class inheriting from Dialogs::UiFileBasedOptionPage in a convenient way.

Remarks
Must be closed with END_DECLARE_OPTION_PAGE.

Definition at line 199 of file optionpage.h.

◆ BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE_CUSTOM_CTOR

#define BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE_CUSTOM_CTOR (   SomeClass)
Value:
namespace Ui { \
class SomeClass; \
} \
typedef ::Dialogs::UiFileBasedOptionPage<Ui::SomeClass> SomeClass##Base; \
class QT_UTILITIES_EXPORT SomeClass : public ::Dialogs::UiFileBasedOptionPage<Ui::SomeClass> { \
public: \
~SomeClass() override; \
bool apply() override; \
void reset() override; \
\
private:
#define QT_UTILITIES_EXPORT
Marks the symbol to be exported by the qtutilities library.

Declares a class inheriting from Dialogs::UiFileBasedOptionPage in a convenient way.

Remarks
Must be closed with END_DECLARE_OPTION_PAGE.

Definition at line 181 of file optionpage.h.

◆ DECLARE_EXTERN_UI_FILE_BASED_OPTION_PAGE

#define DECLARE_EXTERN_UI_FILE_BASED_OPTION_PAGE (   SomeClass)
Value:
namespace Dialogs { \
namespace Ui { \
class SomeClass; \
} \
extern template class UiFileBasedOptionPage<Ui::SomeClass>; \
}
Provides common dialogs such as AboutDialog, EnterPasswordDialog and SettingsDialog.
Definition: dialogutils.h:12

Declares external instantiation of class declared with BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE in a convenient way.

Remarks
Might be required when the class comes from an external library.

Definition at line 240 of file optionpage.h.

◆ DECLARE_EXTERN_UI_FILE_BASED_OPTION_PAGE_NS

#define DECLARE_EXTERN_UI_FILE_BASED_OPTION_PAGE_NS (   SomeNamespace,
  SomeClass 
)
Value:
namespace SomeNamespace { \
namespace Ui { \
class SomeClass; \
} \
} \
namespace Dialogs { \
extern template class UiFileBasedOptionPage<::SomeNamespace::Ui::SomeClass>; \
}
Provides common dialogs such as AboutDialog, EnterPasswordDialog and SettingsDialog.
Definition: dialogutils.h:12

Declares external instantiation of class declared with BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE inside a given namespace in a convenient way.

Remarks
Might be required when the class comes from an external library.

Definition at line 254 of file optionpage.h.

◆ DECLARE_OPTION_PAGE

#define DECLARE_OPTION_PAGE (   SomeClass)
Value:
DECLARE_SETUP_WIDGETS \
END_DECLARE_OPTION_PAGE
#define BEGIN_DECLARE_OPTION_PAGE(SomeClass)
Declares a class inheriting from Dialogs::OptionPage in a convenient way.
Definition: optionpage.h:150

Declares a class inheriting from Dialogs::OptionPage in a convenient way.

Remarks
Doesn't allow to declare additional class members.

Definition at line 289 of file optionpage.h.

◆ DECLARE_SETUP_WIDGETS

#define DECLARE_SETUP_WIDGETS
Value:
protected: \
QWidget *setupWidget() override; \
\
private:

Declares the method setupWidget() in a convenient way.

Remarks
Can be used between BEGIN_DECLARE_OPTION_PAGE and END_DECLARE_OPTION_PAGE.

Definition at line 269 of file optionpage.h.

◆ DECLARE_UI_FILE_BASED_OPTION_PAGE

#define DECLARE_UI_FILE_BASED_OPTION_PAGE (   SomeClass)
Value:
END_DECLARE_OPTION_PAGE
#define BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE(SomeClass)
Declares a class inheriting from Dialogs::UiFileBasedOptionPage in a convenient way.
Definition: optionpage.h:199

Declares a class inheriting from Dialogs::OptionPage in a convenient way.

Remarks
Doesn't allow to declare additional class members.

Definition at line 280 of file optionpage.h.

◆ DECLARE_UI_FILE_BASED_OPTION_PAGE_CUSTOM_SETUP

#define DECLARE_UI_FILE_BASED_OPTION_PAGE_CUSTOM_SETUP (   SomeClass)
Value:
DECLARE_SETUP_WIDGETS \
END_DECLARE_OPTION_PAGE
#define BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE(SomeClass)
Declares a class inheriting from Dialogs::UiFileBasedOptionPage in a convenient way.
Definition: optionpage.h:199

Declares a class inheriting from Dialogs::UiFileBasedOptionPage in a convenient way.

Remarks
Doesn't allow to declare additional class members.

Definition at line 299 of file optionpage.h.

◆ END_DECLARE_OPTION_PAGE

#define END_DECLARE_OPTION_PAGE
Value:
} \
;

Must be used after BEGIN_DECLARE_OPTION_PAGE and BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE.

Definition at line 210 of file optionpage.h.

◆ INSTANTIATE_UI_FILE_BASED_OPTION_PAGE

#define INSTANTIATE_UI_FILE_BASED_OPTION_PAGE (   SomeClass)
Value:
namespace Dialogs { \
template class UiFileBasedOptionPage<Ui::SomeClass>; \
}
Provides common dialogs such as AboutDialog, EnterPasswordDialog and SettingsDialog.
Definition: dialogutils.h:12

Instantiates a class declared with BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE in a convenient way.

Remarks
Might be required when the class is used by another application.

Definition at line 219 of file optionpage.h.

◆ INSTANTIATE_UI_FILE_BASED_OPTION_PAGE_NS

#define INSTANTIATE_UI_FILE_BASED_OPTION_PAGE_NS (   SomeNamespace,
  SomeClass 
)
Value:
namespace Dialogs { \
template class UiFileBasedOptionPage<::SomeNamespace::Ui::SomeClass>; \
}
Provides common dialogs such as AboutDialog, EnterPasswordDialog and SettingsDialog.
Definition: dialogutils.h:12

Instantiates a class declared with BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE inside a given namespace in a convenient way.

Remarks
Might be required when the class is used by another application.

Definition at line 230 of file optionpage.h.