X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=qml%2Fvietkaralist%2Fmain.qml;fp=qml%2Fvietkaralist%2Fmain.qml;h=b60e43cbd42573a5b9b3b9fcb058e2af04d1b8b4;hb=f81dd90b1452c4a2622b9a63eb2d47258fe72e37;hp=0000000000000000000000000000000000000000;hpb=24e9c77bec569ed58f02b5d1c17f944648042355;p=vietkaralist diff --git a/qml/vietkaralist/main.qml b/qml/vietkaralist/main.qml new file mode 100644 index 0000000..b60e43c --- /dev/null +++ b/qml/vietkaralist/main.qml @@ -0,0 +1,129 @@ +/* +Copyright (C) 2011 by Cuong Le + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see +*/ + +import QtQuick 1.1 + +import "./scripts/main.js" as Script + +Rectangle { + + id: mainWindow + + width: 480 + height: 800 + + color:"white" + + property variant pageTitle: ["Danh Sách Yêu Thích","Danh Sách Bài Hát"] + + signal dialogClose + + VisualItemModel { + id:pageModel + + Page{ + id:page1 + width: viewModel.width; height: viewModel.height + anchors.topMargin: 4 + color:"white" + } + + Page{ + id:page2 + width: viewModel.width; height: viewModel.height + color:"white" + + SongList{ + id:xsonglist + } + } + + } + + ListView { + id: viewModel + + anchors.fill: parent + anchors.topMargin: 52 + anchors.bottomMargin: 30 + + model: pageModel + + preferredHighlightBegin: 0 + preferredHighlightEnd: 0 + + highlightRangeMode: ListView.StrictlyEnforceRange + orientation: ListView.Horizontal + snapMode: ListView.SnapOneItem + highlightMoveDuration: 300 + + interactive: false + + onCurrentIndexChanged:{ + topbar.title = pageTitle[currentIndex] + } + } + + Component.onCompleted: { + viewModel.currentIndex = 1; + } + + TopBar{ + id:topbar + } + + MenuBar { + id:menubar + + onChangeToFavouritePage: { + + } + + onChangeToMainPage: { + } + + onOption: { + + } + + onAbout: { + mainWindow.state="disable" + var a = Script.createObject("../AboutDlg.qml", mainWindow) + a.close.connect(closeDlg) + a.state = "show" + } + } + + function closeDlg(){ + dialogClose(); + mainWindow.state = "enable" + } + + states: [ + State{ + name:"enable" + }, + State{ + name:"disable" + PropertyChanges {target: topbar; visible:false } + PropertyChanges {target: menubar; visible:false } + PropertyChanges {target: page2; visible:false} + } + ] + + +}