Dekko
Loading...
Searching...
No Matches
MailSettings.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("Mail Settings")
12 backAction: Action {
13 iconName: "back"
14 onTriggered: ViewActions.popStageArea(ViewKeys.settingsStack1)
15 }
16 }
17
19 id: registry
20 location: "Dekko::Settings::MailAction"
21 defaultActions: [
22 Action {
23 iconName: "account"
24 text: qsTr("Accounts")
25 onTriggered: ViewActions.pushToStageArea(
26 ViewKeys.settingsStack1,
27 Qt.resolvedUrl("./ManageAccountsPage.qml"),
28 {}
29 )
30 },
31
32 Action {
33 iconName: "contact-group"
34 text: qsTr("Identities")
35 onTriggered: ViewActions.pushToStageArea(
36 ViewKeys.settingsStack1,
37 Qt.resolvedUrl("./IdentitiesListPage.qml"),
38 {}
39 )
40 },
41
42 Action {
43 iconName: "video-display-symbolic"
44 text: qsTr("Display")
45 onTriggered: SettingsActions.openSettingsGroup(
46 Qt.resolvedUrl("./DisplaySettingsPage.qml")
47 )
48 },
49 Action {
50 iconName: "private-browsing"
51 text: qsTr("Privacy")
52 onTriggered: SettingsActions.openSettingsGroup(
53 Qt.resolvedUrl("./PrivacySettingsPage.qml")
54 )
55 }
56 ]
57 }
58
60 margins: 0
61 spacing: 0
62
63 Repeater {
64 id: settingsRepeater
65 model: registry.actions
66 delegate: ListItem {
67 id: li
68 property Action action: modelData
69 height: layout.height + divider.height
70 ListItemLayout {
71 id: layout
72 title.text: li.action.text
73 Icon {
74 height: units.gu(3)
75 width: height
76 name: li.action.iconName ? li.action.iconName : ""
77 source: li.action.iconSource ? li.action.iconSource : ""
78 SlotsLayout.position: SlotsLayout.Leading
79 }
80
81 ProgressionSlot {}
82 }
83 onClicked: li.action.trigger()
84 }
85 }
86 }
87}