mirror of
https://github.com/shizand/statapp.git
synced 2025-10-08 05:03:27 +03:00
feat: добавлена генерация данных (#13)
Closes #2 --------- Co-authored-by: MisterMLiL <99662459+MisterMLiL@users.noreply.github.com>
This commit is contained in:
34
statapp/generate_factor_window.py
Normal file
34
statapp/generate_factor_window.py
Normal 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()
|
Reference in New Issue
Block a user