2023-03-13 09:33:52 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Controls 2.15
|
|
|
|
import QtQuick.Layouts 1.15
|
|
|
|
|
|
|
|
import StatusQ.Components 0.1
|
2024-10-15 19:26:12 +00:00
|
|
|
import StatusQ.Core.Theme 0.1
|
2023-03-13 09:33:52 +00:00
|
|
|
|
2024-10-15 19:26:12 +00:00
|
|
|
import utils 1.0
|
2023-03-13 09:33:52 +00:00
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
Item {
|
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
StatusFlowSelector {
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
2024-10-15 19:26:12 +00:00
|
|
|
icon: Theme.png("tokens/SNT")
|
2023-03-13 09:33:52 +00:00
|
|
|
title: "Item Selector Title"
|
|
|
|
|
|
|
|
placeholderText: "Example: Empty items"
|
|
|
|
|
|
|
|
Repeater {
|
|
|
|
id: repeater
|
|
|
|
|
|
|
|
model: ListModel {
|
|
|
|
id: listModel
|
|
|
|
}
|
|
|
|
|
|
|
|
property int counter: 0
|
|
|
|
|
|
|
|
delegate: StatusListItemTag {
|
|
|
|
title: `tag ${model.name}`
|
|
|
|
|
|
|
|
onClicked: listModel.remove(index)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
placeholderItem.visible: listModel.count === 0
|
|
|
|
|
|
|
|
addButton.onClicked: {
|
|
|
|
listModel.append({ name: `item ${repeater.counter++}` })
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Button {
|
|
|
|
Layout.bottomMargin: 10
|
|
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
|
|
|
|
text: "Clear list"
|
|
|
|
onClicked: listModel.clear()
|
|
|
|
}
|
|
|
|
}
|
2023-07-31 12:21:14 +00:00
|
|
|
|
|
|
|
// category: Components
|