62 lines
1.3 KiB
QML
62 lines
1.3 KiB
QML
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
|
|
}
|