navigate.controller.sub_controllers.gui.GUIController
- class navigate.controller.sub_controllers.gui.GUIController(view: Any, parent_controller: Optional = None)
Bases:
object
Base class for GUI controllers
- __init__(view: Any, parent_controller: Optional = None) → None
Initializes GUI controller
- Parameters:
view (Any) – GUI view
parent_controller (Controller) – parent controller
Methods
__init__
(view[, parent_controller])Initializes GUI controller
execute
(command, *args)This function is called when a command is passed from a child process.
This function is called when the controller is initialized
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
Collects all the values of widgets
Attributes
Custom events for the controller
GUI view
parent controller
- 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
- 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
- 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()
Collects all the values of widgets
setting_dict is a reference of experiment dictionary update the dictionary directly
- property custom_events
Custom events for the controller
- parent_controller
parent controller
- Type:
- view
GUI view
- Type:
tkinter.Tk