Qt Utilities  5.6.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_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(); \
bool apply(); \
void reset(); \
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 148 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:163

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

Remarks
Must be closed with END_DECLARE_OPTION_PAGE.

Definition at line 180 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(); \
bool apply(); \
void reset(); \
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 163 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 214 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 226 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:148

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

Remarks
Doesn't allow to declare additional class members.

Definition at line 257 of file optionpage.h.

◆ DECLARE_SETUP_WIDGETS

#define DECLARE_SETUP_WIDGETS
Value:
protected: \
QWidget *setupWidget(); \
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 240 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:180

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

Remarks
Doesn't allow to declare additional class members.

Definition at line 249 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:180

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

Remarks
Doesn't allow to declare additional class members.

Definition at line 266 of file optionpage.h.

◆ END_DECLARE_OPTION_PAGE

#define END_DECLARE_OPTION_PAGE   };

Must be used after BEGIN_DECLARE_OPTION_PAGE and BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE.

Definition at line 189 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 196 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 205 of file optionpage.h.