Rename QDeclarative symbols to QQuick and QQml
[profile/ivi/qtdeclarative.git] / tests / auto / quick / qquickgridview / data / footer.qml
1 import QtQuick 2.0
2
3 Rectangle {
4     property bool showHeader: false
5
6     function changeFooter() {
7         grid.footer = footer2
8     }
9     width: 240
10     height: 320
11     color: "#ffffff"
12     Component {
13         id: myDelegate
14         Rectangle {
15             id: wrapper
16             objectName: "wrapper"
17             width: 80
18             height: 60
19             border.color: "blue"
20             Text {
21                 text: index
22             }
23             color: GridView.isCurrentItem ? "lightsteelblue" : "white"
24         }
25     }
26     Component {
27         id: headerComponent
28         Text { objectName: "header"; text: "Header " + x + "," + y; width: 100; height: 30 }
29     }
30
31     GridView {
32         id: grid
33         objectName: "grid"
34         width: 240
35         height: 320
36         cellWidth: 80
37         cellHeight: 60
38         model: testModel
39         delegate: myDelegate
40         header: parent.showHeader ? headerComponent : null
41         footer: Text { objectName: "footer"; text: "Footer " + x + "," + y; width: 100; height: 30 }
42     }
43
44     Component {
45         id: footer2
46         Text { objectName: "footer2"; text: "Footer 2" + x + "," + y; width: 50; height: 20 }
47     }
48 }