From 3faa75064cd7ae6476519b5cf9974ab5b670b815 Mon Sep 17 00:00:00 2001 From: sbosse Date: Wed, 28 Aug 2024 21:39:30 +0200 Subject: [PATCH] Wed 28 Aug 21:38:52 CEST 2024 --- src/SimNDT/gui/newScenarioController.py | 38 +++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/SimNDT/gui/newScenarioController.py diff --git a/src/SimNDT/gui/newScenarioController.py b/src/SimNDT/gui/newScenarioController.py new file mode 100644 index 0000000..ed22d2f --- /dev/null +++ b/src/SimNDT/gui/newScenarioController.py @@ -0,0 +1,38 @@ +__author__ = 'Miguel Molero' + +from PySide.QtCore import * +from PySide.QtGui import * + +from SimNDT.gui import resources_rc +from SimNDT.gui.ui_newscenario import Ui_NewModel +from SimNDT.gui.Warnings import WarningParms + + +class NewScenario(QDialog, Ui_NewModel): + def __init__(self, parent = None): + super(NewScenario,self).__init__(parent) + self.setupUi(self) + + + def accept(self): + try: + self.width = float(self.widthLineEdit.text()) + self.height = float(self.heightLineEdit.text()) + self.pixel = float(self.pixelLineEdit.text()) + self.label = int(self.labelSpinBox.value()) + + except: + msgBox = WarningParms() + msgBox.exec_() + return + + QDialog.accept(self) + + + +if __name__ == '__main__': + import sys + app = QApplication(sys.argv) + dialog = NewScenario() + dialog.exec_() + app.exec_() \ No newline at end of file