Add images. Update requirements.txt. Update UI. Add import images and audio.

This commit is contained in:
Jarosław Wieczorek 2020-12-18 22:45:18 +01:00
parent d93dd450dc
commit 28e65ac8b8
8 changed files with 563 additions and 165 deletions

View File

@ -1,15 +1,13 @@
################################################################################ click==7.1.2
# This requirements file has been automatically generated from `Pipfile` with ffmpeg==1.4
# `pipenv-to-requirements` Flask==1.1.2
# itsdangerous==1.1.0
# Jinja2==2.11.2
# This has been done to maintain backward compatibility with tools and services MarkupSafe==1.1.1
# that do not support `Pipfile` yet. packaging==20.7
# pipfile-requirements==0.3.0
# Do NOT edit it directly, use `pipenv install [-d]` to modify `Pipfile` and pyparsing==2.4.7
# `Pipfile.lock` and then regenerate `requirements*.txt`. PyQt5==5.15.2
################################################################################ PyQt5-sip==12.8.1
toml==0.10.2
flask Werkzeug==1.0.1
pipfile-requirements
pyqt5

BIN
src/gui/images/both.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 MiB

BIN
src/gui/images/left.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 MiB

BIN
src/gui/images/none.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 MiB

BIN
src/gui/images/right.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 MiB

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>861</width> <width>864</width>
<height>775</height> <height>959</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -16,15 +16,15 @@
<widget class="QWidget" name="central_widget"> <widget class="QWidget" name="central_widget">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>700</width> <width>500</width>
<height>540</height> <height>900</height>
</size> </size>
</property> </property>
<layout class="QVBoxLayout" name="vertical_layout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<layout class="QHBoxLayout" name="h_layout_select_audio1"> <layout class="QHBoxLayout" name="h_layout_select_audio_1">
<item> <item>
<widget class="QLineEdit" name="line_edit_audio1"> <widget class="QLineEdit" name="line_edit_audio_1">
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
@ -34,7 +34,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLineEdit" name="line_edit_name1"> <widget class="QLineEdit" name="line_edit_name_1">
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
@ -44,7 +44,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="push_button_audio1"> <widget class="QPushButton" name="button_audio_1">
<property name="text"> <property name="text">
<string>Dodaj audio 1</string> <string>Dodaj audio 1</string>
</property> </property>
@ -53,9 +53,9 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="h_layout_select_audio2"> <layout class="QHBoxLayout" name="h_layout_select_audio_2">
<item> <item>
<widget class="QLineEdit" name="line_edit_audio2"> <widget class="QLineEdit" name="line_edit_audio_2">
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
@ -65,7 +65,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLineEdit" name="line_edit_name2"> <widget class="QLineEdit" name="line_edit_name_2">
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
@ -75,7 +75,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="push_button_audio2"> <widget class="QPushButton" name="button_audio_2">
<property name="text"> <property name="text">
<string>Dodaj audio 2</string> <string>Dodaj audio 2</string>
</property> </property>
@ -84,69 +84,157 @@
</layout> </layout>
</item> </item>
<item> <item>
<widget class="Line" name="h_line3"> <widget class="Line" name="h_line">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QVBoxLayout" name="v_layout_avatars"> <layout class="QHBoxLayout" name="w_layout_avatars_1_and_2">
<item> <item>
<layout class="QHBoxLayout" name="h_layout_avatars_preview"> <layout class="QVBoxLayout" name="w_layout_avatar_1">
<item> <item>
<widget class="QLabel" name="label_avatar_1"> <widget class="QLabel" name="preview_label_avatar_1">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>100</width> <width>200</width>
<height>100</height> <height>200</height>
</size> </size>
</property> </property>
<property name="maximumSize">
<size>
<width>300</width>
<height>300</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text"> <property name="text">
<string>TextLabel</string> <string>Podgląd - rozmówcy aktywni</string>
</property>
<property name="scaledContents">
<bool>true</bool>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignCenter</set> <set>Qt::AlignCenter</set>
</property> </property>
<property name="path" stdset="0">
<string/>
</property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_avatar_2"> <widget class="QPushButton" name="button_select_avatar_1">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>100</width> <width>200</width>
<height>100</height> <height>35</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>300</width>
<height>35</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string>TextLabel</string> <string>Rozmówcy - aktywni</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="h_spacer_1">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>5</width>
<height>5</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QVBoxLayout" name="w_layout_avatar_2">
<item>
<widget class="QLabel" name="preview_label_avatar_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>200</width>
<height>200</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>300</width>
<height>300</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string>Podgląd - rozmówcy nieaktywni</string>
</property>
<property name="scaledContents">
<bool>true</bool>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignCenter</set> <set>Qt::AlignCenter</set>
</property> </property>
</widget> <property name="path" stdset="0">
</item> <string/>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="h_layout_avatars_buttons">
<item>
<widget class="QPushButton" name="push_button_select_avatar1">
<property name="text">
<string>Wybierz grafikę dla pierwszego rozmówcy</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="push_button_select_avatar2"> <widget class="QPushButton" name="button_select_avatar_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>200</width>
<height>0</height> <height>35</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>300</width>
<height>35</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string>Wybierz grafikę dla drugiego rozmówcy</string> <string>Rozmówcy - nieaktywni</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -155,7 +243,178 @@
</layout> </layout>
</item> </item>
<item> <item>
<widget class="Line" name="h_line2"> <spacer name="v_spacer_1">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>5</width>
<height>5</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="w_layout_avatars_3_and_4">
<item>
<layout class="QVBoxLayout" name="w_layout_avatar_3">
<item>
<widget class="QLabel" name="preview_label_avatar_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>200</width>
<height>200</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>300</width>
<height>300</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string>Podgląd - 1 rozmówca aktywny</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="path" stdset="0">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="button_select_avatar_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>200</width>
<height>35</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>300</width>
<height>35</height>
</size>
</property>
<property name="text">
<string>Pierwszy rozmówca - aktywny</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="h_spacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>5</width>
<height>5</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QVBoxLayout" name="w_layout_avatar_4">
<item>
<widget class="QLabel" name="preview_label_avatar_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>200</width>
<height>200</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>300</width>
<height>300</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string>Podgląd - 2 rozmówca aktywny</string>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="path" stdset="0">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="button_select_avatar_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>200</width>
<height>35</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>300</width>
<height>35</height>
</size>
</property>
<property name="text">
<string>Drugi rozmówca - aktywny</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<widget class="Line" name="h_line_2">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -226,7 +485,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="Line" name="h_line"> <widget class="Line" name="h_line_3">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -235,14 +494,14 @@
<item> <item>
<layout class="QHBoxLayout" name="h_layout_preview_or_generate"> <layout class="QHBoxLayout" name="h_layout_preview_or_generate">
<item> <item>
<widget class="QPushButton" name="push_button_preview"> <widget class="QPushButton" name="button_preview">
<property name="text"> <property name="text">
<string>Podgląd</string> <string>Podgląd</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="push_button_generate"> <widget class="QPushButton" name="button_generate">
<property name="text"> <property name="text">
<string>Wygeneruj podcast</string> <string>Wygeneruj podcast</string>
</property> </property>
@ -251,17 +510,18 @@
</layout> </layout>
</item> </item>
</layout> </layout>
<zorder>h_line2</zorder>
<zorder>h_line</zorder> <zorder>h_line</zorder>
<zorder>h_line3</zorder> <zorder>h_line_2</zorder>
<zorder>h_slider</zorder> <zorder>h_slider</zorder>
<zorder>h_line_3</zorder>
<zorder>v_spacer_1</zorder>
</widget> </widget>
<widget class="QMenuBar" name="menu_bar"> <widget class="QMenuBar" name="menu_bar">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>861</width> <width>864</width>
<height>32</height> <height>32</height>
</rect> </rect>
</property> </property>

