Qt Utilities  5.13.0
Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models
Signals | Public Member Functions | Properties | List of all members
Dialogs::OptionCategory Class Reference

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

#include <optioncategory.h>

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

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 () override
 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...
 

Detailed Description

The OptionCategory class wraps associated option pages.

Definition at line 14 of file optioncategory.h.

Constructor & Destructor Documentation

◆ OptionCategory()

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

Constructs a option category.

Definition at line 14 of file optioncategory.cpp.

◆ ~OptionCategory()

Dialogs::OptionCategory::~OptionCategory ( )
override

Destroys the option category.

Definition at line 23 of file optioncategory.cpp.

Member Function Documentation

◆ applyAllPages()

bool Dialogs::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 34 of file optioncategory.cpp.

◆ assignPages()

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.

◆ currentIndex()

int Dialogs::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 95 of file optioncategory.h.

◆ displayName()

const QString& Dialogs::OptionCategory::displayName ( ) const

◆ displayNameChanged

Dialogs::OptionCategory::displayNameChanged ( )
signal

Emitted when the display name changed.

◆ icon()

const QIcon& Dialogs::OptionCategory::icon ( ) const

◆ iconChanged

Dialogs::OptionCategory::iconChanged ( )
signal

Emitted when the icon changed.

◆ matches()

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.

◆ pages()

const QList<OptionPage *> Dialogs::OptionCategory::pages ( ) const

◆ pagesChanged

Dialogs::OptionCategory::pagesChanged ( )
signal

Emitted when the pages changed.

◆ resetAllPages()

void Dialogs::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 53 of file optioncategory.cpp.

◆ setCurrentIndex()

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

Sets the current index.

See also
currentIndex()

Definition at line 104 of file optioncategory.h.

◆ setDisplayName()

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

Sets the display name of the category.

Definition at line 59 of file optioncategory.h.

◆ setIcon()

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

Sets the icon of the category.

Definition at line 76 of file optioncategory.h.

Property Documentation

◆ displayName

const QString & Dialogs::OptionCategory::displayName
inlinereadwrite

Returns the display name of the category.

Definition at line 16 of file optioncategory.h.

◆ icon

const QIcon & Dialogs::OptionCategory::icon
inlinereadwrite

Returns the icon of the category.

Definition at line 17 of file optioncategory.h.

◆ pages

const QList< OptionPage * > Dialogs::OptionCategory::pages
inlinereadwrite

Returns the assigned pages.

Definition at line 18 of file optioncategory.h.


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