from PyQt5 import QtWidgets


class DialogForm(QtWidgets.QWidget):
    def __init__(self):
        super().__init__()
        self.setupUi()

    def setupUi(self):
        self.resize(400, 242)
        self.formLayout_2 = QtWidgets.QFormLayout(self)
        self.formLayout = QtWidgets.QFormLayout()
        self.formLayout_2.setLayout(0, QtWidgets.QFormLayout.LabelRole, self.formLayout)
        self.label = QtWidgets.QLabel(self)
        self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label)
        self.variety_field = QtWidgets.QLineEdit(self)
        self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.variety_field)
        self.label2 = QtWidgets.QLabel(self)
        self.formLayout_2.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label2)
        self.roast_field = QtWidgets.QDoubleSpinBox(self)
        self.roast_field.setMaximum(1.0)
        self.roast_field.setSingleStep(0.01)
        self.formLayout_2.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.roast_field)
        self.radioButton = QtWidgets.QRadioButton(self)
        self.formLayout_2.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.radioButton)
        self.radioButton_2 = QtWidgets.QRadioButton(self)
        self.formLayout_2.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.radioButton_2)
        self.label3 = QtWidgets.QLabel(self)
        self.formLayout_2.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.label3)
        self.taste_desc_field = QtWidgets.QLineEdit(self)
        self.formLayout_2.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.taste_desc_field)
        self.label4 = QtWidgets.QLabel(self)
        self.formLayout_2.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.label4)
        self.price_field = QtWidgets.QDoubleSpinBox(self)
        self.price_field.setMaximum(9999.99)
        self.formLayout_2.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.price_field)
        self.label5 = QtWidgets.QLabel(self)
        self.formLayout_2.setWidget(6, QtWidgets.QFormLayout.LabelRole, self.label5)
        self.package_size_field = QtWidgets.QDoubleSpinBox(self)
        self.package_size_field.setMaximum(9999.99)
        self.formLayout_2.setWidget(6, QtWidgets.QFormLayout.FieldRole, self.package_size_field)
        self.ok_button = QtWidgets.QPushButton(self)
        self.formLayout_2.setWidget(7, QtWidgets.QFormLayout.LabelRole, self.ok_button)

        self.setWindowTitle("Изменить/добавить запись")
        self.label.setText("Название сорта")
        self.label2.setText("Степень обжарки")
        self.radioButton.setText("Молотый")
        self.radioButton_2.setText("В зёрнах")
        self.label3.setText("Описание вкуса")
        self.label4.setText("Цена")
        self.label5.setText("Объем упаковки")
        self.ok_button.setText("OK")
