diff options
| author | Maximilian Siess | 2017-04-18 13:35:29 +0200 |
|---|---|---|
| committer | Maximilian Siess | 2017-04-18 13:35:29 +0200 |
| commit | c772bf5583dec23513371392ca6d2018518483cb (patch) | |
| tree | 1de8e0323662a494679d52212107840d861c9045 /preview_thread.py | |
| parent | 7d2ecb0d1511f9918a951c995988e797d2971fd7 (diff) | |
Added text alignment option
Diffstat (limited to 'preview_thread.py')
| -rw-r--r-- | preview_thread.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/preview_thread.py b/preview_thread.py index 740f6c6..53bb608 100644 --- a/preview_thread.py +++ b/preview_thread.py @@ -19,13 +19,14 @@ class Worker(QtCore.QObject): self.queue = queue - @pyqtSlot(str, str, QtGui.QFont) - def createPreviewImage(self, backgroundImage, titleText, titleFont): + @pyqtSlot(str, str, QtGui.QFont, str) + def createPreviewImage(self, backgroundImage, titleText, titleFont, alignment): # print('worker thread id: {}'.format(QtCore.QThread.currentThreadId())) dic = { "backgroundImage": backgroundImage, "titleText": titleText, - "titleFont": titleFont + "titleFont": titleFont, + "alignment": alignment } self.queue.put(dic) @@ -42,7 +43,8 @@ class Worker(QtCore.QObject): im = self.core.drawBaseImage( nextPreviewInformation["backgroundImage"], nextPreviewInformation["titleText"], - nextPreviewInformation["titleFont"]) + nextPreviewInformation["titleFont"], + nextPreviewInformation["alignment"]) spectrum = numpy.fromfunction(lambda x: 0.008*(x-128)**2, (255,), dtype="int16") |
