mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-10 14:51:54 +02:00
[ui] Viewer3D: add loading overlay with BusyIndicator
This commit is contained in:
parent
edfc34fbd1
commit
5814a39e3e
2 changed files with 22 additions and 0 deletions
|
@ -16,6 +16,15 @@ Entity {
|
||||||
property bool pickingEnabled: false
|
property bool pickingEnabled: false
|
||||||
readonly property alias count: instantiator.count // number of instantiated media delegates
|
readonly property alias count: instantiator.count // number of instantiated media delegates
|
||||||
|
|
||||||
|
/// True while at least one media is being loaded
|
||||||
|
readonly property bool loading: {
|
||||||
|
for(var i=0; i<m.mediaModel.count; ++i) {
|
||||||
|
if(m.mediaModel.get(i).status === SceneLoader.Loading)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
signal pressed(var pick)
|
signal pressed(var pick)
|
||||||
signal loadRequest(var idx)
|
signal loadRequest(var idx)
|
||||||
|
|
||||||
|
|
|
@ -214,6 +214,19 @@ FocusScope {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Media loading overlay
|
||||||
|
// (Scene3D is frozen while a media is being loaded)
|
||||||
|
Rectangle {
|
||||||
|
anchors.fill: parent
|
||||||
|
visible: mediaLibrary.loading
|
||||||
|
color: Qt.darker(Colors.sysPalette.mid, 1.2)
|
||||||
|
opacity: 0.6
|
||||||
|
BusyIndicator {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
running: parent.visible
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// UI Overlay
|
// UI Overlay
|
||||||
Controls1.SplitView {
|
Controls1.SplitView {
|
||||||
id: overlaySplitView
|
id: overlaySplitView
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue