Computer Assited Medical Intervention Tool Kit  version 5.0
camitk::ActionExtension Class Referenceabstract

This class describes what is a generic Action extension. To add a ActionExtension to CamiTK core, write a new class that inherits from this class. More...

#include <ActionExtension.h>

+ Inheritance diagram for camitk::ActionExtension:
+ Collaboration diagram for camitk::ActionExtension:

Public Member Functions

const ActionListgetActions ()
 get the list of actions registered y this extension More...
 
virtual QString getDescription ()=0
 returns the action extension small description (to be overriden in your ActionExtension) More...
 
QString getLocation () const
 get the file path (location of the .dll/.so/.dylib) of this plugin More...
 
virtual QString getName ()=0
 returns the action extension name (to be overriden in your ActionExtension) More...
 
virtual void init ()=0
 this method should just call registerNewAction(MyAction) for any MyAction class you need to register by this extension More...
 
void initResources ()
 Load, for the selected langage (asked to the Application), the associated .qm file. More...
 
void setLocation (const QString loc)
 set the file path (once loaded as a dynamic library) More...
 
 ~ActionExtension () override
 destructor More...
 

Protected Member Functions

 ActionExtension ()
 constructor More...
 
void registerAction (Action *)
 register an action instance More...
 

Protected Attributes

ActionList actions
 the list of actions More...
 

Private Attributes

QString dynamicLibraryFileName
 the shared lib (.so, .dll or .dylib) used to instantiate the ComponentExtension subclass instance More...
 
QTranslator * translator
 Provide internationalization support for text output. More...
 

Detailed Description

This class describes what is a generic Action extension. To add a ActionExtension to CamiTK core, write a new class that inherits from this class.

The following methods HAVE to be redefined in your subclass:

  • getName: return the name of your extension
  • getDescription: return a small description
  • init: a simple enough method, just call registerNewAction(MyAction) for any MyAction class inheriting from camitk::Action
See also
BasicMeshExtension For an example of an extension registering more than one actions

Constructor & Destructor Documentation

◆ ActionExtension()

camitk::ActionExtension::ActionExtension ( )
protected

constructor

◆ ~ActionExtension()

camitk::ActionExtension::~ActionExtension ( )
override

destructor

Member Function Documentation

◆ getActions()

const camitk::ActionList & camitk::ActionExtension::getActions ( )

get the list of actions registered y this extension

Referenced by camitk::Application::registerAllActions(), and camitk::Application::unregisterAllActions().

+ Here is the caller graph for this function:

◆ getDescription()

◆ getLocation()

QString camitk::ActionExtension::getLocation ( ) const

get the file path (location of the .dll/.so/.dylib) of this plugin

◆ getName()

◆ init()

◆ initResources()

void camitk::ActionExtension::initResources ( )

Load, for the selected langage (asked to the Application), the associated .qm file.

◆ registerAction()

void camitk::ActionExtension::registerAction ( Action action)
protected

register an action instance

◆ setLocation()

void camitk::ActionExtension::setLocation ( const QString  loc)

set the file path (once loaded as a dynamic library)

Member Data Documentation

◆ actions

ActionList camitk::ActionExtension::actions
protected

the list of actions

◆ dynamicLibraryFileName

QString camitk::ActionExtension::dynamicLibraryFileName
private

the shared lib (.so, .dll or .dylib) used to instantiate the ComponentExtension subclass instance

◆ translator

QTranslator* camitk::ActionExtension::translator
private

Provide internationalization support for text output.


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