def __init__(self, document): document.contentsChanged.connect(self.slotDocumentContentsChanged, Qt.QueuedConnection) document.saving.connect(self.slotDocumentSaving) document.loaded.connect(self.initialize) jobmanager.manager(document).started.connect(self.slotJobStarted) self.initialize()
def runJob(self, job, document): """Runs the engraving job on behalf of document.""" jobattributes.get(job).mainwindow = self.mainwindow() # cancel running job, that would be an autocompile job rjob = jobmanager.job(document) if rjob and rjob.is_running(): rjob.abort() jobmanager.manager(document).start_job(job)
def __init__(self, document): document.contentsChanged.connect(self.slotDocumentContentsChanged) document.saved.connect(self.slotDocumentSaved) if document.isModified(): self._dirty = True else: # look for existing result files in the default output format s = QSettings() s.beginGroup("lilypond_settings") if s.value("default_output_target", "pdf", type("")) == "svg": ext = '.svg*' else: ext = '.pdf' self._dirty = not resultfiles.results(document).files(ext) self._hash = None if self._dirty else documentinfo.docinfo(document).token_hash() jobmanager.manager(document).started.connect(self.slotJobStarted)
def __init__(self, document): self._files = None self.current = 0 document.loaded.connect(self.invalidate, -100) jobmanager.manager(document).finished.connect(self.invalidate, -100)
def __init__(self, doc): doc.modificationChanged.connect(self._send_icon) mgr = jobmanager.manager(doc) mgr.started.connect(self._send_icon) mgr.finished.connect(self._send_icon)
def runJob(self, job, document): """Runs the engraving job on behalf of document.""" jobattributes.get(job).mainwindow = self.mainwindow() jobmanager.manager(document).startJob(job)
def __init__(self, document): document.contentsChanged.connect(self.slotDocumentContentsChanged) document.saved.connect(self.slotDocumentSaved) document.loaded.connect(self.initialize) jobmanager.manager(document).started.connect(self.slotJobStarted) self.initialize()
def __init__(self, document): self._refs = {} mgr = jobmanager.manager(document) if mgr.job(): self.connectJob(mgr.job()) mgr.started.connect(self.connectJob)