feat: добавлена генерация данных (#13)

Closes #2

---------

Co-authored-by: MisterMLiL <99662459+MisterMLiL@users.noreply.github.com>
This commit is contained in:
2023-09-27 13:19:20 +03:00
committed by GitHub
parent fe37f33d84
commit bdcc2cdfe2
11 changed files with 605 additions and 3 deletions

View File

@@ -0,0 +1,34 @@
from PySide2.QtCore import Slot
from PySide2.QtWidgets import QDialog
from statapp.ui.ui_generate_factor_window import Ui_GenerateFactorWindow
from statapp.models.combobox_model import ComboBoxModel
DIRECT_LINK = 0
INDIRECT_LINK = 1
class GenerateFactorWindow(QDialog):
def __init__(self):
super().__init__()
self.deviation = None
self.mat = None
self.typeConnection = None
self._typeComboBox = ComboBoxModel([
[DIRECT_LINK, "прямая"],
[INDIRECT_LINK, "обратная"]
])
self.ui = Ui_GenerateFactorWindow()
self.ui.setupUi(self)
self.ui.typeComboBox.setModel(self._typeComboBox)
@Slot()
def on_generatePushButton_clicked(self):
self.typeConnection = self._typeComboBox.rawData(self.ui.typeComboBox.currentIndex())[0]
self.mat = self.ui.matSpinBox.value()
self.deviation = self.ui.deviationSpinBox.value()
self.accept()