summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeviewer/data/orientation.qml
blob: be911a3698402c494975af946f34ed05c168b44c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import Qt 4.7
Rectangle {
    color: "black"
    width: (runtime.orientation == Orientation.RightUp || runtime.orientation == Orientation.LeftUp) ? 300 : 200
    height: (runtime.orientation == Orientation.RightUp || runtime.orientation == Orientation.LeftUp) ? 200 : 300
    Text {
        text: {
            if (runtime.orientation == Orientation.TopUp)
                return "TopUp"
            if (runtime.orientation == Orientation.TopDown)
                return "TopDown"
            if (runtime.orientation == Orientation.LeftUp)
                return "LeftUp"
            if (runtime.orientation == Orientation.RightUp)
                return "RightUp"
        }
        color: "white"
    }
}