Dekko
Loading...
Searching...
No Matches
AccountDelegate.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
*/
18
import
QtQuick 2.4
19
import Lomiri.Components 1.3
20
import Dekko.Mail.API 1.0
21
import Dekko.Lomiri.Components 1.0
22
23
ListItem {
24
25
property var account
26
property alias showProgression: ps.visible
27
property bool canDelete: false
28
property bool showContextActions: false
29
divider.visible: false
30
height: layout.height + line.height
31
32
ListItemLayout {
33
id: layout
34
title.text: account ? account.name : ""
35
Icon {
36
height: units.gu(2.5)
37
width: height
38
name: "contact
"
39
SlotsLayout.position: SlotsLayout.Leading
40
}
41
ProgressionSlot {
42
id: ps
43
}
44
}
45
leadingActions: canDelete ? leading : null
46
47
ListItemActions {
48
id: leading
49
actions: [
50
Action {
51
iconName: "
delete
"
52
onTriggered: AccountActions.deleteAccount(account.id, account.name, true)
53
}
54
]
55
}
56
57
Line {
58
id: line
59
anchors {
60
left: parent.left
61
bottom: parent.bottom
62
right: parent.right
63
}
64
}
65
}
plugins
ubuntu-plugin
plugins
core
mail
accounts
AccountDelegate.qml
Generated by
1.9.8