on 1290955 help sign in
unity8/Notifications/Notifications.qml
77 lines 2.0 kB history raw
1/*
2 * Copyright (C) 2013 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
17import QtQuick 2.0
18import Ubuntu.Components 0.1
19import "../Components"
20import "timings.js" as Timings
22ListView {
23 id: notificationRenderer
25 objectName: "notificationRenderer"
26 interactive: false
28 spacing: units.gu(.5)
29 delegate: Notification {
30 objectName: "notification" + index
31 anchors {
32 left: parent.left
33 right: parent.right
34 }
35 type: model.type
36 iconSource: model.icon
37 secondaryIconSource: model.secondaryIcon
38 summary: model.summary
39 body: model.body
40 actions: model.actions
41 }
43 populate: Transition {
44 NumberAnimation {
45 property: "opacity"
46 to: 1
47 duration: Timings.snapBeat
48 easing.type: Timings.easing
49 }
50 }
52 add: Transition {
53 NumberAnimation {
54 property: "opacity"
55 to: 1
56 duration: Timings.snapBeat
57 easing.type: Timings.easing
58 }
59 }
61 remove: Transition {
62 NumberAnimation {
63 property: "opacity"
64 to: 0
65 duration: Timings.fastBeat
66 easing.type: Timings.easing
67 }
68 }
70 displaced: Transition {
71 NumberAnimation {
72 properties: "x,y"
73 duration: Timings.fastBeat
74 easing.type: Timings.easing
75 }
76 }