def __init__(self, model_controller, plugin_manager, workspace_manager): FaradayUi.__init__(self, model_controller, plugin_manager, workspace_manager) qt.QApplication.__init__(self, []) self._shell_envs = dict() model.guiapi.setMainApp(self) self._main_window = MainWindow(CONF.getAppname(), self, self.getModelController(), self.getPluginManager()) self.setMainWidget(self.getMainWindow()) notifier = model.log.getNotifier() notifier.widget = self._main_window model.guiapi.notification_center.registerWidget(self._main_window) self.loghandler = GUIHandler() addHandler(self.loghandler) self._splash_screen = qt.QSplashScreen( qt.QPixmap(os.path.join(CONF.getImagePath(), "splash2.png")), qt.Qt.WStyle_StaysOnTop) self.startSplashScreen()
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)