Example #1
0
 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()
Example #2
0
 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)
Example #3
0
 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)
Example #4
0
 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)
Example #5
0
 def __init__(self, document):
     self._files = None
     self.current = 0
     document.loaded.connect(self.invalidate, -100)
     jobmanager.manager(document).finished.connect(self.invalidate, -100)
Example #6
0
 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)
Example #7
0
 def runJob(self, job, document):
     """Runs the engraving job on behalf of document."""
     jobattributes.get(job).mainwindow = self.mainwindow()
     jobmanager.manager(document).startJob(job)
Example #8
0
 def __init__(self, document):
     self._files = None
     self.current = 0
     document.loaded.connect(self.invalidate, -100)
     jobmanager.manager(document).finished.connect(self.invalidate, -100)
Example #9
0
 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()
Example #10
0
 def __init__(self, document):
     self._refs = {}
     mgr = jobmanager.manager(document)
     if mgr.job():
         self.connectJob(mgr.job())
     mgr.started.connect(self.connectJob)
Example #11
0
 def __init__(self, document):
     self._refs = {}
     mgr = jobmanager.manager(document)
     if mgr.job():
         self.connectJob(mgr.job())
     mgr.started.connect(self.connectJob)