Dekko
Loading...
Searching...
No Matches
NavMenuAccountSettingsModel.qml
1/* Copyright (C) 2016 - 2017 Dan Chapman <dpniel@ubuntu.com>
2
3 This file is part of Dekko email client for Ubuntu devices
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License as
7 published by the Free Software Foundation; either version 2 of
8 the License or (at your option) version 3
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18import QtQuick 2.4
19import QtQuick.Window 2.2
20import Lomiri.Components 1.3
21import Lomiri.Components.Popups 1.3
22import Dekko.Mail.API 1.0
24VisualItemModel {
25 ListItem {
26 height: accountSettingsLayout.implicitHeight
27 ListItemLayout {
28 id: accountSettingsLayout
29 title.text: qsTr("Manage accounts")
30
31 Icon {
32 height: units.gu(3)
33 width: height
34 name: "account"
35 SlotsLayout.position: SlotsLayout.Leading
36 }
37 ProgressionSlot{}
38 }
39 onClicked: ViewActions.pushStage("../stages/SettingsStage.qml", {})
40 }
41 ListItem {
42 height: displaySettingsLayout.implicitHeight
43 ListItemLayout {
44 id: displaySettingsLayout
45 title.text: qsTr("Display settings")
46
47 Icon {
48 height: units.gu(3)
49 width: height
50 name: "video-display-symbolic"
51 SlotsLayout.position: SlotsLayout.Leading
52 }
53 ProgressionSlot{}
54 }
55 onClicked: {
56 if (dekko.isSmallFF) {
57 ViewActions.pushToStageArea(ViewKeys.messageListStack, Qt.resolvedUrl("../settings/DisplaySettingsPage.qml"), {})
58 } else {
59 PopupUtils.open(Qt.resolvedUrl("../settings/DisplaySettingsPopup.qml"))
60 }
61 }
62 }
63 ListItem {
64 height: privacySettingsLayout.implicitHeight
65 ListItemLayout {
66 id: privacySettingsLayout
67 title.text: qsTr("Privacy settings")
68
69 Icon {
70 height: units.gu(3)
71 width: height
72 name: "private-browsing"
73 SlotsLayout.position: SlotsLayout.Leading
74 }
75 ProgressionSlot{}
76 }
77 onClicked: {
78 if (dekko.isSmallFF) {
79 ViewActions.pushToStageArea(ViewKeys.messageListStack, Qt.resolvedUrl("../settings/PrivacySettingsPage.qml"), {})
80 } else {
81 PopupUtils.open(Qt.resolvedUrl("../settings/PrivacySettingsPopup.qml"))
82 }
83 }
84 }
85// ListItem {
86// height: offlineSettingsLayout.implicitHeight
87// ListItemLayout {
88// id: offlineSettingsLayout
89// title.text: qsTr("Offline settings")
90
91// Icon {
92// height: units.gu(3)
93// width: height
94// name: "network-wifi-symbolic"
95// SlotsLayout.position: SlotsLayout.Leading
96// }
97// ProgressionSlot{}
98// }
99// }
100}
101