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 /main.py | |
| parent | 7d2ecb0d1511f9918a951c995988e797d2971fd7 (diff) | |
Added text alignment option
Diffstat (limited to 'main.py')
| -rw-r--r-- | main.py | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -14,7 +14,7 @@ import preview_thread, core, video_thread class Main(QtCore.QObject): - newTask = QtCore.pyqtSignal(str, str, QFont) + newTask = QtCore.pyqtSignal(str, str, QFont, str) processTask = QtCore.pyqtSignal() videoTask = QtCore.pyqtSignal(str, str, QFont, str, str) @@ -49,6 +49,7 @@ class Main(QtCore.QObject): window.fontComboBox.currentFontChanged.connect(self.drawPreview) window.lineEdit_title.textChanged.connect(self.drawPreview) + window.alignmentComboBox.currentIndexChanged.connect(self.drawPreview) window.progressBar_create.setValue(0) window.setWindowTitle("Audio Visualizer") @@ -56,12 +57,17 @@ class Main(QtCore.QObject): window.pushButton_selectOutput.setText("Select Output Video File") window.pushButton_selectBackground.setText("Select Background Image") window.label_font.setText("Title Font") + window.label_alignment.setText("Alignment") window.label_title.setText("Title Text") window.pushButton_createVideo.setText("Create Video") window.groupBox_create.setTitle("Create") window.groupBox_settings.setTitle("Settings") window.groupBox_preview.setTitle("Preview") + window.alignmentComboBox.addItem("Left"); + window.alignmentComboBox.addItem("Middle"); + window.alignmentComboBox.addItem("Right"); + titleFont = self.settings.value("titleFont") if not titleFont == None: window.fontComboBox.setCurrentFont(QFont(titleFont)) @@ -136,7 +142,8 @@ class Main(QtCore.QObject): def drawPreview(self): self.newTask.emit(self.window.label_background.text(), self.window.lineEdit_title.text(), - self.window.fontComboBox.currentFont()) + self.window.fontComboBox.currentFont(), + self.window.alignmentComboBox.currentText()) # self.processTask.emit() def showPreviewImage(self, image): |
