StateInstance Class Referenceabstract

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

+ Inheritance diagram for StateInstance:

Public Slots

void setBoundingBox (float squareSize)
 
void setCenter (const QPointF &newStateCenter)
 
void setPosition (QPointF newPosition)
 
void updateScale ()
 

Public Member Functions

virtual void accept (Visitor &visitor) const =0
 
QPointF adjustPosition (QPointF &newPos) const
 
QRectF getBoundingSquare () const
 getBoundingSquare return the maximum bounding box of this state instance in parent coordinate system More...
 
float getBoundingSquareSize () const
 
QRectF getBounds () const
 getBounds returns the rectangle occupied by this state instance in the parent coordinate system. More...
 
const QPointF getCenter () const
 
QSizeF getClassSize () const
 
QString getInstanceName () const
 
StatePtr getParent () const
 
float getScale () const
 getScale returns the scale of this state instance, which is the relation between boundingSquareSize and classSize. More...
 
virtual StatePtr getStateClass () const
 
const QPointF & getTopLeft () const
 getTopLeft returns the topleft point of the stateinstance in the coordinate system of the parent state. More...
 
virtual eStateType getType () const =0
 
bool isActive ()
 
virtual void setInstanceName (const QString &value)
 
 StateInstance (const QString &instanceName, StatePtr parentState=StatePtr())
 
- 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 ()
 

Public Attributes

const int defaultBoundingSquareSize = 100
 
::armarx::StateParameterMap inputParameters
 input values of this state instance, only used by Viewer. More...
 
::armarx::StateParameterMap localParameters
 
::armarx::StateParameterMap outputParameters
 

Static Public Attributes

static const QSizeF StateDefaultSize = QSizeF(800, 600)
 

Protected Attributes

float boundingSquareSize
 
QString name
 
std::weak_ptr< StateparentState
 
QPointF position
 
- Protected Attributes inherited from Logging
MessageTypeT minimumLoggingLevel
 
SpamFilterDataPtr spamFilter
 
LogTag tag
 

Additional Inherited Members

- 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
 

Detailed Description

Definition at line 44 of file StateInstance.h.

Constructor & Destructor Documentation

◆ StateInstance()

StateInstance ( const QString &  instanceName,
StatePtr  parentState = StatePtr() 
)

Definition at line 33 of file StateInstance.cpp.

Member Function Documentation

◆ accept()

virtual void accept ( Visitor visitor) const
pure virtual

◆ adjustPosition()

QPointF adjustPosition ( QPointF &  newPos) const

Definition at line 107 of file StateInstance.cpp.

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

◆ getBoundingSquare()

QRectF getBoundingSquare ( ) const

getBoundingSquare return the maximum bounding box of this state instance in parent coordinate system

Returns
See also
getBounds()

Definition at line 87 of file StateInstance.cpp.

+ Here is the call graph for this function:

◆ getBoundingSquareSize()

float getBoundingSquareSize ( ) const
inline

Definition at line 92 of file StateInstance.h.

◆ getBounds()

QRectF getBounds ( ) const
inline

getBounds returns the rectangle occupied by this state instance in the parent coordinate system.

See also
getBoundingBox()

Definition at line 87 of file StateInstance.h.

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

◆ getCenter()

const QPointF getCenter ( ) const

Definition at line 80 of file StateInstance.cpp.

◆ getClassSize()

QSizeF getClassSize ( ) const

Definition at line 226 of file StateInstance.cpp.

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

◆ getInstanceName()

QString getInstanceName ( ) const

Definition at line 44 of file StateInstance.cpp.

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

◆ getParent()

StatePtr getParent ( ) const
inline

Definition at line 59 of file StateInstance.h.

+ Here is the caller graph for this function:

◆ getScale()

float getScale ( ) const

getScale returns the scale of this state instance, which is the relation between boundingSquareSize and classSize.

Resizing is only done with this scale at the moment.

Definition at line 239 of file StateInstance.cpp.

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

◆ getStateClass()

virtual StatePtr getStateClass ( ) const
inlinevirtual

Reimplemented in RegularState.

Definition at line 55 of file StateInstance.h.

+ Here is the caller graph for this function:

◆ getTopLeft()

const QPointF& getTopLeft ( ) const
inline

getTopLeft returns the topleft point of the stateinstance in the coordinate system of the parent state.

Definition at line 68 of file StateInstance.h.

+ Here is the caller graph for this function:

◆ getType()

virtual eStateType getType ( ) const
pure virtual

Implemented in LocalState, RemoteState, and DynamicRemoteState.

◆ isActive()

bool isActive ( )

Definition at line 249 of file StateInstance.cpp.

◆ setBoundingBox

void setBoundingBox ( float  squareSize)
slot

Definition at line 187 of file StateInstance.cpp.

+ Here is the call graph for this function:

◆ setCenter

void setCenter ( const QPointF &  newStateCenter)
slot

Definition at line 172 of file StateInstance.cpp.

+ Here is the call graph for this function:

◆ setInstanceName()

void setInstanceName ( const QString &  value)
virtual

Reimplemented in EndState.

Definition at line 60 of file StateInstance.cpp.

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

◆ setPosition

void setPosition ( QPointF  newPosition)
slot

Definition at line 134 of file StateInstance.cpp.

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

◆ updateScale

void updateScale ( )
slot

Definition at line 208 of file StateInstance.cpp.

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

Member Data Documentation

◆ boundingSquareSize

float boundingSquareSize
protected

Definition at line 136 of file StateInstance.h.

◆ defaultBoundingSquareSize

const int defaultBoundingSquareSize = 100

Definition at line 122 of file StateInstance.h.

◆ inputParameters

::armarx::StateParameterMap inputParameters

input values of this state instance, only used by Viewer.

Definition at line 119 of file StateInstance.h.

◆ localParameters

::armarx::StateParameterMap localParameters

Definition at line 120 of file StateInstance.h.

◆ name

QString name
protected

Definition at line 132 of file StateInstance.h.

◆ outputParameters

::armarx::StateParameterMap outputParameters

Definition at line 121 of file StateInstance.h.

◆ parentState

std::weak_ptr<State> parentState
protected

Definition at line 133 of file StateInstance.h.

◆ position

QPointF position
protected

Definition at line 135 of file StateInstance.h.

◆ StateDefaultSize

const QSizeF StateDefaultSize = QSizeF(800, 600)
static

Definition at line 110 of file StateInstance.h.


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