if there is no corresponding media; set play/pause symbol via model property instead of via qml.
41 lines
709 B
QML
41 lines
709 B
QML
import QtQuick 2.0
|
|
|
|
Rectangle {
|
|
id: container
|
|
property alias imageSource: image.source
|
|
signal clicked();
|
|
|
|
border.width: 2
|
|
border.color: "grey"
|
|
|
|
color: "white"
|
|
|
|
width: 65
|
|
height: width
|
|
radius: width/2
|
|
|
|
Image{
|
|
id: image
|
|
anchors.centerIn: parent
|
|
width: 30
|
|
height: width
|
|
source: "qrc:/icon_back"
|
|
}
|
|
Rectangle{
|
|
id: overlay
|
|
z: 1
|
|
visible: !container.enabled
|
|
anchors.centerIn: parent
|
|
width: 30
|
|
height: width
|
|
color: "#99ffffff"
|
|
}
|
|
|
|
MouseArea{
|
|
id: controlObject
|
|
anchors.fill: parent
|
|
onClicked:{
|
|
container.clicked();
|
|
}
|
|
}
|
|
}
|