opihiexarata.gui.functions module
Where helpful functions which otherwise do not belong in the library, for the GUIs, exist.
- opihiexarata.gui.functions.apply_window_icon(window: QWidget | QMainWindow, icon_path: str = None) None [source]
This function just applies the window icon to the GUI interfaces. We break it out as a function so that it is much easier to change the window icons uniformly.
- Parameters:
window (QtWidget, QtMainWindow) – The window which the image will be applied to.
icon_path (str, default = None) – The path of the icon file. If None, then we default to the
window_icon.png
file in the qtui directory.
- Return type:
None
- opihiexarata.gui.functions.get_busy_image_array(progress_index: int = None) ndarray [source]
This function gets the busy image and returns it in the form of a color array which can be plot with matplotlib. The image file is stored as per convention.
- Parameters:
progress_index (int, default = None) – If provided, and between 1-4 inclusive, the busy image with progress text is output, otherwise, the default image without any text is used.
- Returns:
busy_image – The image array which is the busy image.
- Return type:
array
- opihiexarata.gui.functions.pick_engine_class_from_name(engine_name: str, engine_type: ~opihiexarata.library.engine.ExarataEngine = <class 'opihiexarata.library.engine.ExarataEngine'>) ExarataEngine [source]
This returns a specific engine class provided its user friendly name. This is a convince function for both development and implementation.
If an engine name provided is not present, this raises. This is not a matter of conversion because user friendly names are specific
- Parameters:
engine_name (str) – The engine name, the user friendly version. It is case insensitive.
engine_type (ExarataEngine) – The engine subtype, if not provided, then it searches through all available implemented engines.
- Returns:
engine_class – The more specific engine class based on the engine name.
- Return type: