Changeset View
Changeset View
Standalone View
Standalone View
kcmkwin/common/effectsmodel.h
- This file was moved from kcmkwin/common/effectmodel.h.
Show All 28 Lines | |||||
29 | #include <QAbstractItemModel> | 29 | #include <QAbstractItemModel> | ||
30 | #include <QString> | 30 | #include <QString> | ||
31 | #include <QUrl> | 31 | #include <QUrl> | ||
32 | #include <QWindow> | 32 | #include <QWindow> | ||
33 | 33 | | |||
34 | namespace KWin | 34 | namespace KWin | ||
35 | { | 35 | { | ||
36 | 36 | | |||
37 | class KWIN_EXPORT EffectModel : public QAbstractItemModel | 37 | class KWIN_EXPORT EffectsModel : public QAbstractItemModel | ||
38 | { | 38 | { | ||
39 | Q_OBJECT | 39 | Q_OBJECT | ||
40 | 40 | | |||
41 | public: | 41 | public: | ||
42 | /** | 42 | /** | ||
43 | * This enum type is used to specify data roles. | 43 | * This enum type is used to specify data roles. | ||
44 | **/ | 44 | **/ | ||
45 | enum AdditionalRoles { | 45 | enum AdditionalRoles { | ||
▲ Show 20 Lines • Show All 88 Lines • ▼ Show 20 Line(s) | 125 | enum class Status { | |||
134 | **/ | 134 | **/ | ||
135 | EnabledUndeterminded = Qt::PartiallyChecked, | 135 | EnabledUndeterminded = Qt::PartiallyChecked, | ||
136 | /** | 136 | /** | ||
137 | * The effect is enabled. | 137 | * The effect is enabled. | ||
138 | **/ | 138 | **/ | ||
139 | Enabled = Qt::Checked | 139 | Enabled = Qt::Checked | ||
140 | }; | 140 | }; | ||
141 | 141 | | |||
142 | explicit EffectModel(QObject *parent = nullptr); | 142 | explicit EffectsModel(QObject *parent = nullptr); | ||
143 | 143 | | |||
144 | // Reimplemented from QAbstractItemModel. | 144 | // Reimplemented from QAbstractItemModel. | ||
145 | QHash<int, QByteArray> roleNames() const override; | 145 | QHash<int, QByteArray> roleNames() const override; | ||
146 | QModelIndex index(int row, int column, const QModelIndex &parent = {}) const override; | 146 | QModelIndex index(int row, int column, const QModelIndex &parent = {}) const override; | ||
147 | QModelIndex parent(const QModelIndex &child) const override; | 147 | QModelIndex parent(const QModelIndex &child) const override; | ||
148 | int rowCount(const QModelIndex &parent = {}) const override; | 148 | int rowCount(const QModelIndex &parent = {}) const override; | ||
149 | int columnCount(const QModelIndex &parent = {}) const override; | 149 | int columnCount(const QModelIndex &parent = {}) const override; | ||
150 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; | 150 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; | ||
▲ Show 20 Lines • Show All 98 Lines • ▼ Show 20 Line(s) | |||||
249 | 249 | | |||
250 | private: | 250 | private: | ||
251 | void loadBuiltInEffects(const KConfigGroup &kwinConfig, const KPluginInfo::List &configs); | 251 | void loadBuiltInEffects(const KConfigGroup &kwinConfig, const KPluginInfo::List &configs); | ||
252 | void loadJavascriptEffects(const KConfigGroup &kwinConfig); | 252 | void loadJavascriptEffects(const KConfigGroup &kwinConfig); | ||
253 | void loadPluginEffects(const KConfigGroup &kwinConfig, const KPluginInfo::List &configs); | 253 | void loadPluginEffects(const KConfigGroup &kwinConfig, const KPluginInfo::List &configs); | ||
254 | 254 | | |||
255 | QVector<EffectData> m_effectsList; | 255 | QVector<EffectData> m_effectsList; | ||
256 | 256 | | |||
257 | Q_DISABLE_COPY(EffectModel) | 257 | Q_DISABLE_COPY(EffectsModel) | ||
258 | }; | 258 | }; | ||
259 | 259 | | |||
260 | } | 260 | } |