pic_scanner.gui.models.element_bases package
Submodules
pic_scanner.gui.models.element_bases.blueprint module
- class pic_scanner.gui.models.element_bases.blueprint.BaseBlueprint(auto_build=False)
Bases:
objectA base class for building blueprints.
This class is used to create blueprints for building GUI elements. A blueprint is a set of instructions that are used to build a GUI element.
Properties:
- auto_build (bool):
A boolean value that determines whether the class should automatically build itself when instantiated.
- building (bool):
A boolean value that determines whether the class is currently building itself.
- is_built (bool):
A boolean value that determines whether the class has been built.
- layout (list):
A list of elements that make up the layout of the class.
- Parameters:
auto_build (bool)
- build()
An abstract method that builds the class.
- __init__(auto_build=False)
Initializes the class.
This method initializes the class by setting the building and is_built attributes to False and the layout attribute to an empty list. It also sets the auto_build attribute to the value of the auto_build argument if it is a boolean value, otherwise it sets it to False.
- Parameters:
auto_build (bool) – A boolean value that determines whether the class should automatically build itself when instantiated. Defaults to False.
- _abc_impl = <_abc._abc_data object>
- property _built
Returns the value of the _built attribute.
The _built attribute is a boolean value that determines whether the class has been built.
- Returns:
The value of the _built attribute.
- Return type:
bool
- property auto_build
Returns the value of the auto_build attribute.
The auto_build attribute is a boolean value that determines whether the class should automatically build itself when instantiated.
- Returns:
The value of the auto_build attribute.
- Return type:
bool
- abstract build()
An abstract method that builds the class.
This method is called to build the class by creating and must be implemented by subclasses.
- Returns:
None
- property building
Returns the value of the building attribute.
The building attribute is a boolean value that determines whether the class is currently building itself.
- Returns:
The value of the building attribute.
- Return type:
bool
- property is_built
Returns the value of the is_built attribute.
The is_built attribute is a boolean value that determines whether the class has been built.
- Returns:
The value of the is_built attribute.
- Return type:
bool
- property layout
Returns the value of the layout attribute.
The layout attribute is a list of elements that make up the layout of the class.
- Returns:
The value of the layout attribute.
- Return type:
list
pic_scanner.gui.models.element_bases.column module
pic_scanner.gui.models.element_bases.metas module
- class pic_scanner.gui.models.element_bases.metas.AutoBuildMeta(name, bases, namespace, /, **kwargs)
Bases:
ABCMetaMetaclass for classes that should build themselves upon instantiation when the auto_build attribute is True.
This metaclass overrides the __call__ method to build the instance if the auto_build attribute is True.
- __init__(*args, **kwargs)
- _abc_caches_clear()
Clear the caches (for debugging or testing).
- _abc_registry_clear()
Clear the registry (for debugging or testing).
- _dump_registry(file=None)
Debug helper to print the ABC registry.
- mro()
Return a type’s method resolution order.
- register(subclass)
Register a virtual subclass of an ABC.
Returns the subclass, to allow usage as a class decorator.
- class pic_scanner.gui.models.element_bases.metas.AutoBuildRunMeta(name, bases, namespace, /, **kwargs)
Bases:
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.
- __init__(*args, **kwargs)
- _abc_caches_clear()
Clear the caches (for debugging or testing).
- _abc_registry_clear()
Clear the registry (for debugging or testing).
- _dump_registry(file=None)
Debug helper to print the ABC registry.
- mro()
Return a type’s method resolution order.
- register(subclass)
Register a virtual subclass of an ABC.
Returns the subclass, to allow usage as a class decorator.