Computer Assisted Medical Intervention Tool Kit  version 5.2
ViewerExtension.h File Reference
#include "CamiTKAPI.h"
#include <QRegularExpression>
#include <QTranslator>
+ Include dependency graph for ViewerExtension.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  camitk::ViewerExtension
 This class describes what is a generic Action extension. More...
 

Namespaces

 camitk
 

Macros

#define registerDefaultViewer(className)
 register a new viewer and create a default instance using the name of the class (note that the regular expression used here results in the default viewer's name of being the name of the viewer class where the words are separated space, e.g. More...
 
#define registerNewViewer(className, instanceName)
 register a new viewer, instance of X, its name is Y More...
 

Macro Definition Documentation

◆ registerDefaultViewer

#define registerDefaultViewer (   className)
Value:
setManagedMetaObject(&className::staticMetaObject); \
registerViewer(new className(QString(#className).replace(QRegularExpression("([^A-Z\\s])([A-Z])"),"\\1 \\2").replace(QRegularExpression("([A-Z]+)([A-Z][a-z])"),"\\1 \\2")));

register a new viewer and create a default instance using the name of the class (note that the regular expression used here results in the default viewer's name of being the name of the viewer class where the words are separated space, e.g.

the default FooBarViewer is called "Foo Bar Viewer")

Note
#className surrounds macro argument with double quotes converting it to string

◆ registerNewViewer

#define registerNewViewer (   className,
  instanceName 
)
Value:
setManagedMetaObject(&className::staticMetaObject); \
registerViewer(new className(QString(instanceName)))

register a new viewer, instance of X, its name is Y