Commit 43822015 authored by Jan Möbius's avatar Jan Möbius

Added Basinterface function to switch renderer

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@12944 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 151d7a1f
......@@ -264,6 +264,21 @@ class BaseInterface {
virtual void setSlotDescription(QString _slotName , QString _slotDescription,
QStringList _parameters , QStringList _descriptions) {};
/** @} */
//===========================================================================
/** @name Renderer control
* @{ */
//===========================================================================
signals:
/** \brief Set a renderer for the given viewer
*
* @param _viewer Id of the viewer to set the renderer for
* @param _rendererName Name of the renderer to be used
*/
virtual void setRenderer(unsigned int _viewer, QString _rendererName) {};
/** @} */
private slots :
......
......@@ -69,8 +69,6 @@ class RenderInterface {
private slots:
/** \brief announce required draw modes
*
* This function is called by the core to get a list of draw modes that are supported
......
......@@ -587,13 +587,15 @@ signals:
void slotGetAllFilters ( QStringList& _list);
/// Called when a plugin wants to delete all objects
void slotDeleteAllObjects( );
/// Called to create inter plugin connections
void slotCrossPluginConnect( QString _pluginName1, const char* _signal, QString _pluginName2, const char* _slot);
/// called to switch the renderer for a specific viewer
void slotSetRenderer(unsigned int _viewer, QString _rendererName);
/// Get a Pointer to the Plugin with given _name (if it is loaded)
// void slotGetPlugin(QString _name, QObject* & _plugin );
......
......@@ -62,6 +62,8 @@
#include "OpenFlipper/BasePlugin/PluginFunctionsCore.hh"
#include <OpenFlipper/common/RendererInfo.hh>
//== IMPLEMENTATION ==========================================================
//========================================================================================
......@@ -401,8 +403,12 @@ void Core::slotCrossPluginConnect( QString _pluginName1, const char* _signal, QS
connect(plugin1,_signal,plugin2,_slot);
}
//========================================================================================
// === Renderer Settings ============================
//========================================================================================
void Core::slotSetRenderer(unsigned int _viewer, QString _rendererName) {
renderManager().setActive(_rendererName,_viewer);
}
......
......@@ -928,6 +928,12 @@ void Core::loadPlugin(QString filename, bool silent, QString& _licenseErrors, QO
if ( checkSignal(plugin,"setSlotDescription(QString,QString,QStringList,QStringList)") )
connect(plugin, SIGNAL(setSlotDescription(QString,QString,QStringList,QStringList)),
this, SLOT(slotSetSlotDescription(QString,QString,QStringList,QStringList)) );
// Function allowing switching of renderers from other plugins
if ( checkSignal(plugin,"setRenderer(unsigned int,QString)" ) ) {
connect(plugin,SIGNAL(setRenderer(unsigned int,QString)),this,SLOT(slotSetRenderer(unsigned int,QString)));
}
}
//Check if the plugin supports Logging
......
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