Qt Utilities 6.14.0
Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models
Loading...
Searching...
No Matches
Signals | Public Member Functions | Properties | List of all members
QtUtilities::OptionCategory Class Reference

The OptionCategory class wraps associated option pages. More...

#include <optioncategory.h>

Inheritance diagram for QtUtilities::OptionCategory:
[legend]
Collaboration diagram for QtUtilities::OptionCategory:
[legend]

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
 

Detailed Description

The OptionCategory class wraps associated option pages.

Definition at line 18 of file optioncategory.h.

Constructor & Destructor Documentation

◆ OptionCategory()

QtUtilities::OptionCategory::OptionCategory ( QObject * parent = nullptr)
explicit

Constructs a option category.

Definition at line 17 of file optioncategory.cpp.

◆ ~OptionCategory()

QtUtilities::OptionCategory::~OptionCategory ( )
override

Destroys the option category.

Definition at line 26 of file optioncategory.cpp.

Member Function Documentation

◆ applyAllPages()

bool QtUtilities::OptionCategory::applyAllPages ( )

Applies all pages.

Remarks
Pages which have not been shown yet must have not been initialized anyways and hence are skipped.
See also
OptionPage::apply()

Definition at line 37 of file optioncategory.cpp.

◆ assignPages()

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.

◆ currentIndex()

int QtUtilities::OptionCategory::currentIndex ( ) const
inline

Returns the index of the currently shown page.

Remarks
The returned index might be invalid/out of range.
See also
setCurrentIndex()

Definition at line 98 of file optioncategory.h.

◆ displayName()

const QString & QtUtilities::OptionCategory::displayName ( ) const
inline

Returns the display name of the category.

Definition at line 56 of file optioncategory.h.

◆ displayNameChanged

QtUtilities::OptionCategory::displayNameChanged ( const QString & displayName)
signal

Emitted when the display name changed.

◆ icon()

const QIcon & QtUtilities::OptionCategory::icon ( ) const
inline

Returns the icon of the category.

Definition at line 72 of file optioncategory.h.

◆ iconChanged

QtUtilities::OptionCategory::iconChanged ( const QIcon & icon)
signal

Emitted when the icon changed.

◆ matches()

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.

◆ pages()

const QList< OptionPage * > & QtUtilities::OptionCategory::pages ( ) const
inline

Returns the assigned pages.

Definition at line 88 of file optioncategory.h.

◆ pagesChanged

QtUtilities::OptionCategory::pagesChanged ( const QList< QtUtilities::OptionPage * > & pages)
signal

Emitted when the pages changed.

◆ resetAllPages()

void QtUtilities::OptionCategory::resetAllPages ( )

Resets all pages.

Remarks
Pages which have not been shown yet must have not been initialized anyways and hence are skipped.
See also
OptionPage::reset()

Definition at line 56 of file optioncategory.cpp.

◆ retranslateAllPages()

void QtUtilities::OptionCategory::retranslateAllPages ( )

Triggers retranslation of all pages.

Remarks
Has no effect if the pages don't react to the LanguageChange event.

Definition at line 69 of file optioncategory.cpp.

◆ setCurrentIndex()

void QtUtilities::OptionCategory::setCurrentIndex ( int currentIndex)
inline

Sets the current index.

See also
currentIndex()

Definition at line 107 of file optioncategory.h.

◆ setDisplayName()

void QtUtilities::OptionCategory::setDisplayName ( const QString & displayName)
inline

Sets the display name of the category.

Definition at line 64 of file optioncategory.h.

◆ setIcon()

void QtUtilities::OptionCategory::setIcon ( const QIcon & icon)
inline

Sets the icon of the category.

Definition at line 80 of file optioncategory.h.

Property Documentation

◆ displayName

QString QtUtilities::OptionCategory::displayName
readwrite

Definition at line 20 of file optioncategory.h.

◆ icon

QIcon QtUtilities::OptionCategory::icon
readwrite

Definition at line 21 of file optioncategory.h.

◆ pages

QList<OptionPage *> QtUtilities::OptionCategory::pages
readwrite

Definition at line 22 of file optioncategory.h.


The documentation for this class was generated from the following files: