1bdb170ef2f0f6aacb8b110fd06aa27284041009
[mussorgsky] / ui / main.qml
1 import Qt 4.7
2
3 Rectangle {
4     id: screen
5     width: 800
6     height: 480
7     color: "black"
8     state: "in_initPage"
9      
10     Row {
11         id: initPage
12
13         anchors.horizontalCenter : screen.horizontalCenter
14         anchors.verticalCenter: screen.verticalCenter
15         spacing: screen.width / 4
16
17         FancyButton {
18            source: "images/button-blue.png"
19            caption: "Edit metadata"
20         }
21
22         FancyButton {
23            source: "images/button-red.png"
24            caption: "Album art"
25            onClicked: {
26               screen.state = "in_albumsPage"
27            }
28         }
29     }
30
31     AlbumList {
32         id: albumsPage
33         model: albumModel
34     }
35
36     states: [
37        State {
38            name: "in_initPage"
39            PropertyChanges {target: initPage; visible: true }
40            PropertyChanges {target: albumsPage; visible: false }
41        },
42
43        State {
44            name: "in_albumsPage"
45            PropertyChanges {target: initPage; visible: false }
46            PropertyChanges {target: albumsPage; visible: true }
47        }
48     ]
49
50
51 }