Changeset View
Changeset View
Standalone View
Standalone View
libnotificationmanager/notificationsortproxymodel_p.h
Show All 33 Lines | |||||
34 | 34 | | |||
35 | public: | 35 | public: | ||
36 | explicit NotificationSortProxyModel(QObject *parent = nullptr); | 36 | explicit NotificationSortProxyModel(QObject *parent = nullptr); | ||
37 | ~NotificationSortProxyModel() override; | 37 | ~NotificationSortProxyModel() override; | ||
38 | 38 | | |||
39 | Notifications::SortMode sortMode() const; | 39 | Notifications::SortMode sortMode() const; | ||
40 | void setSortMode(Notifications::SortMode); | 40 | void setSortMode(Notifications::SortMode); | ||
41 | 41 | | |||
42 | Qt::SortOrder sortOrder() const; | ||||
43 | void setSortOrder(Qt::SortOrder sortOrder); | ||||
44 | | ||||
42 | signals: | 45 | signals: | ||
43 | void sortModeChanged(); | 46 | void sortModeChanged(); | ||
47 | void sortOrderChanged(); | ||||
44 | 48 | | |||
45 | protected: | 49 | protected: | ||
46 | bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const override; | 50 | bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const override; | ||
47 | 51 | | |||
48 | private: | 52 | private: | ||
49 | Notifications::SortMode m_sortMode = Notifications::SortByDate; | 53 | Notifications::SortMode m_sortMode = Notifications::SortByDate; | ||
54 | Qt::SortOrder m_sortOrder = Qt::DescendingOrder; | ||||
50 | 55 | | |||
51 | }; | 56 | }; | ||
52 | 57 | | |||
53 | } // namespace NotificationManager | 58 | } // namespace NotificationManager |