Computer Assisted Medical Intervention Tool Kit  version 5.2
ActionTransition Class Reference

This class handle a transition between two states (including previous/next buttons). More...

#include <ActionTransition.h>

+ Inheritance diagram for ActionTransition:
+ Collaboration diagram for ActionTransition:

Public Member Functions

 ActionTransition (QPushButton *sender, const char *signal, QState *sourceState=nullptr, bool applyPreviousAction=true, QTextStream *logStream=nullptr)
 constructor: takes at least the state and signal considered for the transition More...
 
void addComponentToClose (QString compName, QString compType, bool force=false)
 add a component's name and type to the list of component to close during the transition. More...
 
void autoNext ()
 programmatically activate the transition (during autoNext), i.e. call "click" on the button More...
 
bool isNamed (QString) const
 Check the name of the transition (i.e. text of the button) More...
 
void onTransition (QEvent *e) override
 called during the transition More...
 

Detailed Description

This class handle a transition between two states (including previous/next buttons).

Specific things can happen for CamiTK SCXML transition (e.g., apply the selected action before going to the next, closing components...)

The transition's name is set as the button's text.

Example:

<!-- Closing some components -->
<camitk:close>
<camitk:component type="ImageComponent" name="inputImage"/>
<!-- even if image2 is modified, it will be closed without asking the user for a filename -->
<camitk:component type="ImageComponent" name="generatedImage" force="true"/>
</camitk:close>
#define a
void onTransition(QEvent *e) override
called during the transition
Definition: ActionTransition.cpp:43
Definition: Action.cpp:36

Constructor & Destructor Documentation

◆ ActionTransition()

ActionTransition::ActionTransition ( QPushButton *  sender,
const char *  signal,
QState *  sourceState = nullptr,
bool  applyPreviousAction = true,
QTextStream *  logStream = nullptr 
)

constructor: takes at least the state and signal considered for the transition

Member Function Documentation

◆ addComponentToClose()

void ActionTransition::addComponentToClose ( QString  compName,
QString  compType,
bool  force = false 
)

add a component's name and type to the list of component to close during the transition.

Set force to "true" in order to close the component independently of its modified flag.

◆ autoNext()

void ActionTransition::autoNext ( )

programmatically activate the transition (during autoNext), i.e. call "click" on the button

Referenced by ActionStateMachine::autoNext().

+ Here is the caller graph for this function:

◆ isNamed()

bool ActionTransition::isNamed ( QString  name) const

Check the name of the transition (i.e. text of the button)

Referenced by ActionStateMachine::autoNext().

+ Here is the caller graph for this function:

◆ onTransition()

void ActionTransition::onTransition ( QEvent *  e)
override

called during the transition

References ActionState::applyAction(), ActionState::getName(), and ActionState::setPreviousActionStatus().

+ Here is the call graph for this function:

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