109 lines
2.8 KiB
QML
109 lines
2.8 KiB
QML
import QtQuick 2.0
|
|
import QtGraphicalEffects 1.0
|
|
|
|
Item{
|
|
id: container
|
|
|
|
property int margins: 20
|
|
|
|
Rectangle{
|
|
id: coverBorder
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
anchors.top: parent.top
|
|
anchors.topMargin: container.margins
|
|
height: parent.height-controlPannel.height-2*container.margins
|
|
width: height
|
|
color: "blue"
|
|
Image{
|
|
id: cover
|
|
anchors.centerIn: parent
|
|
height: parent.height-10
|
|
width: height
|
|
source: musicModel.pCurrentItem.pImageSource
|
|
fillMode: Image.PreserveAspectCrop
|
|
layer.enabled: true
|
|
layer.effect: OpacityMask{
|
|
maskSource: coverBorder
|
|
}
|
|
}
|
|
}
|
|
|
|
RoundButton{
|
|
id: backNavigation
|
|
anchors.left: parent.left
|
|
anchors.top: parent.top
|
|
anchors.margins: container.margins
|
|
onClicked: {
|
|
musicModel.navigateBack();
|
|
}
|
|
}
|
|
|
|
Rectangle {
|
|
id: controlPannel
|
|
|
|
anchors.left: parent.left
|
|
anchors.right: parent.right
|
|
anchors.bottom: parent.bottom
|
|
color: "#99ffffff"
|
|
height: 120
|
|
|
|
// @todo: use rowLayout instead?
|
|
Row{
|
|
spacing: 20
|
|
anchors.centerIn: parent
|
|
|
|
RoundButton{
|
|
id: previous
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
width: 60
|
|
imageSource: "qrc:/icon_previous"
|
|
|
|
// visible: model.pHasPrevious
|
|
|
|
onClicked:{
|
|
//musicModel.playPrevious();
|
|
}
|
|
}
|
|
RoundButton{
|
|
id: playPause
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
width: 80
|
|
imageSource: "qrc:/icon_play"
|
|
|
|
onClicked:{
|
|
musicModel.playPause();
|
|
if(imageSource == "qrc:/icon_play")
|
|
imageSource = "qrc:/icon_pause"
|
|
else
|
|
imageSource = "qrc:/icon_play"
|
|
}
|
|
}
|
|
RoundButton{
|
|
id: stop
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
width: 60
|
|
imageSource: "qrc:/icon_stop"
|
|
|
|
onClicked:{
|
|
//musicModel.stop();
|
|
//playPause.imageSource = "qrc:/icon_play"
|
|
}
|
|
}
|
|
RoundButton{
|
|
id: next
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
width: 60
|
|
imageSource: "qrc:/icon_next"
|
|
|
|
// visible: model.pHasNext
|
|
|
|
onClicked:{
|
|
//musicModel.playNext();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|