@@ -0,0 +1,238 @@
2+ * Copyright 2013 Canonical Ltd.
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.
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.
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/>.
18+import QtQuick.Layouts 1.1
21+import "../../../../qml/Panel/New"
22+import Ubuntu.Components 0.1
23+import Unity.Test 0.1 as UT
24+import Unity.Indicators 0.1 as Indicators
31+ Component.onCompleted: {
32+ Indicators.UnityMenuModelCache.setCachedModelData("com.canonical.indicators.fake1",
33+ "/com/canonical/indicators/fake1",
34+ "/com/canonical/indicators/fake1",
36+ "title": "Bluetooth",
37+ "icons": [ "image://theme/bluetooth-active" ],
39+ Indicators.UnityMenuModelCache.setCachedModelData("com.canonical.indicators.fake2",
40+ "/com/canonical/indicators/fake2",
41+ "/com/canonical/indicators/fake2",
44+ "icons": [ "image://theme/simcard-error", "image://theme/wifi-high" ],
46+ Indicators.UnityMenuModelCache.setCachedModelData("com.canonical.indicators.fake3",
47+ "/com/canonical/indicators/fake3",
48+ "/com/canonical/indicators/fake3",
51+ "icons": [ "image://theme/audio-volume-high" ],
53+ Indicators.UnityMenuModelCache.setCachedModelData("com.canonical.indicators.fake4",
54+ "/com/canonical/indicators/fake4",
55+ "/com/canonical/indicators/fake4",
58+ "icons": [ "image://theme/battery-020" ],
60+ Indicators.UnityMenuModelCache.setCachedModelData("com.canonical.indicators.fake5",
61+ "/com/canonical/indicators/fake5",
62+ "/com/canonical/indicators/fake5",
65+ "icons": [ "image://theme/gps" ],
67+ Indicators.UnityMenuModelCache.setCachedModelData("com.canonical.indicators.fake6",
68+ "/com/canonical/indicators/fake6",
69+ "/com/canonical/indicators/fake6",
71+ "title": "Notifications",
72+ "icons": [ "image://theme/messages-new" ],
74+ Indicators.UnityMenuModelCache.setCachedModelData("com.canonical.indicators.fake7",
75+ "/com/canonical/indicators/fake7",
76+ "/com/canonical/indicators/fake7",
78+ "title": "Upcoming Events",
83+ Indicators.FakeIndicatorsModel {
88+ "identifier": "indicator-fake1",
89+ "indicatorProperties": {
91+ "busName": "com.canonical.indicators.fake1",
92+ "menuObjectPath": "/com/canonical/indicators/fake1",
93+ "actionsObjectPath": "/com/canonical/indicators/fake1"
97+ "identifier": "indicator-fake2",
98+ "indicatorProperties": {
100+ "busName": "com.canonical.indicators.fake2",
101+ "menuObjectPath": "/com/canonical/indicators/fake2",
102+ "actionsObjectPath": "/com/canonical/indicators/fake2"
106+ "identifier": "indicator-fake3",
107+ "indicatorProperties": {
109+ "busName": "com.canonical.indicators.fake3",
110+ "menuObjectPath": "/com/canonical/indicators/fake3",
111+ "actionsObjectPath": "/com/canonical/indicators/fake3"
115+ "identifier": "indicator-fake4",
116+ "indicatorProperties": {
118+ "busName": "com.canonical.indicators.fake4",
119+ "menuObjectPath": "/com/canonical/indicators/fake4",
120+ "actionsObjectPath": "/com/canonical/indicators/fake4"
124+ "identifier": "indicator-fake5",
125+ "indicatorProperties": {
127+ "busName": "com.canonical.indicators.fake5",
128+ "menuObjectPath": "/com/canonical/indicators/fake5",
129+ "actionsObjectPath": "/com/canonical/indicators/fake5"
133+ "identifier": "indicator-fake6",
134+ "indicatorProperties": {
136+ "busName": "com.canonical.indicators.fake6",
137+ "menuObjectPath": "/com/canonical/indicators/fake6",
138+ "actionsObjectPath": "/com/canonical/indicators/fake6"
142+ "identifier": "indicator-fake7",
143+ "indicatorProperties": {
145+ "busName": "com.canonical.indicators.fake7",
146+ "menuObjectPath": "/com/canonical/indicators/fake7",
147+ "actionsObjectPath": "/com/canonical/indicators/fake7"
151+ "identifier": "indicator-fake8",
152+ "indicatorProperties": {
154+ "busName": "com.canonical.indicators.fake1",
155+ "menuObjectPath": "/com/canonical/indicators/fake1",
156+ "actionsObjectPath": "/com/canonical/indicators/fake1"
160+ "identifier": "indicator-fake9",
161+ "indicatorProperties": {
163+ "busName": "com.canonical.indicators.fake1",
164+ "menuObjectPath": "/com/canonical/indicators/fake1",
165+ "actionsObjectPath": "/com/canonical/indicators/fake1"
169+ "identifier": "indicator-fake10",
170+ "indicatorProperties": {
172+ "busName": "com.canonical.indicators.fake1",
173+ "menuObjectPath": "/com/canonical/indicators/fake1",
174+ "actionsObjectPath": "/com/canonical/indicators/fake1"
185+ bottom: parent.bottom
191+ anchors.fill: indicatorsBar
196+ height: expanded ? units.gu(7) : units.gu(3)
198+ anchors.centerIn: parent
199+ indicatorsModel: indicatorsModel
201+ Behavior on height { NumberAnimation { duration: 1000; easing: UbuntuAnimation.StandardEasing } }
204+ anchors.fill: parent
205+ enabled: !indicatorsBar.expanded
207+ console.log("click")
208+ indicatorsBar.selectItemAt(mouse.x);
209+ indicatorsBar.expanded = true
219+ left: itemArea.right
229+ bottom: parent.bottom
231+ text: indicatorsBar.expanded ? "Collapse" : "Expand"
232+ onClicked: indicatorsBar.expanded = !indicatorsBar.expanded
236+ name: "IndicatorsRow"