@@ -15,35 +15,62 @@
17import QtQuick 2.0
17import QtQuick 2.0
18−import Ubuntu.Components 0.1
18+import "../Components"
20−DashFilterGrid {
20+DashRenderer {
21 id: genericFilterGrid
21 id: genericFilterGrid
23− minimumHorizontalSpacing: units.gu(1)
23+ expandable: filterGrid.expandable
24− delegateWidth: cardTool.cardWidth
25− delegateHeight: cardTool.cardHeight
26− verticalSpacing: units.gu(1)
27 collapsedRowCount: Math.min(2, cardTool && cardTool.template && cardTool.template["collapsed-rows"] || 2)
24 collapsedRowCount: Math.min(2, cardTool && cardTool.template && cardTool.template["collapsed-rows"] || 2)
25+ collapsedHeight: filterGrid.collapsedHeight
26+ columns: filterGrid.columns
27+ rows: filter ? collapsedRowCount : uncollapsedRowCount
28+ margins: filterGrid.margins
29+ uncollapsedHeight: filterGrid.uncollapsedHeight
30+ verticalSpacing: units.gu(1)
31+ currentItem: filterGrid.currentItem
32+ height: filterGrid.height
34+ function startFilterAnimation(filter) {
35+ filterGrid.startFilterAnimation(filter)
40+ width: genericFilterGrid.width
41+ minimumHorizontalSpacing: units.gu(1)
42+ delegateWidth: cardTool.cardWidth
43+ delegateHeight: cardTool.cardHeight
44+ verticalSpacing: genericFilterGrid.verticalSpacing
45+ model: genericFilterGrid.model
46+ filter: genericFilterGrid.filter
47+ collapsedRowCount: genericFilterGrid.collapsedRowCount
48+ delegateCreationBegin: genericFilterGrid.delegateCreationBegin
49+ delegateCreationEnd: genericFilterGrid.delegateCreationEnd
51+ width: filterGrid.cellWidth
52+ height: filterGrid.cellHeight
55+ width: cardTool.cardWidth
56+ height: cardTool.cardHeight
57+ headerHeight: cardTool.headerHeight
58+ anchors.horizontalCenter: parent.horizontalCenter
59+ objectName: "delegate" + index
61+ template: cardTool.template
62+ components: cardTool.components
64+ headerAlignment: cardTool.headerAlignment
66+ onClicked: genericFilterGrid.clicked(index, card.y)
67+ onPressAndHold: genericFilterGrid.pressAndHold(index, card.y)
29− delegate: Item {
71+ onFilterChanged: {
30− width: genericFilterGrid.cellWidth
72+ genericFilterGrid.filter = filter
31− height: genericFilterGrid.cellHeight
73+ filter = Qt.binding(function() { return genericFilterGrid.filter })
34− width: cardTool.cardWidth
35− height: cardTool.cardHeight
36− headerHeight: cardTool.headerHeight
37− anchors.horizontalCenter: parent.horizontalCenter
38− objectName: "delegate" + index
40− template: cardTool.template
41− components: cardTool.components
43− headerAlignment: cardTool.headerAlignment
45− onClicked: genericFilterGrid.clicked(index, card.y)
46− onPressAndHold: genericFilterGrid.pressAndHold(index, card.y)