added component for player buttons
This commit is contained in:
parent
056bdb8298
commit
78aec2acf8
3 changed files with 68 additions and 56 deletions
62
LenaPi/PlayerButtons.qml
Normal file
62
LenaPi/PlayerButtons.qml
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
import QtQuick 2.0
|
||||
|
||||
Item {
|
||||
id: container
|
||||
property var model
|
||||
property var spacing: 20
|
||||
Row{
|
||||
id: buttons
|
||||
anchors.centerIn: parent
|
||||
spacing: container.spacing
|
||||
|
||||
RoundButton{
|
||||
id: previous
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
width: 60
|
||||
imageSource: "qrc:/icon_previous"
|
||||
|
||||
enabled: model.pHasPrevious
|
||||
|
||||
onClicked:{
|
||||
model.playPrevious();
|
||||
}
|
||||
}
|
||||
RoundButton{
|
||||
id: playPause
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: 80
|
||||
imageSource: model.pIsPlaying ? "qrc:/icon_pause" : "qrc:/icon_play"
|
||||
|
||||
onClicked:{
|
||||
model.playPause();
|
||||
}
|
||||
}
|
||||
RoundButton{
|
||||
id: stop
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
width: 60
|
||||
imageSource: "qrc:/icon_stop"
|
||||
|
||||
enabled: model.pIsPlaying
|
||||
|
||||
onClicked:{
|
||||
model.stopMusic();
|
||||
}
|
||||
}
|
||||
RoundButton{
|
||||
id: next
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
width: 60
|
||||
imageSource: "qrc:/icon_next"
|
||||
|
||||
enabled: model.pHasNext
|
||||
|
||||
onClicked:{
|
||||
model.playNext();
|
||||
}
|
||||
}
|
||||
} //Row
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue