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

Added objectProperties slot

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5327 383ad7c9-94d9-4d36-a494-682f7c89f535
parent a955741f
......@@ -129,6 +129,13 @@ class BaseInterface {
*/
virtual void objectSelectionChanged( int /*_identifier*/ ) {};
/** \brief Object properties have been changed
*
* This signal is used to tell the other plugins that the object properties (e.g. name ) have changed
*
*/
virtual void objectPropertiesChanged( int /*_identifier*/ ) {};
private slots:
/** \brief An object has been updated by another plugin
......@@ -169,6 +176,15 @@ class BaseInterface {
*/
virtual void slotVisibilityChanged( int /*_identifier*/ ) {};
/** \brief Object properties have been changed
*
* This slot is called if the object properties (e.g. name ) have changed
* The id of the object is given as a parameter.
* If multiple or all objects have changed, the id will be -1.
*
*/
virtual void slotObjectPropertiesChanged( int /*_identifier*/ ) {};
/** @} */
//===========================================================================
......
......@@ -197,6 +197,9 @@ signals:
/// Tell plugins that the visibility of an object has changed
void visibilityChanged(int _id);
/// Tell plugins that object properties such as object names have been changed
void objectPropertiesChanged( int _id );
/** @} */
//===========================================================================
......@@ -213,6 +216,9 @@ signals:
/// Called when a plugin changes the visibility of an object
void slotVisibilityChanged(int _id);
/// Called by plugins if object properties like names have changed
void slotObjectPropertiesChanged( int _id );
/// Called by Plugins if they changed the active object
void slotObjectSelectionChanged( int _id);
......@@ -415,9 +421,9 @@ private:
/// Open Recent file
void slotRecentOpen(QAction* _action);
public slots:
/// Add a Toolbox from a plugin or from scripting
void addToolbox(QString _name ,QWidget* _widget);
......@@ -434,7 +440,7 @@ private:
/// Data root node
SeparatorNode* root_node_;
/// Node for the coordinate system
ACG::SceneGraph::CoordsysNode* coordsysNode_;
......
......@@ -116,6 +116,11 @@ void Core::slotObjectSelectionChanged( int _id )
// emit updatedObject(_id);
}
void Core::slotObjectPropertiesChanged( int _id )
{
emit objectPropertiesChanged(_id);
}
//====================================================================================
// === Toolbox handling =================
//=====================================================================================
......
......@@ -479,6 +479,11 @@ void Core::loadPlugin(QString filename, bool silent){
connect(this,SIGNAL(signalObjectUpdated(int)),plugin,SLOT(slotObjectUpdated(int)), Qt::DirectConnection);
if ( checkSignal(plugin,"objectPropertiesChanged(int)"))
connect(plugin,SIGNAL(objectPropertiesChanged(int)),this,SLOT(slotObjectPropertiesChanged(int)), Qt::DirectConnection);
if ( checkSlot(plugin,"slotObjectPropertiesChanged(int)"))
connect(this,SIGNAL(objectPropertiesChanged(int)),plugin,SLOT(slotObjectPropertiesChanged(int)), Qt::DirectConnection);
if ( checkSignal(plugin,"visibilityChanged(int)" ) )
emit log (LOGERR,"Signal visibilityChanged() now requires objectid or -1 as argument " );
......
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