Upgrade generate_class_files_from_ui_files.sh. Add preview_dialog_ui.py
This commit is contained in:
parent
9601de2358
commit
42d6a914c0
@ -1,9 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
for file in $(ls ./src/gui/ui)
|
||||
for file in ./src/gui/ui/*.ui
|
||||
do
|
||||
output_file=$(echo $file | sed -e 's/\..*$//')
|
||||
pipenv run python -m PyQt5.uic.pyuic -x ./src/gui/ui/$file -o ./src/python/ui/$output_file'_ui.py'
|
||||
echo "$file"
|
||||
[[ -e "$file" ]] || break
|
||||
output_file="$(basename -s .ui "$file")"
|
||||
|
||||
echo "$output_file";
|
||||
pipenv run python -m PyQt5.uic.pyuic -x "$file" -o ./src/python/ui/"$output_file"'_ui.py';
|
||||
done;
|
||||
|
89
src/gui/ui/preview_dialog.ui
Normal file
89
src/gui/ui/preview_dialog.ui
Normal file
@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>dialog</class>
|
||||
<widget class="QDialog" name="dialog">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::NonModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>782</width>
|
||||
<height>356</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QGraphicsView" name="graphicsView"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSlider" name="range_silder">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TicksBothSides</enum>
|
||||
</property>
|
||||
<property name="tickInterval">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Początek fragmentu</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Koniec fragemntu</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_2"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="text">
|
||||
<string>start</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_2">
|
||||
<property name="text">
|
||||
<string>stop</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_3">
|
||||
<property name="text">
|
||||
<string>zakończ</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
78
src/python/ui/preview_dialog_ui.py
Normal file
78
src/python/ui/preview_dialog_ui.py
Normal file
@ -0,0 +1,78 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file './src/gui/ui/preview_dialog.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_dialog(object):
|
||||
def setupUi(self, dialog):
|
||||
dialog.setObjectName("dialog")
|
||||
dialog.setWindowModality(QtCore.Qt.NonModal)
|
||||
dialog.resize(782, 356)
|
||||
self.verticalLayout = QtWidgets.QVBoxLayout(dialog)
|
||||
self.verticalLayout.setObjectName("verticalLayout")
|
||||
self.graphicsView = QtWidgets.QGraphicsView(dialog)
|
||||
self.graphicsView.setObjectName("graphicsView")
|
||||
self.verticalLayout.addWidget(self.graphicsView)
|
||||
self.range_silder = QtWidgets.QSlider(dialog)
|
||||
self.range_silder.setOrientation(QtCore.Qt.Horizontal)
|
||||
self.range_silder.setTickPosition(QtWidgets.QSlider.TicksBothSides)
|
||||
self.range_silder.setTickInterval(1)
|
||||
self.range_silder.setObjectName("range_silder")
|
||||
self.verticalLayout.addWidget(self.range_silder)
|
||||
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
|
||||
self.label = QtWidgets.QLabel(dialog)
|
||||
self.label.setObjectName("label")
|
||||
self.horizontalLayout_2.addWidget(self.label)
|
||||
self.lineEdit = QtWidgets.QLineEdit(dialog)
|
||||
self.lineEdit.setObjectName("lineEdit")
|
||||
self.horizontalLayout_2.addWidget(self.lineEdit)
|
||||
self.label_2 = QtWidgets.QLabel(dialog)
|
||||
self.label_2.setObjectName("label_2")
|
||||
self.horizontalLayout_2.addWidget(self.label_2)
|
||||
self.lineEdit_2 = QtWidgets.QLineEdit(dialog)
|
||||
self.lineEdit_2.setObjectName("lineEdit_2")
|
||||
self.horizontalLayout_2.addWidget(self.lineEdit_2)
|
||||
self.verticalLayout.addLayout(self.horizontalLayout_2)
|
||||
self.horizontalLayout = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||
self.pushButton = QtWidgets.QPushButton(dialog)
|
||||
self.pushButton.setObjectName("pushButton")
|
||||
self.horizontalLayout.addWidget(self.pushButton)
|
||||
self.pushButton_2 = QtWidgets.QPushButton(dialog)
|
||||
self.pushButton_2.setObjectName("pushButton_2")
|
||||
self.horizontalLayout.addWidget(self.pushButton_2)
|
||||
self.pushButton_3 = QtWidgets.QPushButton(dialog)
|
||||
self.pushButton_3.setObjectName("pushButton_3")
|
||||
self.horizontalLayout.addWidget(self.pushButton_3)
|
||||
self.verticalLayout.addLayout(self.horizontalLayout)
|
||||
|
||||
self.retranslateUi(dialog)
|
||||
QtCore.QMetaObject.connectSlotsByName(dialog)
|
||||
|
||||
def retranslateUi(self, dialog):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
dialog.setWindowTitle(_translate("dialog", "Dialog"))
|
||||
self.label.setText(_translate("dialog", "Początek fragmentu"))
|
||||
self.label_2.setText(_translate("dialog", "Koniec fragemntu"))
|
||||
self.pushButton.setText(_translate("dialog", "start"))
|
||||
self.pushButton_2.setText(_translate("dialog", "stop"))
|
||||
self.pushButton_3.setText(_translate("dialog", "zakończ"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
dialog = QtWidgets.QDialog()
|
||||
ui = Ui_dialog()
|
||||
ui.setupUi(dialog)
|
||||
dialog.show()
|
||||
sys.exit(app.exec_())
|
Loading…
Reference in New Issue
Block a user