Qt Utilities 6.14.4
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 (const QString &displayName) |
Emitted when the display name changed. | |
void | iconChanged (const QIcon &icon) |
Emitted when the icon changed. | |
void | pagesChanged (const QList< QtUtilities::OptionPage * > &pages) |
Emitted when the pages changed. | |
Public Member Functions | |
OptionCategory (QObject *parent=nullptr) | |
Constructs a option category. | |
~OptionCategory () override | |
Destroys the option category. | |
const QString & | displayName () const |
Returns the display name of the category. | |
void | setDisplayName (const QString &displayName) |
Sets the display name of the category. | |
const QIcon & | icon () const |
Returns the icon of the category. | |
void | setIcon (const QIcon &icon) |
Sets the icon of the category. | |
const QList< OptionPage * > & | pages () const |
Returns the assigned pages. | |
void | assignPages (const QList< OptionPage * > &pages) |
Assigns the specified pages to the category. | |
bool | applyAllPages () |
Applies all pages. | |
void | resetAllPages () |
Resets all pages. | |
void | retranslateAllPages () |
Triggers retranslation of all pages. | |
bool | matches (const QString &searchKeyWord) const |
Returns whether the option category matches the specified searchKeyWord. | |
int | currentIndex () const |
Returns the index of the currently shown page. | |
void | setCurrentIndex (int currentIndex) |
Sets the current index. | |
Properties | |
QString | displayName |
QIcon | icon |
QList< OptionPage * > | pages |
The OptionCategory class wraps associated option pages.
Definition at line 18 of file optioncategory.h.
|
explicit |
Constructs a option category.
Definition at line 17 of file optioncategory.cpp.
|
override |
Destroys the option category.
Definition at line 26 of file optioncategory.cpp.
bool QtUtilities::OptionCategory::applyAllPages | ( | ) |
Applies all pages.
Definition at line 37 of file optioncategory.cpp.
void QtUtilities::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 99 of file optioncategory.cpp.
|
inline |
Returns the index of the currently shown page.
Definition at line 98 of file optioncategory.h.
|
inline |
Returns the display name of the category.
Definition at line 56 of file optioncategory.h.
|
signal |
Emitted when the display name changed.
|
inline |
Returns the icon of the category.
Definition at line 72 of file optioncategory.h.
|
signal |
Emitted when the icon changed.
bool QtUtilities::OptionCategory::matches | ( | const QString & | searchKeyWord | ) | const |
Returns whether the option category matches the specified searchKeyWord.
Definition at line 83 of file optioncategory.cpp.
|
inline |
Returns the assigned pages.
Definition at line 88 of file optioncategory.h.
|
signal |
Emitted when the pages changed.
void QtUtilities::OptionCategory::resetAllPages | ( | ) |
Resets all pages.
Definition at line 56 of file optioncategory.cpp.
void QtUtilities::OptionCategory::retranslateAllPages | ( | ) |
Triggers retranslation of all pages.
Definition at line 69 of file optioncategory.cpp.
|
inline |
|
inline |
Sets the display name of the category.
Definition at line 64 of file optioncategory.h.
|
inline |
Sets the icon of the category.
Definition at line 80 of file optioncategory.h.
|
readwrite |
Definition at line 20 of file optioncategory.h.
|
readwrite |
Definition at line 21 of file optioncategory.h.
|
readwrite |
Definition at line 22 of file optioncategory.h.