diff options
author | Nao Pross <np@0hm.ch> | 2021-02-10 15:34:45 +0100 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2021-02-10 15:34:45 +0100 |
commit | 6c48698478d4a4ea877f86370482cf84c4dd3b50 (patch) | |
tree | dc282a4c37a7174910a2d99487de3f0286e870f5 | |
parent | Replace QToolButtons with QPushButtons (diff) | |
download | Muddle-6c48698478d4a4ea877f86370482cf84c4dd3b50.tar.gz Muddle-6c48698478d4a4ea877f86370482cf84c4dd3b50.zip |
Prepare progress bar slots
Diffstat (limited to '')
-rw-r--r-- | gui.py | 21 | ||||
-rw-r--r-- | muddle.ui | 4 |
2 files changed, 23 insertions, 2 deletions
@@ -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 @@ -73,10 +73,10 @@ <item row="5" column="0" colspan="2"> <widget class="QProgressBar" name="downloadProgressBar"> <property name="enabled"> - <bool>false</bool> + <bool>true</bool> </property> <property name="value"> - <number>24</number> + <number>0</number> </property> </widget> </item> |