Developer Documentation
|
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. More... | |
virtual DataType | supportedType ()=0 |
Return your supported object type( e.g. DATA_TRIANGLE_MESH ) More... | |
virtual void | generateBackup (int _id, QString _name, UpdateType _type) |
This slot should be implemented in a TypePlugin to generate type specific backups. More... | |
Signals | |
virtual void | emptyObjectAdded (int _id) |
Emit this signal if an empty object has been created. More... | |
Public Member Functions | |
virtual | ~TypeInterface () |
Destructor. | |
Interface class for type definitions.
Detailed description
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 73 of file TypeInterface.hh.
|
pure virtualslot |
Create an empty object.
When this slot is called you have to create an object of your supported type.
Implemented in TypeLightPlugin, TypeBSplineCurvePlugin, TypeBSplineSurfacePlugin, TypeSkeletonPlugin, TypeCameraPlugin, TypeSplatCloudPlugin, TypePolyMeshPlugin, TypeQtWidgetPlugin, TypeTriangleMeshPlugin, TypePlanePlugin, TypeSpherePlugin, TypeCoordsysPlugin, and TypePolyLinePlugin.
|
inlinevirtualsignal |
Emit this signal if an empty object has been created.
_id | Id of the added object |
Definition at line 81 of file TypeInterface.hh.
|
inlinevirtualslot |
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 TypeSkeletonPlugin, TypeSplatCloudPlugin, TypePolyMeshPlugin, and TypeTriangleMeshPlugin.
Definition at line 112 of file TypeInterface.hh.
|
pure virtualslot |
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 TypeLightPlugin, TypeBSplineCurvePlugin, TypeBSplineSurfacePlugin, TypeSkeletonPlugin, TypeCameraPlugin, TypeSplatCloudPlugin, TypePolyMeshPlugin, TypeQtWidgetPlugin, TypeTriangleMeshPlugin, TypePlanePlugin, TypeSpherePlugin, TypeCoordsysPlugin, and TypePolyLinePlugin.