Changeset View
Changeset View
Standalone View
Standalone View
kcms/keyboard/layoutmodel/layout_list_sort_by_priority_proxy_model.h
- This file was added.
1 | #ifndef LAYOUTLISTENABLEDPROXYMODEL_H | ||||
---|---|---|---|---|---|
2 | #define LAYOUTLISTENABLEDPROXYMODEL_H | ||||
3 | | ||||
4 | #include <QSortFilterProxyModel> | ||||
5 | #include <layout_list_model_base.h> | ||||
6 | | ||||
7 | class LayoutListSortByPriorityProxyModel : public QSortFilterProxyModel, public LayoutListModelBase { | ||||
8 | Q_OBJECT | ||||
9 | public: | ||||
10 | LayoutListSortByPriorityProxyModel(QObject* parent); | ||||
11 | | ||||
12 | Q_INVOKABLE void applyOrderChanges(); | ||||
13 | Q_INVOKABLE void simulateMove(int src, int dst); | ||||
14 | Q_INVOKABLE void remove(int idx); | ||||
15 | | ||||
16 | //bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const override; | ||||
17 | | ||||
18 | Q_SIGNALS: | ||||
19 | void enabledOrderChanged(QVector<int> const& newOrder); | ||||
20 | void itemRemoved(int idx); | ||||
21 | void itemAdded(QString const& saveName); | ||||
22 | | ||||
23 | private: | ||||
24 | QVector<int> m_tempMapping; | ||||
25 | }; | ||||
26 | | ||||
27 | #endif // LAYOUTLISTENABLEDPROXYMODEL_H |