2 * Copyright (C) 2015 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 Ubuntu.Components 1.3
19 import Ubuntu.Components.ListItems 1.3 as ListItems
21 /*! Option Selector Filter Widget. */
26 implicitHeight: expandingItem.height
28 ListItems.Expandable {
30 objectName: "expandingItem"
32 expandedHeight: collapsedHeight + column.height
43 anchors.top: parent.top
44 height: expandingItem.collapsedHeight
48 anchors.left: parent.left
49 anchors.right: dropDown.left
50 anchors.verticalCenter: parent.verticalCenter
51 text: widgetData.label || ""
57 fillMode: Image.PreserveAspectFit
58 anchors.right: parent.right
59 anchors.verticalCenter: parent.verticalCenter
60 source: expandingItem.expanded ? "image://theme/up" : "image://theme/down"
66 anchors.top: holder.bottom
69 model: widgetData.options
73 objectName: root.objectName + "label" + index;
77 fillMode: Image.PreserveAspectFit
78 anchors.right: parent.right
79 anchors.verticalCenter: parent.verticalCenter
80 source: "image://theme/tick"
85 widgetData.options.setChecked(index, !checked);