added progress bar to show position in track

still todo:
styling, positioning, output of current time and length
This commit is contained in:
Anika Raemer 2018-12-06 10:19:51 +01:00
parent 6eabd3cb75
commit b013b69e8d
4 changed files with 63 additions and 6 deletions

View file

@ -1,4 +1,6 @@
import QtQuick 2.0
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
import QtGraphicalEffects 1.0
Item{
@ -38,6 +40,37 @@ Item{
}
}
ProgressBar{
anchors.top: parent.top
anchors.right: parent.right
anchors.margins: container.margins
/*anchors.bottom: buttons.top
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 40
anchors.rightMargin: 40
anchors.topMargin: 10
anchors.bottomMargin: 10
*/
z:99
value: musicModel.pProgress
style:ProgressBarStyle {
background: Rectangle {
radius: 2
color: "magenta"
border.color: "gray"
border.width: 1
implicitWidth: 200
implicitHeight: 24
}
progress: Rectangle {
color: "lightsteelblue"
border.color: "steelblue"
}
}
}
Rectangle {
id: controlPannel
@ -47,8 +80,9 @@ Item{
color: "#99ffffff"
height: 120
// @todo: use rowLayout instead?
Row{
id: buttons
spacing: 20
anchors.centerIn: parent
@ -73,10 +107,6 @@ Item{
onClicked:{
musicModel.playPause();
/* if(imageSource == "qrc:/icon_play")
imageSource = "qrc:/icon_pause"
else
imageSource = "qrc:/icon_play"*/
}
}
RoundButton{
@ -90,7 +120,6 @@ Item{
onClicked:{
musicModel.stopMusic();
//playPause.imageSource = "qrc:/icon_play"
}
}
RoundButton{