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

Added drawModeChanged signal to BaseInterface

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@12367 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 30a85d2d
...@@ -144,7 +144,7 @@ class BaseInterface { ...@@ -144,7 +144,7 @@ class BaseInterface {
* *
*/ */
virtual void nodeVisibilityChanged( int _identifier ) {}; virtual void nodeVisibilityChanged( int _identifier ) {};
private slots: private slots:
/** \brief An object has been updated by another plugin /** \brief An object has been updated by another plugin
...@@ -216,6 +216,11 @@ class BaseInterface { ...@@ -216,6 +216,11 @@ class BaseInterface {
*/ */
virtual void slotViewChanged() {}; virtual void slotViewChanged() {};
/** \brief A viewer changed its draw mode
*
* @param _viewerId Id of the viewer that changed its draw mode
*/
virtual void slotDrawModeChanged(int _viewerId) {};
/** @} */ /** @} */
//=========================================================================== //===========================================================================
......
...@@ -881,6 +881,9 @@ void Core::loadPlugin(QString filename, bool silent, QString& _licenseErrors, QO ...@@ -881,6 +881,9 @@ void Core::loadPlugin(QString filename, bool silent, QString& _licenseErrors, QO
if ( checkSlot( plugin , "slotViewChanged()" ) ) if ( checkSlot( plugin , "slotViewChanged()" ) )
connect(this,SIGNAL(pluginViewChanged()),plugin,SLOT(slotViewChanged()), Qt::DirectConnection); connect(this,SIGNAL(pluginViewChanged()),plugin,SLOT(slotViewChanged()), Qt::DirectConnection);
if ( checkSlot( plugin , "slotDrawModeChanged(int)" ) )
connect(coreWidget_,SIGNAL(drawModeChanged(int)),plugin,SLOT(slotDrawModeChanged(int)), Qt::DirectConnection);
if ( checkSlot(plugin,"slotObjectPropertiesChanged(int)")) if ( checkSlot(plugin,"slotObjectPropertiesChanged(int)"))
connect(this,SIGNAL(objectPropertiesChanged(int)),plugin,SLOT(slotObjectPropertiesChanged(int)), Qt::DirectConnection); connect(this,SIGNAL(objectPropertiesChanged(int)),plugin,SLOT(slotObjectPropertiesChanged(int)), Qt::DirectConnection);
......
...@@ -123,7 +123,9 @@ namespace Viewer { ...@@ -123,7 +123,9 @@ namespace Viewer {
public: public:
/// set draw mode (No test if this mode is available!) /// set draw mode (No test if this mode is available!)
void drawMode(ACG::SceneGraph::DrawModes::DrawMode _mode) { currentDrawMode_ = _mode; emit updated(); }; void drawMode(ACG::SceneGraph::DrawModes::DrawMode _mode) { currentDrawMode_ = _mode;
emit updated();
emit drawModeChanged(viewerId_); };
/// get current draw mode /// get current draw mode
ACG::SceneGraph::DrawModes::DrawMode drawMode() { return currentDrawMode_; }; ACG::SceneGraph::DrawModes::DrawMode drawMode() { return currentDrawMode_; };
...@@ -498,10 +500,17 @@ namespace Viewer { ...@@ -498,10 +500,17 @@ namespace Viewer {
signals: signals:
/** \brief This signal is emitted when the configuration has been changed /** \brief This signal is emitted when the configuration has been changed
*
*/ */
void updated(); void updated();
/** \brief This signal is emitted when the drawmode changed
*
*/
void drawModeChanged(int _viewerId );
void getPickMode(std::string& _mode ); void getPickMode(std::string& _mode );
void setPickMode(const std::string _mode ); void setPickMode(const std::string _mode );
......
...@@ -335,6 +335,7 @@ CoreWidget( QVector<ViewMode*>& _viewModes, ...@@ -335,6 +335,7 @@ CoreWidget( QVector<ViewMode*>& _viewModes,
connect (&PluginFunctions::viewerProperties(i), SIGNAL( setActionMode(const Viewer::ActionMode) ), connect (&PluginFunctions::viewerProperties(i), SIGNAL( setActionMode(const Viewer::ActionMode) ),
this, SLOT( setActionMode(const Viewer::ActionMode)), Qt::DirectConnection ); this, SLOT( setActionMode(const Viewer::ActionMode)), Qt::DirectConnection );
connect (&PluginFunctions::viewerProperties(i), SIGNAL( drawModeChanged(int)), this, SIGNAL(drawModeChanged(int)));
} }
// Initialize all examiners // Initialize all examiners
......
...@@ -1279,6 +1279,12 @@ public: ...@@ -1279,6 +1279,12 @@ public:
/// When using first person mode strafe to the right /// When using first person mode strafe to the right
void strafeRight(); void strafeRight();
signals :
/** \brief The viewer with id _viewerId changed its draw Mode
*
*/
void drawModeChanged(int _viewerId);
private : private :
bool stereoActive_; bool stereoActive_;
......
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