State Class Reference

#include <ArmarXGui/gui-plugins/StatechartViewerPlugin/model/State.h>

+ Inheritance diagram for State:

Public Slots

void addDetachedTransition (const QString &eventName, StateInstancePtr sourceState)
 
StateInstancePtr addDynamicRemoteSubstate (StatePtr state, QString instanceName, const QPointF &pos)
 
StateInstancePtr addEndSubstate (const QString &endstateName, const QString &eventName, const QPointF &pos=QPointF())
 
StateInstancePtr addRemoteSubstate (StatePtr newRemoteSubstate, const QString &remoteStateOffererName, QString instanceName="", const QPointF &pos=QPointF())
 
StateInstancePtr addSubstate (StateInstancePtr stateInstance)
 
StateInstancePtr addSubstate (StatePtr newSubstate, QString instanceName="", const QPointF &pos=QPointF())
 
void addSupportPoint (TransitionCPtr transition, QPointF supportPoint)
 
void addTransition (TransitionPtr newTransition)
 
void bendTransition (TransitionCPtr transition, int u, int v)
 
void clearActiveSubstates ()
 
void detachTransitionDestination (TransitionCPtr transition)
 
void detachTransitionDestination (TransitionCPtr transition, QPointF floatingEndPoint)
 
bool removeSubstate (QString stateInstanceName)
 
bool removeSubstate (StateInstancePtr substate)
 
bool removeTransition (TransitionPtr transition)
 
bool renameSubstate (QString oldName, QString newName)
 
StateInstancePtr replaceSubstate (QString stateInstanceName, StateInstancePtr newInstance)
 
void replaceSubstates (StateInstanceMap newSubstateList)
 
void replaceTransitions (TransitionList newTransitionList)
 
void setActiveSubstate (StateInstancePtr newActiveState)
 
void setDescription (const QString &newDescription)
 
void setEditable (bool editable)
 
void setInputParameters (const StateParameterMap &newInputParameters)
 
void setLocalParameters (const StateParameterMap &newLocalParameters)
 
void setOutgoingEvents (const EventList &outgoingEvents)
 
void setOutputParameters (const StateParameterMap &newOutputParameters)
 
void setSize (const QSizeF &newSize)
 
void setStartState (StateInstancePtr newStartState)
 
void setStartStateInputMapping (const ParameterMappingList &newStartStateInputMapping)
 
void setStateName (const QString &newName)
 
void setSubstateAreaSize (const QSizeF &newSize)
 
void setTransitionActivated (TransitionCPtr transition)
 
void setTransitionMapping (TransitionCPtr transition, const ParameterMappingList &mappingToNextStateInput, const ParameterMappingList &mappingToParentLocal, const ParameterMappingList &mappingToParentOutput)
 
void setTransitionSupportPoints (statechartmodel::TransitionCPtr transition, const SupportPoints &points, const QPointPtr &labelCenterPosition=QPointPtr(), const FloatPtr &labelFontPointSize=FloatPtr())
 
void setTransitionUserCodeEnabled (TransitionCPtr transition, bool enabled=true)
 
void updateTransition (const QString &eventName, statechartmodel::StatePtr stateClass, statechartmodel::SignalType signalType)
 
void updateTransitionDestination (TransitionCPtr transition, StateInstancePtr newDest, QPointList newSupportPoints=QPointList())
 

Signals

void dirtyStatusChanged (bool newStatus)
 
void outgoingTransitionChanged (const QString &eventName, statechartmodel::StatePtr stateClass, statechartmodel::SignalType signalType)
 
void resized ()
 
void stateChanged (statechartmodel::SignalType signalType)
 
void stateDeleted ()
 stateDeleted Signals that the destructor of this state was called. More...
 
void substateChanged (statechartmodel::StateInstancePtr substate, statechartmodel::SignalType signalType)
 
void transitionChanged (statechartmodel::TransitionCPtr transition, statechartmodel::SignalType signalType)
 

Public Member Functions

void addReferences (const QMap< QString, armarx::statechartmodel::StatePtr > &uuidStateMap)
 Annotates the State object created by parseXml() before with references to other states. More...
 
void connectToSubclasses ()
 
TransitionPtr findTransition (const QString &eventName, const QString &transitionSourceName, const QString &transitionDestinationName) const
 
