LoadSaveInterface Class Reference

Interface for all plugins which want to Load or Save files and create Objects. More...

#include <OpenFlipper/BasePlugin/LoadSaveInterface.hh>

Inheritance diagram for LoadSaveInterface:
Inheritance graph
[legend]

List of all members.

Signals

virtual void save (int _id, QString _filename)
 Save object to a file.
virtual void load (QString _filename, DataType _type, int &_id)
 Load object from file with a specific DataType.
virtual void addEmptyObject (DataType _type, int &_id)
virtual void copyObject (int _oldId, int &_newId)
virtual void emptyObjectAdded (int _id)
 DEPRECATED! Emit this signal if an empty object has been created.
virtual void deleteObject (int _id)
 Delete an object.
virtual void deleteAllObjects ()
 Delete all Objects.

Public Member Functions

virtual ~LoadSaveInterface ()
 Destructor.

Private Slots

virtual void fileOpened (int _id)
 A file has been opened.
virtual void addedEmptyObject (int _id)
 An empty object has been added.
virtual void objectDeleted (int _id)
 An object was deleted.

Detailed Description

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 61 of file LoadSaveInterface.hh.


Member Function Documentation

virtual void LoadSaveInterface::addedEmptyObject ( int  _id  )  [inline, private, virtual, slot]

An empty object has been added.

This slot is called if an empty object has been added by the core.

Parameters:
_id Id of the new object

Reimplemented in DataControlPlugin, SelectionBasePlugin, SkeletalAnimationPlugin, TextureControlPlugin, and TypeLightPlugin.

Definition at line 133 of file LoadSaveInterface.hh.

virtual void LoadSaveInterface::addEmptyObject ( DataType  _type,
int &  _id 
) [inline, virtual, signal]

Add an empty object of the given type

Parameters:
_type Type to be created
_id Here the id of the loaded object is returned. id its -1 something went wrong

Reimplemented in FileBVHPlugin, FileLightPlugin, FileOBJPlugin, FileOFFPlugin, FileViewPlugin, FileOMPlugin, FilePlaPlugin, FilePLYPlugin, FileSKLPlugin, FileSPHPlugin, FileSTLPlugin, SkeletalAnimationPlugin, SkeletonEditingPlugin, SubdividerPlugin, and TypeLightPlugin.

Definition at line 90 of file LoadSaveInterface.hh.

virtual void LoadSaveInterface::copyObject ( int  _oldId,
int &  _newId 
) [inline, virtual, signal]

Create a copy of an existing object

Parameters:
_oldId id of the object to copy
_newId id of the new object created

Reimplemented in DataControlPlugin.

Definition at line 97 of file LoadSaveInterface.hh.

virtual void LoadSaveInterface::deleteAllObjects (  )  [inline, virtual, signal]

Delete all Objects.

Definition at line 117 of file LoadSaveInterface.hh.

virtual void LoadSaveInterface::deleteObject ( int  _id  )  [inline, virtual, signal]
virtual void LoadSaveInterface::emptyObjectAdded ( int  _id  )  [inline, virtual, signal]

DEPRECATED! 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

Parameters:
_id Id of the added object

Reimplemented in DataControlPlugin, TypeBSplineCurvePlugin, TypeBSplineSurfacePlugin, TypeCameraPlugin, TypeLightPlugin, TypePlanePlugin, TypePolyMeshPlugin, TypeSkeletonPlugin, TypeSpherePlugin, and TypeTriangleMeshPlugin.

Definition at line 106 of file LoadSaveInterface.hh.

virtual void LoadSaveInterface::fileOpened ( int  _id  )  [inline, private, virtual, slot]

A file has been opened.

This slot is called if a file has been opened by the core.

Parameters:
_id Id of the new object

Reimplemented in DataControlPlugin, FileBVHPlugin, FileLightPlugin, FileOBJPlugin, FileOFFPlugin, FileViewPlugin, FileOMPlugin, FilePlaPlugin, FilePLYPlugin, FileSKLPlugin, FileSPHPlugin, FileSTLPlugin, SkeletalAnimationPlugin, and TextureControlPlugin.

Definition at line 126 of file LoadSaveInterface.hh.

virtual void LoadSaveInterface::load ( QString  _filename,
DataType  _type,
int &  _id 
) [inline, virtual, signal]

Load object from file with a specific DataType.

Parameters:
_filename Filename of the File to load
_type Type to be loaded
_id Here the id of the loaded object is returned. id its -1 something went wrong

Reimplemented in FileBVHPlugin, FileLightPlugin, FileOBJPlugin, FileOFFPlugin, FileViewPlugin, FileOMPlugin, FilePlaPlugin, FilePLYPlugin, FileSKLPlugin, FileSPHPlugin, and FileSTLPlugin.

Definition at line 82 of file LoadSaveInterface.hh.

virtual void LoadSaveInterface::objectDeleted ( int  _id  )  [inline, private, virtual, slot]

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.

Parameters:
_id Id of the object that is deleted.

Reimplemented in BackupPlugin, DataControlPlugin, MovePlugin, SelectionBasePlugin, SkeletalAnimationPlugin, and TypeLightPlugin.

Definition at line 146 of file LoadSaveInterface.hh.

virtual void LoadSaveInterface::save ( int  _id,
QString  _filename 
) [inline, virtual, signal]

Save object to a file.

Parameters:
_id Object to Save
_filename Filename to save it to (Leave as "" to automatically determine filename)

Reimplemented in FileBVHPlugin, FileLightPlugin, FileOBJPlugin, FileOFFPlugin, FileViewPlugin, FileOMPlugin, FilePlaPlugin, FilePLYPlugin, FileSKLPlugin, FileSPHPlugin, and FileSTLPlugin.

Definition at line 74 of file LoadSaveInterface.hh.


The documentation for this class was generated from the following file:
Generated on Thu Jun 30 10:11:07 2011 for DeveloperDocumentation by  doxygen 1.6.3