Qt Utilities 6.14.4
Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models
Loading...
Searching...
No Matches
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  QtUtilities::OptionPageWidget
 
class  QtUtilities::OptionPage
 The OptionPage class is the base class for SettingsDialog pages. More...
 
class  QtUtilities::UiFileBasedOptionPage< UiClass >
 

Namespaces

namespace  QtUtilities
 !
 

Macros

#define BEGIN_DECLARE_TYPEDEF_OPTION_PAGE(SomeClass)
 Declares the base class for a class inheriting from Dialogs::OptionPage.
 
#define BEGIN_DECLARE_OPTION_PAGE(SomeClass)
 Declares a class inheriting from Dialogs::OptionPage in a convenient way.
 
#define BEGIN_DECLARE_OPTION_PAGE_CUSTOM_CTOR(SomeClass)
 Declares a class inheriting from Dialogs::OptionPage in a convenient way.
 
#define BEGIN_DECLARE_TYPEDEF_UI_FILE_BASED_OPTION_PAGE(SomeClass)
 Declares the base class for a class inheriting from Dialogs::UiFileBasedOptionPage.
 
#define BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE_CUSTOM_CTOR(SomeClass)
 Declares a class inheriting from Dialogs::UiFileBasedOptionPage in a convenient way.
 
#define BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE(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 INSTANTIATE_UI_FILE_BASED_OPTION_PAGE(SomeClass)
 Instantiates a class declared with BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE in a convenient way.
 
#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.
 
#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.
 
#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.
 
#define DECLARE_SETUP_WIDGETS
 Declares the method setupWidget() in a convenient way.
 
#define DECLARE_UI_FILE_BASED_OPTION_PAGE(SomeClass)
 Declares a class inheriting from Dialogs::OptionPage in a convenient way.
 
#define DECLARE_OPTION_PAGE(SomeClass)
 Declares a class inheriting from Dialogs::OptionPage in a convenient way.
 
#define DECLARE_UI_FILE_BASED_OPTION_PAGE_CUSTOM_SETUP(SomeClass)
 Declares a class inheriting from Dialogs::UiFileBasedOptionPage in a convenient way.
 

Macro Definition Documentation

◆ BEGIN_DECLARE_OPTION_PAGE

#define BEGIN_DECLARE_OPTION_PAGE ( SomeClass)
Value:
class QT_UTILITIES_EXPORT SomeClass : public ::QtUtilities::OptionPage { \
public: \
explicit SomeClass(QWidget *parentWidget = nullptr); \
~SomeClass() override; \
bool apply() override; \
void reset() override; \
\
private:
The OptionPage class is the base class for SettingsDialog pages.
Definition optionpage.h:34
virtual void reset()=0
Discards altered settings and resets relevant widgets.
virtual bool apply()=0
Applies altered settings.
#define QT_UTILITIES_EXPORT
Marks the symbol to be exported by the qtutilities library.
Definition global.h:14
#define BEGIN_DECLARE_TYPEDEF_OPTION_PAGE(SomeClass)
Declares the base class for a class inheriting from Dialogs::OptionPage.
Definition optionpage.h:168

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

Remarks
Must be closed with END_DECLARE_OPTION_PAGE.

Definition at line 175 of file optionpage.h.

◆ BEGIN_DECLARE_OPTION_PAGE_CUSTOM_CTOR

#define BEGIN_DECLARE_OPTION_PAGE_CUSTOM_CTOR ( SomeClass)
Value:
class QT_UTILITIES_EXPORT SomeClass : public ::QtUtilities::OptionPage { \
public: \
~SomeClass() override; \
bool apply() override; \
void reset() override; \
\
private:

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

Remarks
Must be closed with END_DECLARE_OPTION_PAGE.

Definition at line 191 of file optionpage.h.

◆ BEGIN_DECLARE_TYPEDEF_OPTION_PAGE

#define BEGIN_DECLARE_TYPEDEF_OPTION_PAGE ( SomeClass)
Value:
using SomeClass##Base = ::QtUtilities::OptionPage;

Declares the base class for a class inheriting from Dialogs::OptionPage.

Definition at line 168 of file optionpage.h.

◆ BEGIN_DECLARE_TYPEDEF_UI_FILE_BASED_OPTION_PAGE

#define BEGIN_DECLARE_TYPEDEF_UI_FILE_BASED_OPTION_PAGE ( SomeClass)
Value:
namespace Ui { \
class SomeClass; \
} \

Declares the base class for a class inheriting from Dialogs::UiFileBasedOptionPage.

Definition at line 204 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:215

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

Remarks
Must be closed with END_DECLARE_OPTION_PAGE.

Definition at line 230 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:
class QT_UTILITIES_EXPORT SomeClass : public ::QtUtilities::UiFileBasedOptionPage<Ui::SomeClass> { \
public: \
~SomeClass() override; \
bool apply() override; \
void reset() override; \
\
private:
void reset() override=0
Discards altered settings and resets relevant widgets.
bool apply() override=0
Applies altered settings.
#define BEGIN_DECLARE_TYPEDEF_UI_FILE_BASED_OPTION_PAGE(SomeClass)
Declares the base class for a class inheriting from Dialogs::UiFileBasedOptionPage.
Definition optionpage.h:204

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

Remarks
Must be closed with END_DECLARE_OPTION_PAGE.

Definition at line 215 of file optionpage.h.

◆ DECLARE_EXTERN_UI_FILE_BASED_OPTION_PAGE

#define DECLARE_EXTERN_UI_FILE_BASED_OPTION_PAGE ( SomeClass)
Value:
namespace QtUtilities { \
namespace Ui { \
class SomeClass; \
} \
extern template class UiFileBasedOptionPage<Ui::SomeClass>; \
}
The UiFileBasedOptionPage class is the base class for SettingsDialog pages using UI files to describe...

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 271 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 QtUtilities { \
}

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 285 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:175

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

Remarks
Doesn't allow to declare additional class members.

Definition at line 320 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 300 of file optionpage.h.

◆ DECLARE_UI_FILE_BASED_OPTION_PAGE

#define DECLARE_UI_FILE_BASED_OPTION_PAGE ( SomeClass)
Value:
#define BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE(SomeClass)
Declares a class inheriting from Dialogs::UiFileBasedOptionPage in a convenient way.
Definition optionpage.h:230
#define END_DECLARE_OPTION_PAGE
Must be used after BEGIN_DECLARE_OPTION_PAGE and BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE.
Definition optionpage.h:241

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

Remarks
Doesn't allow to declare additional class members.

Definition at line 311 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

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

Remarks
Doesn't allow to declare additional class members.

Definition at line 330 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 241 of file optionpage.h.

◆ INSTANTIATE_UI_FILE_BASED_OPTION_PAGE

#define INSTANTIATE_UI_FILE_BASED_OPTION_PAGE ( SomeClass)
Value:
namespace QtUtilities { \
}

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 250 of file optionpage.h.

◆ INSTANTIATE_UI_FILE_BASED_OPTION_PAGE_NS

#define INSTANTIATE_UI_FILE_BASED_OPTION_PAGE_NS ( SomeNamespace,
SomeClass )
Value:

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 261 of file optionpage.h.