Qt Utilities
5.11.0
Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models
|
The OptionCategory class wraps associated option pages. More...
#include <optioncategory.h>
Signals | |
void | displayNameChanged () |
Emitted when the display name changed. More... | |
void | iconChanged () |
Emitted when the icon changed. More... | |
void | pagesChanged () |
Emitted when the pages changed. More... | |
Public Member Functions | |
OptionCategory (QObject *parent=nullptr) | |
Constructs a option category. More... | |
~OptionCategory () | |
Destroys the option category. More... | |
const QString & | displayName () const |
void | setDisplayName (const QString &displayName) |
Sets the display name of the category. More... | |
const QIcon & | icon () const |
void | setIcon (const QIcon &icon) |
Sets the icon of the category. More... | |
const QList< OptionPage * > | pages () const |
void | assignPages (const QList< OptionPage *> pages) |
Assigns the specified pages to the category. More... | |
bool | applyAllPages () |
Applies all pages. More... | |
void | resetAllPages () |
Resets all pages. More... | |
bool | matches (const QString &searchKeyWord) const |
Returns whether the option category matches the specified searchKeyWord. More... | |
int | currentIndex () const |
Returns the index of the currently shown page. More... | |
void | setCurrentIndex (int currentIndex) |
Sets the current index. More... | |
Properties | |
QString | displayName |
Returns the display name of the category. More... | |
QIcon | icon |
Returns the icon of the category. More... | |
QList< OptionPage * > | pages |
Returns the assigned pages. More... | |
The OptionCategory class wraps associated option pages.
Definition at line 14 of file optioncategory.h.
|
explicit |
Constructs a option category.
Definition at line 14 of file optioncategory.cpp.
Dialogs::OptionCategory::~OptionCategory | ( | ) |
Destroys the option category.
Definition at line 23 of file optioncategory.cpp.
bool Dialogs::OptionCategory::applyAllPages | ( | ) |
Applies all pages.
Definition at line 34 of file optioncategory.cpp.
void Dialogs::OptionCategory::assignPages | ( | const QList< OptionPage *> | pages | ) |
Assigns the specified pages to the category.
Previously assigned pages get deleted. The pagesChanged() signal is emitted. The category takes ownership over the given pages.
Definition at line 82 of file optioncategory.cpp.
|
inline |
Returns the index of the currently shown page.
Definition at line 95 of file optioncategory.h.
const QString& Dialogs::OptionCategory::displayName | ( | ) | const |
|
signal |
Emitted when the display name changed.
const QIcon& Dialogs::OptionCategory::icon | ( | ) | const |
|
signal |
Emitted when the icon changed.
bool Dialogs::OptionCategory::matches | ( | const QString & | searchKeyWord | ) | const |
Returns whether the option category matches the specified searchKeyWord.
Definition at line 66 of file optioncategory.cpp.
const QList<OptionPage *> Dialogs::OptionCategory::pages | ( | ) | const |
|
signal |
Emitted when the pages changed.
void Dialogs::OptionCategory::resetAllPages | ( | ) |
Resets all pages.
Definition at line 53 of file optioncategory.cpp.
|
inline |
|
inline |
Sets the display name of the category.
Definition at line 59 of file optioncategory.h.
|
inline |
Sets the icon of the category.
Definition at line 76 of file optioncategory.h.
|
inlinereadwrite |
Returns the display name of the category.
Definition at line 16 of file optioncategory.h.
|
inlinereadwrite |
Returns the icon of the category.
Definition at line 17 of file optioncategory.h.
|
inlinereadwrite |
Returns the assigned pages.
Definition at line 18 of file optioncategory.h.