--- /dev/null
+import QtQuick 1.1
+import com.meego 1.0
+
+Page {
+ id: albumsPage
+ tools: commonTools
+ Label {
+ id: label
+ anchors.centerIn: parent
+ text: "albums page"
+ visible: false
+ }
+ Button{
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.top: label.bottom
+ anchors.topMargin: 10
+ text: qsTr("Click here!")
+ onClicked: label.visible=true
+ }
+}
--- /dev/null
+import QtQuick 1.1
+import com.meego 1.0
+
+Page {
+ id: songsPage
+ tools: commonTools
+ Label {
+ id: label
+ anchors.centerIn: parent
+ text: "songs page"
+ visible: false
+ }
+ Button{
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.top: label.bottom
+ anchors.topMargin: 10
+ text: qsTr("Click here also")
+ onClicked: label.visible=true
+ }
+}
-import Qt 4.7
+import QtQuick 1.1
+import com.meego 1.0
-Rectangle {
- id: screen
- width: 800
- height: 480
- color: "black"
- state: "in_initPage"
- //state: "in_albumsPage"
+PageStackWindow {
+ id: appWindow
- TitleBar {
- closeOrBack: ( screen.state == "in_initPage" ? "close" : "back")
- onBack: {
- switch (screen.state) {
- case "in_initPage":
- Qt.quit()
- break
- case "in_albumsPage":
- screen.state = "in_initPage"
- break
- case "in_alternativesPage":
- screen.state = "in_albumsPage"
- break
- default:
- console.log ("WFT")
- }
- }
+ initialPage: Empty {}
+ TabGroup {
+ id: tabGroup
+ currentTab: albumsTab
+ AlbumsPage {id: albumsTab}
+ SongsPage {id: othersTab}
}
-
- Intro {
- id: initPage
- onSelected: {
- screen.state = state
- }
- }
-
-
- AlbumList {
- id: albumsPage
- model: albumModel
- onRowSelected: {
- screen.state = "in_alternativesPage"
- missionControl.albumSelected (coversModel, selectedAlbum)
- alternativesPage.indexInAlbumList = index
+ ToolBarLayout {
+ id: commonTools
+ visible: true
+ ButtonRow {
+ style: TabButtonStyle { }
+ TabButton {
+ text: "Albums"
+ tab: albumsTab
+ }
+ TabButton {
+ text: "Songs"
+ tab: othersTab
+ }
+ }
+ ToolIcon { platformIconId: "toolbar-view-menu";
+ anchors.right: parent===undefined ? undefined : parent.right
+ onClicked: (myMenu.status == DialogStatus.Closed) ? myMenu.open() : myMenu.close()
}
}
- Alternatives {
- id:alternativesPage
- altmodel: coversModel
- albumListModel : albumModel
- mc: missionControl
- onDone: {
- screen.state = "in_albumsPage"
+ Menu {
+ id: myMenu
+ MenuLayout {
+ MenuItem { text: "Download all" }
}
}
- states: [
- State {
- name: "in_initPage"
- PropertyChanges {target: initPage; visible: true }
- PropertyChanges {target: albumsPage; visible: false }
- PropertyChanges {target: alternativesPage; visible: false }
- },
-
- State {
- name: "in_albumsPage"
- PropertyChanges {target: initPage; visible: false }
- PropertyChanges {target: albumsPage; visible: true }
- PropertyChanges {target: alternativesPage; visible: false }
- StateChangeScript {
- script: {
- // This runs on entering the state
- missionControl.resetAlternatives (coversModel)
- }
- }
- },
-
- State {
- name: "in_alternativesPage"
- PropertyChanges {target: initPage; visible: false }
- PropertyChanges {target: albumsPage; visible: false }
- PropertyChanges {target: alternativesPage; visible: true }
- }
- ]
-
-
}