pic_scanner.gui.models.windows.template
Created on Thu Apr 11 13:11:16 2024
@author: tayja
Attributes
Classes
Metaclass for classes that should build and run themselves upon instantiation when the auto_build |
|
A metaclass to enhance classes with logging capabilities. Classes that inherit from |
Functions
|
Determine if an object is a class. |
|
|
|
Module Contents
- pic_scanner.gui.models.windows.template.is_class(obj)
Determine if an object is a class.
- Parameters:
obj – The object to check.
- Returns:
True if the object is a class; False otherwise.
- Return type:
bool
Example
>>> is_class(str) True >>> is_class('string') False
- class pic_scanner.gui.models.windows.template.AutoBuildRunMeta
Bases:
abc.ABCMetaMetaclass for classes that should build and run themselves upon instantiation when the auto_build and auto_run attributes are True.
This metaclass overrides the __call__ method to build and run the instance if the auto_build and auto_run attributes are True.
- pic_scanner.gui.models.windows.template.PROG_LOGGER
- pic_scanner.gui.models.windows.template.event_handler(event, values, window)
- pic_scanner.gui.models.windows.template.layout()
- class pic_scanner.gui.models.windows.template.Window(auto_build=False, auto_run=False, title=None, blueprint: pic_scanner.BluePrint | None = None, blueprint_args: dict | None = None)
Bases:
inspy_logger.LoggableA metaclass to enhance classes with logging capabilities. Classes that inherit from ‘Loggable’ can instantly access a logger without manually setting it up. This logger is derived from a parent logger, ensuring consistent logging behavior and hierarchy.
- Parameters:
blueprint (Optional[pic_scanner.BluePrint])
blueprint_args (Optional[dict])
- - log_device
The logger device associated with the instance of the class.
- property blueprint
- abstract build()
Builds the window.
- Returns:
None
- property event_handler
- close()
Closes the window.
- Returns:
None
- run()
Runs the window.
- Returns:
None
- property auto_build
- Returns the value of the `auto_build` attribute.
- Returns:
The value of the auto_build attribute.
- Return type:
bool
- property auto_run
- Returns the value of the `auto_run` attribute.
- Returns:
The value of the auto_run attribute.
- Return type:
bool
- property is_built
- Returns the value of the `built` attribute.
- Returns:
The value of the built attribute.
- Return type:
bool
- property building
- Returns the value of the `building` attribute.
- Returns:
The value of the building attribute.
- Return type:
bool
- is_built()
Deletes the built attribute.
- Returns:
None
- property closed
- Returns the value of the `closed` attribute.
- Returns:
The value of the closed attribute.
- Return type:
bool
- property layout
- Returns the value of the `layout` attribute.
- Returns:
The value of the layout attribute.
- Return type:
list
- property running
- Returns the value of the `running` attribute.
- Returns:
The value of the running attribute.
- Return type:
bool
- property title
- property window