Dekko
Loading...
Searching...
No Matches
Settings.qml
1import QtQuick 2.4
2import Lomiri.Components 1.3
3import Dekko.Mail.API 1.0
4import PlugMan 1.0
5import Dekko.Lomiri.Components 1.0
7DekkoPage {
8 id: sp
9
10 pageHeader {
11 title: qsTr("Settings")
12 backAction: Action {
13 iconName: "back"
14 onTriggered: ViewActions.closeSettings()
15 }
16 }
17
19 id: registry
20 location: "Dekko::Settings::PluginAction"
21 defaultActions: [
22// Action {
23// iconName: "mail-unread"
24// text: qsTr("Mail")
25// onTriggered: ViewActions.pushToStageArea(
26// ViewKeys.settingsStack1,
27// Qt.resolvedUrl("./MailSettings.qml"),
28// {}
29// )
30// },
31// Action {
32// iconName: "address-book-app-symbolic"
33// text: qsTr("Contacts")
35// },
36// Action {
37// iconName: "calendar"
38// text: qsTr("Calendar")
39// onTriggered: console.log("Action Clicked")
40// },
41// Action {
42// iconName: "stock_note"
43// text: qsTr("Notes")
44// onTriggered: console.log("Action Clicked")
45// }
46// Action {
47// iconName: "account"
48// text: qsTr("Accounts")
49// onTriggered: ViewActions.pushToStageArea(
50// ViewKeys.settingsStack1,
51// Qt.resolvedUrl("./ManageAccountsPage.qml"),
52// {}
53// )
54// }
55 ]
56 }
57
59 margins: 0
60 spacing: 0
61 Repeater {
62 id: settingsRepeater
63 model: registry.actions
64 delegate: ListItem {
65 id: li
66 property Action action: modelData
67 height: layout.height + divider.height
68 ListItemLayout {
69 id: layout
70 title.text: li.action.text
71 Icon {
72 height: units.gu(3)
73 width: height
74 name: li.action.iconName ? li.action.iconName : ""
75 source: li.action.iconSource ? li.action.iconSource : ""
76 SlotsLayout.position: SlotsLayout.Leading
77 }
78
79 ProgressionSlot {}
80 }
81 onClicked: li.action.trigger()
82 }
83 }
84 }
85}