igor::iAction Class Referenceabstract

#include <iAction.h>

Inherited by igor::iActionApplicationStop.

Public Member Functions

 iAction (const iaString &name)
 
virtual ~iAction ()=default
 
virtual void execute (const iActionContext &context)=0
 
virtual bool isCompatible (const iActionContext &context)=0
 
iaString getName () const
 
void setDescription (const iaString &brief, const iaString &description="")
 
const iaStringgetBrief () const
 
const iaStringgetDescription () const
 
void setIcon (const iaString &alias)
 
const iaStringgetIcon () const
 

Detailed Description

action base class

Constructor & Destructor Documentation

◆ iAction()

igor::iAction::iAction ( const iaString name)

init members

Parameters
namethe identifier of this action

must be a unique name so it can be registered with the action manager

◆ ~iAction()

virtual igor::iAction::~iAction ( )
virtualdefault

does nothing

Member Function Documentation

◆ execute()

virtual void igor::iAction::execute ( const iActionContext context)
pure virtual

executed when action gets triggered

Parameters
contextthe context the action was called with

Implemented in igor::iActionApplicationStop.

◆ getBrief()

const iaString & igor::iAction::getBrief ( ) const
Returns
the brief description

◆ getDescription()

const iaString & igor::iAction::getDescription ( ) const
Returns
the full description

◆ getIcon()

const iaString & igor::iAction::getIcon ( ) const
Returns
the icon texture of this action

◆ getName()

iaString igor::iAction::getName ( ) const
Returns
the action identifier

◆ isCompatible()

virtual bool igor::iAction::isCompatible ( const iActionContext context)
pure virtual
Returns
true if this action will execute with given context
Parameters
contextthe context the action was called with

Implemented in igor::iActionApplicationStop.

◆ setDescription()

void igor::iAction::setDescription ( const iaString brief,
const iaString description = "" 
)

sets text of action

Parameters
briefthe brief description
descriptionthe full description

◆ setIcon()

void igor::iAction::setIcon ( const iaString alias)

sets icon of the action

Parameters
aliasalias or id of icon

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