tommy.controller.config_controller
Classes
- class tommy.controller.config_controller.ConfigController[source]
Bases:
object
Controls the access to and changes to the configuration settings.
- add_configuration(name: str) bool [source]
Add a new configuration with the given name and switch to the new configuration :param name: Name of the configuration :return: Whether the config could successfully be created. Creating a config fails if a config with that name already exists
- property config_switched_event: EventHandler[ConfigModel]
- delete_configuration(name: str) bool [source]
Delete the configuration with the given name. If it is the currently selected configuration, switch to the previous configuration. If the currently selected configuration is the first one, switch to the next one instead :param name: Name of the configuration to delete :return: Whether or not deletion succeeded. Deletion of a configuration fails if the configuration name does not exist or if it is the only configuration
- get_selected_configuration() str [source]
Get the name of the currently selected configuration. :return: The name of the configuration
- set_controller_refs(graph_controller: GraphController) None [source]
Set a reference to the graph controller :param graph_controller: The graph controller :return: None