Developer Documentation
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:
BackupPlugin ComponentsPlugin DataControlPlugin DecimaterPlugin FileBundlePlugin FileBVHPlugin FileHeightFieldPNGPlugin FileLightPlugin FileOBJPlugin FileOFFPlugin FileOMPlugin FileOpenVolumeMeshPlugin FilePlaPlugin FilePLYPlugin FilePolyLinePlugin FilePTSPlugin FileScriptPlugin FileSKLPlugin FileSPHPlugin FileSTLPlugin FileViewPlugin FileVTKPlugin InfoMeshObjectPlugin MergePlugin MeshConvertPlugin MeshObjectSelectionPlugin MovePlugin ObjectSelectionPlugin PolyLinePlugin PrimitivesGeneratorPlugin PropertyVisPlugin RulerPlugin SelectionBasePlugin SkeletalAnimationPlugin SkeletonEditingPlugin SplatCloudObjectSelectionPlugin SplatCloudRenderingControlPlugin SubdividerPlugin TextureControlPlugin TypeBSplineCurvePlugin TypeBSplineSurfacePlugin TypeCameraPlugin TypeHexahedralMeshPlugin TypeLightPlugin TypePlanePlugin TypePolyhedralMeshPlugin TypePolyLinePlugin TypePolyMeshPlugin TypeQtWidgetPlugin TypeSkeletonPlugin TypeSpherePlugin TypeSplatCloudPlugin TypeTetrahedralMeshPlugin TypeTriangleMeshPlugin VolumeMeshConvertPlugin

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...
 

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

Member Function Documentation

◆ addedEmptyObject()

virtual void LoadSaveInterface::addedEmptyObject ( int  _id)
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.

Parameters
_idId of the new object

Reimplemented in MeshObjectSelectionPlugin, and TypeLightPlugin.

Definition at line 139 of file LoadSaveInterface.hh.

◆ addEmptyObject()

virtual void LoadSaveInterface::addEmptyObject ( DataType  _type,
int &  _id 
)
inlinevirtual

Add an empty object of the given type
This signal can be called from any thread.

Parameters
_typeType to be created
_idHere the id of the loaded object is returned. id is -1 something went wrong

Definition at line 89 of file LoadSaveInterface.hh.

◆ copyObject()

virtual void LoadSaveInterface::copyObject ( int  _oldId,
int &  _newId 
)
inlinevirtual

Create a copy of an existing object

Parameters
_oldIdid of the object to copy
_newIdid of the new object created

Definition at line 96 of file LoadSaveInterface.hh.

◆ deleteAllObjects()

virtual void LoadSaveInterface::deleteAllObjects ( )
inlinevirtual

Delete all Objects.

Definition at line 116 of file LoadSaveInterface.hh.

◆ deleteObject()

virtual void LoadSaveInterface::deleteObject ( int  _id)
inlinevirtual

Delete an object
This signal can be called from any thread.
.

Parameters
_idId of the object

Definition at line 111 of file LoadSaveInterface.hh.

◆ emptyObjectAdded()

virtual void LoadSaveInterface::emptyObjectAdded ( int  _id)
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

Parameters
_idId of the added object

Definition at line 105 of file LoadSaveInterface.hh.

◆ fileOpened

virtual void LoadSaveInterface::fileOpened ( int  _id)
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.

Parameters
_idId of the new object

Definition at line 131 of file LoadSaveInterface.hh.

◆ getAllFileFilters()

virtual void LoadSaveInterface::getAllFileFilters ( QStringList &  _filters)
inlinevirtual

Get all file filters that are registered.

Definition at line 121 of file LoadSaveInterface.hh.

◆ load

virtual void LoadSaveInterface::load ( QString  _filename,
DataType  _type,
int &  _id 
)
inlinevirtualsignal

Load object from file with a specific DataType.

Parameters
_filenameFilename of the File to load
_typeType to be loaded
_idHere the id of the loaded object is returned. id is -1 something went wrong

Definition at line 80 of file LoadSaveInterface.hh.

◆ objectDeleted()

virtual void LoadSaveInterface::objectDeleted ( int  _id)
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.

Parameters
_idId of the object that is deleted.

Reimplemented in TypeLightPlugin, and TypeQtWidgetPlugin.

Definition at line 154 of file LoadSaveInterface.hh.

◆ save

virtual void LoadSaveInterface::save ( int  _id,
QString  _filename 
)
inlinevirtualsignal

Save object to a file.

Parameters
_idObject to Save
_filenameFilename to save it to (Leave as "" to automatically determine filename)

Definition at line 72 of file LoadSaveInterface.hh.


The documentation for this class was generated from the following file: