label module#

Labels module for JITX Standard Library

This module provides configurations for reference designator and value labels in symbols

class LabelConfig(ref_size=1.0, value_size=1.0)[source]#

Configuration for reference desigantor and value labels in symbols

Parameters:
ref_size: float = 1.0#

Reference designator label size

value_size: float | None = 1.0#

Value label size, can be set to None to avoid creating a value label

class LabelConfigurable(label_config=None)[source]#

Label configuration wrapper, useful for handling defaults

Parameters:

label_config (LabelConfig | None)

label_config: LabelConfig | None = None#
get_label_config()[source]#

Returns the label configuration.

If an label config is specified, it will be used. Otherwise, the config will be pulled from the context. If no context is available, a default config will be used.

Return type:

LabelConfig

class LabelledSymbol[source]#

Bases: Symbol

Base class for symbols with reference designator and/or value labels

Subclasses must have a ‘config’ property that extends LabelConfigurable to provide label configuration.

reference: Shape[Text]#
value: Shape[Text]#
property label_config: LabelConfigurable#

Configuration object that provides label configuration

Subclasses must override this property to provide their configuration.