navigate.controller.sub_controllers.microscope_popup.MicroscopePopupController
- class navigate.controller.sub_controllers.microscope_popup.MicroscopePopupController(view, parent_controller, microscope_info)
- Bases: - GUIController- Controller for the microscope setting popup window. - __init__(view, parent_controller, microscope_info)
- Initialize the MicroscopePopupController. - Parameters:
- view (object) – GUI element containing widgets and variables to control. Likely tk.Toplevel-derived. 
- parent_controller (Navigate_controller) – The main controller. 
- microscope_info (dict) – A dictionary containing the information of the microscopes. 
 
 
 - Methods - __init__(view, parent_controller, ...)- Initialize the MicroscopePopupController. - Confirm the microscope settings. - execute(command, *args)- This function is called when a command is passed from a child process. - Close the window and delete this controller. - 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 - showup()- This function will let the popup window show in front. - Collects all the values of widgets - update_microscope_mode(microscope_name)- Update the microscope mode. - Attributes - Custom events for the controller - The popup window. - A dictionary containing the widgets. - A dictionary containing the variables. - A dictionary containing the buttons. - A dictionary containing the microscope information. - The name of the primary microscope. - confirm_microscope_setting()
- Confirm the microscope settings. 
 - 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()
- Close the window and delete this controller. 
 - 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 
 
 - showup()
- This function will let the popup window show in front. 
 - update_experiment_values()
- Collects all the values of widgets - setting_dict is a reference of experiment dictionary update the dictionary directly 
 - update_microscope_mode(microscope_name)
- Update the microscope mode. - Parameters:
- microscope_name (str) – The name of the microscope. 
- Returns:
- A function to update the microscope mode. 
- Return type:
- func 
 
 - buttons
- A dictionary containing the buttons. - Type:
- dict 
 
 - property custom_events
- Custom events for the controller 
 - microscope_info
- A dictionary containing the microscope information. - Type:
- dict 
 
 - parent_controller
- parent controller - Type:
 
 - primary_microscope
- The name of the primary microscope. - Type:
- str 
 
 - variables
- A dictionary containing the variables. - Type:
- dict 
 
 - view
- The popup window. - Type:
- tk.Toplevel-derived 
 
 - widgets
- A dictionary containing the widgets. - Type:
- dict