Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
0524d11
adding debug messages
TobiasSpohn May 8, 2024
2d1c389
added method to dump all status vars of active modules
TobiasSpohn May 8, 2024
c491d22
add gui implementation for saving status variables
May 8, 2024
4c78492
improved comment to show that only strings are stored
TobiasSpohn May 10, 2024
1875b45
Merge branch 'save_status_variables' of https://github.com/Ulm-IQO/qu…
TobiasSpohn May 10, 2024
1166e6d
added automatic saving of status variables
TobiasSpohn May 10, 2024
bfab2eb
moved automatic status variable dumping to settings dialog
TobiasSpohn May 13, 2024
9a3cae4
fixed automatic status variable saving
TobiasSpohn Jun 10, 2024
391d8ce
fixed imports
TobiasSpohn Jun 13, 2024
9a41c4f
fixed imports
TobiasSpohn Jun 13, 2024
a132f61
Merge branch 'main' into save_status_variables
TobiasSpohn Jun 14, 2024
4c01dbb
docstring fixes and code cleanup
TobiasSpohn Jun 14, 2024
7614804
Merge branch 'refs/heads/main' into save_status_variables
TobiasSpohn Aug 1, 2024
9cea7f4
fixed incorrect startup timer interval
TobiasSpohn Aug 1, 2024
9a8e38d
reverted automatic code style changes
TobiasSpohn Aug 12, 2024
4de4d84
modified changelog
TobiasSpohn Aug 12, 2024
5f53e61
reverted automatic style changes
TobiasSpohn Aug 12, 2024
e6d0c73
elevated _dump_status_variables to public method
TobiasSpohn Sep 2, 2024
d64536a
changed modulemanager to handle dumping_timer_interval in seconds
TobiasSpohn Sep 2, 2024
1d8695e
docstring fix
TobiasSpohn Sep 2, 2024
d01c313
introduced timer interval Exception if interval <= 0
TobiasSpohn Sep 2, 2024
c73d248
settings dialog correctly shows, when no status variable has been sav…
TobiasSpohn Sep 2, 2024
97a2cda
Merge branch 'main' into save_status_variables
TobiasSpohn Sep 2, 2024
6634e3a
added automated dumping of status variables to Base
TobiasSpohn Oct 14, 2024
373a23e
added GUI dumping of status variables button to modules widget
TobiasSpohn Oct 14, 2024
ed40807
debug message improvement
TobiasSpohn Oct 14, 2024
3121159
removed modulemanager automatic status var saving
TobiasSpohn Oct 14, 2024
f8b70da
add ModuleWidget to SettingsDialog
TobiasSpohn Oct 14, 2024
5ef54c8
first GUI for changing auto status variable dumping
TobiasSpohn Oct 14, 2024
0a62d08
removed deprecated automatic status variable saving
TobiasSpohn Oct 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ None
- Fixed syntax error in `qudi.util.fit_models.lorentzian.LorentzianLinear` fit model

### New Features
None
- Added "Dump all status variables" button to manually dump status variables without restarting qudi
- Added settings to configure automatic dumping of status variables during qudi runtime

### Other
- Improved documentation [`getting_started.md`](getting_started.md)
Expand Down
192 changes: 96 additions & 96 deletions docs/design_concepts/measurement_modules.md

Large diffs are not rendered by default.

18 changes: 17 additions & 1 deletion src/qudi/core/gui/main_gui/main_gui.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
""" This module contains the
"""This module contains the

Copyright (c) 2021, the qudi developers. See the AUTHORS.md file at the top-level directory of this
distribution and on <https://github.com/Ulm-IQO/qudi-core/>
Expand Down Expand Up @@ -49,6 +49,9 @@ class QudiMainGui(GuiBase):
_console_font_size = StatusVar(name='console_font_size', default=10)
_show_error_popups = StatusVar(name='show_error_popups', default=True)

signal_update_automatic_status_var_checkstate = QtCore.Signal(bool)
signal_update_automatic_status_var_interval = QtCore.Signal(int)

