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

Group Base Interface Documentation

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@4590 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 1f2fa206
......@@ -55,12 +55,43 @@
* them just add them to your plugin header.
*/
class BaseInterface {
//===========================================================================
/** @name Initialization
* @{ */
//===========================================================================
private slots:
/** \brief Initialize Plugin
*
* This slot is called if the plugin is loaded and has to be initialized. All initialization stuff
* in this slot has to stay inside the plugin, no external signals are allowed here.
* Dont create any objects via pluginfunctions here. Use the pluginsInitialized() slot for external
* initialization. After execution of this slot your plugin should be fully functional.
* Only gui elements may be uninitialized and should be created in pluginsInitialized().
*/
virtual void initializePlugin() {};
/** \brief Initialize Plugin step 2
*
* This slot is called if all plugins are loaded and the core is ready. Here you can create objects,
* set Textures and everything which will involve signals to the core.
*/
virtual void pluginsInitialized() {};
/** @} */
//===========================================================================
/** @name Object/View updates
* @{ */
//===========================================================================
signals :
/** \brief Update current view in Main Application
*
* Emit this Signal if the examiner widget in the Main Application should update the current view.
* This should be done for example if you changed a scenegraph node or a mesh and have
* to redraw it.
* If you do an updatedObject the core will trigger an update itself
*/
virtual void updateView() {};
......@@ -82,20 +113,7 @@ class BaseInterface {
*/
virtual void activeObjectChanged() {};
/** \brief Set a description for a public slot
*
* public slots of each plugin are automaticly available for scripting. \n
* Use this Signal to add a description for your slot so that everyone knows what it is used for. \n
*
* @param _slotName the name of the slot
* @param _slotDescription a description for the slot
* @param _parameters list of parameters
* @param _descriptions list of descriptions for the parameters (_descriptions[i] corresponds to _parameters[i])
*/
virtual void setSlotDescription(QString /*_slotName*/, QString /*_slotDescription*/,
QStringList /*_parameters*/, QStringList /*_descriptions*/) {};
private slots :
private slots:
/** \brief An object has been updated by an other plugin
*
......@@ -104,6 +122,7 @@ class BaseInterface {
* or that for an existing object with the given id has been modified.
* If you store local information about one of these Objects, you should check if its still valid!\n
* Dont emit BaseInterface::updatedObject(int) in this slot as this causes an endless Loop!!
* You dont need to call updateView as the core triggers a redraw itself.
* @param _identifier Identifier of the updated/new object or -1 if one is deleted
*/
virtual void slotObjectUpdated( int /*_identifier*/ ) {};
......@@ -120,23 +139,52 @@ class BaseInterface {
*/
virtual void slotActiveObjectChanged() {};
/** @} */
/** \brief Initialize Plugin
//===========================================================================
/** @name Plugin identification
* @{ */
//===========================================================================
public :
/** \brief Return a Name for the plugin
*
* This slot is called if the plugin is loaded and has to be initialized. All initialization stuff
* in this slot has to stay inside the plugin, no external signals are allowed here.
* Dont create any objects via pluginfunctions here. Use the pluginsInitialized() slot for external
* initialization. After execution of this slot your plugin should be fully functional.
* Only gui elements may be uninitialized and should be created in pluginsInitialized().
* This Function has to return the name of the plugin.
*/
virtual void initializePlugin() {};
virtual QString name() = 0;
/** \brief Initialize Plugin step 2
/** \brief Return a description of what the plugin is doing
*
* This slot is called if all plugins are loaded and the core is ready. Here you can create objects,
* set Textures and everything which will involve signals to the core.
* This function has to return a basic description of the plugin
*/
virtual void pluginsInitialized() {};
virtual QString description() = 0;
public slots:
/** \brief Return a version string for your plugin
*
* This function will be used to determin the current version of your plugin.
* Should have the form x.x.x ( you do not need to give that many subversions )
*/
virtual QString version() { return QString("-1"); };
signals:
/** \brief Set a description for a public slot
*
* public slots of each plugin are automaticly available for scripting. \n
* Use this Signal to add a description for your slot so that everyone knows what it is used for. \n
*
* @param _slotName the name of the slot
* @param _slotDescription a description for the slot
* @param _parameters list of parameters
* @param _descriptions list of descriptions for the parameters (_descriptions[i] corresponds to _parameters[i])
*/
virtual void setSlotDescription(QString /*_slotName*/, QString /*_slotDescription*/,
QStringList /*_parameters*/, QStringList /*_descriptions*/) {};
/** @} */
private slots :
/** This function is called when the application exits or when your plugin is about to be unloaded.
* Here you can clean up your plugin, delete local variables...
......@@ -149,31 +197,11 @@ class BaseInterface {
*/
virtual void noguiSupported( ) {} ;
public slots:
/** \brief Return a version string for your plugin
*
* This function will be used to determin the current version of your plugin.
* Should have the form x.x.x ( you do not need to give that many subversions )
*/
virtual QString version() { return QString("-1"); };
public :
/// Destructor
virtual ~BaseInterface() {};
/** \brief Return a Name for the plugin
*
* This Function has to return the name of the plugin.
*/
virtual QString name() = 0;
/** \brief Return a description of what the plugin is doing
*
* This function has to return a basic description of the plugin
*/
virtual QString description() = 0;
};
Q_DECLARE_INTERFACE(BaseInterface,"OpenFlipper.BaseInterface/1.0")
......
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