#include "CamiTKAPI.h"
#include <QRegularExpression>
#include <QTranslator>
Go to the source code of this file.
|
#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...
|
|
◆ 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