View File

@ -1,19 +1,29 @@
from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import * from PyQt5.QtWidgets import *
from src.python.ui.mainwindow_ui import Ui_MainWindow from src.python.ui.mainwindow_ui import Ui_MainWindow
class MainWindow(QMainWindow, Ui_MainWindow): class MainWindow(QMainWindow, Ui_MainWindow):
def __init__(self, parent=None): def __init__(self, parent=None):
super(MainWindow, self).__init__(parent=parent) super(MainWindow, self).__init__(parent=parent)
self.setupUi(self) self.setupUi(self)
self.setup_logic() self.setup_logic()
self.setup_detail()
def setup_logic(self): def setup_logic(self):
self.push_button_audio1.clicked.connect(lambda: self.open_audio_import(audio_number=1)) self.button_audio_1.clicked.connect(lambda: self.open_audio_import(audio_number=1))
self.push_button_audio2.clicked.connect(lambda: self.open_audio_import(audio_number=2)) self.button_audio_2.clicked.connect(lambda: self.open_audio_import(audio_number=2))
self.button_select_avatar_1.clicked.connect(lambda: self.open_image_import(image_number=1))
self.button_select_avatar_2.clicked.connect(lambda: self.open_image_import(image_number=2))
self.button_select_avatar_3.clicked.connect(lambda: self.open_image_import(image_number=3))
self.button_select_avatar_4.clicked.connect(lambda: self.open_image_import(image_number=4))
def setup_detail(self): def setup_detail(self):
pass self.line_edit_name_1.setDisabled(True)
self.line_edit_name_2.setDisabled(True)
def create_custom_dialog(self, title: str, msg: str): def create_custom_dialog(self, title: str, msg: str):
dialog = QDialog() dialog = QDialog()
@ -29,25 +39,56 @@ class MainWindow(QMainWindow, Ui_MainWindow):
dialog.setLayout(layout) dialog.setLayout(layout)
return dialog return dialog
def open_image_import(self, image_number: int):
dialog = QFileDialog()
dialog.setOption(dialog.DontUseNativeDialog, True)
dialog.setFileMode(QFileDialog.ExistingFile)
file_formats = "All Files (*);;JPG (*.jpg);;PNG (*.png)"
file, _ = dialog.getOpenFileName(self, "QFileDialog.getOpenFileName()", "", file_formats, options=dialog.options())
if not file.lower().endswith('.jpg') and not file.lower().endswith('.png'):
msg = F"[!] Plik {file} nie jest plikiem jpg/png."
dialog = self.create_custom_dialog(title='Error', msg=msg)
dialog.exec_()
else:
pixmap = QPixmap(file)
if image_number == 1:
self.preview_label_avatar_1.setProperty('path', file)
self.preview_label_avatar_1.setPixmap(pixmap)
elif image_number == 2:
self.preview_label_avatar_2.setProperty('path', file)
self.preview_label_avatar_2.setPixmap(pixmap)
elif image_number == 3:
self.preview_label_avatar_3.setProperty('path', file)
self.preview_label_avatar_3.setPixmap(pixmap)
elif image_number == 4:
self.preview_label_avatar_4.setProperty('path', file)
self.preview_label_avatar_4.setPixmap(pixmap)
print(F"[*] Zaimportowano garfikę {image_number} z pliku: '{file}'.")
print(F"Rodzielczość {pixmap.width()}x{pixmap.height()}")
def open_audio_import(self, audio_number: int): def open_audio_import(self, audio_number: int):
dialog = QFileDialog() dialog = QFileDialog()
dialog.setOption(dialog.DontUseNativeDialog, True) dialog.setOption(dialog.DontUseNativeDialog, True)
dialog.setFileMode(QFileDialog.ExistingFile) dialog.setFileMode(QFileDialog.ExistingFile)
file_formats = "All Files (*);;mp3 (*.mp3);;wav (*.wav)"
file, _ = dialog.getOpenFileName(self, "QFileDialog.getOpenFileName()", "", file_formats, options=dialog.options())
file, _ = dialog.getOpenFileName(self, "QFileDialog.getOpenFileName()", "", "All Files (*);;mp3 (*.mp3);;wav (*.wav)", options=dialog.options()) if not file.lower().endswith('.mp3') and not file.lower().endswith('.wav'):
msg = F"[!] Plik {file} nie jest plikiem mp3/wav."
if not file.endswith('.mp3'): dialog = self.create_custom_dialog(title='Error', msg=msg)
print(F"[!] Plik {file} nie jest plikiem mp3.")
dialog = self.create_custom_dialog(title='Error', msg=F"[!] Plik {file} nie jest plikiem mp3.")
dialog.exec_() dialog.exec_()
else: else:
if audio_number == 1: if audio_number == 1:
self.line_edit_audio1.setText(file) self.line_edit_audio_1.setText(file)
elif audio_number == 2: elif audio_number == 2:
self.line_edit_audio2.setText(file) self.line_edit_audio_2.setText(file)
print(F"[*] Zaimportowano ścieżkę {audio_number} pliku: '{file}'.") print(F"[*] Zaimportowano ścieżkę {audio_number} pliku: '{file}'.")

