add loadingItem to serviceList
The loading item will show as things are dropped into the listview. This makes sure the user sees a loading bit as things are happening in the background to add the new serviceItem
This commit is contained in:
parent
d349e0a572
commit
a946db072d
1 changed files with 23 additions and 3 deletions
|
@ -60,10 +60,11 @@ Item {
|
|||
Layout.fillWidth: true
|
||||
onDropped: (drag) => {
|
||||
console.log("DROPPED AT END");
|
||||
showPassiveNotification(drag.source.title);
|
||||
loadingItem.visible = true;
|
||||
appendItem(dragItemType,
|
||||
dragItemIndex);
|
||||
dropHighlightLine.visible = false;
|
||||
loadingItem.visible = false;
|
||||
}
|
||||
|
||||
keys: ["library"]
|
||||
|
@ -92,14 +93,13 @@ Item {
|
|||
onEntered: (drag) => {
|
||||
if (drag.keys[0] === "library") {
|
||||
dropHighlightLine.visible = true;
|
||||
showPassiveNotification("Y is: " + serviceDrop.mapToItem(
|
||||
serviceItemList,0,0).y);
|
||||
dropHighlightLine.y = serviceDrop.mapToItem(
|
||||
serviceItemList,0,0).y - 2;
|
||||
}
|
||||
}
|
||||
|
||||
onDropped: (drag) => {
|
||||
loadingItem.visible = true;
|
||||
console.log("DROPPED IN ITEM AREA: " + drag.keys);
|
||||
console.log(dragItemIndex + " " + index);
|
||||
const hlIndex = serviceItemList.currentIndex;
|
||||
|
@ -113,6 +113,7 @@ Item {
|
|||
/* serviceItemList.currentIndex = moveToIndex; */
|
||||
}
|
||||
dropHighlightLine.visible = false;
|
||||
loadingItem.visible = false;
|
||||
}
|
||||
|
||||
keys: ["library","serviceitem"]
|
||||
|
@ -431,6 +432,18 @@ Item {
|
|||
/* PathLine { x: -40; y: 200 } */
|
||||
/* } */
|
||||
/* } */
|
||||
|
||||
Rectangle {
|
||||
id: loadingItem
|
||||
anchors.fill: parent
|
||||
color: Kirigami.Theme.backgroundColor
|
||||
visible: false
|
||||
|
||||
Controls.BusyIndicator {
|
||||
anchors.centerIn: parent
|
||||
running: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Kirigami.ActionToolBar {
|
||||
|
@ -501,6 +514,13 @@ Item {
|
|||
showPassiveNotification("clearing all items");
|
||||
ServiceItemModel.clearAll();
|
||||
}
|
||||
},
|
||||
Kirigami.Action {
|
||||
text: "Load"
|
||||
icon.name: "list-remove-all"
|
||||
onTriggered: {
|
||||
loadingItem.visible = !loadingItem.visible;
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue