Add script to generate python class files from .ui files. Add generated python class file - mainwindow_ui.py. Update Pipfile. Add empty main.py
This commit is contained in:
parent
da20478ab0
commit
f452125973
11
Pipfile
Normal file
11
Pipfile
Normal file
@ -0,0 +1,11 @@
|
||||
[[source]]
|
||||
url = "https://pypi.org/simple"
|
||||
verify_ssl = true
|
||||
name = "pypi"
|
||||
|
||||
[packages]
|
||||
|
||||
[dev-packages]
|
||||
|
||||
[requires]
|
||||
python_version = "3.9"
|
221
class_files/mainwindow_ui.py
Normal file
221
class_files/mainwindow_ui.py
Normal file
@ -0,0 +1,221 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file './ui_files/mainwindow.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.15.2
|
||||
#
|
||||
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
|
||||
# run again. Do not edit this file unless you know what you are doing.
|
||||
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_MainWindow(object):
|
||||
def setupUi(self, MainWindow):
|
||||
MainWindow.setObjectName("MainWindow")
|
||||
MainWindow.resize(870, 566)
|
||||
self.centralwidget = QtWidgets.QWidget(MainWindow)
|
||||
self.centralwidget.setObjectName("centralwidget")
|
||||
self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget)
|
||||
self.verticalLayout.setObjectName("verticalLayout")
|
||||
self.h_layout_select_video = QtWidgets.QHBoxLayout()
|
||||
self.h_layout_select_video.setObjectName("h_layout_select_video")
|
||||
self.line_edit_video = QtWidgets.QLineEdit(self.centralwidget)
|
||||
self.line_edit_video.setText("")
|
||||
self.line_edit_video.setObjectName("line_edit_video")
|
||||
self.h_layout_select_video.addWidget(self.line_edit_video)
|
||||
self.push_button_wideo = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.push_button_wideo.setObjectName("push_button_wideo")
|
||||
self.h_layout_select_video.addWidget(self.push_button_wideo)
|
||||
self.verticalLayout.addLayout(self.h_layout_select_video)
|
||||
self.h_layout_select_audio1 = QtWidgets.QHBoxLayout()
|
||||
self.h_layout_select_audio1.setObjectName("h_layout_select_audio1")
|
||||
self.line_edit_audio1 = QtWidgets.QLineEdit(self.centralwidget)
|
||||
self.line_edit_audio1.setText("")
|
||||
self.line_edit_audio1.setObjectName("line_edit_audio1")
|
||||
self.h_layout_select_audio1.addWidget(self.line_edit_audio1)
|
||||
self.line_edit_name1 = QtWidgets.QLineEdit(self.centralwidget)
|
||||
self.line_edit_name1.setText("")
|
||||
self.line_edit_name1.setObjectName("line_edit_name1")
|
||||
self.h_layout_select_audio1.addWidget(self.line_edit_name1)
|
||||
self.push_button_audio1 = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.push_button_audio1.setObjectName("push_button_audio1")
|
||||
self.h_layout_select_audio1.addWidget(self.push_button_audio1)
|
||||
self.verticalLayout.addLayout(self.h_layout_select_audio1)
|
||||
self.h_layout_select_audio2 = QtWidgets.QHBoxLayout()
|
||||
self.h_layout_select_audio2.setObjectName("h_layout_select_audio2")
|
||||
self.line_edit_audio2 = QtWidgets.QLineEdit(self.centralwidget)
|
||||
self.line_edit_audio2.setText("")
|
||||
self.line_edit_audio2.setObjectName("line_edit_audio2")
|
||||
self.h_layout_select_audio2.addWidget(self.line_edit_audio2)
|
||||
self.line_edit_name2 = QtWidgets.QLineEdit(self.centralwidget)
|
||||
self.line_edit_name2.setText("")
|
||||
self.line_edit_name2.setObjectName("line_edit_name2")
|
||||
self.h_layout_select_audio2.addWidget(self.line_edit_name2)
|
||||
self.push_button_audio2 = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.push_button_audio2.setObjectName("push_button_audio2")
|
||||
self.h_layout_select_audio2.addWidget(self.push_button_audio2)
|
||||
self.verticalLayout.addLayout(self.h_layout_select_audio2)
|
||||
self.h_line3 = QtWidgets.QFrame(self.centralwidget)
|
||||
self.h_line3.setFrameShape(QtWidgets.QFrame.HLine)
|
||||
self.h_line3.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||
self.h_line3.setObjectName("h_line3")
|
||||
self.verticalLayout.addWidget(self.h_line3)
|
||||
self.h_layout_avatars1 = QtWidgets.QHBoxLayout()
|
||||
self.h_layout_avatars1.setObjectName("h_layout_avatars1")
|
||||
self.label_image1 = QtWidgets.QLabel(self.centralwidget)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label_image1.sizePolicy().hasHeightForWidth())
|
||||
self.label_image1.setSizePolicy(sizePolicy)
|
||||
self.label_image1.setMinimumSize(QtCore.QSize(100, 100))
|
||||
self.label_image1.setMaximumSize(QtCore.QSize(100, 100))
|
||||
self.label_image1.setSizeIncrement(QtCore.QSize(1, 1))
|
||||
self.label_image1.setBaseSize(QtCore.QSize(100, 100))
|
||||
self.label_image1.setFrameShape(QtWidgets.QFrame.Box)
|
||||
self.label_image1.setFrameShadow(QtWidgets.QFrame.Plain)
|
||||
self.label_image1.setText("")
|
||||
self.label_image1.setScaledContents(True)
|
||||
self.label_image1.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_image1.setProperty("KeepAspectRatio", True)
|
||||
self.label_image1.setObjectName("label_image1")
|
||||
self.h_layout_avatars1.addWidget(self.label_image1)
|
||||
self.push_button_select_avatar1 = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.push_button_select_avatar1.setMinimumSize(QtCore.QSize(0, 0))
|
||||
self.push_button_select_avatar1.setObjectName("push_button_select_avatar1")
|
||||
self.h_layout_avatars1.addWidget(self.push_button_select_avatar1)
|
||||
self.verticalLayout.addLayout(self.h_layout_avatars1)
|
||||
self.h_layout_avatars2 = QtWidgets.QHBoxLayout()
|
||||
self.h_layout_avatars2.setObjectName("h_layout_avatars2")
|
||||
self.label_image2 = QtWidgets.QLabel(self.centralwidget)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label_image2.sizePolicy().hasHeightForWidth())
|
||||
self.label_image2.setSizePolicy(sizePolicy)
|
||||
self.label_image2.setMinimumSize(QtCore.QSize(100, 100))
|
||||
self.label_image2.setMaximumSize(QtCore.QSize(100, 100))
|
||||
self.label_image2.setSizeIncrement(QtCore.QSize(1, 1))
|
||||
self.label_image2.setBaseSize(QtCore.QSize(100, 100))
|
||||
self.label_image2.setFrameShape(QtWidgets.QFrame.Box)
|
||||
self.label_image2.setFrameShadow(QtWidgets.QFrame.Plain)
|
||||
self.label_image2.setText("")
|
||||
self.label_image2.setScaledContents(True)
|
||||
self.label_image2.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_image2.setProperty("KeepAspectRatio", True)
|
||||
self.label_image2.setObjectName("label_image2")
|
||||
self.h_layout_avatars2.addWidget(self.label_image2)
|
||||
self.push_button_select_avatar2 = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.push_button_select_avatar2.setObjectName("push_button_select_avatar2")
|
||||
self.h_layout_avatars2.addWidget(self.push_button_select_avatar2)
|
||||
self.verticalLayout.addLayout(self.h_layout_avatars2)
|
||||
self.h_line2 = QtWidgets.QFrame(self.centralwidget)
|
||||
self.h_line2.setFrameShape(QtWidgets.QFrame.HLine)
|
||||
self.h_line2.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||
self.h_line2.setObjectName("h_line2")
|
||||
self.verticalLayout.addWidget(self.h_line2)
|
||||
self.h_layout_threshold = QtWidgets.QHBoxLayout()
|
||||
self.h_layout_threshold.setObjectName("h_layout_threshold")
|
||||
self.label_threshold_description = QtWidgets.QLabel(self.centralwidget)
|
||||
self.label_threshold_description.setObjectName("label_threshold_description")
|
||||
self.h_layout_threshold.addWidget(self.label_threshold_description)
|
||||
self.line_edit_threshold_value = QtWidgets.QLineEdit(self.centralwidget)
|
||||
self.line_edit_threshold_value.setObjectName("line_edit_threshold_value")
|
||||
self.h_layout_threshold.addWidget(self.line_edit_threshold_value)
|
||||
self.verticalLayout.addLayout(self.h_layout_threshold)
|
||||
self.h_slider = QtWidgets.QSlider(self.centralwidget)
|
||||
self.h_slider.setOrientation(QtCore.Qt.Horizontal)
|
||||
self.h_slider.setObjectName("h_slider")
|
||||
self.verticalLayout.addWidget(self.h_slider)
|
||||
self.h_line = QtWidgets.QFrame(self.centralwidget)
|
||||
self.h_line.setFrameShape(QtWidgets.QFrame.HLine)
|
||||
self.h_line.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||
self.h_line.setObjectName("h_line")
|
||||
self.verticalLayout.addWidget(self.h_line)
|
||||
self.h_layout_preview_or_generate = QtWidgets.QHBoxLayout()
|
||||
self.h_layout_preview_or_generate.setObjectName("h_layout_preview_or_generate")
|
||||
self.push_button_preview = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.push_button_preview.setObjectName("push_button_preview")
|
||||
self.h_layout_preview_or_generate.addWidget(self.push_button_preview)
|
||||
self.push_button_generate = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.push_button_generate.setObjectName("push_button_generate")
|
||||
self.h_layout_preview_or_generate.addWidget(self.push_button_generate)
|
||||
self.verticalLayout.addLayout(self.h_layout_preview_or_generate)
|
||||
self.h_line2.raise_()
|
||||
self.h_line.raise_()
|
||||
self.h_line3.raise_()
|
||||
self.h_slider.raise_()
|
||||
MainWindow.setCentralWidget(self.centralwidget)
|
||||
self.menubar = QtWidgets.QMenuBar(MainWindow)
|
||||
self.menubar.setGeometry(QtCore.QRect(0, 0, 870, 32))
|
||||
self.menubar.setObjectName("menubar")
|
||||
self.menuProject = QtWidgets.QMenu(self.menubar)
|
||||
self.menuProject.setObjectName("menuProject")
|
||||
MainWindow.setMenuBar(self.menubar)
|
||||
self.statusbar = QtWidgets.QStatusBar(MainWindow)
|
||||
self.statusbar.setObjectName("statusbar")
|
||||
MainWindow.setStatusBar(self.statusbar)
|
||||
self.actionNowy = QtWidgets.QAction(MainWindow)
|
||||
self.actionNowy.setObjectName("actionNowy")
|
||||
self.actionOtw_rz = QtWidgets.QAction(MainWindow)
|
||||
self.actionOtw_rz.setObjectName("actionOtw_rz")
|
||||
self.actionZapisz = QtWidgets.QAction(MainWindow)
|
||||
self.actionZapisz.setObjectName("actionZapisz")
|
||||
self.actionZapisz_jako = QtWidgets.QAction(MainWindow)
|
||||
self.actionZapisz_jako.setObjectName("actionZapisz_jako")
|
||||
self.actionZako_cz = QtWidgets.QAction(MainWindow)
|
||||
self.actionZako_cz.setObjectName("actionZako_cz")
|
||||
self.actionUstawienia = QtWidgets.QAction(MainWindow)
|
||||
self.actionUstawienia.setObjectName("actionUstawienia")
|
||||
self.actionO_programie = QtWidgets.QAction(MainWindow)
|
||||
self.actionO_programie.setObjectName("actionO_programie")
|
||||
self.menuProject.addAction(self.actionNowy)
|
||||
self.menuProject.addAction(self.actionOtw_rz)
|
||||
self.menuProject.addAction(self.actionZapisz)
|
||||
self.menuProject.addAction(self.actionZapisz_jako)
|
||||
self.menuProject.addSeparator()
|
||||
self.menuProject.addAction(self.actionO_programie)
|
||||
self.menuProject.addAction(self.actionUstawienia)
|
||||
self.menuProject.addSeparator()
|
||||
self.menuProject.addAction(self.actionZako_cz)
|
||||
self.menubar.addAction(self.menuProject.menuAction())
|
||||
|
||||
self.retranslateUi(MainWindow)
|
||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||
|
||||
def retranslateUi(self, MainWindow):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
MainWindow.setWindowTitle(_translate("MainWindow", "MagicPodcast"))
|
||||
self.line_edit_video.setPlaceholderText(_translate("MainWindow", "Plik wideo"))
|
||||
self.push_button_wideo.setText(_translate("MainWindow", "Dodaj wideo"))
|
||||
self.line_edit_audio1.setPlaceholderText(_translate("MainWindow", "Plik audio pierwszego rozmówcy"))
|
||||
self.line_edit_name1.setPlaceholderText(_translate("MainWindow", "Imię pierwszego rozmówcy"))
|
||||
self.push_button_audio1.setText(_translate("MainWindow", "Dodaj audio 1"))
|
||||
self.line_edit_audio2.setPlaceholderText(_translate("MainWindow", "Plik audio drugiego rozmówcy"))
|
||||
self.line_edit_name2.setPlaceholderText(_translate("MainWindow", "Imię drugieo rozmówcy"))
|
||||
self.push_button_audio2.setText(_translate("MainWindow", "Dodaj audio 2"))
|
||||
self.push_button_select_avatar1.setText(_translate("MainWindow", "Wybierz awatar pierwszego rozmówcy"))
|
||||
self.push_button_select_avatar2.setText(_translate("MainWindow", "Wybierz awatar drugiego rozmówcy"))
|
||||
self.label_threshold_description.setText(_translate("MainWindow", "Poziom wykrywania głosu:"))
|
||||
self.push_button_preview.setText(_translate("MainWindow", "Podgląd"))
|
||||
self.push_button_generate.setText(_translate("MainWindow", "Wygeneruj podcast"))
|
||||
self.menuProject.setTitle(_translate("MainWindow", "Projekt"))
|
||||
self.actionNowy.setText(_translate("MainWindow", "Nowy"))
|
||||
self.actionOtw_rz.setText(_translate("MainWindow", "Otwórz"))
|
||||
self.actionZapisz.setText(_translate("MainWindow", "Zapisz"))
|
||||
self.actionZapisz_jako.setText(_translate("MainWindow", "Zapisz jako"))
|
||||
self.actionZako_cz.setText(_translate("MainWindow", "Zakończ"))
|
||||
self.actionUstawienia.setText(_translate("MainWindow", "Ustawienia"))
|
||||
self.actionO_programie.setText(_translate("MainWindow", "O programie"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
MainWindow = QtWidgets.QMainWindow()
|
||||
ui = Ui_MainWindow()
|
||||
ui.setupUi(MainWindow)
|
||||
MainWindow.show()
|
||||
sys.exit(app.exec_())
|
9
generate_class_files_from_ui_files.sh
Executable file
9
generate_class_files_from_ui_files.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
for file in $(ls ./ui_files)
|
||||
do
|
||||
output_file=$(echo $file | sed -e 's/\..*$//')
|
||||
pipenv run python -m PyQt5.uic.pyuic -x ./ui_files/$file -o ./class_files/$output_file'_ui.py'
|
||||
|
||||
done;
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>870</width>
|
||||
<height>563</height>
|
||||
<height>566</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -154,6 +154,9 @@
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="KeepAspectRatio" stdset="0">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
@ -220,6 +223,9 @@
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="KeepAspectRatio" stdset="0">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
@ -285,12 +291,9 @@
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
<zorder>verticalLayoutWidget</zorder>
|
||||
<zorder>verticalLayoutWidget</zorder>
|
||||
<zorder>h_line2</zorder>
|
||||
<zorder>h_line</zorder>
|
||||
<zorder>h_line3</zorder>
|
||||
<zorder>horizontalLayoutWidget_5</zorder>
|
||||
<zorder>horizontalLayoutWidget_6</zorder>
|
||||
<zorder>horizontalLayoutWidget_7</zorder>
|
||||
<zorder>h_slider</zorder>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
|
Loading…
Reference in New Issue
Block a user