aboutsummaryrefslogtreecommitdiffstats
path: root/gui.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--gui.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/gui.py b/gui.py
index f58bf23..c4b5961 100644
--- a/gui.py
+++ b/gui.py
@@ -354,6 +354,12 @@ class MuddleWindow(QMainWindow):
selectPathBtn = self.findChild(QPushButton, "selectPathBtn")
selectPathBtn.clicked.connect(self.onSelectPathBtnClicked)
+ ## progressbar
+ self.progressBar = self.findChild(QProgressBar, "downloadProgressBar")
+
+ # self.moodleTreeModel.worker.loaded
+ # self.moodleTreeModel.worker.loadedItem.connect(lambda t, item:)
+
# local filesystem tab
self.downloadPath = QDir.homePath()
@@ -371,6 +377,21 @@ class MuddleWindow(QMainWindow):
self.show()
+ @pyqtSlot(int)
+ def setProgressBarTasks(self, nrTasks):
+ self.progressBar.setMinimum(0)
+ self.progressBar.setMaximum(tasks)
+ self.progressBar.reset()
+
+ @pyqtSlot()
+ def advanceProgressBar(self):
+ currentValue = self.progressBar.value()
+ self.progressBar.setValue(currentValue + 1);
+
+ @pyqtSlot(int)
+ def setProgressBarValue(self, value):
+ self.progressBar.setValue(value)
+
@pyqtSlot()
def onRequestTokenBtnClicked(self):
# TODO: open login dialog