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

#include <state.h>

Inheritance diagram for KDSME::State:
Collaboration diagram for KDSME::State:

Public Types

enum  ChildMode { ExclusiveStates , ParallelStates }
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
}

Signals

void childModeChanged (KDSME::State::ChildMode childMode)
void expandedChanged (bool expanded)
void isCompositeChanged (bool isComposite)
void onEntryChanged (const QString &onEntry)
void onExitChanged (const QString &onExit)
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

 State (State *parent=nullptr)
 ~State ()
SignalTransition * addSignalTransition (State *target, const QString &silgnal=QString())
TimeoutTransition * addTimeoutTransition (State *target, int timeout)
void addTransition (Transition *transition)
ChildMode childMode () const
QList< State * > childStates () const
State * initialState () const
bool isComposite () const
bool isExpanded () const
Q_INVOKABLE KDSME::StateMachine * machine () const
QString onEntry () const
QString onExit () const
Q_INVOKABLE KDSME::State * parentState () const
void setChildMode (ChildMode childMode)
void setExpanded (bool expanded)
void setInitialState (State *initialState)
void setOnEntry (const QString &onEntry)
void setOnExit (const QString &onExit)
QList< Transition * > transitions () 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

Protected Member Functions

bool event (QEvent *event) override

Properties

ChildMode childMode
bool expanded
bool isComposite
QString onEntry
QString onExit
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

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

Examples
export/main.cpp, and simplestatemachine/main.cpp.

Definition at line 28 of file state.h.

Member Enumeration Documentation

◆ ChildMode

Enumerator
ExclusiveStates 
ParallelStates 

Definition at line 38 of file state.h.

Constructor & Destructor Documentation

◆ State()

◆ ~State()

State::~State ( )

Definition at line 69 of file state.cpp.

Member Function Documentation

◆ addSignalTransition()

SignalTransition * State::addSignalTransition ( State * target,
const QString & silgnal = QString() )
Examples
simplestatemachine/main.cpp.

Definition at line 108 of file state.cpp.

References State(), and addTransition().

◆ addTimeoutTransition()

TimeoutTransition * State::addTimeoutTransition ( State * target,
int timeout )

Definition at line 121 of file state.cpp.

References State(), and addTransition().

◆ addTransition()

void State::addTransition ( Transition * transition)

Definition at line 103 of file state.cpp.

References KDSME::Element::setParent().

Referenced by addSignalTransition(), and addTimeoutTransition().

◆ childMode()

State::ChildMode State::childMode ( ) const

Definition at line 162 of file state.cpp.

◆ childModeChanged

void KDSME::State::childModeChanged ( KDSME::State::ChildMode childMode)
signal

References childMode.

Referenced by setChildMode().

◆ childStates()

◆ event()

bool State::event ( QEvent * event)
overrideprotected

Definition at line 202 of file state.cpp.

References childStates(), event(), and isCompositeChanged().

Referenced by event().

◆ expandedChanged

void KDSME::State::expandedChanged ( bool expanded)
signal

References expanded.

Referenced by setExpanded().

◆ initialState()

State * State::initialState ( ) const

Definition at line 83 of file state.cpp.

References State(), and KDSME::ElementUtil::findInitialState().

Referenced by setInitialState().

◆ isComposite()

bool State::isComposite ( ) const
Returns
True in case this state contains other states, otherwise false

Definition at line 176 of file state.cpp.

◆ isCompositeChanged

void KDSME::State::isCompositeChanged ( bool isComposite)
signal

References isComposite.

Referenced by event().

◆ isExpanded()

bool State::isExpanded ( ) const

Definition at line 181 of file state.cpp.

Referenced by KDSME::StateMachineScene::isItemExpanded().

◆ machine()

StateMachine * State::machine ( ) const

Definition at line 195 of file state.cpp.

References KDSME::ElementUtil::findStateMachine().

Referenced by GraphvizLayouterBackend::layout().

◆ onEntry()

QString State::onEntry ( ) const

Executable content to be executed when the state is entered

Definition at line 134 of file state.cpp.

◆ onEntryChanged

void KDSME::State::onEntryChanged ( const QString & onEntry)
signal

References onEntry.

Referenced by setOnEntry().

◆ onExit()

QString State::onExit ( ) const

Executable content to be executed when the state is exited.

Definition at line 139 of file state.cpp.

◆ onExitChanged

void KDSME::State::onExitChanged ( const QString & onExit)
signal

References onExit.

Referenced by setOnExit().

◆ parentState()

State * State::parentState ( ) const

Definition at line 78 of file state.cpp.

References State(), and KDSME::Element::parent.

◆ setChildMode()

void State::setChildMode ( ChildMode childMode)

Definition at line 167 of file state.cpp.

References childMode, and childModeChanged().

◆ setExpanded()

void State::setExpanded ( bool expanded)

◆ setInitialState()

void State::setInitialState ( State * initialState)

Definition at line 88 of file state.cpp.

References State(), initialState(), and KDSME::ElementUtil::setInitialState().

◆ setOnEntry()

void State::setOnEntry ( const QString & onEntry)

Definition at line 144 of file state.cpp.

References onEntry, and onEntryChanged().

◆ setOnExit()

void State::setOnExit ( const QString & onExit)

Definition at line 153 of file state.cpp.

References onExit, and onExitChanged().

◆ transitions()

◆ type()

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

Reimplemented from KDSME::Element.

Reimplemented in KDSME::StateMachine.

Definition at line 73 of file state.cpp.

References KDSME::Element::StateType.

Property Documentation

◆ childMode

ChildMode KDSME::State::childMode
readwrite

Definition at line 33 of file state.h.

Referenced by childModeChanged(), and setChildMode().

◆ expanded

bool KDSME::State::expanded
readwrite

Definition at line 35 of file state.h.

Referenced by expandedChanged(), and setExpanded().

◆ isComposite

bool KDSME::State::isComposite
read

Definition at line 34 of file state.h.

Referenced by isCompositeChanged().

◆ onEntry

QString KDSME::State::onEntry
readwrite

Definition at line 31 of file state.h.

Referenced by onEntryChanged(), and setOnEntry().

◆ onExit

QString KDSME::State::onExit
readwrite

Definition at line 32 of file state.h.

Referenced by onExitChanged(), and setOnExit().


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