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-23 07:14:55 +00:00
|
|
|
property int footerHeight: 44
|
|
|
|
property bool footerContentVisible: true
|
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
|
|
|
ScrollBar.vertical: null
|
2024-02-28 12:19:14 +00:00
|
|
|
footerPositioning: ListView.PullBackFooter
|
|
|
|
|
2024-01-26 15:39:42 +00:00
|
|
|
|
2024-02-21 13:39:27 +00:00
|
|
|
footer: ColumnLayout {
|
|
|
|
width: root.width
|
|
|
|
|
2024-02-23 07:14:55 +00:00
|
|
|
Item {
|
|
|
|
Layout.preferredHeight: root.footerHeight
|
2024-02-21 13:39:27 +00:00
|
|
|
Layout.fillWidth: true
|
2024-01-26 15:39:42 +00:00
|
|
|
|
2024-02-28 12:19:14 +00:00
|
|
|
visible: root.model && root.count === 0
|
2024-02-23 07:14:55 +00:00
|
|
|
|
|
|
|
ShapeRectangle {
|
|
|
|
id: shapeRectangle
|
|
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
anchors.margins: 1
|
|
|
|
|
|
|
|
visible: root.footerContentVisible
|
|
|
|
text: root.placeholderText
|
|
|
|
}
|
2024-02-21 13:39:27 +00:00
|
|
|
}
|
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 }
|
|
|
|
}
|
|
|
|
}
|