import QtQuick 1.0 import "../Shared" Rectangle { id: mainPage anchors.fill: parent TopBarLogo { id: topBar anchors.top: parent.top } SlideControl { id: promo anchors.top: topBar.bottom //anchors.bottom: tabbar.top width: mainPage.width height: mainPage.height-topBar.height - 56 listModel: promoLM listComponent: Component { Rectangle{ id: slide width: promo.width height: promo.height property int textAnimationDuration: 1200 Image { id: background source: img width: parent.width height: parent.height anchors.fill: parent clip: true fillMode: Image.PreserveAspectCrop onStatusChanged: { if(status==Image.Ready) hideSpinner() else if(status==Image.Error) hideSpinner() } MouseArea{ anchors.fill: parent onClicked: { clickMovie(content_id) pageModel.pageRequested("MovieCard/MovieCard.qml") showSpinner() } } } Image { id: bottompromo property int showtxt: 0 width: parent.width height: film_name.height + film_description.height + 60 y: background.height - topBar.height - film_name.height - 20 - (20 + film_description.height)*showtxt+56 anchors.horizontalCenter: parent.horizontalCenter source: "../images/topbar.png" smooth: true Behavior on opacity { NumberAnimation { duration: slide.fadeDuration } } Behavior on y { NumberAnimation { duration: slide.textAnimationDuration; easing.type: "OutCubic" } } opacity: 1 Image { id: promo_row anchors.top: bottompromo.top anchors.right: bottompromo.right anchors.topMargin: 27 anchors.rightMargin: 30 source: "../images/prTextup.png" smooth: true } Text { id: film_name text: name color: "#ffffff" font.family: mainFont.name font.pointSize: 9.0 anchors.left: parent.left anchors.top: bottompromo.top anchors.topMargin: 15 anchors.leftMargin: 10 width: parent.width-50 wrapMode: Text.WordWrap } Text { id: film_description text: description color: "#ffffff" font.family: mainFont.name font.pointSize: 5.0 anchors.left: parent.left anchors.top: film_name.bottom anchors.topMargin: 10 anchors.leftMargin: 10 width: parent.width-20 wrapMode: Text.WordWrap } MouseArea { anchors.fill: parent onClicked: { if (bottompromo.showtxt == 0) { bottompromo.showtxt = 1 promo_row.source = "../images/prText.png" }else { bottompromo.showtxt = 0 promo_row.source = "../images/prTextup.png" } } } } } } SequentialAnimation { running: true loops: Animation.Infinite PauseAnimation { duration: 5000 } ScriptAction { script: { promo.currentIndex++ } } } } }