diff options
| author | Martin Kaistra | 2017-05-25 18:43:21 +0200 |
|---|---|---|
| committer | Martin Kaistra | 2017-05-25 18:43:21 +0200 |
| commit | 5487319dc10c42728ecc0d8f67abe55278348509 (patch) | |
| tree | a744c6557a4a33fe9c9b3cc4c08e9156dde2e68e /preview_thread.py | |
| parent | c622f2908ed1e1fed165d3433d7e6932f06c7a22 (diff) | |
| parent | 624ec8dca2872813789cf2d5fa32c523f4359d86 (diff) | |
Merge branch 'tassaron2-master'
Diffstat (limited to 'preview_thread.py')
| -rw-r--r-- | preview_thread.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/preview_thread.py b/preview_thread.py index 5bad653..041d39e 100644 --- a/preview_thread.py +++ b/preview_thread.py @@ -19,8 +19,9 @@ class Worker(QtCore.QObject): self.queue = queue - @pyqtSlot(str, str, QtGui.QFont, int, int, int, int) - def createPreviewImage(self, backgroundImage, titleText, titleFont, fontSize, alignment, xOffset, yOffset): + @pyqtSlot(str, str, QtGui.QFont, int, int, int, int, tuple, tuple) + def createPreviewImage(self, backgroundImage, titleText, titleFont, fontSize,\ + alignment, xOffset, yOffset, textColor, visColor): # print('worker thread id: {}'.format(QtCore.QThread.currentThreadId())) dic = { "backgroundImage": backgroundImage, @@ -29,7 +30,9 @@ class Worker(QtCore.QObject): "fontSize": fontSize, "alignment": alignment, "xoffset": xOffset, - "yoffset": yOffset + "yoffset": yOffset, + "textColor" : textColor, + "visColor" : visColor } self.queue.put(dic) @@ -59,11 +62,12 @@ class Worker(QtCore.QObject): nextPreviewInformation["fontSize"], nextPreviewInformation["alignment"], nextPreviewInformation["xoffset"], - nextPreviewInformation["yoffset"]) - + nextPreviewInformation["yoffset"], + nextPreviewInformation["textColor"], + nextPreviewInformation["visColor"]) spectrum = numpy.fromfunction(lambda x: 0.008*(x-128)**2, (255,), dtype="int16") - im = self.core.drawBars(spectrum, im) + im = self.core.drawBars(spectrum, im, nextPreviewInformation["visColor"]) self._image = ImageQt(im) self._previewImage = QtGui.QImage(self._image) |
