-
Notifications
You must be signed in to change notification settings - Fork 26
/
SortTypeSelectionPage.qml
56 lines (46 loc) · 1.28 KB
/
SortTypeSelectionPage.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import QtQuick 2.0
import Sailfish.Silica 1.0
import Sailfish.Office.Files 1.0
Page {
id: root
signal sortSelected(int sortType)
SilicaListView {
anchors.fill: parent
model: sortModel
header: PageHeader {
//% "Sort by"
title: qsTrId("sailfish_office-he-sort_by")
}
delegate: BackgroundItem {
Label {
x: Theme.horizontalPageMargin
anchors.verticalCenter: parent.verticalCenter
text: name
color: highlighted ? Theme.highlightColor : Theme.primaryColor
}
onClicked: root.sortSelected(sortType)
}
VerticalScrollDecorator {}
}
ListModel {
id: sortModel
ListElement {
sortType: FilterModel.Name
//: Sort by name
//% "Name"
name: qsTrId("sailfish_office-me-sort_name")
}
ListElement {
sortType: FilterModel.Type
//: Sort by type
//% "Type"
name: qsTrId("sailfish_office-me-sort_type")
}
ListElement {
sortType: FilterModel.Date
//: Sort by date
//% "Date"
name: qsTrId("sailfish_office-me-sort_date")
}
}
}