Commit af6fc260 authored by Jan Möbius's avatar Jan Möbius
Browse files

Some loadsaveinterface documentation

git-svn-id: 383ad7c9-94d9-4d36-a494-682f7c89f535
parent e6b79a83
......@@ -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:
<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)
......@@ -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
Supports Markdown
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