navigate.controller.sub_controllers.features_popup.FeaturePopupController
- class navigate.controller.sub_controllers.features_popup.FeaturePopupController(view, parent_controller, feature_list_id=0, persist_feature_list_edits=False)
Bases:
GUIControllerController for feature list popup
- __init__(view, parent_controller, feature_list_id=0, persist_feature_list_edits=False)
Initialize the controller
- Parameters:
view (navigate.view.popups.feature_list_popup.FeatureListPopup) – The view of the controller
parent_controller (navigate.controller.main_controller.MainController) – The parent controller
feature_list_id (int, optional) – The id of the feature list, by default 0
persist_feature_list_edits (bool, optional) – Persist confirmed edits to an internal feature-list record. Acquisition configuration remains runtime-only by default.
Methods
__init__(view, parent_controller[, ...])Initialize the controller
Add the feature list
Cancel the acquisition
Close child config popups
execute(command, *args)This function is called when a command is passed from a child process.
exit_func(*args)Exit the popup
This function is called when the controller is initialized
populate_feature_list(feature_list_id)Populate the feature list
register_event_listener(event_name, ...)Register event listener in the parent_controller
Sets values of widgets based on experiment setting
show_verbose_info(*info)Prints verbose information to the console
update_experiment_values(*args)Collects all the values of widgets
Update the feature list
Verify the feature list
Attributes
Custom events for the controller
The id of the feature in the feature list.
Whether confirmed edits should be persisted to the feature-list YAML.
The list of feature names.
The list of feature structure.
- add_feature_list()
Add the feature list
- cancel_acquisition()
Cancel the acquisition
- close_child_popups()
Close child config popups
- execute(command, *args)
This function is called when a command is passed from a child process.
- Parameters:
command (str) – command name
args (tuple) – command arguments
- exit_func(*args)
Exit the popup
- initialize()
This function is called when the controller is initialized
This function initializes GUI based on configuration setting parameter: configuration_controller set range value for entry or spinbox widgets; add values to combobox get other necessary information for configuration.yml
- populate_feature_list(feature_list_id)
Populate the feature list
- Parameters:
feature_list_id (int) – The id of the feature list
- register_event_listener(event_name, event_handler)
Register event listener in the parent_controller
- Parameters:
event_name (str) – event name
event_handler (function) – event handler
- set_experiment_values()
Sets values of widgets based on experiment setting
setting_dict is a dictionary
- show_verbose_info(*info)
Prints verbose information to the console
- Parameters:
info (tuple) – information to be printed
- update_experiment_values(*args)
Collects all the values of widgets
setting_dict is a reference of experiment dictionary update the dictionary directly
- update_feature_list()
Update the feature list
- verify_feature_list()
Verify the feature list
- Returns:
feature_list – The feature list
- Return type:
list
- property custom_events
Custom events for the controller
- feature_list_id
The id of the feature in the feature list.
- Type:
int
- feature_structure
The list of feature structure.
- Type:
list
- features
The list of feature names.
- Type:
list
- parent_controller
parent controller
- Type:
- persist_feature_list_edits
Whether confirmed edits should be persisted to the feature-list YAML.
- Type:
bool
- view
GUI view
- Type:
tkinter.Tk