TransitionPtr findTransition (TransitionCPtr t) const
 
const StateInstancePtrgetActiveSubstate () const
 
EventList getAllEvents () const
 
const QString & getDescription () const
 
bool getDirty () const
 
const StateParameterMap getInputAndLocalParameters () const
 
const StateParameterMapgetInputParameters () const
 
const StateParameterMapgetLocalParameters () const
 
const EventListgetOutgoingEvents () const
 
const StateParameterMapgetOutputParameters () const
 
const QList< QString > getProxies () const
 
QSizeF getSize () const
 
StateInstancePtr getStartState () const
 
ParameterMappingList getStartStateInputMapping () const
 
TransitionCPtr getStartTransition () const
 
QString getStateName () const
 
const StateInstanceMapgetSubstates () const
 
CTransitionList getTransitions (bool withStartTransition=false) const
 
virtual eStateType getType () const
 
QString getUUID () const
 
bool hasDescendant (statechartmodel::StatePtr state) const
 
bool isEditable () const
 
 State (const QString &uuid="")
 
 ~State () override
 
- Public Member Functions inherited from Logging
SpamFilterDataPtr deactivateSpam (float deactivationDurationSec=10.0f, const std::string &identifier="", bool deactivate=true) const
 disables the logging for the current line for the given amount of seconds. More...
 
MessageTypeT getEffectiveLoggingLevel () const
 
 Logging ()
 
void setLocalMinimumLoggingLevel (MessageTypeT level)
 With setLocalMinimumLoggingLevel the minimum verbosity-level of log-messages can be set. More...
 
void setTag (const LogTag &tag)
 
void setTag (const std::string &tagName)
 
virtual ~Logging ()
 

Static Public Member Functions

static QString StateTypeToString (eStateType type)
 

Public Attributes

const QRectF margin
 

Protected Member Functions

bool checkSubstate (StatePtr newState) const
 
bool checkTransition (TransitionPtr transition) const
 
QList< StateInstancePtrgetInstances (statechartmodel::StatePtr stateClass) const
 
TransitionPtr getStartTransition ()
 
TransitionPtr getTransition (const QString &eventName, StateInstancePtr sourceInstance) const
 
- Protected Member Functions inherited from Logging
bool checkLogLevel (MessageTypeT level) const
 
const LogSenderPtrgetLogSender () const
 Retrieve log sender. More...
 
LogSenderPtr loghelper (const char *file, int line, const char *function) const
 

Protected Attributes

StateInstancePtr activeSubstate
 
QString cppClassName
 
QString description
 
bool dirty
 
bool editable
 
StateParameterMap inputParameters
 
StateParameterMap localParameters
 
EventList outgoingTransitions
 
StateParameterMap outputParameters
 
QList< QString > proxies
 
QSizeF size
 
QString stateName
 
StateInstanceMap substates
 
TransitionList transitions
 
QString UUID
 
- Protected Attributes inherited from Logging
MessageTypeT minimumLoggingLevel
 
SpamFilterDataPtr spamFilter
 
LogTag tag
 

Friends

class StateInstance
 

Detailed Description

Definition at line 54 of file State.h.

Constructor & Destructor Documentation

◆ State()

State ( const QString &  uuid = "")
explicit

Definition at line 38 of file State.cpp.

◆ ~State()

~State ( )
override

Definition at line 64 of file State.cpp.

Member Function Documentation

◆ addDetachedTransition

void addDetachedTransition ( const QString &  eventName,
StateInstancePtr  sourceState 
)
slot

Definition at line 835 of file State.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addDynamicRemoteSubstate

StateInstancePtr addDynamicRemoteSubstate ( StatePtr  state,
QString  instanceName,
const QPointF &  pos 
)
slot

Definition at line 363 of file State.cpp.

+ Here is the call graph for this function:

◆ addEndSubstate

StateInstancePtr addEndSubstate ( const QString &  endstateName,
const QString &  eventName,
const QPointF &  pos = QPointF() 
)
slot

Definition at line 408 of file State.cpp.

+ Here is the call graph for this function:

◆ addReferences()

void addReferences ( const QMap< QString, armarx::statechartmodel::StatePtr > &  uuidStateMap)

Annotates the State object created by parseXml() before with references to other states.

Definition at line 70 of file State.cpp.

+ Here is the call graph for this function:

◆ addRemoteSubstate

