 |
Computer Assited Medical Intervention Tool Kit
version 4.1
|
Go to the documentation of this file.
26 #ifndef ACTION_EXTENSION_H
27 #define ACTION_EXTENSION_H
33 #include <QPluginLoader>
35 #include <QTranslator>
42 #define registerNewAction(X) registerAction(new X(this))
59 class CAMITK_API ActionExtension :
public QObject {
67 ~ActionExtension()
override;
70 virtual QString getName() = 0;
73 virtual QString getDescription() = 0;
76 virtual void init() = 0;
82 void setLocation(
const QString loc) {
83 dynamicLibraryFileName = loc;
87 QString getLocation()
const {
88 return dynamicLibraryFileName;
96 void registerAction(Action*);
103 QString dynamicLibraryFileName;
106 QTranslator* translator{
nullptr};
114 #endif //ACTION_EXTENSION_H
static QString getSelectedLanguage()
Returns for the current CamiTK application, the selected language (stored in its ....
Definition: Application.cpp:1232
#define CAMITK_INFO(MSG)
Log for info verbosity (the second most verbose one) The msg will appear only if the user asked for I...
Definition: Log.h:258
QString getName() const
get the name of the action
Definition: Action.h:334
QList< Action * > ActionList
A list of Action.
Definition: CamiTKAPI.h:95
QTranslator * translator
Provide internationalization support for text output.
Definition: ActionExtension.h:129
Action class is an abstract class that enables you to build a action (generally on a component)....
Definition: Action.h:230
void registerAction(Action *)
register an action instance
Definition: ActionExtension.cpp:99
void initResources()
Load, for the selected langage (asked to the Application), the associated .qm file.
Definition: ActionExtension.cpp:62
This class describes what is a generic Action extension. To add a ActionExtension to CamiTK core,...
Definition: ActionExtension.h:82
const ActionList & getActions()
get the list of actions registered y this extension
Definition: ActionExtension.cpp:105
ActionList actions
the list of actions
Definition: ActionExtension.h:122
QString getLocation() const
get the file path (location of the .dll/.so/.dylib) of this plugin
Definition: ActionExtension.h:110
~ActionExtension() override
destructor
Definition: ActionExtension.cpp:83
#define CAMITK_API
Definition: CamiTKAPI.h:49
Definition: Action.cpp:36