26 #ifndef VIEWER_EXTENSION_H
27 #define VIEWER_EXTENSION_H
32 #include <QRegularExpression>
33 #include <QTranslator>
43 #define registerDefaultViewer(className) setManagedMetaObject(&className::staticMetaObject); \
44 registerViewer(new className(QString(#className).replace(QRegularExpression("([^A-Z\\s])([A-Z])"),"\\1 \\2").replace(QRegularExpression("([A-Z]+)([A-Z][a-z])"),"\\1 \\2")));
47 #define registerNewViewer(className, instanceName) setManagedMetaObject(&className::staticMetaObject); \
48 registerViewer(new className(QString(instanceName)))
108 void setLocation(
const QString loc);
111 QString getLocation()
const;
114 void initResources();
117 QString getViewerClassName();
121 Viewer* getNewInstance(QString name);
127 bool registerViewer(
Viewer*);
133 void setManagedMetaObject(
const QMetaObject*);
137 QString dynamicLibraryFileName;
140 QTranslator* translator;
143 const QMetaObject* managedMetaObject;
#define CAMITK_API
Definition: CamiTKAPI.h:49
This class describes what is a generic Action extension.
Definition: ViewerExtension.h:85
virtual void init()=0
this method should just call registerNewViewer(MyViewer) for any MyViewer class you need to register ...
ViewerList viewers
the list of viewers
Definition: ViewerExtension.h:130
virtual QString getDescription()=0
returns the viewer extension small description (to be overriden in the derived class)
virtual QString getName()=0
returns the viewer extension name (to be overriden in the derived class)
Viewer is an abstract class that is the base class for all viewers.
Definition: Viewer.h:181
Definition: Action.cpp:36