Commit 01f0ea43 authored by Jan Möbius's avatar Jan Möbius

Some loadsaveinterface documentation



git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@11008 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 7502c471
......@@ -347,6 +347,8 @@ Remarks:
OpenFlipper manages the scene updates in its core. If objects get updated the scene will be automatically redrawn. Nevertheless,
you can force an update of the scene by emitting the signal BaseInterface::updateView().
\image html updateView.jpg
If the view (viewer position /viewing direction) has been changed, the slot BaseInterface::slotViewChanged() will be called. Be carefull, not to
change the view in this function or you get an endless loop!
......
......@@ -45,10 +45,18 @@
#include <OpenFlipper/common/Types.hh>
/** \brief Interface for all plugins which want to load or save files
/** \file LoadSaveInterface.hh
*
* Interface for adding and removing objects.\ref loadSaveInterfacePage
*/
/** \brief Interface for all plugins which want to Load or Save files and create Objects
*
* \ref loadSaveInterfacePage "Detailed description"
* \n
*
* Using this interface you can instruct the core to open/save objects or
* create new empty objects.
* to create new empty objects.
*/
class LoadSaveInterface {
......@@ -135,12 +143,41 @@ class LoadSaveInterface {
/** \brief An object was deleted
*
* @param _id Id of the object
* This function is called bz the core if an object gets deleted. It is called immediatly
* 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.
*
* @param _id Id of the object that is deleted.
*/
virtual void objectDeleted( int /*_id*/ ){};
};
/** \page loadSaveInterfacePage Load/Save Interface
*
The LoadSaveInterface can be used by plugins to add new objects to the scene either by creating empty objects
or by loading them from files. The interface also triggers saving of existing objects to files.
Additionally the interface informs plugins if new objects have been added to the scenes or if previous objects
have been removed.
To use the LoadSaveInterface:
<ul>
<li> include LoadSaveInterface in your plugins header file
<li> derive your plugin from the class LoadSaveInterface
<li> add Q_INTERFACES(LoadSaveInterface) to your plugin class
<li> And add the signals or slots you want to use to your plugin class (You don't need to implement all of them)
</ul>
*/
Q_DECLARE_INTERFACE(LoadSaveInterface,"OpenFlipper.LoadSaveInterface/1.0")
#endif // LOADSAVEINTERFACE_HH
......@@ -37,8 +37,8 @@
* See \ref baseInterfacePluginInitialization for an overview of OpenFlipper's startup and initialization calls.
*
* After this interface of the plugin is successfully processed all other interfaces will be initialized
* and connected to the core. For details about the individual interfaces see their documentation.
* \ref interfaces
* and connected to the core. For details about the individual interfaces see the
* \ref interfaces "Plugin Interfaces Documentation".
*
* \section geometryData Handling geometry data within a plugin
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment