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 Lesser 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 Lesser General Public License for more details.
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 * Renato Araujo Oliveira Filho <renato@canonical.com>
18 * Nick Dedekind <nick.dedekind@canonical.com>
22import Lomiri.Components 1.3
28 property variant indicatorProperties
31 title: indicatorProperties && indicatorProperties.title ? indicatorProperties.title :
32 indicatorProperties && indicatorProperties.accessibleName ? indicatorProperties.accessibleName
39 color: theme.palette.highlighted.background
48 height: selectorLayout.height
49 onClicked: visualCheck.checked = !visualCheck.checked
53 title.text: "Enable Visual Representation"
58 SlotsLayout.position: SlotsLayout.Trailing
65 objectName: "pageLoader"
70 top: visualCheckItem.bottom
74 topMargin: units.gu(2)
75 bottomMargin: units.gu(2)
77 sourceComponent: visualCheck.checked ? page : tree
82 objectName: model.identifier + "-page"
85 menuModel: delegate.menuModel
87 factory: IndicatorMenuItemFactory {
88 indicator: model.identifier
89 rootModel: delegate.menuModel
94 busName: indicatorProperties.busName
95 actionsObjectPath: indicatorProperties.actionsObjectPath
96 menuObjectPath: indicatorProperties.menuObjectPath
103 identifier: model.identifier
104 busName: indicatorProperties.busName
105 actionsObjectPath: indicatorProperties.actionsObjectPath
106 menuObjectPath: indicatorProperties.menuObjectPath
116 bottom: parent.bottom
119 height: childrenRect.height