2024-01-26 15:39:42 +00:00
|
|
|
import QtQuick 2.15
|
2024-02-15 17:25:03 +00:00
|
|
|
import QtQuick.Controls 2.15
|
2024-02-21 13:39:27 +00:00
|
|
|
import QtQuick.Layouts 1.15
|
2024-01-26 15:39:42 +00:00
|
|
|
import QtQml 2.15
|
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
|
2024-02-21 13:39:27 +00:00
|
|
|
import utils 1.0
|
|
|
|
|
2024-01-26 15:39:42 +00:00
|
|
|
StatusListView {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
property string placeholderText
|
2024-02-15 17:25:03 +00:00
|
|
|
property int placeholderHeight: 44
|
2024-02-21 13:39:27 +00:00
|
|
|
property Component additionalFooterComponent
|
2024-01-26 15:39:42 +00:00
|
|
|
|
2024-02-15 17:25:03 +00:00
|
|
|
// TO BE REMOVE: #13498
|
|
|
|
property bool empty: root.model && root.count === 0
|
2024-01-26 15:39:42 +00:00
|
|
|
|
2024-02-15 17:25:03 +00:00
|
|
|
ScrollBar.vertical: null
|
2024-01-26 15:39:42 +00:00
|
|
|
|
2024-02-21 13:39:27 +00:00
|
|
|
footer: ColumnLayout {
|
|
|
|
width: root.width
|
|
|
|
|
|
|
|
ShapeRectangle {
|
|
|
|
id: shapeRectangle
|
2024-01-26 15:39:42 +00:00
|
|
|
|
2024-02-21 13:39:27 +00:00
|
|
|
Layout.preferredHeight: root.placeholderHeight
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
Layout.margins: 1
|
2024-01-26 15:39:42 +00:00
|
|
|
|
2024-02-21 13:39:27 +00:00
|
|
|
visible: root.empty// TO BE REPLACE by (#13498): root.model && root.count === 0
|
|
|
|
text: root.placeholderText
|
|
|
|
}
|
2024-01-26 15:39:42 +00:00
|
|
|
|
2024-02-21 13:39:27 +00:00
|
|
|
Loader {
|
|
|
|
Layout.preferredWidth: root.width
|
2024-01-26 15:39:42 +00:00
|
|
|
|
2024-02-21 13:39:27 +00:00
|
|
|
sourceComponent: root.additionalFooterComponent
|
2024-01-26 15:39:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
displaced: Transition {
|
|
|
|
NumberAnimation { properties: "x,y"; easing.type: Easing.OutQuad }
|
|
|
|
}
|
|
|
|
}
|