Computer Assited Medical Intervention Tool Kit  version 3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Protected Attributes | List of all members
ActionState Class Reference

The state (in a state machine point of view) corresponding to the current processed action. More...

#include <ActionState.h>

+ Inheritance diagram for ActionState:

Public Member Functions

 ActionState (QState *parent, QString name, QString description, QTextStream *logStream=NULL)
 
ActionTransitionaddActionTransition (QString buttonText, QAbstractState *nextState, bool applyAction=true, QVector< camitk::Action::ApplyStatus > disableConditions=QVector< camitk::Action::ApplyStatus >())
 Adds a possible transition from this action. More...
 
virtual camitk::Action::ApplyStatus applyAction ()
 apply the action encapsulated by this action state More...
 
QString getDescription ()
 Returns the description of the action state (may be different from the description of the actual action) More...
 
const QMap< QString, QString > & getInputComponents ()
 get the names and type of all input components More...
 
QString getName ()
 Returns the name of the action state (may be different from the name of the actual action) More...
 
const QMap< QString, QString > & getOutputComponents ()
 get the names and type of all output components More...
 
ActionStateWidgetgetWidget ()
 
void setAction (camitk::Action *action, QMap< QString, QVariant > parameters, QMap< QString, QString > inputComponentNames, QMap< QString, QString > outputComponentNames)
 
void setAlternativeDesc (QString altDescText, QVector< camitk::Action::ApplyStatus > statusList)
 May change its description according to the previous action result. More...
 
void setFinal ()
 
void setPreviousActionStatus (camitk::Action::ApplyStatus status)
 

Protected Member Functions

virtual void onEntry (QEvent *event)
 Reimplemented from QState. More...
 
virtual void onExit (QEvent *event)
 

Protected Attributes

QMap
< camitk::Action::ApplyStatus,
QVector< QPushButton * > > 
conditionalButtons
 Buttons that should be disabled if the previous aciton state did not happen correctly. More...
 
QMap
< camitk::Action::ApplyStatus,
QString > 
conditionalDescriptions
 Descriptions that should be displaied if the previous action state did not happen correctly. More...
 
QString description
 Description of the state action may not be the same as the action's description but complementary. More...
 
QMap< QString, QString > inputComponentNames
 names of all the input compenent, this is a map <name, type> More...
 
QTextStream * logStream
 Log stream to write report on logFile. More...
 
camitk::ActionmyAction
 Actual CamiTK action. More...
 
ActionStateWidgetmyStateWidget
 Widget containing: More...
 
QString name
 Name of the state action (may not be the same as the action's name) More...
 
QMap< QString, QString > outputComponentNames
 names of all the output compenent, this is a map <name, type> More...
 
QMap< QString, QVariant > parameters
 name and value of preset parameters More...
 
QTime * startTime
 Keep track of time... More...
 

Detailed Description

The state (in a state machine point of view) corresponding to the current processed action.

Constructor & Destructor Documentation

ActionState::ActionState ( QState *  parent,
QString  name,
QString  description,
QTextStream *  logStream = NULL 
)

Member Function Documentation

ActionTransition* ActionState::addActionTransition ( QString  buttonText,
QAbstractState *  nextState,
bool  applyAction = true,
QVector< camitk::Action::ApplyStatus disableConditions = QVector< camitk::Action::ApplyStatus >() 
)

Adds a possible transition from this action.

virtual camitk::Action::ApplyStatus ActionState::applyAction ( )
virtual

apply the action encapsulated by this action state

Reimplemented in SaveActionState.

QString ActionState::getDescription ( )

Returns the description of the action state (may be different from the description of the actual action)

const QMap<QString, QString>& ActionState::getInputComponents ( )

get the names and type of all input components

QString ActionState::getName ( )

Returns the name of the action state (may be different from the name of the actual action)

const QMap<QString, QString>& ActionState::getOutputComponents ( )

get the names and type of all output components

ActionStateWidget* ActionState::getWidget ( )
virtual void ActionState::onEntry ( QEvent *  event)
protectedvirtual

Reimplemented from QState.

virtual void ActionState::onExit ( QEvent *  event)
protectedvirtual
void ActionState::setAction ( camitk::Action action,
QMap< QString, QVariant >  parameters,
QMap< QString, QString >  inputComponentNames,
QMap< QString, QString >  outputComponentNames 
)
void ActionState::setAlternativeDesc ( QString  altDescText,
QVector< camitk::Action::ApplyStatus statusList 
)

May change its description according to the previous action result.

void ActionState::setFinal ( )
void ActionState::setPreviousActionStatus ( camitk::Action::ApplyStatus  status)

Member Data Documentation

QMap<camitk::Action::ApplyStatus, QVector<QPushButton * > > ActionState::conditionalButtons
protected

Buttons that should be disabled if the previous aciton state did not happen correctly.

QMap<camitk::Action::ApplyStatus, QString> ActionState::conditionalDescriptions
protected

Descriptions that should be displaied if the previous action state did not happen correctly.

QString ActionState::description
protected

Description of the state action may not be the same as the action's description but complementary.

QMap<QString, QString> ActionState::inputComponentNames
protected

names of all the input compenent, this is a map <name, type>

QTextStream* ActionState::logStream
protected

Log stream to write report on logFile.

camitk::Action* ActionState::myAction
protected

Actual CamiTK action.

ActionStateWidget* ActionState::myStateWidget
protected

Widget containing:

  • the name of the state action
  • the description of the action
  • the action's widget
  • the buttons linking to the transitions
QString ActionState::name
protected

Name of the state action (may not be the same as the action's name)

QMap<QString, QString> ActionState::outputComponentNames
protected

names of all the output compenent, this is a map <name, type>

QMap<QString, QVariant> ActionState::parameters
protected

name and value of preset parameters

QTime* ActionState::startTime
protected

Keep track of time...


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