def load_project(self, project): """Load a project Get the settings for the project and load them as the current application settings. Set the current project name in the window title. Set the current project name setting in application settings. """ project_settings = project.get_settings() project_name = project.get_project_name() set_setting('current_project', project_name) changed_settings = save_settings(project_settings) self.handle_settings_changed(changed_settings) self.main_window.set_window_title(project_name)
def save_state(self): """Save current expressions to settings""" set_setting('expressions_viewer/expressions', self.get_expressions())
def closeEvent(self, event): set_setting("window/geometry", self.saveGeometry()) set_setting("window/state", self.saveState()) super(PugdebugMainWindow, self).closeEvent(event)