8.6.4.4. pymodaq_gui.managers.h5manager module

class pymodaq_gui.managers.h5manager.FileAction(*values)[source]

Bases: StrEnum

CLOSE_FILE = 'close_file'
LOAD = 'load'
NEW_FILE = 'new_file'
OPEN_FILE = 'open_file'
SAVE = 'save'
SHOW_FILE = 'show_file'
SHOW_SETTINGS = 'show_settings'
class pymodaq_gui.managers.h5manager.FileStatus(*values)[source]

Bases: BaseEnum

CLOSED = 2
NEW = 0
NO_FILE = 4
REOPENED = 1
REOPENED_ANOTHER = 3
class pymodaq_gui.managers.h5manager.H5Manager(app, parent=None, show_not=(FileAction.CLOSE_FILE, FileAction.OPEN_FILE))[source]

Bases: QObject, ActionManager

Attributes:
h5saver
statusbar

Methods

create_new_file()

Slot of the New File button in the H5Saver settings Tree and the new file action.

get_h5saver([create_new_file, mode])

Return a H5Saver instance with more control than when using the h5saver property, in particular, the property will attempt to create a new file if it doesn't exist.

open_file([mode])

Try to reopen the current h5 file if it is closed.

set_file_open(is_open)

Update the file-status LED's open/closed state, preserving SWMR state.

set_swmr_status(active[, compatible])

Reflect SWMR state on the file-status LED (only meaningful while the file is open).

update_file_status_led()

Reflect the current h5 file open/accessible and SWMR state in the status bar LED.

close_file

command_sig

create_file_toolbar_and_menu

file_loaded_signal

file_open_signal

flush

insert_h5stuff_status

load_file

save_file

settings

settings_tree

show_file_content

show_settings

close_file()[source]
create_file_toolbar_and_menu()[source]
Return type:

tuple[QToolBar, QMenu]

create_new_file()[source]

Slot of the New File button in the H5Saver settings Tree and the new file action.

Also connected to new_file_sig (Signal(bool)); Qt allows a signal to connect to a slot taking fewer arguments than it emits, so no bool parameter is needed here.

flush()[source]
get_h5saver(create_new_file=False, mode='a')[source]

Return a H5Saver instance with more control than when using the h5saver property, in particular, the property will attempt to create a new file if it doesn’t exist.

Return type:

H5Saver

insert_h5stuff_status()[source]
load_file(mode='a')[source]
open_file(mode='a')[source]

Try to reopen the current h5 file if it is closed.

Return type:

FileStatus

save_file()[source]
set_file_open(is_open)[source]

Update the file-status LED’s open/closed state, preserving SWMR state.

set_swmr_status(active, compatible=False)[source]

Reflect SWMR state on the file-status LED (only meaningful while the file is open).

Parameters:
  • active (bool) – True if SWMR mode is currently active on the file (shown as ‘running’).

  • compatible (bool) – True if the file was created with SWMR support (informational, tooltip only).

settings()[source]
Return type:

Parameter

settings_tree()[source]
Return type:

QWidget

show_file_content()[source]
show_settings(show=True)[source]
update_file_status_led()[source]

Reflect the current h5 file open/accessible and SWMR state in the status bar LED.

command_sig
current_folder: Path
file_loaded_signal
file_open_signal
property h5saver: H5Saver
staticMetaObject = PySide6.QtCore.QMetaObject("H5Manager" inherits "QObject": Methods:   #4 type=Signal, signature=command_sig(PyObject), parameters=PyObject   #5 type=Signal, signature=file_open_signal(bool), parameters=bool   #6 type=Signal, signature=file_loaded_signal(PyObject), parameters=PyObject )
property statusbar: QStatusBar