From 5d796c76b796d65d1fd08812b6d038ba01bb001e Mon Sep 17 00:00:00 2001 From: Maximilian Siess Date: Tue, 18 Apr 2017 13:46:24 +0200 Subject: Alignment options added to render task --- .main.py.swp | Bin 20480 -> 20480 bytes .main.ui.swp | Bin 24576 -> 0 bytes .video_thread.py.swp | Bin 0 -> 12288 bytes main.py | 3 ++- video_thread.py | 7 ++++--- 5 files changed, 6 insertions(+), 4 deletions(-) delete mode 100644 .main.ui.swp create mode 100644 .video_thread.py.swp diff --git a/.main.py.swp b/.main.py.swp index 4705a19..e57f30f 100644 Binary files a/.main.py.swp and b/.main.py.swp differ diff --git a/.main.ui.swp b/.main.ui.swp deleted file mode 100644 index bd61a94..0000000 Binary files a/.main.ui.swp and /dev/null differ diff --git a/.video_thread.py.swp b/.video_thread.py.swp new file mode 100644 index 0000000..12dd93f Binary files /dev/null and b/.video_thread.py.swp differ diff --git a/main.py b/main.py index f71bbf2..40c1650 100644 --- a/main.py +++ b/main.py @@ -16,7 +16,7 @@ class Main(QtCore.QObject): newTask = QtCore.pyqtSignal(str, str, QFont, str) processTask = QtCore.pyqtSignal() - videoTask = QtCore.pyqtSignal(str, str, QFont, str, str) + videoTask = QtCore.pyqtSignal(str, str, QFont, str, str, str) def __init__(self, window): @@ -128,6 +128,7 @@ class Main(QtCore.QObject): self.videoTask.emit(self.window.label_background.text(), self.window.lineEdit_title.text(), self.window.fontComboBox.currentFont(), + self.window.alignmentComboBox.currentText(), self.window.label_input.text(), self.window.label_output.text()) diff --git a/video_thread.py b/video_thread.py index 9f4ce7b..2bd767c 100644 --- a/video_thread.py +++ b/video_thread.py @@ -18,14 +18,15 @@ class Worker(QtCore.QObject): self.core = core.Core() - @pyqtSlot(str, str, QtGui.QFont, str, str) - def createVideo(self, backgroundImage, titleText, titleFont, inputFile, outputFile): + @pyqtSlot(str, str, QtGui.QFont, str, str, str) + def createVideo(self, backgroundImage, titleText, titleFont, alignment, inputFile, outputFile): # print('worker thread id: {}'.format(QtCore.QThread.currentThreadId())) imBackground = self.core.drawBaseImage( backgroundImage, titleText, - titleFont) + titleFont, + alignment) self.progressBarUpdate.emit(0) -- cgit v1.2.3