StateInstancePtr addRemoteSubstate ( StatePtr  newRemoteSubstate,
const QString &  remoteStateOffererName,
QString  instanceName = "",
const QPointF &  pos = QPointF() 
)
slot

Definition at line 319 of file State.cpp.

+ Here is the call graph for this function:

◆ addSubstate [1/2]

StateInstancePtr addSubstate ( StateInstancePtr  stateInstance)
slot

Definition at line 427 of file State.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addSubstate [2/2]

StateInstancePtr addSubstate ( StatePtr  newSubstate,
QString  instanceName = "",
const QPointF &  pos = QPointF() 
)
slot

Definition at line 275 of file State.cpp.

+ Here is the call graph for this function:

◆ addSupportPoint

void addSupportPoint ( TransitionCPtr  transition,
QPointF  supportPoint 
)
slot

Definition at line 950 of file State.cpp.

◆ addTransition

void addTransition ( TransitionPtr  newTransition)
slot

Definition at line 742 of file State.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bendTransition

void bendTransition ( TransitionCPtr  transition,
int  u,
int  v 
)
slot

Definition at line 1381 of file State.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkSubstate()

bool checkSubstate ( StatePtr  newState) const
protected

Definition at line 1218 of file State.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkTransition()

bool checkTransition ( TransitionPtr  transition) const
protected

Definition at line 1184 of file State.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clearActiveSubstates

void clearActiveSubstates ( )
slot

Definition at line 679 of file State.cpp.

◆ connectToSubclasses()

void connectToSubclasses ( )

Definition at line 206 of file State.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ detachTransitionDestination [1/2]

void detachTransitionDestination ( TransitionCPtr  transition)
slot

Definition at line 921 of file State.cpp.

+ Here is the call graph for this function:

◆ detachTransitionDestination [2/2]

void detachTransitionDestination ( TransitionCPtr  transition,
QPointF  floatingEndPoint 
)
slot

Definition at line 899 of file State.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dirtyStatusChanged

void dirtyStatusChanged ( bool  newStatus)
signal

◆ findTransition() [1/2]

TransitionPtr findTransition ( const QString &  eventName,
const QString &  transitionSourceName,
const QString &  transitionDestinationName 
) const

Definition at line 1244 of file State.cpp.

◆ findTransition() [2/2]

TransitionPtr findTransition ( TransitionCPtr  t) const

Definition at line 1230 of file State.cpp.

+ Here is the caller graph for this function:

◆ getActiveSubstate()

const StateInstancePtr& getActiveSubstate ( ) const
inline

Definition at line 121 of file State.h.

◆ getAllEvents()

EventList getAllEvents ( ) const

Definition at line 150 of file State.cpp.

+ Here is the call graph for this function:

◆ getDescription()

const QString& getDescription ( ) const
inline

Definition at line 80 of file State.h.

◆ getDirty()

bool getDirty ( ) const
inline

Definition at line 150 of file State.h.

◆ getInputAndLocalParameters()

const StateParameterMap getInputAndLocalParameters ( ) const

Definition at line 95 of file State.cpp.

◆ getInputParameters()

const StateParameterMap& getInputParameters ( ) const
inline

Definition at line 93 of file State.h.

◆ getInstances()

QList< StateInstancePtr > getInstances ( statechartmodel::StatePtr  stateClass) const
protected

Definition at line 1137 of file State.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLocalParameters()

const StateParameterMap& getLocalParameters ( ) const
inline

Definition at line 99 of file State.h.

◆ getOutgoingEvents()

const EventList& getOutgoingEvents ( ) const
inline

Definition at line 130 of file State.h.

+ Here is the caller graph for this function:

◆ getOutputParameters()

const StateParameterMap& getOutputParameters ( ) const
inline

Definition at line 107 of file State.h.

◆ getProxies()

const QList<QString> getProxies ( ) const
inline

Definition at line 86 of file State.h.

◆ getSize()

QSizeF getSize ( ) const
inline

Definition at line 138 of file State.h.

◆ getStartState()

StateInstancePtr getStartState ( ) const

Definition at line 136 of file State.cpp.

+ Here is the call graph for this function:

◆ getStartStateInputMapping()

ParameterMappingList getStartStateInputMapping ( ) const

Definition at line 143 of file State.cpp.

+ Here is the call graph for this function:

