2
Copyright (c) 2010 Volker Krause <vkrause@kde.org>
4
This library is free software; you can redistribute it and/or modify it
5
under the terms of the GNU Library General Public License as published by
6
the Free Software Foundation; either version 2 of the License, or (at your
7
option) any later version.
9
This library is distributed in the hope that it will be useful, but WITHOUT
10
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12
License for more details.
14
You should have received a copy of the GNU Library General Public License
15
along with this library; see the file COPYING.LIB. If not, write to the
16
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21
import org.kde.pim.mobileui 4.5 as KPIM
23
/** Akonadi Note List View
27
property bool showDeleteButton : true
28
property bool showCheckBox
29
property variant checkModel
32
KPIM.ItemListViewDelegate {
33
showCheckBox : _top.showCheckBox
34
checkModel : _top.checkModel
35
navigationModel : _top.navigationModel
36
height : itemListView.height / 7
40
anchors.top : parent.top
42
anchors.left : parent.left
43
anchors.leftMargin : 10
44
anchors.right: parent.right
45
anchors.rightMargin: deleteAction.width
53
anchors.top : titleLabel.bottom
55
anchors.left : parent.left
56
anchors.leftMargin : 10
57
anchors.right: parent.right
58
anchors.rightMargin: deleteAction.width
60
text : "model.shortContent"
66
id : importantFlagImage
67
anchors.verticalCenter : parent.verticalCenter;
68
anchors.left : parent.left
69
anchors.leftMargin : 15
70
source : "important-email.png"
71
opacity : model.is_important ? 0.25 : 0
75
anchors.verticalCenter : parent.verticalCenter;
76
anchors.left : importantFlagImage.right
77
source : "action-item-email.png"
78
opacity : model.is_action_item ? 0.25 : 0
82
anchors.verticalCenter: parent.verticalCenter;
83
anchors.right : parent.right;
86
action : application.getAction("akonadi_item_delete", "")
91
visible : showDeleteButton
93
_itemActionModel.select(model.index, 3);
95
image : KDE.locate( "data", "mobileui/delete-button.png" );
102
when : itemListView.flicking
103
QML.PropertyChanges {
104
target : deleteAction;
107
QML.PropertyChanges {
108
target : deleteAction.anchors;
109
rightMargin : -deleteAction.width
117
QML.PropertyAnimation {
118
target : deleteAction
119
properties : "opacity"
121
easing.type: "OutQuad"
127
QML.SequentialAnimation {
131
// TODO: figure out how to do this.
135
QML.PropertyAnimation {
136
target : deleteAction.anchors
137
properties : "rightMargin"
139
easing.type: "InQuad"