Qt Utilities 6.14.3
Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models
|
The OptionCategoryModel class is used by SettingsDialog to store and display option categories. More...
#include <optioncategorymodel.h>
Public Member Functions | |
OptionCategoryModel (QObject *parent=nullptr) | |
Constructs an option category model. | |
OptionCategoryModel (const QList< OptionCategory * > &categories, QObject *parent=nullptr) | |
Constructs an option category model with the specified categories. | |
~OptionCategoryModel () override | |
Destroys the option category model. | |
const QList< OptionCategory * > & | categories () const |
Returns the categories. | |
OptionCategory * | category (const QModelIndex &index) const |
Returns the category for the specified model index. | |
OptionCategory * | category (int row) const |
Returns the category for the specified row. | |
void | setCategories (const QList< OptionCategory * > &categories) |
Sets the categories for the model. | |
int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
Properties | |
QList< OptionCategory * > | categories |
The OptionCategoryModel class is used by SettingsDialog to store and display option categories.
Definition at line 14 of file optioncategorymodel.h.
|
explicit |
Constructs an option category model.
Definition at line 22 of file optioncategorymodel.cpp.
|
explicit |
Constructs an option category model with the specified categories.
Definition at line 31 of file optioncategorymodel.cpp.
|
override |
Destroys the option category model.
Definition at line 43 of file optioncategorymodel.cpp.
|
inline |
Returns the categories.
Definition at line 42 of file optioncategorymodel.h.
|
inline |
Returns the category for the specified model index.
Definition at line 52 of file optioncategorymodel.h.
|
inline |
Returns the category for the specified row.
Definition at line 62 of file optioncategorymodel.h.
|
override |
Definition at line 70 of file optioncategorymodel.cpp.
|
override |
Definition at line 65 of file optioncategorymodel.cpp.
void QtUtilities::OptionCategoryModel::setCategories | ( | const QList< OptionCategory * > & | categories | ) |
Sets the categories for the model.
The model takes ownership over the given categories.
Definition at line 52 of file optioncategorymodel.cpp.
|
readwrite |
Definition at line 16 of file optioncategorymodel.h.