on xenial help sign in
First implementantion of FilterOptionSelector

Missing a few TODO

commitb8dde78f77592209df03908e54418f03b9a2baab authorAlbert Astals Cid <albert.astals@canonical.com> dateFri 2 Oct 2015, 13:20 (11 years ago) parent816a6cf
1 file changed+42−3
qml/Dash/Filters/FilterOptionSelector.qml+42−3
qml/Dash/Filters/FilterOptionSelector.qml+42−3
@@ -15,10 +15,49 @@
1515 */
1616
1717import QtQuick 2.4
18+import Ubuntu.Components 1.2
19+import Ubuntu.Components.ListItems 1.2 as ListItems
1820
19−/*! Interface for filter widgets. */
21+/*! Option Selector Filter Widget. */
2022
2123FilterWidget {
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+ }
2463}