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 52 of file State.h.

Constructor & Destructor Documentation

◆ State()

State ( const QString &  uuid = "")
explicit

Definition at line 36 of file State.cpp.

◆ ~State()

~State ( )
override

Definition at line 50 of file State.cpp.

Member Function Documentation

◆ addDetachedTransition

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

Definition at line 753 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 313 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 353 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 55 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 279 of file State.cpp.

+ Here is the call graph for this function:

◆ addSubstate [1/2]

StateInstancePtr addSubstate ( StateInstancePtr  stateInstance)
slot

Definition at line 371 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 242 of file State.cpp.

+ Here is the call graph for this function:

◆ addSupportPoint

void addSupportPoint ( TransitionCPtr  transition,
QPointF  supportPoint 
)
slot

Definition at line 860 of file State.cpp.

◆ addTransition

void addTransition ( TransitionPtr  newTransition)
slot

Definition at line 667 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 1268 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 1117 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 1086 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 607 of file State.cpp.

◆ connectToSubclasses()

void connectToSubclasses ( )

Definition at line 183 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 834 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 813 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 1143 of file State.cpp.

◆ findTransition() [2/2]

TransitionPtr findTransition ( TransitionCPtr  t) const

Definition at line 1130 of file State.cpp.

+ Here is the caller graph for this function:

◆ getActiveSubstate()

const StateInstancePtr& getActiveSubstate ( ) const
inline

Definition at line 103 of file State.h.

◆ getAllEvents()

EventList getAllEvents ( ) const

Definition at line 128 of file State.cpp.

+ Here is the call graph for this function:

◆ getDescription()

const QString& getDescription ( ) const
inline

Definition at line 76 of file State.h.

◆ getDirty()

bool getDirty ( ) const
inline

Definition at line 123 of file State.h.

◆ getInputAndLocalParameters()

const StateParameterMap getInputAndLocalParameters ( ) const

Definition at line 78 of file State.cpp.

◆ getInputParameters()

const StateParameterMap& getInputParameters ( ) const
inline

Definition at line 85 of file State.h.

◆ getInstances()

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

Definition at line 1040 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 89 of file State.h.

◆ getOutgoingEvents()

const EventList& getOutgoingEvents ( ) const
inline

Definition at line 109 of file State.h.

+ Here is the caller graph for this function:

◆ getOutputParameters()

const StateParameterMap& getOutputParameters ( ) const
inline

Definition at line 94 of file State.h.

◆ getProxies()

const QList<QString> getProxies ( ) const
inline

Definition at line 80 of file State.h.

◆ getSize()

QSizeF getSize ( ) const
inline

Definition at line 115 of file State.h.

◆ getStartState()

StateInstancePtr getStartState ( ) const

Definition at line 116 of file State.cpp.

+ Here is the call graph for this function:

◆ getStartStateInputMapping()

ParameterMappingList getStartStateInputMapping ( ) const

Definition at line 122 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 155 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 99 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 1055 of file State.cpp.

+ Here is the caller graph for this function:

◆ getTransitions()

CTransitionList getTransitions ( bool  withStartTransition = false) const

Definition at line 90 of file State.cpp.

◆ getType()

virtual eStateType getType ( ) const
inlinevirtual

Reimplemented in DynamicRemoteStateClass.

Definition at line 119 of file State.h.

◆ getUUID()

QString getUUID ( ) const
inline

Definition at line 72 of file State.h.

+ Here is the caller graph for this function:

◆ hasDescendant()

bool hasDescendant ( statechartmodel::StatePtr  state) const

Definition at line 1155 of file State.cpp.

◆ isEditable()

bool isEditable ( ) const

Definition at line 195 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 497 of file State.cpp.

+ Here is the call graph for this function:

◆ removeSubstate [2/2]

bool removeSubstate ( StateInstancePtr  substate)
slot

Definition at line 475 of file State.cpp.

+ Here is the caller graph for this function:

◆ removeTransition

bool removeTransition ( TransitionPtr  transition)
slot

Definition at line 1069 of file State.cpp.

