Qt Utilities: settingsdialog/optionpage.h File Reference

Qt Utilities 6.22.0 Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models

Loading...
Searching...
No Matches
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 | 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:
BEGIN_DECLARE_TYPEDEF_OPTION_PAGE(SomeClass) \
class QT_UTILITIES_EXPORT SomeClass : public ::QtUtilities::OptionPage { \
public: \
explicit SomeClass(QWidget *parentWidget = nullptr); \
~SomeClass() override; \
bool apply() override; \
void reset() override; \
\
private:
QtUtilities::OptionPage
The OptionPage class is the base class for SettingsDialog pages.
Definition optionpage.h:34
QtUtilities::OptionPage::reset
virtual void reset()=0
Discards altered settings and resets relevant widgets.
QtUtilities::OptionPage::apply
virtual bool apply()=0
Applies altered settings.
QT_UTILITIES_EXPORT
#define QT_UTILITIES_EXPORT
Marks the symbol to be exported by the qtutilities library.
Definition global.h:14
BEGIN_DECLARE_TYPEDEF_OPTION_PAGE
#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:
BEGIN_DECLARE_TYPEDEF_OPTION_PAGE(SomeClass) \
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; \
} \
using SomeClass##Base = ::QtUtilities::UiFileBasedOptionPage<Ui::SomeClass>;
QtUtilities::UiFileBasedOptionPage
Definition optionpage.h:110

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:
BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE_CUSTOM_CTOR(SomeClass) \
public: \
explicit SomeClass(QWidget *parentWidget = nullptr); \
\
private:
BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE_CUSTOM_CTOR
#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:
BEGIN_DECLARE_TYPEDEF_UI_FILE_BASED_OPTION_PAGE(SomeClass) \
class QT_UTILITIES_EXPORT SomeClass : public ::QtUtilities::UiFileBasedOptionPage<Ui::SomeClass> { \
public: \
~SomeClass() override; \
bool apply() override; \
void reset() override; \
\
private:
QtUtilities::UiFileBasedOptionPage::reset
void reset() override=0
Discards altered settings and resets relevant widgets.
QtUtilities::UiFileBasedOptionPage::apply
bool apply() override=0
Applies altered settings.
BEGIN_DECLARE_TYPEDEF_UI_FILE_BASED_OPTION_PAGE
#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>; \
}
UiFileBasedOptionPage
The UiFileBasedOptionPage class is the base class for SettingsDialog pages using UI files to describe...
QtUtilities
!
Definition trylocker.h:8

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 { \
extern template class UiFileBasedOptionPage<::SomeNamespace::Ui::SomeClass>; \
}

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:
BEGIN_DECLARE_OPTION_PAGE(SomeClass) \
DECLARE_SETUP_WIDGETS \
END_DECLARE_OPTION_PAGE
BEGIN_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:
BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE(SomeClass) \
END_DECLARE_OPTION_PAGE
BEGIN_DECLARE_UI_FILE_BASED_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:230
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 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:
BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE(SomeClass) \
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 { \
template class UiFileBasedOptionPage<Ui::SomeClass>; \
}

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:
namespace QtUtilities { \
template class UiFileBasedOptionPage<::SomeNamespace::Ui::SomeClass>; \
}

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.