registry¶
Provide Registry Services
-
class
openlp.core.common.registry.
Registry
[source]¶ Bases:
object
This is the Component Registry. It is a singleton object and is used to provide a look up service for common objects.
-
classmethod
create
()[source]¶ The constructor for the component registry providing a single registry of objects.
-
execute
(event, *args, **kwargs)[source]¶ Execute all the handlers associated with the event and return an array of results.
Parameters: - event – The function to be processed
- args – Parameters to be passed to the function.
- kwargs – Parameters to be passed to the function.
-
get
(key)[source]¶ Extracts the registry value from the list based on the key passed in
Parameters: key – The service to be retrieved.
-
get_flag
(key)[source]¶ Extracts the working_flag value from the list based on the key passed in
Parameters: key – The flag to be retrieved.
-
register
(key, reference)[source]¶ Registers a component against a key.
Parameters: - key – The service to be created this is usually a major class like “renderer” or “main_window” .
- reference – The service address to be saved.
-
register_function
(event, function)[source]¶ Register an event and associated function to be called
Parameters: - event – The function description like “live_display_hide” where a number of places in the code will/may need to respond to a single action and the caller does not need to understand or know about the recipients.
- function – The function to be called when the event happens.
-
remove
(key)[source]¶ Removes the registry value from the list based on the key passed in.
Parameters: key – The service to be deleted.
-
remove_flag
(key)[source]¶ Removes the working flags value from the list based on the key passed.
Parameters: key – The working_flag to be deleted.
-
classmethod