betty.gui.model module

Provide entity management widgets for the Graphical User Interface.

class betty.gui.model.EntityReferenceCollector[source]

Bases: LocalizedObject, QWidget

A form widget that allows users to configure an entity reference.

Parameters:
  • app (App)

  • entity_reference (EntityReference[UserFacingEntity & Entity])

  • label_builder (Callable[[], str] | None)

  • caption_builder (Callable[[], str] | None)

__init__(app: App, entity_reference: EntityReference[UserFacingEntity & Entity], label_builder: Callable[[], str] | None = None, caption_builder: Callable[[], str] | None = None)[source]
Parameters:
  • app (App)

  • entity_reference (EntityReference[UserFacingEntity & Entity])

  • label_builder (Callable[[], str] | None)

  • caption_builder (Callable[[], str] | None)

class betty.gui.model.EntityReferenceSequenceCollector[source]

Bases: LocalizedObject, QWidget

A form widget that allows users to configure a sequence of entity references.

Parameters:
  • app (App)

  • entity_references (EntityReferenceSequence[UserFacingEntity & Entity])

  • label_text (Localizable | None)

  • caption_text (Localizable | None)

__init__(app: App, entity_references: EntityReferenceSequence[UserFacingEntity & Entity], label_text: Localizable | None = None, caption_text: Localizable | None = None)[source]
Parameters:
  • app (App)

  • entity_references (EntityReferenceSequence[UserFacingEntity & Entity])

  • label_text (Localizable | None)

  • caption_text (Localizable | None)