◆ getStartTransition() [1/2]

TransitionPtr getStartTransition ( )
protected

◆ getStartTransition() [2/2]

TransitionCPtr getStartTransition ( ) const

Definition at line 178 of file State.cpp.

+ Here is the caller graph for this function:

◆ getStateName()

QString getStateName ( ) const
inline

Definition at line 68 of file State.h.

+ Here is the caller graph for this function:

◆ getSubstates()

const StateInstanceMap& getSubstates ( ) const
inline

Definition at line 115 of file State.h.

+ Here is the caller graph for this function:

◆ getTransition()

TransitionPtr getTransition ( const QString &  eventName,
StateInstancePtr  sourceInstance 
) const
protected

Definition at line 1153 of file State.cpp.

+ Here is the caller graph for this function:

◆ getTransitions()

CTransitionList getTransitions ( bool  withStartTransition = false) const

Definition at line 108 of file State.cpp.

◆ getType()

virtual eStateType getType ( ) const
inlinevirtual

Reimplemented in DynamicRemoteStateClass.

Definition at line 144 of file State.h.

◆ getUUID()

QString getUUID ( ) const
inline

Definition at line 74 of file State.h.

+ Here is the caller graph for this function:

◆ hasDescendant()

bool hasDescendant ( statechartmodel::StatePtr  state) const

Definition at line 1261 of file State.cpp.

◆ isEditable()

bool isEditable ( ) const

Definition at line 224 of file State.cpp.

◆ outgoingTransitionChanged

void outgoingTransitionChanged ( const QString &  eventName,
statechartmodel::StatePtr  stateClass,
statechartmodel::SignalType  signalType 
)
signal
+ Here is the caller graph for this function:

◆ removeSubstate [1/2]

bool removeSubstate ( QString  stateInstanceName)
slot

Definition at line 559 of file State.cpp.

+ Here is the call graph for this function:

◆ removeSubstate [2/2]

bool removeSubstate ( StateInstancePtr  substate)
slot

Definition at line 535 of file State.cpp.

+ Here is the caller graph for this function:

◆ removeTransition

bool removeTransition ( TransitionPtr  transition)
slot

Definition at line 1166 of file State.cpp.

+ Here is the caller graph for this function:

◆ renameSubstate

bool renameSubstate ( QString  oldName,
QString  newName 
)
slot

Definition at line 499 of file State.cpp.

◆ replaceSubstate

StateInstancePtr replaceSubstate ( QString  stateInstanceName,
StateInstancePtr  newInstance 
)
slot

Definition at line 607 of file State.cpp.

+ Here is the call graph for this function:

◆ replaceSubstates

void replaceSubstates ( StateInstanceMap  newSubstateList)
slot

Definition at line 627 of file State.cpp.

+ Here is the call graph for this function:

◆ replaceTransitions

void replaceTransitions ( TransitionList  newTransitionList)
slot

Definition at line 931 of file State.cpp.

+ Here is the call graph for this function:

◆ resized

void resized ( )
signal
+ Here is the caller graph for this function:

◆ setActiveSubstate

void setActiveSubstate ( StateInstancePtr  newActiveState)
slot

Definition at line 655 of file State.cpp.

◆ setDescription

void setDescription ( const QString &  newDescription)
slot

Definition at line 230 of file State.cpp.

◆ setEditable

void setEditable ( bool  editable)
slot

Definition at line 269 of file State.cpp.

◆ setInputParameters

void setInputParameters ( const StateParameterMap newInputParameters)
slot

Definition at line 696 of file State.cpp.

+ Here is the caller graph for this function:

◆ setLocalParameters

void setLocalParameters ( const StateParameterMap newLocalParameters)
slot

Definition at line 715 of file State.cpp.

◆ setOutgoingEvents

void setOutgoingEvents ( const EventList outgoingEvents)
slot

Definition at line 988 of file State.cpp.

◆ setOutputParameters

void setOutputParameters ( const StateParameterMap newOutputParameters)
slot

Definition at line 734 of file State.cpp.

◆ setSize

void setSize ( const QSizeF &  newSize)
slot

Definition at line 244 of file State.cpp.

+ Here is the caller graph for this function:

◆ setStartState

void setStartState ( StateInstancePtr  newStartState)
slot

Definition at line 452 of file State.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setStartStateInputMapping

