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

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 {
*
*/
virtual void nodeVisibilityChanged( int _identifier ) {};
private slots:
/** \brief An object has been updated by another plugin
......@@ -216,6 +216,11 @@ class BaseInterface {
*/
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
if ( checkSlot( plugin , "slotViewChanged()" ) )
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)"))
connect(this,SIGNAL(objectPropertiesChanged(int)),plugin,SLOT(slotObjectPropertiesChanged(int)), Qt::DirectConnection);
......
......@@ -123,7 +123,9 @@ namespace Viewer {
public:
/// 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
ACG::SceneGraph::DrawModes::DrawMode drawMode() { return currentDrawMode_; };
......@@ -498,10 +500,17 @@ namespace Viewer {
signals:
/** \brief This signal is emitted when the configuration has been changed
*
*/
void updated();
/** \brief This signal is emitted when the drawmode changed
*
*/
void drawModeChanged(int _viewerId );
void getPickMode(std::string& _mode );
void setPickMode(const std::string _mode );
......
......@@ -335,6 +335,7 @@ CoreWidget( QVector<ViewMode*>& _viewModes,
connect (&PluginFunctions::viewerProperties(i), SIGNAL( setActionMode(const Viewer::ActionMode) ),
this, SLOT( setActionMode(const Viewer::ActionMode)), Qt::DirectConnection );
connect (&PluginFunctions::viewerProperties(i), SIGNAL( drawModeChanged(int)), this, SIGNAL(drawModeChanged(int)));
}
// Initialize all examiners
......
......@@ -1279,6 +1279,12 @@ public:
/// When using first person mode strafe to the right
void strafeRight();
signals :
/** \brief The viewer with id _viewerId changed its draw Mode
*
*/
void drawModeChanged(int _viewerId);
private :
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