示例#1
0
    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)
示例#2
0
    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)
示例#3
0
 def save_state(self):
     """Save current expressions to settings"""
     set_setting('expressions_viewer/expressions', self.get_expressions())
示例#4
0
    def closeEvent(self, event):
        set_setting("window/geometry", self.saveGeometry())
        set_setting("window/state", self.saveState())

        super(PugdebugMainWindow, self).closeEvent(event)
示例#5
0
    def closeEvent(self, event):
        set_setting("window/geometry", self.saveGeometry())
        set_setting("window/state", self.saveState())

        super(PugdebugMainWindow, self).closeEvent(event)
示例#6
0
 def save_state(self):
     """Save current expressions to settings"""
     set_setting('expressions_viewer/expressions', self.get_expressions())