def __init__(self, options=None, parent=None):
        QWizard.__init__(self, parent)
        if options is None:
            self.setWindowTitle("Create new options")
        else:
            self.setWindowTitle("Modify options")
        self.setWizardStyle(QWizard.WizardStyle.ClassicStyle)

        # Variables
        if options is None:
            options = Options()
        options = copy.deepcopy(options)
        self._options = options

        settings = get_settings()
        if not settings.get_programs():
            raise RuntimeError('No programs are defined. Run the configuration first.')

        # Pages
        self.addPage(NameWizardPage(options))
        self.addPage(ProgramWizardPage(options))
        self.addPage(BeamWizardPage(options))
        self.addPage(GeometryWizardPage(options))
        self.addPage(DetectorWizardPage(options))
        self.addPage(LimitWizardPage(options))
        self.addPage(ModelWizardPage(options))
        self.addPage(WarningWizardPage(options))
Beispiel #2
0
 def __init__(self, gui, parent=None):
     ObsLightGuiObject.__init__(self, gui)
     if parent is None:
         QWizard.__init__(self, self.mainWindow)
     else:
         QWizard.__init__(self, parent)
     self.setButtonText(QWizard.CommitButton, u"Validate >")
     # QPlainTextEdit is not a known field type so we have to register it
     self.setDefaultProperty(QPlainTextEdit.__name__, "plainText",
                             "textChanged")
     self.loadPages()
     self.isModifyingServer = False
     self.__pageCounter = 0
 def __init__(self):
     QWizard.__init__(self)
     self.goto_finish=False