View File

@ -14,76 +14,171 @@ from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object): class Ui_MainWindow(object):
def setupUi(self, MainWindow): def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow") MainWindow.setObjectName("MainWindow")
MainWindow.resize(861, 775) MainWindow.resize(864, 959)
self.central_widget = QtWidgets.QWidget(MainWindow) self.central_widget = QtWidgets.QWidget(MainWindow)
self.central_widget.setMinimumSize(QtCore.QSize(700, 540)) self.central_widget.setMinimumSize(QtCore.QSize(500, 900))
self.central_widget.setObjectName("central_widget") self.central_widget.setObjectName("central_widget")
self.vertical_layout = QtWidgets.QVBoxLayout(self.central_widget) self.verticalLayout = QtWidgets.QVBoxLayout(self.central_widget)
self.vertical_layout.setObjectName("vertical_layout") self.verticalLayout.setObjectName("verticalLayout")
self.h_layout_select_audio1 = QtWidgets.QHBoxLayout() self.h_layout_select_audio_1 = QtWidgets.QHBoxLayout()
self.h_layout_select_audio1.setObjectName("h_layout_select_audio1") self.h_layout_select_audio_1.setObjectName("h_layout_select_audio_1")
self.line_edit_audio1 = QtWidgets.QLineEdit(self.central_widget) self.line_edit_audio_1 = QtWidgets.QLineEdit(self.central_widget)
self.line_edit_audio1.setText("") self.line_edit_audio_1.setText("")
self.line_edit_audio1.setObjectName("line_edit_audio1") self.line_edit_audio_1.setObjectName("line_edit_audio_1")
self.h_layout_select_audio1.addWidget(self.line_edit_audio1) self.h_layout_select_audio_1.addWidget(self.line_edit_audio_1)
self.line_edit_name1 = QtWidgets.QLineEdit(self.central_widget) self.line_edit_name_1 = QtWidgets.QLineEdit(self.central_widget)
self.line_edit_name1.setText("") self.line_edit_name_1.setText("")
self.line_edit_name1.setObjectName("line_edit_name1") self.line_edit_name_1.setObjectName("line_edit_name_1")
self.h_layout_select_audio1.addWidget(self.line_edit_name1) self.h_layout_select_audio_1.addWidget(self.line_edit_name_1)
self.push_button_audio1 = QtWidgets.QPushButton(self.central_widget) self.button_audio_1 = QtWidgets.QPushButton(self.central_widget)
self.push_button_audio1.setObjectName("push_button_audio1") self.button_audio_1.setObjectName("button_audio_1")
self.h_layout_select_audio1.addWidget(self.push_button_audio1) self.h_layout_select_audio_1.addWidget(self.button_audio_1)
self.vertical_layout.addLayout(self.h_layout_select_audio1) self.verticalLayout.addLayout(self.h_layout_select_audio_1)
self.h_layout_select_audio2 = QtWidgets.QHBoxLayout() self.h_layout_select_audio_2 = QtWidgets.QHBoxLayout()
self.h_layout_select_audio2.setObjectName("h_layout_select_audio2") self.h_layout_select_audio_2.setObjectName("h_layout_select_audio_2")
self.line_edit_audio2 = QtWidgets.QLineEdit(self.central_widget) self.line_edit_audio_2 = QtWidgets.QLineEdit(self.central_widget)
self.line_edit_audio2.setText("") self.line_edit_audio_2.setText("")
self.line_edit_audio2.setObjectName("line_edit_audio2") self.line_edit_audio_2.setObjectName("line_edit_audio_2")
self.h_layout_select_audio2.addWidget(self.line_edit_audio2) self.h_layout_select_audio_2.addWidget(self.line_edit_audio_2)
self.line_edit_name2 = QtWidgets.QLineEdit(self.central_widget) self.line_edit_name_2 = QtWidgets.QLineEdit(self.central_widget)
self.line_edit_name2.setText("") self.line_edit_name_2.setText("")
self.line_edit_name2.setObjectName("line_edit_name2") self.line_edit_name_2.setObjectName("line_edit_name_2")
self.h_layout_select_audio2.addWidget(self.line_edit_name2) self.h_layout_select_audio_2.addWidget(self.line_edit_name_2)
self.push_button_audio2 = QtWidgets.QPushButton(self.central_widget) self.button_audio_2 = QtWidgets.QPushButton(self.central_widget)
self.push_button_audio2.setObjectName("push_button_audio2") self.button_audio_2.setObjectName("button_audio_2")
self.h_layout_select_audio2.addWidget(self.push_button_audio2) self.h_layout_select_audio_2.addWidget(self.button_audio_2)
self.vertical_layout.addLayout(self.h_layout_select_audio2) self.verticalLayout.addLayout(self.h_layout_select_audio_2)
self.h_line3 = QtWidgets.QFrame(self.central_widget) self.h_line = QtWidgets.QFrame(self.central_widget)
self.h_line3.setFrameShape(QtWidgets.QFrame.HLine) self.h_line.setFrameShape(QtWidgets.QFrame.HLine)
self.h_line3.setFrameShadow(QtWidgets.QFrame.Sunken) self.h_line.setFrameShadow(QtWidgets.QFrame.Sunken)
self.h_line3.setObjectName("h_line3") self.h_line.setObjectName("h_line")
self.vertical_layout.addWidget(self.h_line3) self.verticalLayout.addWidget(self.h_line)
self.v_layout_avatars = QtWidgets.QVBoxLayout() self.w_layout_avatars_1_and_2 = QtWidgets.QHBoxLayout()
self.v_layout_avatars.setObjectName("v_layout_avatars") self.w_layout_avatars_1_and_2.setObjectName("w_layout_avatars_1_and_2")
self.h_layout_avatars_preview = QtWidgets.QHBoxLayout() self.w_layout_avatar_1 = QtWidgets.QVBoxLayout()
self.h_layout_avatars_preview.setObjectName("h_layout_avatars_preview") self.w_layout_avatar_1.setObjectName("w_layout_avatar_1")
self.label_avatar_1 = QtWidgets.QLabel(self.central_widget) self.preview_label_avatar_1 = QtWidgets.QLabel(self.central_widget)
self.label_avatar_1.setMinimumSize(QtCore.QSize(100, 100)) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
self.label_avatar_1.setAlignment(QtCore.Qt.AlignCenter) sizePolicy.setHorizontalStretch(0)
self.label_avatar_1.setObjectName("label_avatar_1") sizePolicy.setVerticalStretch(0)
self.h_layout_avatars_preview.addWidget(self.label_avatar_1) sizePolicy.setHeightForWidth(self.preview_label_avatar_1.sizePolicy().hasHeightForWidth())
self.label_avatar_2 = QtWidgets.QLabel(self.central_widget) self.preview_label_avatar_1.setSizePolicy(sizePolicy)
self.label_avatar_2.setMinimumSize(QtCore.QSize(100, 100)) self.preview_label_avatar_1.setMinimumSize(QtCore.QSize(200, 200))
self.label_avatar_2.setAlignment(QtCore.Qt.AlignCenter) self.preview_label_avatar_1.setMaximumSize(QtCore.QSize(300, 300))
self.label_avatar_2.setObjectName("label_avatar_2") self.preview_label_avatar_1.setFrameShape(QtWidgets.QFrame.Box)
self.h_layout_avatars_preview.addWidget(self.label_avatar_2) self.preview_label_avatar_1.setScaledContents(True)
self.v_layout_avatars.addLayout(self.h_layout_avatars_preview) self.preview_label_avatar_1.setAlignment(QtCore.Qt.AlignCenter)
self.h_layout_avatars_buttons = QtWidgets.QHBoxLayout() self.preview_label_avatar_1.setProperty("path", "")
self.h_layout_avatars_buttons.setObjectName("h_layout_avatars_buttons") self.preview_label_avatar_1.setObjectName("preview_label_avatar_1")
self.push_button_select_avatar1 = QtWidgets.QPushButton(self.central_widget) self.w_layout_avatar_1.addWidget(self.preview_label_avatar_1)
self.push_button_select_avatar1.setObjectName("push_button_select_avatar1") self.button_select_avatar_1 = QtWidgets.QPushButton(self.central_widget)
self.h_layout_avatars_buttons.addWidget(self.push_button_select_avatar1) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
self.push_button_select_avatar2 = QtWidgets.QPushButton(self.central_widget) sizePolicy.setHorizontalStretch(0)
self.push_button_select_avatar2.setMinimumSize(QtCore.QSize(0, 0)) sizePolicy.setVerticalStretch(0)
self.push_button_select_avatar2.setObjectName("push_button_select_avatar2") sizePolicy.setHeightForWidth(self.button_select_avatar_1.sizePolicy().hasHeightForWidth())
self.h_layout_avatars_buttons.addWidget(self.push_button_select_avatar2) self.button_select_avatar_1.setSizePolicy(sizePolicy)
self.v_layout_avatars.addLayout(self.h_layout_avatars_buttons) self.button_select_avatar_1.setMinimumSize(QtCore.QSize(200, 35))
self.vertical_layout.addLayout(self.v_layout_avatars) self.button_select_avatar_1.setMaximumSize(QtCore.QSize(300, 35))
self.h_line2 = QtWidgets.QFrame(self.central_widget) self.button_select_avatar_1.setObjectName("button_select_avatar_1")
self.h_line2.setFrameShape(QtWidgets.QFrame.HLine) self.w_layout_avatar_1.addWidget(self.button_select_avatar_1)
self.h_line2.setFrameShadow(QtWidgets.QFrame.Sunken) self.w_layout_avatars_1_and_2.addLayout(self.w_layout_avatar_1)
self.h_line2.setObjectName("h_line2") spacerItem = QtWidgets.QSpacerItem(5, 5, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
self.vertical_layout.addWidget(self.h_line2) self.w_layout_avatars_1_and_2.addItem(spacerItem)
self.w_layout_avatar_2 = QtWidgets.QVBoxLayout()
self.w_layout_avatar_2.setObjectName("w_layout_avatar_2")
self.preview_label_avatar_2 = QtWidgets.QLabel(self.central_widget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.preview_label_avatar_2.sizePolicy().hasHeightForWidth())
self.preview_label_avatar_2.setSizePolicy(sizePolicy)
self.preview_label_avatar_2.setMinimumSize(QtCore.QSize(200, 200))
self.preview_label_avatar_2.setMaximumSize(QtCore.QSize(300, 300))
self.preview_label_avatar_2.setFrameShape(QtWidgets.QFrame.Box)
self.preview_label_avatar_2.setScaledContents(True)
self.preview_label_avatar_2.setAlignment(QtCore.Qt.AlignCenter)
self.preview_label_avatar_2.setProperty("path", "")
self.preview_label_avatar_2.setObjectName("preview_label_avatar_2")
self.w_layout_avatar_2.addWidget(self.preview_label_avatar_2)
self.button_select_avatar_2 = QtWidgets.QPushButton(self.central_widget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.button_select_avatar_2.sizePolicy().hasHeightForWidth())
self.button_select_avatar_2.setSizePolicy(sizePolicy)
self.button_select_avatar_2.setMinimumSize(QtCore.QSize(200, 35))
self.button_select_avatar_2.setMaximumSize(QtCore.QSize(300, 35))
self.button_select_avatar_2.setObjectName("button_select_avatar_2")
self.w_layout_avatar_2.addWidget(self.button_select_avatar_2)
self.w_layout_avatars_1_and_2.addLayout(self.w_layout_avatar_2)
self.verticalLayout.addLayout(self.w_layout_avatars_1_and_2)
spacerItem1 = QtWidgets.QSpacerItem(5, 5, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
self.verticalLayout.addItem(spacerItem1)
self.w_layout_avatars_3_and_4 = QtWidgets.QHBoxLayout()
self.w_layout_avatars_3_and_4.setObjectName("w_layout_avatars_3_and_4")
self.w_layout_avatar_3 = QtWidgets.QVBoxLayout()
self.w_layout_avatar_3.setObjectName("w_layout_avatar_3")
self.preview_label_avatar_3 = QtWidgets.QLabel(self.central_widget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.preview_label_avatar_3.sizePolicy().hasHeightForWidth())
self.preview_label_avatar_3.setSizePolicy(sizePolicy)
self.preview_label_avatar_3.setMinimumSize(QtCore.QSize(200, 200))
self.preview_label_avatar_3.setMaximumSize(QtCore.QSize(300, 300))
self.preview_label_avatar_3.setFrameShape(QtWidgets.QFrame.Box)
self.preview_label_avatar_3.setTextFormat(QtCore.Qt.RichText)
self.preview_label_avatar_3.setScaledContents(True)
self.preview_label_avatar_3.setAlignment(QtCore.Qt.AlignCenter)
self.preview_label_avatar_3.setProperty("path", "")
self.preview_label_avatar_3.setObjectName("preview_label_avatar_3")
self.w_layout_avatar_3.addWidget(self.preview_label_avatar_3)
self.button_select_avatar_3 = QtWidgets.QPushButton(self.central_widget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.button_select_avatar_3.sizePolicy().hasHeightForWidth())
self.button_select_avatar_3.setSizePolicy(sizePolicy)
self.button_select_avatar_3.setMinimumSize(QtCore.QSize(200, 35))
self.button_select_avatar_3.setMaximumSize(QtCore.QSize(300, 35))
self.button_select_avatar_3.setObjectName("button_select_avatar_3")
self.w_layout_avatar_3.addWidget(self.button_select_avatar_3)
self.w_layout_avatars_3_and_4.addLayout(self.w_layout_avatar_3)
spacerItem2 = QtWidgets.QSpacerItem(5, 5, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
self.w_layout_avatars_3_and_4.addItem(spacerItem2)
self.w_layout_avatar_4 = QtWidgets.QVBoxLayout()
self.w_layout_avatar_4.setObjectName("w_layout_avatar_4")
self.preview_label_avatar_4 = QtWidgets.QLabel(self.central_widget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.preview_label_avatar_4.sizePolicy().hasHeightForWidth())
self.preview_label_avatar_4.setSizePolicy(sizePolicy)
self.preview_label_avatar_4.setMinimumSize(QtCore.QSize(200, 200))
self.preview_label_avatar_4.setMaximumSize(QtCore.QSize(300, 300))
self.preview_label_avatar_4.setFrameShape(QtWidgets.QFrame.Box)
self.preview_label_avatar_4.setScaledContents(True)
self.preview_label_avatar_4.setAlignment(QtCore.Qt.AlignCenter)
self.preview_label_avatar_4.setProperty("path", "")
self.preview_label_avatar_4.setObjectName("preview_label_avatar_4")
self.w_layout_avatar_4.addWidget(self.preview_label_avatar_4)
self.button_select_avatar_4 = QtWidgets.QPushButton(self.central_widget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.button_select_avatar_4.sizePolicy().hasHeightForWidth())
self.button_select_avatar_4.setSizePolicy(sizePolicy)
self.button_select_avatar_4.setMinimumSize(QtCore.QSize(200, 35))
self.button_select_avatar_4.setMaximumSize(QtCore.QSize(300, 35))
self.button_select_avatar_4.setObjectName("button_select_avatar_4")
self.w_layout_avatar_4.addWidget(self.button_select_avatar_4)
self.w_layout_avatars_3_and_4.addLayout(self.w_layout_avatar_4)
self.verticalLayout.addLayout(self.w_layout_avatars_3_and_4)
self.h_line_2 = QtWidgets.QFrame(self.central_widget)
self.h_line_2.setFrameShape(QtWidgets.QFrame.HLine)
self.h_line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
self.h_line_2.setObjectName("h_line_2")
self.verticalLayout.addWidget(self.h_line_2)
self.h_layout_threshold = QtWidgets.QHBoxLayout() self.h_layout_threshold = QtWidgets.QHBoxLayout()
self.h_layout_threshold.setObjectName("h_layout_threshold") self.h_layout_threshold.setObjectName("h_layout_threshold")
self.label_threshold_description = QtWidgets.QLabel(self.central_widget) self.label_threshold_description = QtWidgets.QLabel(self.central_widget)
@ -102,32 +197,32 @@ class Ui_MainWindow(object):
self.lcd_number_of_threshold.setProperty("intValue", 0) self.lcd_number_of_threshold.setProperty("intValue", 0)
self.lcd_number_of_threshold.setObjectName("lcd_number_of_threshold") self.lcd_number_of_threshold.setObjectName("lcd_number_of_threshold")
self.h_layout_threshold.addWidget(self.lcd_number_of_threshold) self.h_layout_threshold.addWidget(self.lcd_number_of_threshold)
self.vertical_layout.addLayout(self.h_layout_threshold) self.verticalLayout.addLayout(self.h_layout_threshold)
self.h_slider = QtWidgets.QSlider(self.central_widget) self.h_slider = QtWidgets.QSlider(self.central_widget)
self.h_slider.setOrientation(QtCore.Qt.Horizontal) self.h_slider.setOrientation(QtCore.Qt.Horizontal)
self.h_slider.setObjectName("h_slider") self.h_slider.setObjectName("h_slider")
self.vertical_layout.addWidget(self.h_slider) self.verticalLayout.addWidget(self.h_slider)
self.h_line = QtWidgets.QFrame(self.central_widget) self.h_line_3 = QtWidgets.QFrame(self.central_widget)
self.h_line.setFrameShape(QtWidgets.QFrame.HLine) self.h_line_3.setFrameShape(QtWidgets.QFrame.HLine)
self.h_line.setFrameShadow(QtWidgets.QFrame.Sunken) self.h_line_3.setFrameShadow(QtWidgets.QFrame.Sunken)
self.h_line.setObjectName("h_line") self.h_line_3.setObjectName("h_line_3")
self.vertical_layout.addWidget(self.h_line) self.verticalLayout.addWidget(self.h_line_3)
self.h_layout_preview_or_generate = QtWidgets.QHBoxLayout() self.h_layout_preview_or_generate = QtWidgets.QHBoxLayout()
self.h_layout_preview_or_generate.setObjectName("h_layout_preview_or_generate") self.h_layout_preview_or_generate.setObjectName("h_layout_preview_or_generate")
self.push_button_preview = QtWidgets.QPushButton(self.central_widget) self.button_preview = QtWidgets.QPushButton(self.central_widget)
self.push_button_preview.setObjectName("push_button_preview") self.button_preview.setObjectName("button_preview")
self.h_layout_preview_or_generate.addWidget(self.push_button_preview) self.h_layout_preview_or_generate.addWidget(self.button_preview)
self.push_button_generate = QtWidgets.QPushButton(self.central_widget) self.button_generate = QtWidgets.QPushButton(self.central_widget)
self.push_button_generate.setObjectName("push_button_generate") self.button_generate.setObjectName("button_generate")
self.h_layout_preview_or_generate.addWidget(self.push_button_generate) self.h_layout_preview_or_generate.addWidget(self.button_generate)
self.vertical_layout.addLayout(self.h_layout_preview_or_generate) self.verticalLayout.addLayout(self.h_layout_preview_or_generate)
self.h_line2.raise_()
self.h_line.raise_() self.h_line.raise_()
self.h_line3.raise_() self.h_line_2.raise_()
self.h_slider.raise_() self.h_slider.raise_()
self.h_line_3.raise_()
MainWindow.setCentralWidget(self.central_widget) MainWindow.setCentralWidget(self.central_widget)
self.menu_bar = QtWidgets.QMenuBar(MainWindow) self.menu_bar = QtWidgets.QMenuBar(MainWindow)
self.menu_bar.setGeometry(QtCore.QRect(0, 0, 861, 32)) self.menu_bar.setGeometry(QtCore.QRect(0, 0, 864, 32))
self.menu_bar.setObjectName("menu_bar") self.menu_bar.setObjectName("menu_bar")
self.menu_project = QtWidgets.QMenu(self.menu_bar) self.menu_project = QtWidgets.QMenu(self.menu_bar)
self.menu_project.setObjectName("menu_project") self.menu_project.setObjectName("menu_project")
@ -167,19 +262,23 @@ class Ui_MainWindow(object):
def retranslateUi(self, MainWindow): def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate _translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "MagicPodcast")) MainWindow.setWindowTitle(_translate("MainWindow", "MagicPodcast"))
self.line_edit_audio1.setPlaceholderText(_translate("MainWindow", "Plik audio pierwszego rozmówcy")) self.line_edit_audio_1.setPlaceholderText(_translate("MainWindow", "Plik audio pierwszego rozmówcy"))
self.line_edit_name1.setPlaceholderText(_translate("MainWindow", "Imię pierwszego rozmówcy")) self.line_edit_name_1.setPlaceholderText(_translate("MainWindow", "Imię pierwszego rozmówcy"))
self.push_button_audio1.setText(_translate("MainWindow", "Dodaj audio 1")) self.button_audio_1.setText(_translate("MainWindow", "Dodaj audio 1"))
self.line_edit_audio2.setPlaceholderText(_translate("MainWindow", "Plik audio drugiego rozmówcy")) self.line_edit_audio_2.setPlaceholderText(_translate("MainWindow", "Plik audio drugiego rozmówcy"))
self.line_edit_name2.setPlaceholderText(_translate("MainWindow", "Imię drugieo rozmówcy")) self.line_edit_name_2.setPlaceholderText(_translate("MainWindow", "Imię drugieo rozmówcy"))
self.push_button_audio2.setText(_translate("MainWindow", "Dodaj audio 2")) self.button_audio_2.setText(_translate("MainWindow", "Dodaj audio 2"))
self.label_avatar_1.setText(_translate("MainWindow", "TextLabel")) self.preview_label_avatar_1.setText(_translate("MainWindow", "Podgląd - rozmówcy aktywni"))
self.label_avatar_2.setText(_translate("MainWindow", "TextLabel")) self.button_select_avatar_1.setText(_translate("MainWindow", "Rozmówcy - aktywni"))
self.push_button_select_avatar1.setText(_translate("MainWindow", "Wybierz grafikę dla pierwszego rozmówcy")) self.preview_label_avatar_2.setText(_translate("MainWindow", "Podgląd - rozmówcy nieaktywni"))
self.push_button_select_avatar2.setText(_translate("MainWindow", "Wybierz grafikę dla drugiego rozmówcy")) self.button_select_avatar_2.setText(_translate("MainWindow", "Rozmówcy - nieaktywni"))
self.preview_label_avatar_3.setText(_translate("MainWindow", "Podgląd - 1 rozmówca aktywny"))
self.button_select_avatar_3.setText(_translate("MainWindow", "Pierwszy rozmówca - aktywny"))
self.preview_label_avatar_4.setText(_translate("MainWindow", "Podgląd - 2 rozmówca aktywny"))
self.button_select_avatar_4.setText(_translate("MainWindow", "Drugi rozmówca - aktywny"))
self.label_threshold_description.setText(_translate("MainWindow", "Poziom wykrywania głosu:")) self.label_threshold_description.setText(_translate("MainWindow", "Poziom wykrywania głosu:"))
self.push_button_preview.setText(_translate("MainWindow", "Podgląd")) self.button_preview.setText(_translate("MainWindow", "Podgląd"))
self.push_button_generate.setText(_translate("MainWindow", "Wygeneruj podcast")) self.button_generate.setText(_translate("MainWindow", "Wygeneruj podcast"))
self.menu_project.setTitle(_translate("MainWindow", "Projekt")) self.menu_project.setTitle(_translate("MainWindow", "Projekt"))
self.action_new.setText(_translate("MainWindow", "Nowy projekt")) self.action_new.setText(_translate("MainWindow", "Nowy projekt"))
self.action_new.setToolTip(_translate("MainWindow", "Kliknij, aby utwórzyć nowy projekt")) self.action_new.setToolTip(_translate("MainWindow", "Kliknij, aby utwórzyć nowy projekt"))