void setStartStateInputMapping ( const ParameterMappingList newStartStateInputMapping)
slot

Definition at line 477 of file State.cpp.

+ Here is the call graph for this function:

◆ setStateName

void setStateName ( const QString &  newName)
slot

Definition at line 122 of file State.cpp.

+ Here is the caller graph for this function:

◆ setSubstateAreaSize

void setSubstateAreaSize ( const QSizeF &  newSize)
slot

Definition at line 261 of file State.cpp.

+ Here is the call graph for this function:

◆ setTransitionActivated

void setTransitionActivated ( TransitionCPtr  transition)
slot

Definition at line 813 of file State.cpp.

◆ setTransitionMapping

void setTransitionMapping ( TransitionCPtr  transition,
const ParameterMappingList mappingToNextStateInput,
const ParameterMappingList mappingToParentLocal,
const ParameterMappingList mappingToParentOutput 
)
slot

Definition at line 754 of file State.cpp.

+ Here is the call graph for this function:

◆ setTransitionSupportPoints

void setTransitionSupportPoints ( statechartmodel::TransitionCPtr  transition,
const SupportPoints points,
const QPointPtr labelCenterPosition = QPointPtr(),
const FloatPtr labelFontPointSize = FloatPtr() 
)
slot

Definition at line 775 of file State.cpp.

+ Here is the call graph for this function:

◆ setTransitionUserCodeEnabled

void setTransitionUserCodeEnabled ( TransitionCPtr  transition,
bool  enabled = true 
)
slot

Definition at line 819 of file State.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stateChanged

void stateChanged ( statechartmodel::SignalType  signalType)
signal
+ Here is the caller graph for this function:

◆ stateDeleted

void stateDeleted ( )
signal

stateDeleted Signals that the destructor of this state was called.

+ Here is the caller graph for this function:

◆ StateTypeToString()

QString StateTypeToString ( eStateType  type)
static

Definition at line 1294 of file State.cpp.

+ Here is the caller graph for this function:

◆ substateChanged

void substateChanged ( statechartmodel::StateInstancePtr  substate,
statechartmodel::SignalType  signalType 
)
signal
+ Here is the caller graph for this function:

◆ transitionChanged

void transitionChanged ( statechartmodel::TransitionCPtr  transition,
statechartmodel::SignalType  signalType 
)
signal
+ Here is the caller graph for this function:

◆ updateTransition

void updateTransition ( const QString &  eventName,
statechartmodel::StatePtr  stateClass,
statechartmodel::SignalType  signalType 
)
slot

Definition at line 1057 of file State.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateTransitionDestination

void updateTransitionDestination ( TransitionCPtr  transition,
StateInstancePtr  newDest,
QPointList  newSupportPoints = QPointList() 
)
slot

Definition at line 854 of file State.cpp.

+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ StateInstance

friend class StateInstance
friend

Definition at line 330 of file State.h.

Member Data Documentation

◆ activeSubstate

StateInstancePtr activeSubstate
protected

Definition at line 312 of file State.h.

◆ cppClassName

QString cppClassName
protected

Definition at line 317 of file State.h.

◆ description

QString description
protected

Definition at line 303 of file State.h.

◆ dirty

bool dirty
protected

Definition at line 320 of file State.h.

◆ editable

bool editable
protected

Definition at line 321 of file State.h.

◆ inputParameters

StateParameterMap inputParameters
protected

Definition at line 307 of file State.h.

◆ localParameters

StateParameterMap localParameters
protected

Definition at line 308 of file State.h.

◆ margin

const QRectF margin

Definition at line 58 of file State.h.

◆ outgoingTransitions

EventList outgoingTransitions
protected

Definition at line 301 of file State.h.

◆ outputParameters

StateParameterMap outputParameters
protected

Definition at line 309 of file State.h.

◆ proxies

QList<QString> proxies
protected

Definition at line 305 of file State.h.

◆ size

QSizeF size
protected

Definition at line 319 of file State.h.

◆ stateName

QString stateName
protected

Definition at line 302 of file State.h.

◆ substates

StateInstanceMap substates
protected

Definition at line 311 of file State.h.

◆ transitions

TransitionList transitions
protected

Definition at line 314 of file State.h.

◆ UUID

QString UUID
protected

Definition at line 316 of file State.h.


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