on xenial help sign in
First implementantion of FilterOptionSelector
b8dde78Albert Astals Cid
qml/Dash/Filters/FilterOptionSelector.qml+42−3
@@ -15,10 +15,49 @@
15 */
15 */
16
16
17import QtQuick 2.4
17import QtQuick 2.4
18+import Ubuntu.Components 1.2
19+import Ubuntu.Components.ListItems 1.2 as ListItems
18
20
19−/*! Interface for filter widgets. */
21+/*! Option Selector Filter Widget. */
20
22
21FilterWidget {
23FilterWidget {
22− // TODO
23− implicitHeight: units.gu(4)
24+ implicitHeight: expandingItem.height
25+
26+ ListItems.Expandable {
27+ id: expandingItem
28+ // TODO ↑ ↓ button
29+
30+ expandedHeight: collapsedHeight + column.height
31+ width: parent.width
32+
33+ onClicked: {
34+ expanded = !expanded;
35+ }
36+
37+ Item {
38+ id: holder
39+ anchors.top: parent.top
40+ height: expandingItem.collapsedHeight
41+ width: parent.width
42+
43+ Label {
44+ anchors.verticalCenter: parent.verticalCenter
45+ text: widgetData.label
46+ }
47+ }
48+
49+ Column {
50+ id: column
51+ anchors.top: holder.bottom
52+ width: parent.width
53+ Repeater {
54+ model: widgetData.options
55+
56+ ListItems.Standard {
57+ // TODO checked
58+ text: label
59+ }
60+ }
61+ }
62+ }
24}
63}