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 signal filterSelected()
30 ListItems.Expandable {
32 objectName: "expandingItem"
34 expandedHeight: collapsedHeight + column.height
45 anchors.top: parent.top
46 height: expandingItem.collapsedHeight
50 anchors.left: parent.left
51 anchors.right: dropDown.left
52 anchors.verticalCenter: parent.verticalCenter
53 text: widgetData.label || ""
59 fillMode: Image.PreserveAspectFit
60 anchors.right: parent.right
61 anchors.verticalCenter: parent.verticalCenter
62 source: expandingItem.expanded ? "image://theme/up" : "image://theme/down"
63 sourceSize.height: height
69 anchors.top: holder.bottom
72 model: widgetData.options
73 objectName: "optionsRepeater"
77 objectName: root.objectName + "label" + index;
81 fillMode: Image.PreserveAspectFit
82 anchors.right: parent.right
83 anchors.verticalCenter: parent.verticalCenter
84 source: "image://theme/tick"
85 sourceSize.height: height
90 widgetData.options.setChecked(index, !checked);