summaryrefslogtreecommitdiffstats
path: root/demos/declarative/phonebrowser/phonebrowser.qml
blob: ce7436744c69346d1c2df9c76443cc932221c296 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import "content"

Item {
    id: MainWindow; width: 800; height: 480

    property var minimized : false

    Item {
        id: Background

        Image { source: "content/pics/background.png"; opaque: true }

        Rect {
            id: Menu; x: -150; width: 150; height: 480; color: "#232323"

            Text {
                id: IconText; x: 40; y: 110
                font.bold: true; font.size: 9; text: "Nokia Devices"
                color: "white"; style: Raised; styleColor: "black"
            }

            Image {
                source: "content/pics/shadow-right-screen.png"
                x: 150; height: 480; tile: true
            }
        }

        PhonesPathView { id: PhonesPathView; model: PhonesModel; y: 60; width: 800; height: 360 }
        PhoneInfoContainer { id: PhoneInfoContainer; width: 750; x: 25; y: 500; height: 440 }

        MediaButton {
            id: CloseButton; x: 680; y: 440; text: "Close"
            onClicked: { MainWindow.minimized = true }
        }

        states: [
            State {
                name: "Minimized"
                when: MainWindow.minimized == true
                SetProperties { target: Background; x: 75 }
                SetProperties { target: Menu; x: -75 }
            }
        ]

        transitions: [
            Transition {
                fromState: "*"; toState: "*"
                NumericAnimation { properties: "x,y,size"; duration: 500; easing: "easeInOutQuad" }
            }
        ]
    }

    Text {
        id: CategoryText; x: 300; y: 15; text: "Nokia Devices"
        font.size: 22; color: "white"; style: Raised; styleColor: "black"
    }

    Item { id: Stack; x: 45; y: 50 }
}