def startPrint(self): if not super(PrinterS3g, self).startPrint(): return if not self.isOperational() or self.isPrinting(): return if self._currentFile is None: raise ValueError("No file selected for printing") if self._printJob and self._printJob.isAlive(): raise Exception("A Print Job is still running") self._changeState(self.STATE_PRINTING) data = printerManager().getFileInfo(self._currentFile['filename']) eventManager().fire(Events.PRINT_STARTED, data) self._printJob = PrintJobS3G(self, self._currentFile) self._printJob.start()
def startPrint(self): if not super(PrinterS3g, self).startPrint(): return if not self.isOperational() or self.isPrinting(): return if self._currentFile is None: raise ValueError("No file selected for printing") if self._printJob and self._printJob.isAlive(): raise Exception("A Print Job is still running") self._changeState(self.STATE_PRINTING) eventManager().fire(Events.PRINT_STARTED, { "file": self._currentFile['filename'], "filename": os.path.basename(self._currentFile['filename']), "origin": self._currentFile['origin'] }) self._printJob = PrintJobS3G(self, self._currentFile) self._printJob.start()