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