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

baseplugin slot for clear all

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@2573 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 5d5263f8
...@@ -94,6 +94,11 @@ class BaseInterface { ...@@ -94,6 +94,11 @@ class BaseInterface {
*/ */
virtual void slotObjectUpdated( int _identifier ) {}; virtual void slotObjectUpdated( int _identifier ) {};
/** \brief Called if the whole scene is cleared
*
*/
virtual void slotAllCleared( ) {};
/** \brief The active object has changed /** \brief The active object has changed
* *
* This slot is called by the Main aplication if the currently active object has changed.\n * This slot is called by the Main aplication if the currently active object has changed.\n
......
...@@ -493,6 +493,7 @@ void ...@@ -493,6 +493,7 @@ void
Core::clearAll() Core::clearAll()
{ {
objectRoot_->deleteSubtree(); objectRoot_->deleteSubtree();
emit allCleared();
emit ObjectListUpdated(-1); emit ObjectListUpdated(-1);
slotScriptInfo( "core" , "clearAll()" ); slotScriptInfo( "core" , "clearAll()" );
......
...@@ -132,6 +132,8 @@ protected: ...@@ -132,6 +132,8 @@ protected:
* @{ */ * @{ */
//=========================================================================== //===========================================================================
signals: signals:
void allCleared();
/// When this Signal is emitted all Plugins are informed that the object list changed /// When this Signal is emitted all Plugins are informed that the object list changed
void ObjectListUpdated(int); void ObjectListUpdated(int);
......
...@@ -401,6 +401,9 @@ void Core::loadPlugin(QString filename, bool silent){ ...@@ -401,6 +401,9 @@ void Core::loadPlugin(QString filename, bool silent){
if ( checkSignal(plugin,"updated_objects(int)") ) if ( checkSignal(plugin,"updated_objects(int)") )
connect(plugin,SIGNAL(updated_objects(int)),this,SLOT(slotObjectsListUpdated(int))); connect(plugin,SIGNAL(updated_objects(int)),this,SLOT(slotObjectsListUpdated(int)));
if ( checkSlot(plugin,"slotAllCleared()") )
connect(this,SIGNAL(allCleared()),plugin,SLOT(slotAllCleared()));
if ( checkSignal(plugin,"activeObjectChanged()") ) if ( checkSignal(plugin,"activeObjectChanged()") )
connect(plugin,SIGNAL(activeObjectChanged()),this,SLOT(slotActiveObjectChanged() )); connect(plugin,SIGNAL(activeObjectChanged()),this,SLOT(slotActiveObjectChanged() ));
......
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