def __init__(self, *args, **kwargs):
"""Create an instance of the module.

Expand Down Expand Up @@ -105,6 +108,7 @@ def on_activate(self):
self._init_remote_modules_widget()

self.reset_default_layout()

self.show()

def on_deactivate(self):
Expand All @@ -126,6 +130,10 @@ def _connect_signals(self):
self.mw.action_open_configuration_editor.triggered.connect(self.new_configuration)
self.mw.action_load_all_modules.triggered.connect(
qudi_main.module_manager.start_all_modules)
self.mw.action_dump_status_variables.triggered.connect(
qudi_main.module_manager.dump_status_variables, QtCore.Qt.QueuedConnection
)

self.mw.action_view_default.triggered.connect(self.reset_default_layout)
# Connect signals from manager
qudi_main.configuration.sigConfigChanged.connect(self.update_config_widget)
Expand All @@ -143,6 +151,8 @@ def _connect_signals(self):
qudi_main.module_manager.deactivate_module)
self.mw.module_widget.sigCleanupModule.connect(
qudi_main.module_manager.clear_module_app_data)
self.mw.module_widget.sigDumpStatusVarModule.connect(
qudi_main.module_manager.dump_module_status_var)

def _disconnect_signals(self):
qudi_main = self._qudi_main
Expand All @@ -152,6 +162,7 @@ def _disconnect_signals(self):
self.mw.action_reload_qudi.triggered.disconnect()
self.mw.action_open_configuration_editor.triggered.disconnect()
self.mw.action_load_all_modules.triggered.disconnect()
self.mw.action_dump_status_variables.triggered.disconnect()
self.mw.action_view_default.triggered.disconnect()
# Disconnect signals from manager
qudi_main.configuration.sigConfigChanged.disconnect(self.update_config_widget)
Expand All @@ -167,6 +178,7 @@ def _disconnect_signals(self):
self.mw.module_widget.sigReloadModule.disconnect()
self.mw.module_widget.sigDeactivateModule.disconnect()
self.mw.module_widget.sigCleanupModule.disconnect()
self.mw.module_widget.sigDumpStatusVarModule.disconnect()

get_signal_handler().sigRecordLogged.disconnect(self.handle_log_record)

Expand Down Expand Up @@ -218,6 +230,7 @@ def reset_default_layout(self):

self.mw.action_view_console.setChecked(self._has_console)
self.mw.action_view_console.setVisible(self._has_console)

return

def handle_log_record(self, entry):
Expand Down Expand Up @@ -340,15 +353,18 @@ def update_configured_modules(self, modules=None):
if modules is None:
modules = self._qudi_main.module_manager
self.mw.module_widget.update_modules(modules)
self.mw.settings_dialog.module_widget.update_modules(modules)

@QtCore.Slot(str, str, str)
def update_module_state(self, base, name, state):
self.mw.module_widget.update_module_state(base, name, state)
self.mw.settings_dialog.module_widget.update_module_state(base, name, state)
return

@QtCore.Slot(str, str, bool)
def update_module_app_data(self, base, name, exists):
self.mw.module_widget.update_module_app_data(base, name, exists)
self.mw.settings_dialog.module_widget.update_module_app_data(base, name, exists)

def get_qudi_version(self):
""" Try to determine the software version in case the program is in a git repository.
Expand Down
12 changes: 12 additions & 0 deletions src/qudi/core/gui/main_gui/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ def __init__(self, parent=None, debug_mode=False, **kwargs):
QtGui.QIcon(os.path.join(icon_path, 'dialog-warning')))
self.action_load_all_modules.setText('Load all modules')
self.action_load_all_modules.setToolTip('Load all available modules found in configuration')

# Dump status variables action
self.action_dump_status_variables = QtWidgets.QAction()
self.action_dump_status_variables.setIcon(
QtGui.QIcon(os.path.join(icon_path, "document-save"))
)
self.action_dump_status_variables.setText("Save all Status Variables")
self.action_dump_status_variables.setToolTip(
"Save Status Variables of all active modules"
)
# quit action
self.action_quit = QtWidgets.QAction()
self.action_quit.setIcon(QtGui.QIcon(os.path.join(icon_path, 'application-exit')))
Expand Down Expand Up @@ -135,6 +145,7 @@ def __init__(self, parent=None, debug_mode=False, **kwargs):
self.toolbar.addAction(self.action_reload_qudi)
self.toolbar.addSeparator()
self.toolbar.addAction(self.action_load_all_modules)
self.toolbar.addAction(self.action_dump_status_variables)
self.addToolBar(self.toolbar)

# Create menu bar
Expand All @@ -146,6 +157,7 @@ def __init__(self, parent=None, debug_mode=False, **kwargs):
menu.addAction(self.action_reload_qudi)
menu.addSeparator()
menu.addAction(self.action_load_all_modules)
menu.addAction(self.action_dump_status_variables)
menu.addSeparator()
menu.addAction(self.action_settings)
menu.addSeparator()
Expand Down
Loading