nmreval/src/gui_qt/_py/gol.py

277 lines
16 KiB
Python
Raw Normal View History

2022-03-08 09:27:40 +00:00
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/gol.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Form(object):
def setupUi(self, Form):
Form.setObjectName("Form")
Form.resize(883, 732)
self.gridLayout_2 = QtWidgets.QGridLayout(Form)
self.gridLayout_2.setObjectName("gridLayout_2")
self.widget = QtWidgets.QWidget(Form)
self.widget.setObjectName("widget")
self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.widget)
self.verticalLayout_3.setContentsMargins(0, 0, 0, 0)
self.verticalLayout_3.setObjectName("verticalLayout_3")
self.vanish_shadow = QtWidgets.QRadioButton(self.widget)
self.vanish_shadow.setChecked(True)
self.vanish_shadow.setObjectName("vanish_shadow")
self.buttonGroup = QtWidgets.QButtonGroup(Form)
self.buttonGroup.setObjectName("buttonGroup")
self.buttonGroup.addButton(self.vanish_shadow)
self.verticalLayout_3.addWidget(self.vanish_shadow)
self.full_shadow = QtWidgets.QRadioButton(self.widget)
self.full_shadow.setObjectName("full_shadow")
self.buttonGroup.addButton(self.full_shadow)
self.verticalLayout_3.addWidget(self.full_shadow)
self.radioButton = QtWidgets.QRadioButton(self.widget)
self.radioButton.setObjectName("radioButton")
self.buttonGroup.addButton(self.radioButton)
self.verticalLayout_3.addWidget(self.radioButton)
self.line = QtWidgets.QFrame(self.widget)
self.line.setFrameShape(QtWidgets.QFrame.HLine)
self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line.setObjectName("line")
self.verticalLayout_3.addWidget(self.line)
self.faster_button = QtWidgets.QToolButton(self.widget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.faster_button.sizePolicy().hasHeightForWidth())
self.faster_button.setSizePolicy(sizePolicy)
self.faster_button.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon)
self.faster_button.setArrowType(QtCore.Qt.RightArrow)
self.faster_button.setObjectName("faster_button")
self.verticalLayout_3.addWidget(self.faster_button)
self.velocity_label = QtWidgets.QLabel(self.widget)
self.velocity_label.setObjectName("velocity_label")
self.verticalLayout_3.addWidget(self.velocity_label)
self.slower_button = QtWidgets.QToolButton(self.widget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.slower_button.sizePolicy().hasHeightForWidth())
self.slower_button.setSizePolicy(sizePolicy)
self.slower_button.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon)
self.slower_button.setArrowType(QtCore.Qt.LeftArrow)
self.slower_button.setObjectName("slower_button")
self.verticalLayout_3.addWidget(self.slower_button)
self.current_step = QtWidgets.QLabel(self.widget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.current_step.sizePolicy().hasHeightForWidth())
self.current_step.setSizePolicy(sizePolicy)
self.current_step.setObjectName("current_step")
self.verticalLayout_3.addWidget(self.current_step)
self.pause_button = QtWidgets.QPushButton(self.widget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Ignored, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pause_button.sizePolicy().hasHeightForWidth())
self.pause_button.setSizePolicy(sizePolicy)
self.pause_button.setCheckable(True)
self.pause_button.setObjectName("pause_button")
self.verticalLayout_3.addWidget(self.pause_button)
self.line_3 = QtWidgets.QFrame(self.widget)
self.line_3.setFrameShape(QtWidgets.QFrame.HLine)
self.line_3.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_3.setObjectName("line_3")
self.verticalLayout_3.addWidget(self.line_3)
self.label_6 = QtWidgets.QLabel(self.widget)
self.label_6.setObjectName("label_6")
self.verticalLayout_3.addWidget(self.label_6)
self.cover_label = QtWidgets.QLabel(self.widget)
self.cover_label.setText("")
self.cover_label.setObjectName("cover_label")
self.verticalLayout_3.addWidget(self.cover_label)
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.verticalLayout_3.addItem(spacerItem)
self.gridLayout_2.addWidget(self.widget, 0, 0, 1, 1)
self.view = QtWidgets.QGraphicsView(Form)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.view.sizePolicy().hasHeightForWidth())
self.view.setSizePolicy(sizePolicy)
self.view.setStyleSheet("background-color: transparent")
self.view.setFrameShape(QtWidgets.QFrame.NoFrame)
self.view.setObjectName("view")
self.gridLayout_2.addWidget(self.view, 0, 1, 1, 1)
self.option_frame = QtWidgets.QFrame(Form)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.option_frame.sizePolicy().hasHeightForWidth())
self.option_frame.setSizePolicy(sizePolicy)
self.option_frame.setFrameShape(QtWidgets.QFrame.Box)
self.option_frame.setObjectName("option_frame")
self.gridLayout = QtWidgets.QGridLayout(self.option_frame)
self.gridLayout.setContentsMargins(3, 3, 3, 3)
self.gridLayout.setHorizontalSpacing(6)
self.gridLayout.setVerticalSpacing(3)
self.gridLayout.setObjectName("gridLayout")
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.rule_label = QtWidgets.QLabel(self.option_frame)
self.rule_label.setObjectName("rule_label")
self.horizontalLayout_2.addWidget(self.rule_label)
self.rule_cb = QtWidgets.QComboBox(self.option_frame)
self.rule_cb.setObjectName("rule_cb")
self.horizontalLayout_2.addWidget(self.rule_cb)
self.gridLayout.addLayout(self.horizontalLayout_2, 3, 0, 1, 1)
self.line_2 = QtWidgets.QFrame(self.option_frame)
self.line_2.setFrameShape(QtWidgets.QFrame.HLine)
self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_2.setObjectName("line_2")
self.gridLayout.addWidget(self.line_2, 2, 0, 1, 1)
self.verticalLayout_2 = QtWidgets.QVBoxLayout()
self.verticalLayout_2.setContentsMargins(-1, 0, -1, 0)
self.verticalLayout_2.setSpacing(3)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.object_widget = QtWidgets.QWidget(self.option_frame)
self.object_widget.setObjectName("object_widget")
self.horizontalLayout_6 = QtWidgets.QHBoxLayout(self.object_widget)
self.horizontalLayout_6.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout_6.setSpacing(3)
self.horizontalLayout_6.setObjectName("horizontalLayout_6")
self.label_5 = QtWidgets.QLabel(self.object_widget)
self.label_5.setObjectName("label_5")
self.horizontalLayout_6.addWidget(self.label_5)
self.object_size = QtWidgets.QSpinBox(self.object_widget)
self.object_size.setMinimum(1)
self.object_size.setMaximum(600)
self.object_size.setObjectName("object_size")
self.horizontalLayout_6.addWidget(self.object_size)
self.verticalLayout_2.addWidget(self.object_widget)
self.rand_button_wdgt = QtWidgets.QWidget(self.option_frame)
self.rand_button_wdgt.setObjectName("rand_button_wdgt")
self.horizontalLayout_7 = QtWidgets.QHBoxLayout(self.rand_button_wdgt)
self.horizontalLayout_7.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout_7.setSpacing(3)
self.horizontalLayout_7.setObjectName("horizontalLayout_7")
self.add_random_button = QtWidgets.QPushButton(self.rand_button_wdgt)
self.add_random_button.setObjectName("add_random_button")
self.horizontalLayout_7.addWidget(self.add_random_button)
self.remove_random_button = QtWidgets.QPushButton(self.rand_button_wdgt)
self.remove_random_button.setObjectName("remove_random_button")
self.horizontalLayout_7.addWidget(self.remove_random_button)
self.verticalLayout_2.addWidget(self.rand_button_wdgt)
self.verticalLayout = QtWidgets.QVBoxLayout()
self.verticalLayout.setObjectName("verticalLayout")
self.verticalLayout_2.addLayout(self.verticalLayout)
self.gridLayout.addLayout(self.verticalLayout_2, 2, 1, 4, 1)
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.label_3 = QtWidgets.QLabel(self.option_frame)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth())
self.label_3.setSizePolicy(sizePolicy)
self.label_3.setObjectName("label_3")
self.horizontalLayout.addWidget(self.label_3)
self.survival_line = QtWidgets.QLineEdit(self.option_frame)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.survival_line.sizePolicy().hasHeightForWidth())
self.survival_line.setSizePolicy(sizePolicy)
self.survival_line.setObjectName("survival_line")
self.horizontalLayout.addWidget(self.survival_line)
self.label_4 = QtWidgets.QLabel(self.option_frame)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_4.sizePolicy().hasHeightForWidth())
self.label_4.setSizePolicy(sizePolicy)
self.label_4.setObjectName("label_4")
self.horizontalLayout.addWidget(self.label_4)
self.birth_line = QtWidgets.QLineEdit(self.option_frame)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.birth_line.sizePolicy().hasHeightForWidth())
self.birth_line.setSizePolicy(sizePolicy)
self.birth_line.setObjectName("birth_line")
self.horizontalLayout.addWidget(self.birth_line)
self.gridLayout.addLayout(self.horizontalLayout, 4, 0, 1, 1)
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.label = QtWidgets.QLabel(self.option_frame)
self.label.setObjectName("label")
self.horizontalLayout_3.addWidget(self.label)
self.width_box = QtWidgets.QSpinBox(self.option_frame)
self.width_box.setMaximum(600)
self.width_box.setProperty("value", 100)
self.width_box.setObjectName("width_box")
self.horizontalLayout_3.addWidget(self.width_box)
self.label_2 = QtWidgets.QLabel(self.option_frame)
self.label_2.setObjectName("label_2")
self.horizontalLayout_3.addWidget(self.label_2)
self.height_box = QtWidgets.QSpinBox(self.option_frame)
self.height_box.setMaximum(600)
self.height_box.setProperty("value", 100)
self.height_box.setObjectName("height_box")
self.horizontalLayout_3.addWidget(self.height_box)
self.gridLayout.addLayout(self.horizontalLayout_3, 1, 0, 1, 1)
self.object_combobox = QtWidgets.QComboBox(self.option_frame)
self.object_combobox.setObjectName("object_combobox")
self.object_combobox.addItem("")
self.object_combobox.addItem("")
self.object_combobox.addItem("")
self.object_combobox.addItem("")
self.object_combobox.addItem("")
self.gridLayout.addWidget(self.object_combobox, 1, 1, 1, 1)
self.start_button = QtWidgets.QPushButton(self.option_frame)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Ignored, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.start_button.sizePolicy().hasHeightForWidth())
self.start_button.setSizePolicy(sizePolicy)
self.start_button.setObjectName("start_button")
self.gridLayout.addWidget(self.start_button, 0, 0, 1, 2)
self.gridLayout_2.addWidget(self.option_frame, 1, 1, 1, 1)
self.hide_button = QtWidgets.QCheckBox(Form)
self.hide_button.setObjectName("hide_button")
self.gridLayout_2.addWidget(self.hide_button, 1, 0, 1, 1)
self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
_translate = QtCore.QCoreApplication.translate
Form.setWindowTitle(_translate("Form", "Game Of Life"))
self.vanish_shadow.setText(_translate("Form", "Motion blur"))
self.full_shadow.setText(_translate("Form", "Scorched earth"))
self.radioButton.setText(_translate("Form", "Nothing"))
self.faster_button.setText(_translate("Form", "Faster"))
self.velocity_label.setText(_translate("Form", "10 steps / s"))
self.slower_button.setText(_translate("Form", "Slower"))
self.current_step.setText(_translate("Form", "0 step"))
self.pause_button.setText(_translate("Form", "Pause"))
self.label_6.setText(_translate("Form", "Coverage:"))
self.rule_label.setText(_translate("Form", "Rule"))
self.label_5.setText(_translate("Form", "Size"))
self.add_random_button.setText(_translate("Form", "Add Random"))
self.remove_random_button.setText(_translate("Form", "Remove Random"))
self.label_3.setText(_translate("Form", "Survival"))
self.label_4.setText(_translate("Form", " Birth"))
self.label.setText(_translate("Form", "Width"))
self.label_2.setText(_translate("Form", "Height"))
self.object_combobox.setItemText(0, _translate("Form", "Random"))
self.object_combobox.setItemText(1, _translate("Form", "Circle"))
self.object_combobox.setItemText(2, _translate("Form", "Square"))
self.object_combobox.setItemText(3, _translate("Form", "Diamond"))
self.object_combobox.setItemText(4, _translate("Form", "Plus"))
self.start_button.setText(_translate("Form", "Start"))
self.hide_button.setText(_translate("Form", "Hide options"))