Пример #1
0
    def update(self, old_name, new_name, new_settings):
        if old_name and old_name != new_name:
            settings.remove('project/' + old_name)

        with settings.open_group('project/' + new_name):
            for k, v in new_settings.items():
                settings.set_value(k, v)

        if not old_name:
            self.load_data()
            self.set_active(new_name)
        elif old_name != new_name:
            self.load_data()
            if old_name == self.active:
                self.set_active(new_name)
        elif old_name == self.active:
            self.active_project_changed.emit()
Пример #2
0
    def closeEvent(self, event):
        settings.set_value('window/geometry', self.saveGeometry())
        settings.set_value('window/state', self.saveState())

        super(PugdebugMainWindow, self).closeEvent(event)
Пример #3
0
 def save_state(self):
     """Save current expressions to settings"""
     settings.set_value('expressions_viewer/expressions',
                        self.get_expressions())
Пример #4
0
 def set_active(self, project_name):
     if project_name != self.active and self.exists(project_name):
         self.active = project_name
         settings.set_value('active_project', project_name)
         self.emit_data_changed()
         self.active_project_changed.emit()