Текст документации сгенерирован автоматически из исходного кода.
Если обнаружили ошибку, отправьте об этом сообщение на 📧почту.
PropertyContainer
Provides functionality to keeps and handles nested properties.
Take into account, all service attribute has prefix «pc_», it's needed to prevent collision when you add your new properties.
Methods
pc_render_gui
@classmethod def pc_render_gui() -> QWidget
Returns widget with placed widgets of properties
Returns:
- QWidget — instance of gui widget
pc_properties
@classmethod def pc_properties() -> Generator[tuple[str, Property]]
Returns Property instance
This generator returns a property instance in this container Yields: tuple[str, Property]: name of attribute and instance of Property
Returns:
- Generator[tuple[str, Property]] — (without description)
pc_get_property
@classmethod def pc_get_property(name: str) -> Property
Returns property instance with <name>
Parameters:
- name: str — name of property
Returns:
- Property — property instance
Raises:
- AttributeError — if property is not found
pc_get_property_value
@classmethod def pc_get_property_value(name: str) -> Any
Returns property value with <name>
Parameters:
- name: str — name of property
Returns:
- Any — property value
Raises:
- AttributeError — if property is not found
pc_prop_values_as_dict
@classmethod def pc_prop_values_as_dict() -> dict[str, tuple[Property, Any]]
Returns dictionary of properties values
Returns:
- dict[str, tuple[Property, Any]] — dictionary of properties values
pc_set_prop_values_from_dict
@classmethod def pc_set_prop_values_from_dict(prop_dict: dict[str, tuple[Property, Any]]) -> None
Receives dictionary of properties values and rewrite properties values
Parameters:
- prop_dict: dict[str, tuple[Property, Any]] — dictionary of properties values
Returns:
- None — (without description)
pc_prop_params_as_dict
@classmethod def pc_prop_params_as_dict() -> dict[str, tuple[Property, dict]]
Returns dictionary of properties parameters
Returns:
- dict[str, tuple[Property, dict]] — dictionary of properties parameters
pc_set_prop_params_from_dict
@classmethod def pc_set_prop_params_from_dict(params_dict: dict[str, tuple[Property, dict]]) -> None
Receives dictionary of properties parameters and rewrite properties parameters
Parameters:
- params_dict: dict[str, tuple[Property, dict]] — dictionary of properties parameters
Returns:
- None — (without description)
pc_delete_prop_widgets
@classmethod def pc_delete_prop_widgets()
Deletes input widgets for all included properties
pc_notifier
@classmethod def pc_notifier() -> pc_Notifier
Returns instance of pc_Notifier class
This method returns pc_Notifier class instance, creates if it doesn't exist and connects handler to [value_changed] signal for each property
Notes: Notifier sends [property_value_changed] signal when value of any property is changed.
Returns:
- (pc_Notifier) — instance of pc_Notifier class
pc_delete_notifier
@classmethod def pc_delete_notifier()
Deletes instance of Notifier class
This method deletes Notifier class instance if it exists and disconnects handler attached to [value_changed] signal of each property
Subclasses
pc_Notifier
Parent class: PropertyContainer
Inherits: QObject
This class provides notifier functionality
Attention! Do not use this class directly, but use PropertyContainer.notifier() method to get instance of this class.
Attributes:
- property_value_changed: Property — Sends when the value of any property changed. Passes reference to property with changed value.
Methods
on_value_changed
def on_value_changed()