Example #1
0
 def _onAddAllToQueue(self):
     model = self._lst_available.model()
     for row in reversed(range(0, model.rowCount())):
         options = model.options(row)
         try:
             self._runner.put(options)
         except Exception as ex:
             messagebox.exception(self, ex)
             return
Example #2
0
    def _onOpened(self, options):
        self._dlg_progress.hide()
        self._options_reader_thread.quit()
        self._options_reader_thread.wait()
        self._options_reader_thread = None

        try:
            self._lst_available.model().addOptions(options)
        except Exception as ex:
            messagebox.exception(self, ex)
Example #3
0
    def _onAddToQueue(self):
        selection = self._lst_available.selectionModel().selection().indexes()
        if len(selection) == 0:
            QMessageBox.warning(self, "Queue", "Select an options")
            return

        model = self._lst_available.model()
        for row in sorted(map(methodcaller('row'), selection), reverse=True):
            options = model.options(row)
            try:
                self._runner.put(options)
            except Exception as ex:
                messagebox.exception(self, ex)
                return
Example #4
0
    def _onBrowse(self):
        oldpath = self.path()
        newpath = self._showDialog(self.baseDir())

        if not newpath and not oldpath:
            return
        elif not newpath and oldpath:
            newpath = oldpath
        else:
            self.pathChanged.emit(newpath)

        try:
            self.setPath(newpath)
        except Exception as ex:
            messagebox.exception(self, ex)
Example #5
0
 def _onDialogProgressException(self, ex):
     self._dlg_progress.hide()
     self._options_reader_thread.quit()
     self._options_reader_thread.wait()
     messagebox.exception(self, ex)