added font size and text position to video thread
This commit is contained in:
parent
8423d95820
commit
a170996259
5
main.py
5
main.py
|
@ -16,7 +16,7 @@ class Main(QtCore.QObject):
|
|||
|
||||
newTask = QtCore.pyqtSignal(str, str, QFont, int, str, int, int)
|
||||
processTask = QtCore.pyqtSignal()
|
||||
videoTask = QtCore.pyqtSignal(str, str, QFont, str, str, str)
|
||||
videoTask = QtCore.pyqtSignal(str, str, QFont, int, str, int, int, str, str)
|
||||
|
||||
def __init__(self, window):
|
||||
|
||||
|
@ -134,7 +134,10 @@ class Main(QtCore.QObject):
|
|||
self.videoTask.emit(self.window.label_background.text(),
|
||||
self.window.lineEdit_title.text(),
|
||||
self.window.fontComboBox.currentFont(),
|
||||
self.window.fontsizeSpinBox.value(),
|
||||
self.window.alignmentComboBox.currentText(),
|
||||
self.window.textXSpinBox.value(),
|
||||
self.window.textYSpinBox.value(),
|
||||
self.window.label_input.text(),
|
||||
self.window.label_output.text())
|
||||
|
||||
|
|
|
@ -18,15 +18,18 @@ class Worker(QtCore.QObject):
|
|||
self.core = core.Core()
|
||||
|
||||
|
||||
@pyqtSlot(str, str, QtGui.QFont, str, str, str)
|
||||
def createVideo(self, backgroundImage, titleText, titleFont, alignment, inputFile, outputFile):
|
||||
@pyqtSlot(str, str, QtGui.QFont, int, str, int, int, str, str)
|
||||
def createVideo(self, backgroundImage, titleText, titleFont, fontSize, alignment, xOffset, yOffset, inputFile, outputFile):
|
||||
# print('worker thread id: {}'.format(QtCore.QThread.currentThreadId()))
|
||||
|
||||
imBackground = self.core.drawBaseImage(
|
||||
backgroundImage,
|
||||
titleText,
|
||||
titleFont,
|
||||
alignment)
|
||||
fontSize,
|
||||
alignment,
|
||||
xOffset,
|
||||
yOffset)
|
||||
|
||||
self.progressBarUpdate.emit(0)
|
||||
|
||||
|
|
Reference in New Issue