def __init__(self): self._original_excepthook = sys.excepthook self.qapp = qt.QApplication([]) self._configuration = CONF self._shell_envs = dict() self._security_manager = SecurityManager() self._model_controller = model.controller.ModelController(security_manager = self._security_manager) self.plugin_manager = PluginManager(os.path.join(CONF.getConfigPath(),"plugins")) self._workspace_manager = WorkspaceManager(self._model_controller, self.plugin_manager.createController("ReportManager")) model.guiapi.setMainApp(self) self._main_window = MainWindow(CONF.getAppname(), self, self._model_controller) self.qapp.setMainWidget(self._main_window) self._splash_screen = qt.QSplashScreen(qt.QPixmap(os.path.join(CONF.getImagePath(),"splash2.png")), qt.Qt.WStyle_StaysOnTop) if not self.getLogger().isGUIOutputRegistered(): self.logger.registerGUIOutput(self._main_window.getLogConsole()) notifier = model.log.getNotifier() notifier.widget = self._main_window model.guiapi.setMainApp(self)
def __init__(self, args): self._original_excepthook = sys.excepthook self._configuration = CONF self._security_manager = SecurityManager() self._model_controller = model.controller.ModelController( security_manager=self._security_manager) self._plugin_manager = PluginManager( os.path.join(CONF.getConfigPath(), "plugins")) self._workspace_manager = WorkspaceManager( self._model_controller, self._plugin_manager.createController("ReportManager")) self.gui_app = UiFactory.create(self._model_controller, self._plugin_manager, self._workspace_manager, args.gui) self.gui_app.setSplashImage( os.path.join(CONF.getImagePath(), "splash2.png"))