Connect main progress bar to potential bulky operations in the project tree

This commit is contained in:
Veronica Berglyd Olsen
2025-07-17 18:06:02 +02:00
parent 1223e6da84
commit e77b71bbbc
4 changed files with 30 additions and 10 deletions
+2 -9
View File
@@ -269,20 +269,13 @@ class SharedData(QObject):
self._idleRefTime = currTime
return
def initMainProgress(self, maximum: int) -> None:
def initMainProgress(self, maximum: int, inclusive: bool = False) -> None:
"""Start a session for the main progress bar."""
if gui := self._gui:
gui.mainProgress.setMaximum(maximum)
gui.mainProgress.setMaximum(maximum - (1 if inclusive else 0))
gui.mainProgress.setValue(0)
return
def updateMainProgress(self, value: int) -> None:
"""Update the value for the main progress bar."""
if gui := self._gui:
gui.mainProgress.setValue(value)
QApplication.processEvents()
return
def incMainProgress(self) -> None:
"""Increment the value for the main progress bar."""
if gui := self._gui: