Changeset View
Changeset View
Standalone View
Standalone View
discover/qml/ApplicationsListPage.qml
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Line(s) | 30 | DiscoverPage { | |||
---|---|---|---|---|---|
55 | } | 55 | } | ||
56 | signal clearSearch() | 56 | signal clearSearch() | ||
57 | 57 | | |||
58 | supportsRefreshing: true | 58 | supportsRefreshing: true | ||
59 | onRefreshingChanged: if (refreshing) { | 59 | onRefreshingChanged: if (refreshing) { | ||
60 | appsModel.invalidateFilter() | 60 | appsModel.invalidateFilter() | ||
61 | refreshing = false | 61 | refreshing = false | ||
62 | } | 62 | } | ||
63 | | ||||
64 | contextualActions: [ | ||||
65 | Kirigami.Action { | ||||
66 | text: i18n("Sort") | ||||
67 | Kirigami.Action { | ||||
68 | text: i18n("Name") | ||||
69 | onTriggered: { | ||||
70 | appsModel.sortRole = ResourcesProxyModel.NameRole | ||||
71 | appsModel.sortOrder = Qt.AscendingOrder | ||||
72 | } | ||||
73 | checked: appsModel.sortRole == ResourcesProxyModel.NameRole | ||||
74 | } | ||||
75 | Kirigami.Action { | ||||
76 | text: i18n("Rating") | ||||
77 | onTriggered: { | ||||
78 | appsModel.sortRole = ResourcesProxyModel.RatingPointsRole | ||||
79 | appsModel.sortOrder = Qt.AscendingOrder | ||||
80 | } | ||||
81 | checked: appsModel.sortRole == ResourcesProxyModel.RatingPointsRole | ||||
82 | } | ||||
83 | Kirigami.Action { | ||||
84 | text: i18n("Size") | ||||
85 | onTriggered: { | ||||
86 | appsModel.sortRole = ResourcesProxyModel.SizeRole | ||||
87 | appsModel.sortOrder = Qt.AscendingOrder | ||||
88 | } | ||||
89 | checked: appsModel.sortRole == ResourcesProxyModel.SizeRole | ||||
90 | } | ||||
91 | } | ||||
92 | ] | ||||
93 | | ||||
63 | ListView { | 94 | ListView { | ||
64 | id: apps | 95 | id: apps | ||
65 | 96 | | |||
66 | anchors { | 97 | anchors { | ||
67 | top: parent.top | 98 | top: parent.top | ||
68 | topMargin: Kirigami.Units.gridUnit | 99 | topMargin: Kirigami.Units.gridUnit | ||
69 | } | 100 | } | ||
70 | 101 | | |||
▲ Show 20 Lines • Show All 96 Lines • Show Last 20 Lines |