Changeset View
Changeset View
Standalone View
Standalone View
kcmkwin/kwindecoration/declarative-plugin/buttonsmodel.h
Show All 39 Lines | 36 | public: | |||
---|---|---|---|---|---|
40 | QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; | 40 | QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; | ||
41 | int rowCount(const QModelIndex& parent = QModelIndex()) const override; | 41 | int rowCount(const QModelIndex& parent = QModelIndex()) const override; | ||
42 | QHash< int, QByteArray > roleNames() const override; | 42 | QHash< int, QByteArray > roleNames() const override; | ||
43 | 43 | | |||
44 | QVector< DecorationButtonType > buttons() const { | 44 | QVector< DecorationButtonType > buttons() const { | ||
45 | return m_buttons; | 45 | return m_buttons; | ||
46 | } | 46 | } | ||
47 | 47 | | |||
48 | Q_INVOKABLE void clear(); | ||||
48 | Q_INVOKABLE void remove(int index); | 49 | Q_INVOKABLE void remove(int index); | ||
49 | Q_INVOKABLE void up(int index); | 50 | Q_INVOKABLE void up(int index); | ||
50 | Q_INVOKABLE void down(int index); | 51 | Q_INVOKABLE void down(int index); | ||
51 | Q_INVOKABLE void move(int sourceIndex, int targetIndex); | 52 | Q_INVOKABLE void move(int sourceIndex, int targetIndex); | ||
52 | 53 | | |||
54 | void replace(const QVector< DecorationButtonType > &buttons); | ||||
53 | void add(DecorationButtonType type); | 55 | void add(DecorationButtonType type); | ||
54 | Q_INVOKABLE void add(int index, int type); | 56 | Q_INVOKABLE void add(int index, int type); | ||
55 | 57 | | |||
56 | private: | 58 | private: | ||
57 | QVector< DecorationButtonType > m_buttons; | 59 | QVector< DecorationButtonType > m_buttons; | ||
58 | }; | 60 | }; | ||
59 | 61 | | |||
60 | } | 62 | } | ||
61 | } | 63 | } | ||
62 | 64 | | |||
63 | #endif | 65 | #endif | ||
64 | 66 | |