pic_scanner.gui.models.element_bases.blueprint

Classes

AutoBuildMeta

Metaclass for classes that should build themselves upon instantiation when the auto_build

BaseBlueprint

A base class for building blueprints.

Module Contents

class pic_scanner.gui.models.element_bases.blueprint.AutoBuildMeta

Bases: abc.ABCMeta

Metaclass 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.

class pic_scanner.gui.models.element_bases.blueprint.BaseBlueprint(auto_build: bool = False)

A 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.

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

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

building()

Deletes the building attribute.

This method sets the building attribute to False.

Returns:

None

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

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