Пример #1
0
    def __init__(self, api, name="Demo", icon="cwicon"):
        QMainWindow.__init__(self)
        CWMainGUI.instance = self
        self.name = name
        sys.excepthook = self.exceptionHandlerDialog
        self.cwPrefDialog = CWPreferencesDialog(self, api.settings)
        util.setUIupdateFunction(QCoreApplication.processEvents)
        self.api = api
        self.setCentralWidget(None)
        ParameterTypesCustom.helpwnd = HelpBrowser(self).showHelp
        self.setDockNestingEnabled(True)
        self.traceManagerDialog = TraceManagerDialog(self)
        self.projEditWidget = ProjectTextEditor(self)
        self.initUI(icon)
        ResultsBase.sigRegisteredObjectsChanged.connect(self.newResultWidget)
        self.resultDocks = []

        self.loadExtraModules()
        self.addToolMenuItems()
        self.toolMenu.addSeparator()
        self.addSettingsDocks()
        self.restoreSettings()

        self.projectChanged()
        self.api.sigNewProject.connect(self.projectChanged)
        self.api.sigTracesChanged.connect(self.tracesChanged)
        Parameter.sigParametersChanged.connect(self.reloadGuiActions)
        self.show()
Пример #2
0
    def __init__(self, api, name="Demo", icon="cwicon"):
        QMainWindow.__init__(self)
        CWMainGUI.instance = self
        self.name = name
        sys.excepthook = self.exceptionHandlerDialog
        util.setUIupdateFunction(QCoreApplication.processEvents)
        self.api = api
        self.setCentralWidget(None)
        ParameterTypesCustom.helpwnd = HelpBrowser(self).showHelp
        self.setDockNestingEnabled(True)
        self.traceManagerDialog = TraceManagerDialog(self)
        self.projEditWidget = ProjectTextEditor(self)
        self.initUI(icon)
        ResultsBase.sigRegisteredObjectsChanged.connect(self.newResultWidget)
        self.resultDocks = []

        self.loadExtraModules()
        self.addToolMenuItems()
        self.toolMenu.addSeparator()
        self.addSettingsDocks()
        self.restoreSettings()

        self.projectChanged()
        self.api.sigNewProject.connect(self.projectChanged)
        self.api.sigTracesChanged.connect(self.tracesChanged)
        Parameter.sigParametersChanged.connect(self.reloadGuiActions)