8.6.4.5. pymodaq_gui.managers.manager_base module

class pymodaq_gui.managers.manager_base.ListView(parent=None)[source]

Bases: QListView

staticMetaObject = PySide6.QtCore.QMetaObject("ListView" inherits "QListView": )
class pymodaq_gui.managers.manager_base.ManagerActions(*values)[source]

Bases: StrEnum

COPY = 'copy_entry'
DELETE = 'delete_entry'
EXECUTE = 'execute_entry'
LABEL_EXTERNAL = 'label_external'
LIST = 'list_entries'
LIST_EXTERNAL = 'list_entries_external'
NEW = 'create_new_entry'
OPEN = 'open_manager'
RELOAD = 'reload_entry'
SAVE = 'save_entry'
class pymodaq_gui.managers.manager_base.ManagerBase(dashboard=None, **kwargs)[source]

Bases: CustomExt

Attributes:
applied_entry_name

Get the name of the last entry that has been successfully applied/executed

entries

Get the name of all existing entries

entries_filepath

Get the full path of all entries file

entry

Get/Set the name of the current entry

entry_applied

Get the status of the execution of the last applied entry

entry_filepath

Get the full path of the current entry file

manager_name

Methods

do_things_for_new_creation()

To be reimplemented if needed

execute_entry([entry_path])

To be called to execute the selected entry

format_subentries(entries)

Should be reimplemented for better display than the repr one

get_action_from_file(file)

Get an action name given a file and the manager name

get_action_list()

Convenience method to get right return type

get_entry_folder(**kwargs_to_entry_folder)

Get the folder path where the managed entries are stored.

get_external_toolbar_menu([toolbar, menu])

Create or update a toolbar and a menu containing actions to open/set/execute the manager

list_managed_entries(**kwargs_to_entry_folder)

Returns a list of names of managed entries with the default one as first

list_managed_entries_path(...)

Should return a list of Path objects representing managed entries.

quit_fun()

save_entries([entry_path])

Particular implementation to save entries for this inherited Manager

save_new_history_entry()

Save a new history entry in the history file

setup_docks_and_widgets()

Sets up the widgets for the manager.

update_entry([entry])

Load and display the given entry

applied_entry

close_subentries_display

connect_things_base

copy_entry

create_entry

create_slot_from_file

delete_entry

deleted_entry

enable_actions

entry_path_from_name

execute_current_entry

force_show

get_sync_combo_entry

new_entry

save_check

set_entry_applied

setup_actions_base

setup_ui

show

show_subentries

sync_entries_with

update_action_list

update_actions_connection

update_execute_action_tooltip

update_menu

updated_entry

static format_subentries(entries)[source]

Should be reimplemented for better display than the repr one

close_subentries_display(after_ms=1000)[source]
connect_things_base()[source]
copy_entry(entry=None, bypass_dialog=False)[source]
create_entry(entry=None, bypass_dialog=False)[source]
create_slot_from_file(filename)[source]
delete_entry(entry=None, bypass_dialog=False)[source]
do_things_for_new_creation()[source]

To be reimplemented if needed

enable_actions(enable=True)[source]
entry_path_from_name(entry_name)[source]
Return type:

Path

execute_current_entry()[source]
execute_entry(entry_path=None, **kwargs)[source]

To be called to execute the selected entry

force_show(show=True)[source]
get_action_from_file(file)[source]

Get an action name given a file and the manager name

Return type:

str

get_action_list()[source]

Convenience method to get right return type

Return type:

ComboBox

get_entry_folder(**kwargs_to_entry_folder)[source]

Get the folder path where the managed entries are stored.

Return type:

Path

get_external_toolbar_menu(toolbar=None, menu=None)[source]

Create or update a toolbar and a menu containing actions to open/set/execute the manager

Return type:

tuple[QToolBar, QMenu]

get_sync_combo_entry()[source]
Return type:

ComboBox

list_managed_entries(**kwargs_to_entry_folder)[source]

Returns a list of names of managed entries with the default one as first

See default_entry_name class attribute

Return type:

list[str]

list_managed_entries_path(**kwargs_to_entry_folder)[source]

Should return a list of Path objects representing managed entries.

Return type:

list[Path]

quit_fun()[source]
save_check(entry=None, bypass_dialog=False)[source]
Return type:

bool

save_entries(entry_path=None)[source]

Particular implementation to save entries for this inherited Manager

save_new_history_entry()[source]

Save a new history entry in the history file

set_entry_applied(value)[source]
setup_actions_base()[source]
setup_docks_and_widgets()[source]

Sets up the widgets for the manager.

Eventually, this can be reimplemented in subclasses to add more/different widgets/docks…

setup_ui()[source]
show()[source]
show_subentries(subentries, title='')[source]
sync_entries_with(combo)[source]
update_action_list()[source]
update_actions_connection()[source]
update_entry(entry=None, **kwargs)[source]

Load and display the given entry

update_execute_action_tooltip(entry)[source]
update_menu(menu=None)[source]
applied_entry
property applied_entry_name: str | None

Get the name of the last entry that has been successfully applied/executed

default_entry_name = 'default'
deleted_entry
property entries: list[str]

Get the name of all existing entries

property entries_filepath: list[Path]

Get the full path of all entries file

property entry: str

Get/Set the name of the current entry

property entry_applied: bool

Get the status of the execution of the last applied entry

If True, the applied_entry_name property will reflect the last successfully applied/executed entry

entry_extension: str
property entry_filepath: Path

Get the full path of the current entry file

entry_type: str
execute_action_checkable = False
icon_name = 'build_circle'
property manager_name: str
new_entry
splash_subentries: SubEntriesSplash | None
staticMetaObject = PySide6.QtCore.QMetaObject("ManagerBase" inherits "CustomExt": Methods:   #8 type=Signal, signature=new_entry(QString), parameters=QString   #9 type=Signal, signature=applied_entry(QString), parameters=QString   #10 type=Signal, signature=deleted_entry(QString), parameters=QString   #11 type=Signal, signature=updated_entry(QString), parameters=QString   #12 type=Slot, signature=set_entry_applied(bool), parameters=bool )
subentries_model: ManagerSubEntriesModel | None
updated_entry
class pymodaq_gui.managers.manager_base.ManagerSubEntriesModel(entries)[source]

Bases: QAbstractListModel

Methods

data

rowCount

set_status

data(index, role)[source]
rowCount(*args, **kwargs)[source]
Return type:

int

set_status(index, status)[source]
colors: list[GlobalColor]
staticMetaObject = PySide6.QtCore.QMetaObject("ManagerSubEntriesModel" inherits "QAbstractListModel": )
status: list[bool | None]
class pymodaq_gui.managers.manager_base.Menu(*values)[source]

Bases: StrEnum

EXTERNAL = 'external'
MAIN = 'main'
class pymodaq_gui.managers.manager_base.SubEntriesSplash(parent=None, title='')[source]

Bases: QLabel

Methods

mousePressEvent

setModel

show_splash

mousePressEvent(event)[source]
setModel(model)[source]
show_splash()[source]
staticMetaObject = PySide6.QtCore.QMetaObject("SubEntriesSplash" inherits "QLabel": )
class pymodaq_gui.managers.manager_base.Toolbar(*values)[source]

Bases: StrEnum

EXTERNAL = 'external'
MAIN = 'main'