| 14 | |
| 15 | |
| 16 | class exportHtml: |
| 17 | _instance = None |
| 18 | |
| 19 | @classmethod |
| 20 | def getInstance(cls): |
| 21 | if cls._instance is None: |
| 22 | cls._instance = exportHtml() |
| 23 | |
| 24 | return cls._instance |
| 25 | |
| 26 | def __init__(self): |
| 27 | self.thread = exportHtmlThread() |
| 28 | |
| 29 | def refreshFittingHtml(self, force=False, progress=None): |
| 30 | settings = HTMLExportSettings.getInstance() |
| 31 | |
| 32 | if force or settings.getEnabled(): |
| 33 | self.thread.stop() |
| 34 | self.thread = exportHtmlThread(progress) |
| 35 | self.thread.start() |
| 36 | |
| 37 | |
| 38 | class exportHtmlThread(threading.Thread): |