Initial import from the monolithic Qt.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qdeclarativegridview / data / mirroring.qml
1 // This example demonstrates how item positioning
2 // changes in right-to-left layout direction
3
4 import QtQuick 1.1
5
6 Rectangle {
7     color: "lightgray"
8     width: 340
9     height: 370
10
11     VisualItemModel {
12         id: itemModel
13         objectName: "itemModel"
14         Rectangle {
15             objectName: "item1"
16             height: 110; width: 120; color: "#FFFEF0"
17             Text { objectName: "text1"; text: "index: " + parent.VisualItemModel.index; font.bold: true; anchors.centerIn: parent }
18         }
19         Rectangle {
20             objectName: "item2"
21             height: 130; width: 150; color: "#F0FFF7"
22             Text { objectName: "text2"; text: "index: " + parent.VisualItemModel.index; font.bold: true; anchors.centerIn: parent }
23         }
24         Rectangle {
25             objectName: "item3"
26             height: 170; width: 190; color: "#F4F0FF"
27             Text { objectName: "text3"; text: "index: " + parent.VisualItemModel.index; font.bold: true; anchors.centerIn: parent }
28         }
29     }
30
31     GridView {
32         id: view
33         objectName: "view"
34         cellWidth: 190
35         cellHeight: 170
36         anchors.fill: parent
37         anchors.bottomMargin: 30
38         model: itemModel
39         highlightRangeMode: "StrictlyEnforceRange"
40         flow: GridView.TopToBottom
41         flickDeceleration: 2000
42     }
43 }