2018-08-18 10:59:23 +00:00
|
|
|
import QtQuick 2.9
|
|
|
|
import QtQuick.Controls 2.2
|
|
|
|
|
|
|
|
Item {
|
|
|
|
property alias source: baseImage.source
|
|
|
|
property alias sourceSize: baseImage.sourceSize.width
|
|
|
|
|
|
|
|
readonly property bool loading: baseImage.status == Image.Loading
|
|
|
|
|
2018-09-04 13:13:14 +00:00
|
|
|
signal clicked()
|
2018-08-18 10:59:23 +00:00
|
|
|
|
|
|
|
width: loading ? 128 : baseImage.implicitWidth
|
|
|
|
height: loading ? progressBar.height : baseImage.implicitHeight
|
|
|
|
|
2018-09-04 13:13:14 +00:00
|
|
|
id: rekt
|
|
|
|
|
|
|
|
Image { id: baseImage }
|
2018-08-18 10:59:23 +00:00
|
|
|
|
|
|
|
ProgressBar {
|
|
|
|
width: parent.width
|
|
|
|
visible: loading
|
|
|
|
|
2018-09-04 13:13:14 +00:00
|
|
|
id: progressBar
|
|
|
|
|
2018-08-18 10:59:23 +00:00
|
|
|
indeterminate: true
|
|
|
|
}
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
anchors.fill: parent
|
|
|
|
propagateComposedEvents: true
|
|
|
|
|
|
|
|
onClicked: rekt.clicked()
|
|
|
|
}
|
|
|
|
}
|