KDStateMachineEditor API Documentation 2.3
Loading...
Searching...
No Matches
KDSME::Transition Class Reference

#include <transition.h>

Inheritance diagram for KDSME::Transition:
Collaboration diagram for KDSME::Transition:

Signals

void guardChanged (const QString &guard)
void labelBoundingRectChanged (const QRectF &rect)
void shapeChanged (const QPainterPath &path)
void sourceStateChanged (KDSME::State *sourceState)
void targetStateChanged (KDSME::State *targetState)
Signals inherited from KDSME::Element
void flagsChanged (KDSME::Element::Flags flags)
void heightChanged (qreal height)
void labelChanged (const QString &label)
void parentChanged (KDSME::Element *parent)
void posChanged (const QPointF &pos)
void selectedChanged (bool selected)
void visibleChanged (bool visible)
void widthChanged (qreal width)

Public Member Functions

 Transition (State *sourceState=nullptr)
 ~Transition ()
QString guard () const
QRectF labelBoundingRect () const
Q_INVOKABLE KDSME::StateMachine * machine () const
void setGuard (const QString &guard)
void setLabelBoundingRect (const QRectF &rect)
void setShape (const QPainterPath &shape)
void setSourceState (State *sourceState)
void setTargetState (State *targetState)
QPainterPath shape () const
State * sourceState () const
State * targetState () const
Type type () const override
Public Member Functions inherited from KDSME::Element
 Element (QObject *parent=nullptr)
 ~Element ()
QPointF absolutePos () const
virtual QRectF boundingRect () const
QList< Element * > childElements () const
Flags flags () const
qreal height () const
quintptr internalId () const
void * internalPointer () const
bool isSelected () const
bool isVisible () const
QString label () const
Element * parentElement () const
QPointF pos () const
QSizeF preferredSize () const
void setFlags (Flags flags)
void setHeight (qreal height)
void setInternalId (quintptr id)
void setInternalPointer (void *ptr)
void setLabel (const QString &label)
void setParent (QObject *object)
void setParentElement (Element *parent)
void setPos (const QPointF &pos)
void setSelected (bool selected)
void setVisible (bool visible)
void setWidth (qreal width)
virtual QString toDisplayString () const
qreal width () const

Properties

QString guard
QRectF labelBoundingRect
QPainterPath shape
 The exact shape of this transition.
KDSME::State * sourceState
KDSME::State * targetState
Properties inherited from KDSME::Element
Flags flags
qreal height
QString label
KDSME::Element * parent
QPointF pos
 The position of the element from the top-left corner.
bool selected
 Whether this item is marked as selected.
Type type
bool visible
 Whether this item is visible in the scene.
qreal width

Additional Inherited Members

Public Types inherited from KDSME::Element
enum  Flag { NoFlags = 0x0 , ElementIsDragEnabled = 0x1 , ElementIsSelectable = 0x2 , ElementIsEditable = 0x4 }
enum  Type {
  ElementType , TransitionType , SignalTransitionType , TimeoutTransitionType ,
  StateType , StateMachineType , HistoryStateType , FinalStateType ,
  PseudoStateType
}
Static Public Member Functions inherited from KDSME::Element
static Q_INVOKABLE KDSME::Element::Type stringToType (const char *type)
static Q_INVOKABLE const char * typeToString (KDSME::Element::Type type)

Detailed Description

Definition at line 23 of file transition.h.

Constructor & Destructor Documentation

◆ Transition()

Transition::Transition ( State * sourceState = nullptr)
explicit

◆ ~Transition()

Transition::~Transition ( )

Definition at line 46 of file transition.cpp.

Member Function Documentation

◆ guard()

QString Transition::guard ( ) const

The guard condition for this transition (executable content)

Returns
Any boolean expression in the current language

Definition at line 91 of file transition.cpp.

◆ guardChanged

void KDSME::Transition::guardChanged ( const QString & guard)
signal

References guard, and guardChanged().

Referenced by guardChanged(), and setGuard().

◆ labelBoundingRect()

QRectF Transition::labelBoundingRect ( ) const

Definition at line 119 of file transition.cpp.

◆ labelBoundingRectChanged

void KDSME::Transition::labelBoundingRectChanged ( const QRectF & rect)
signal

◆ machine()

StateMachine * Transition::machine ( ) const

Definition at line 50 of file transition.cpp.

References KDSME::ElementUtil::findStateMachine().

◆ setGuard()

void Transition::setGuard ( const QString & guard)

Definition at line 96 of file transition.cpp.

References guard, and guardChanged().

◆ setLabelBoundingRect()

void Transition::setLabelBoundingRect ( const QRectF & rect)

Definition at line 124 of file transition.cpp.

References labelBoundingRectChanged().

◆ setShape()

void Transition::setShape ( const QPainterPath & shape)

Definition at line 110 of file transition.cpp.

References shape, and shapeChanged().

◆ setSourceState()

void Transition::setSourceState ( State * sourceState)

◆ setTargetState()

void Transition::setTargetState ( State * targetState)

Definition at line 77 of file transition.cpp.

References targetState, and targetStateChanged().

◆ shape()

QPainterPath Transition::shape ( ) const

Definition at line 105 of file transition.cpp.

◆ shapeChanged

void KDSME::Transition::shapeChanged ( const QPainterPath & path)
signal

References shapeChanged().

Referenced by setShape(), and shapeChanged().

◆ sourceState()

State * Transition::sourceState ( ) const

Definition at line 57 of file transition.cpp.

References KDSME::Element::parent.

◆ sourceStateChanged

void KDSME::Transition::sourceStateChanged ( KDSME::State * sourceState)
signal

◆ targetState()

State * Transition::targetState ( ) const

Definition at line 72 of file transition.cpp.

◆ targetStateChanged

void KDSME::Transition::targetStateChanged ( KDSME::State * targetState)
signal

◆ type()

Element::Type Transition::type ( ) const
overridevirtual

Reimplemented from KDSME::Element.

Definition at line 86 of file transition.cpp.

References KDSME::Element::TransitionType.

Property Documentation

◆ guard

QString KDSME::Transition::guard
readwrite

Definition at line 28 of file transition.h.

Referenced by guardChanged(), and setGuard().

◆ labelBoundingRect

QRectF KDSME::Transition::labelBoundingRect
readwrite

Definition at line 31 of file transition.h.

◆ shape

QPainterPath KDSME::Transition::shape
readwrite

The exact shape of this transition.

Definition at line 30 of file transition.h.

Referenced by setShape().

◆ sourceState

◆ targetState

KDSME::State * KDSME::Transition::targetState
readwrite

The documentation for this class was generated from the following files:

© Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
KDStateMachineEditor
Create Qt State Machine metacode using a graphical user interface
https://github.com/KDAB/KDStateMachineEditor
Generated on for KDStateMachineEditor API Documentation by doxygen 1.15.0