aboutsummaryrefslogtreecommitdiff
path: root/preview_thread.py
diff options
context:
space:
mode:
authorMaximilian Siess2017-04-20 18:47:14 +0200
committerMaximilian Siess2017-04-20 18:47:14 +0200
commitf639760ffc8f3152b46c32a881303a7522b8daca (patch)
tree2e396fb5243f894c3f7bc4bde89a879deba9c1c3 /preview_thread.py
parent153ba9123196c0457d8773d4b2a1a5f86ea4c2ab (diff)
added x/y offset of text in preview
Diffstat (limited to 'preview_thread.py')
-rw-r--r--preview_thread.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/preview_thread.py b/preview_thread.py
index 53bb608..ddb5407 100644
--- a/preview_thread.py
+++ b/preview_thread.py
@@ -19,14 +19,16 @@ class Worker(QtCore.QObject):
self.queue = queue
- @pyqtSlot(str, str, QtGui.QFont, str)
- def createPreviewImage(self, backgroundImage, titleText, titleFont, alignment):
+ @pyqtSlot(str, str, QtGui.QFont, str, int, int)
+ def createPreviewImage(self, backgroundImage, titleText, titleFont, alignment, xOffset, yOffset):
# print('worker thread id: {}'.format(QtCore.QThread.currentThreadId()))
dic = {
"backgroundImage": backgroundImage,
"titleText": titleText,
"titleFont": titleFont,
- "alignment": alignment
+ "alignment": alignment,
+ "xoffset": xOffset,
+ "yoffset": yOffset
}
self.queue.put(dic)
@@ -44,7 +46,9 @@ class Worker(QtCore.QObject):
nextPreviewInformation["backgroundImage"],
nextPreviewInformation["titleText"],
nextPreviewInformation["titleFont"],
- nextPreviewInformation["alignment"])
+ nextPreviewInformation["alignment"],
+ nextPreviewInformation["xoffset"],
+ nextPreviewInformation["yoffset"])
spectrum = numpy.fromfunction(lambda x: 0.008*(x-128)**2, (255,), dtype="int16")