+ Here is the caller graph for this function:

◆ renameSubstate

bool renameSubstate ( QString  oldName,
QString  newName 
)
slot

Definition at line 442 of file State.cpp.

◆ replaceSubstate

StateInstancePtr replaceSubstate ( QString  stateInstanceName,
StateInstancePtr  newInstance 
)
slot

Definition at line 544 of file State.cpp.

+ Here is the call graph for this function:

◆ replaceSubstates

void replaceSubstates ( StateInstanceMap  newSubstateList)
slot

Definition at line 563 of file State.cpp.

+ Here is the call graph for this function:

◆ replaceTransitions

void replaceTransitions ( TransitionList  newTransitionList)
slot

Definition at line 842 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 584 of file State.cpp.

◆ setDescription

void setDescription ( const QString &  newDescription)
slot

Definition at line 200 of file State.cpp.

◆ setEditable

void setEditable ( bool  editable)
slot

Definition at line 237 of file State.cpp.

◆ setInputParameters

void setInputParameters ( const StateParameterMap newInputParameters)
slot

Definition at line 625 of file State.cpp.

+ Here is the caller graph for this function:

◆ setLocalParameters

void setLocalParameters ( const StateParameterMap newLocalParameters)
slot

Definition at line 642 of file State.cpp.

◆ setOutgoingEvents

void setOutgoingEvents ( const EventList outgoingEvents)
slot

Definition at line 897 of file State.cpp.

◆ setOutputParameters

void setOutputParameters ( const StateParameterMap newOutputParameters)
slot

Definition at line 659 of file State.cpp.

◆ setSize

void setSize ( const QSizeF &  newSize)
slot

Definition at line 213 of file State.cpp.

+ Here is the caller graph for this function:

◆ setStartState

void setStartState ( StateInstancePtr  newStartState)
slot

Definition at line 397 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 421 of file State.cpp.

+ Here is the call graph for this function:

◆ setStateName

void setStateName ( const QString &  newName)
slot

Definition at line 103 of file State.cpp.

+ Here is the caller graph for this function:

◆ setSubstateAreaSize

void setSubstateAreaSize ( const QSizeF &  newSize)
slot

Definition at line 230 of file State.cpp.

+ Here is the call graph for this function:

◆ setTransitionActivated

void setTransitionActivated ( TransitionCPtr  transition)
slot

Definition at line 733 of file State.cpp.

◆ setTransitionMapping

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

Definition at line 678 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 698 of file State.cpp.

+ Here is the call graph for this function:

◆ setTransitionUserCodeEnabled

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

Definition at line 738 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 1188 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 965 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 770 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 272 of file State.h.

Member Data Documentation

◆ activeSubstate

StateInstancePtr activeSubstate
protected

Definition at line 256 of file State.h.

◆ cppClassName

QString cppClassName
protected

Definition at line 261 of file State.h.

◆ description

QString description
protected

Definition at line 247 of file State.h.

◆ dirty

bool dirty
protected

Definition at line 264 of file State.h.

◆ editable

bool editable
protected

Definition at line 265 of file State.h.

◆ inputParameters

StateParameterMap inputParameters
protected

Definition at line 251 of file State.h.

◆ localParameters

StateParameterMap localParameters
protected

Definition at line 252 of file State.h.

◆ margin

const QRectF margin

Definition at line 59 of file State.h.

◆ outgoingTransitions

EventList outgoingTransitions
protected

Definition at line 245 of file State.h.

◆ outputParameters

StateParameterMap outputParameters
protected

Definition at line 253 of file State.h.

◆ proxies

QList<QString> proxies
protected

Definition at line 249 of file State.h.

◆ size

QSizeF size
protected

Definition at line 263 of file State.h.

◆ stateName

QString stateName
protected

Definition at line 246 of file State.h.

◆ substates

StateInstanceMap substates
protected

Definition at line 255 of file State.h.

◆ transitions

TransitionList transitions
protected

Definition at line 258 of file State.h.

◆ UUID

QString UUID
protected

Definition at line 260 of file State.h.


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