1 #ifndef DIALOGS_OPTIONCATEGORYMODEL_H 2 #define DIALOGS_OPTIONCATEGORYMODEL_H 7 #include <QAbstractListModel> 19 explicit OptionCategoryModel(
const QList<OptionCategory *> &categories, QObject *parent =
nullptr);
22 const QList<OptionCategory *> &categories()
const;
25 void setCategories(
const QList<OptionCategory *> categories);
26 int rowCount(
const QModelIndex &parent = QModelIndex())
const;
27 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const;
30 void categoryChangedName();
31 void categoryChangedIcon();
34 QList<OptionCategory *> m_categories;
55 return (index.isValid())
56 ? category(index.row())
67 return row < m_categories.size() ? m_categories.at(row) :
nullptr;
72 #endif // DIALOGS_OPTIONCATEGORYMODEL_H The OptionCategoryModel class is used by SettingsDialog to store and display option categories...
The OptionCategory class wraps associated option pages.
OptionCategory * category(const QModelIndex &index) const
Returns the category for the specified model index.
const QList< OptionCategory * > & categories() const
Returns the categories.
#define QT_UTILITIES_EXPORT
Marks the symbol to be exported by the qtutilities library.
Provides common dialogs such as AboutDialog, EnterPasswordDialog and SettingsDialog.