Skip to content

AbstractTransitionMixin

Base classes

Name Children Inherits
ObjectMixin
prettyqt.core.object

Subclasses

Class Module Description
AbstractTransition prettyqt.statemachine.abstracttransition
EventTransition prettyqt.statemachine.eventtransition
SignalTransition prettyqt.statemachine.signaltransition

⋔ Inheritance diagram

graph TD
  1473374533568["statemachine.AbstractTransitionMixin"]
  1473299815024["core.ObjectMixin"]
  140713234304496["builtins.object"]
  1473299815024 --> 1473374533568
  140713234304496 --> 1473299815024

🛈 DocStrings

Bases: ObjectMixin

Source code in prettyqt\statemachine\abstracttransition.py
class AbstractTransitionMixin(core.ObjectMixin):
    def set_transition_type(
        self, typ: TransitionTypeStr | QtStateMachine.QAbstractTransition.TransitionType
    ):
        """Set transition type.

        Args:
            typ: transition type to use
        """
        self.setTransitionType(TRANSITION_TYPE.get_enum_value(typ))

    def get_transition_type(self) -> TransitionTypeStr:
        """Return current transition type.

        Returns:
            transition type
        """
        return TRANSITION_TYPE.inverse[self.transitionType()]

get_transition_type() -> TransitionTypeStr

Return current transition type.

Source code in prettyqt\statemachine\abstracttransition.py
def get_transition_type(self) -> TransitionTypeStr:
    """Return current transition type.

    Returns:
        transition type
    """
    return TRANSITION_TYPE.inverse[self.transitionType()]

set_transition_type(typ: TransitionTypeStr | QtStateMachine.QAbstractTransition.TransitionType)

Set transition type.

Parameters:

Name Type Description Default
typ TransitionTypeStr | TransitionType

transition type to use

required
Source code in prettyqt\statemachine\abstracttransition.py
def set_transition_type(
    self, typ: TransitionTypeStr | QtStateMachine.QAbstractTransition.TransitionType
):
    """Set transition type.

    Args:
        typ: transition type to use
    """
    self.setTransitionType(TRANSITION_TYPE.get_enum_value(typ))