Commit 086983b2 authored by Jan Möbius's avatar Jan Möbius

Scriptable slot to delete objects from scene

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@12296 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 4fbd88b2
......@@ -1396,6 +1396,7 @@ void Core::setDescriptions(){
connect(this, SIGNAL(setSlotDescription(QString,QString,QStringList,QStringList)),
this, SLOT(slotSetSlotDescription(QString,QString,QStringList,QStringList)) );
emit setSlotDescription("deleteObject(int)", tr("Delete an object from the scene."), QStringList("ObjectId"), QStringList(tr("Id of the object to delete")));
emit setSlotDescription("updateView()", tr("Redraw the contents of the viewer."), QStringList(), QStringList());
emit setSlotDescription("clearAll()", tr("Clear all data objects."), QStringList(), QStringList());
emit setSlotDescription("exitApplication()", tr("Quit OpenFlipper"), QStringList(), QStringList());
......@@ -1524,7 +1525,7 @@ void Core::setDescriptions(){
QStringList(tr("side")), QStringList(tr("The desired side of the toolboxes (either 'left' or 'right')")));
}
void Core::slotDeleteObject( int _id ){
void Core::deleteObject( int _id ){
if ( _id == -1 )
return;
......
......@@ -590,8 +590,7 @@ signals:
*/
void slotGetAllFilters ( QStringList& _list);
/// Called when a plugin wants to delete an object
void slotDeleteObject( int _id );
/// Called when a plugin wants to delete all objects
void slotDeleteAllObjects( );
......@@ -616,6 +615,9 @@ public slots:
/// Clear all data objects
void clearAll();
/// Called to delete an object
void deleteObject( int _id );
/// exit the current application
void exitApplication();
......
......@@ -1770,7 +1770,7 @@ void Core::loadPlugin(QString filename, bool silent, QString& _licenseErrors, QO
if ( checkSignal(plugin,"deleteObject(int)" ) )
connect(plugin , SIGNAL( deleteObject( int ) ) ,
this , SLOT( slotDeleteObject( int ) ),Qt::DirectConnection);
this , SLOT( deleteObject( int ) ),Qt::DirectConnection);
if ( checkSignal(plugin,"deleteAllObjects()" ) )
connect(plugin , SIGNAL( deleteAllObjects() ) ,
......
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