Interface class for type definitions. More...
#include <OpenFlipper/BasePlugin/TypeInterface.hh>

Public Slots | |
| virtual bool | registerType ()=0 |
| virtual int | addEmpty ()=0 |
| Create an empty object. | |
| virtual DataType | supportedType ()=0 |
| Return your supported object type( e.g. DATA_TRIANGLE_MESH ). | |
| virtual void | generateBackup (int _id, QString _name, UpdateType _type) |
| This slot should be implemented in a TypePlugin to generate type specific backups. | |
Signals | |
| virtual void | emptyObjectAdded (int _id) |
| Emit this signal if an empty object has been created. | |
Public Member Functions | |
| virtual | ~TypeInterface () |
| Destructor. | |
Interface class for type definitions.
This interface is used to register new types in OpenFlipper. The type plugins are loaded before all other plugins. They have only the registerType function which registers the type to the core and a function to add new objects at runtime.
Definition at line 66 of file TypeInterface.hh.
| virtual int TypeInterface::addEmpty | ( | ) | [pure virtual, slot] |
Create an empty object.
When this slot is called you have to create an object of your supported type.
Implemented in TypeBSplineCurvePlugin, TypeBSplineSurfacePlugin, TypeCameraPlugin, TypeCoordsysPlugin, TypeLightPlugin, TypePlanePlugin, TypePolyMeshPlugin, TypeSkeletonPlugin, TypeSpherePlugin, and TypeTriangleMeshPlugin.
| virtual void TypeInterface::emptyObjectAdded | ( | int | _id | ) | [inline, virtual, signal] |
Emit this signal if an empty object has been created.
| _id | Id of the added object |
Reimplemented in TypeBSplineCurvePlugin, TypeBSplineSurfacePlugin, TypeCameraPlugin, TypeCoordsysPlugin, TypeLightPlugin, TypePlanePlugin, TypePolyMeshPlugin, TypeSkeletonPlugin, TypeSpherePlugin, and TypeTriangleMeshPlugin.
Definition at line 74 of file TypeInterface.hh.
| virtual void TypeInterface::generateBackup | ( | int | _id, | |
| QString | _name, | |||
| UpdateType | _type | |||
| ) | [inline, virtual, slot] |
This slot should be implemented in a TypePlugin to generate type specific backups.
| _id | Id of the added object | |
| _name | name of the backup | |
| _type | the type of backup that needs to be done |
Reimplemented in TypeBSplineCurvePlugin, TypePolyMeshPlugin, TypeSkeletonPlugin, and TypeTriangleMeshPlugin.
Definition at line 105 of file TypeInterface.hh.
| virtual DataType TypeInterface::supportedType | ( | ) | [pure virtual, slot] |
Return your supported object type( e.g. DATA_TRIANGLE_MESH ).
The function is used from addEmpty in the core to check if your plugin can create an object of a given dataType. If so, your addEmpty function will be invoked to create it.
Implemented in TypeBSplineCurvePlugin, TypeBSplineSurfacePlugin, TypeCameraPlugin, TypeCoordsysPlugin, TypeLightPlugin, TypePlanePlugin, TypePolyMeshPlugin, TypeSkeletonPlugin, TypeSpherePlugin, and TypeTriangleMeshPlugin.
Referenced by Core::loadPlugin().
1.6.3