KDStateMachineEditor API Documentation 2.1
|
#include <state.h>
Public Types | |
enum | ChildMode { ExclusiveStates , ParallelStates } |
![]() | |
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) |
![]() | |
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 |
![]() | |
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 |
![]() | |
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 Q_INVOKABLE KDSME::Element::Type | stringToType (const char *type) |
static Q_INVOKABLE const char * | typeToString (KDSME::Element::Type type) |
SignalTransition * State::addSignalTransition | ( | State * | target, |
const QString & | silgnal = QString() |
||
) |
Definition at line 108 of file state.cpp.
References addTransition().
TimeoutTransition * State::addTimeoutTransition | ( | State * | target, |
int | timeout | ||
) |
Definition at line 121 of file state.cpp.
References addTransition().
void State::addTransition | ( | Transition * | transition | ) |
Definition at line 103 of file state.cpp.
References KDSME::Element::setParent().
Referenced by addSignalTransition(), and addTimeoutTransition().
State::ChildMode State::childMode | ( | ) | const |
|
signal |
Referenced by setChildMode().
QList< State * > State::childStates | ( | ) | const |
Definition at line 93 of file state.cpp.
References KDSME::ObjectHelper::copy_if_type().
Referenced by event(), KDSME::LayoutImportExport::exportLayout(), KDSME::ElementUtil::findInitialState(), KDSME::ElementUtil::findState(), KDSME::LayoutImportExport::importLayout(), KDSME::GraphvizLayerLayouter::layout(), KDSME::RegionLayouter::layoutRegion(), KDSME::LayoutImportExport::matches(), KDSME::LayoutUtils::moveInner(), and KDSME::ElementUtil::setInitialState().
|
overrideprotected |
Definition at line 202 of file state.cpp.
References childStates(), event(), and isCompositeChanged().
Referenced by event().
|
signal |
Referenced by setExpanded().
State * State::initialState | ( | ) | const |
Definition at line 83 of file state.cpp.
References KDSME::ElementUtil::findInitialState().
Referenced by setInitialState().
bool State::isComposite | ( | ) | const |
|
signal |
Referenced by event().
bool State::isExpanded | ( | ) | const |
Definition at line 181 of file state.cpp.
Referenced by KDSME::StateMachineScene::isItemExpanded().
StateMachine * State::machine | ( | ) | const |
Definition at line 195 of file state.cpp.
References KDSME::ElementUtil::findStateMachine().
Referenced by GraphvizLayouterBackend::layout().
QString State::onEntry | ( | ) | const |
|
signal |
Referenced by setOnEntry().
QString State::onExit | ( | ) | const |
|
signal |
Referenced by setOnExit().
State * State::parentState | ( | ) | const |
Definition at line 78 of file state.cpp.
References KDSME::Element::parent.
void State::setChildMode | ( | ChildMode | childMode | ) |
Definition at line 167 of file state.cpp.
References childMode, and childModeChanged().
void State::setExpanded | ( | bool | expanded | ) |
Definition at line 186 of file state.cpp.
References expanded, and expandedChanged().
Referenced by KDSME::StateMachineScene::collapseItem(), and KDSME::StateMachineScene::expandItem().
void State::setInitialState | ( | State * | initialState | ) |
Definition at line 88 of file state.cpp.
References initialState(), and KDSME::ElementUtil::setInitialState().
void State::setOnEntry | ( | const QString & | onEntry | ) |
Definition at line 144 of file state.cpp.
References onEntry, and onEntryChanged().
void State::setOnExit | ( | const QString & | onExit | ) |
Definition at line 153 of file state.cpp.
References onExit, and onExitChanged().
QList< Transition * > State::transitions | ( | ) | const |
Definition at line 98 of file state.cpp.
References KDSME::ObjectHelper::copy_if_type().
Referenced by KDSME::LayoutImportExport::exportLayout(), KDSME::LayoutImportExport::importLayout(), and KDSME::LayoutImportExport::matches().
|
overridevirtual |
Reimplemented from KDSME::Element.
Reimplemented in KDSME::StateMachine.
Definition at line 73 of file state.cpp.
References KDSME::Element::StateType.
|
readwrite |
Definition at line 33 of file state.h.
Referenced by setChildMode().
|
readwrite |
Definition at line 35 of file state.h.
Referenced by setExpanded().
|
readwrite |
Definition at line 31 of file state.h.
Referenced by setOnEntry().
|
readwrite |
Definition at line 32 of file state.h.
Referenced by setOnExit().