Developer Documentation
|
Interface for all plugins which want to Load or Save files and create Objects. More...
#include <OpenFlipper/BasePlugin/LoadSaveInterface.hh>
Signals | |
virtual void | save (int _id, QString _filename) |
Save object to a file. More... | |
virtual void | load (QString _filename, DataType _type, int &_id) |
Load object from file with a specific DataType. More... | |
Public Member Functions | |
virtual | ~LoadSaveInterface () |
Destructor. | |
virtual void | addEmptyObject (DataType _type, int &_id) |
virtual void | copyObject (int _oldId, int &_newId) |
virtual void | emptyObjectAdded (int _id) |
DEPRECATED HERE (Moved to Type Interface)! Emit this signal if an empty object has been created. More... | |
virtual void | deleteObject (int _id) |
Delete an object This signal can be called from any thread. . More... | |
virtual void | deleteAllObjects () |
Delete all Objects. More... | |
virtual void | getAllFileFilters (QStringList &_filters) |
Get all file filters that are registered. More... | |
Private Slots | |
virtual void | fileOpened (int _id) |
A file has been opened. More... | |
Private Member Functions | |
virtual void | addedEmptyObject (int _id) |
An empty object has been added. More... | |
virtual void | objectDeleted (int _id) |
An object was deleted. More... | |
Interface for all plugins which want to Load or Save files and create Objects.
Detailed description
Using this interface you can instruct the core to open/save objects or to create new empty objects.
Definition at line 59 of file LoadSaveInterface.hh.
|
inlineprivatevirtual |
An empty object has been added.
Slot is called if an empty object has been added by the core.
This slot will be executed on the main thread.
_id | Id of the new object |
Reimplemented in MeshObjectSelectionPlugin, and TypeLightPlugin.
Definition at line 139 of file LoadSaveInterface.hh.
|
inlinevirtual |
Add an empty object of the given type
This signal can be called from any thread.
_type | Type to be created |
_id | Here the id of the loaded object is returned. id is -1 something went wrong |
Definition at line 89 of file LoadSaveInterface.hh.
|
inlinevirtual |
Create a copy of an existing object
_oldId | id of the object to copy |
_newId | id of the new object created |
Definition at line 96 of file LoadSaveInterface.hh.
|
inlinevirtual |
Delete all Objects.
Definition at line 116 of file LoadSaveInterface.hh.
|
inlinevirtual |
Delete an object
This signal can be called from any thread.
.
_id | Id of the object |
Definition at line 111 of file LoadSaveInterface.hh.
|
inlinevirtual |
DEPRECATED HERE (Moved to Type Interface)! Emit this signal if an empty object has been created.
Deprecated! Objects are added by the Type Plugins and this is signal is in the TypeInterface now
_id | Id of the added object |
Definition at line 105 of file LoadSaveInterface.hh.
|
inlineprivatevirtualslot |
A file has been opened.
This slot is called if a file has been opened by the core.
This slot will be executed in the main thread.
_id | Id of the new object |
Definition at line 131 of file LoadSaveInterface.hh.
|
inlinevirtual |
Get all file filters that are registered.
Definition at line 121 of file LoadSaveInterface.hh.
|
inlinevirtualsignal |
Load object from file with a specific DataType.
_filename | Filename of the File to load |
_type | Type to be loaded |
_id | Here the id of the loaded object is returned. id is -1 something went wrong |
Definition at line 80 of file LoadSaveInterface.hh.
|
inlineprivatevirtual |
An object was deleted.
This function is called by the core if an object gets deleted. It is called immediately before the object is removed from the scenegraph. So if this function is invoked, the object still exists. All plugins get informed via this slot.\
After this function got called for all plugins, the object is removed from the scene with all nodes attached to it and all PerObjectData attached to it.
This slot will be executed on the main thread.
_id | Id of the object that is deleted. |
Reimplemented in TypeLightPlugin, and TypeQtWidgetPlugin.
Definition at line 154 of file LoadSaveInterface.hh.
|
inlinevirtualsignal |
Save object to a file.
_id | Object to Save |
_filename | Filename to save it to (Leave as "" to automatically determine filename) |
Definition at line 72 of file LoadSaveInterface.hh.