added component for player buttons
This commit is contained in:
parent
056bdb8298
commit
78aec2acf8
3 changed files with 68 additions and 56 deletions
|
|
@ -57,66 +57,15 @@ Item{
|
|||
model: musicModel
|
||||
}
|
||||
|
||||
Item{
|
||||
PlayerButtons{
|
||||
id: buttons
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: progress.bottom
|
||||
anchors.bottom: parent.bottom
|
||||
Row{
|
||||
id: buttons
|
||||
spacing: 20
|
||||
anchors.centerIn: parent
|
||||
|
||||
RoundButton{
|
||||
id: previous
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
width: 60
|
||||
imageSource: "qrc:/icon_previous"
|
||||
|
||||
enabled: musicModel.pHasPrevious
|
||||
|
||||
onClicked:{
|
||||
musicModel.playPrevious();
|
||||
}
|
||||
}
|
||||
RoundButton{
|
||||
id: playPause
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: 80
|
||||
imageSource: musicModel.pIsPlaying ? "qrc:/icon_pause" : "qrc:/icon_play"
|
||||
|
||||
onClicked:{
|
||||
musicModel.playPause();
|
||||
}
|
||||
}
|
||||
RoundButton{
|
||||
id: stop
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
width: 60
|
||||
imageSource: "qrc:/icon_stop"
|
||||
|
||||
enabled: musicModel.pIsPlaying
|
||||
|
||||
onClicked:{
|
||||
musicModel.stopMusic();
|
||||
}
|
||||
}
|
||||
RoundButton{
|
||||
id: next
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
width: 60
|
||||
imageSource: "qrc:/icon_next"
|
||||
|
||||
enabled: musicModel.pHasNext
|
||||
|
||||
onClicked:{
|
||||
musicModel.playNext();
|
||||
}
|
||||
}
|
||||
} //Row
|
||||
}// Item
|
||||
model: musicModel
|
||||
spacing: 20
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue