Changeset View
Changeset View
Standalone View
Standalone View
kcms/keyboard/kcmui/advanced_model.h
- This file was added.
1 | #ifndef ADVANCEDMODEL_H | ||||
---|---|---|---|---|---|
2 | #define ADVANCEDMODEL_H | ||||
3 | | ||||
4 | #include <QAbstractItemModel> | ||||
5 | #include "abstract_advanced_model.h" | ||||
6 | | ||||
7 | class AdvancedModel : public QAbstractItemModel, public AbstractAdvancedModel | ||||
8 | { | ||||
9 | Q_OBJECT | ||||
10 | | ||||
11 | public: | ||||
12 | explicit AdvancedModel(QObject *parent = nullptr); | ||||
13 | | ||||
14 | int rowCount(const QModelIndex& parent = QModelIndex()) const override; | ||||
15 | | ||||
16 | int columnCount(const QModelIndex& parent = QModelIndex()) const override; | ||||
17 | | ||||
18 | Qt::ItemFlags flags(const QModelIndex& index) const override; | ||||
19 | | ||||
20 | QModelIndex index(int row, int column, | ||||
21 | const QModelIndex& parent = QModelIndex()) const override; | ||||
22 | | ||||
23 | QModelIndex parent(const QModelIndex& index) const override; | ||||
24 | | ||||
25 | QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; | ||||
26 | | ||||
27 | bool setData(const QModelIndex &index, const QVariant &value, int role) override; | ||||
28 | | ||||
29 | QStringList enabledOptions() const; | ||||
30 | void setEnabledOptions(const QStringList &enabledOptions); | ||||
31 | | ||||
32 | private: | ||||
33 | QStringList m_enabledOptions; | ||||
34 | }; | ||||
35 | | ||||
36 | #endif // ADVANCEDMODEL_H |