Commit 6b1ae418 authored by Jan Möbius's avatar Jan Möbius
Browse files

Added scipting functions to block and unblock the scenegraph



git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@15181 383ad7c9-94d9-4d36-a494-682f7c89f535
parent d6ba74fe
...@@ -1572,6 +1572,10 @@ void Core::setDescriptions(){ ...@@ -1572,6 +1572,10 @@ void Core::setDescriptions(){
emit setSlotDescription("getToolbox(QString,QString)", tr("Returns a pointer to the requested toolbox widget if it was found, nullptr, otherwise."), emit setSlotDescription("getToolbox(QString,QString)", tr("Returns a pointer to the requested toolbox widget if it was found, nullptr, otherwise."),
tr("Plugin Name\rToolbox Name").split("\r"), tr("Plugin Name\rToolbox Name").split("\r"),
tr("The plugin which the requested toolbox belongs to.\rThe name of the requested toolbox.").split("\r")); tr("The plugin which the requested toolbox belongs to.\rThe name of the requested toolbox.").split("\r"));
emit setSlotDescription("blockSceneGraphUpdates()", tr("Disable Scenegraph Updates (e.g. before loading or adding a large number of files)"),QStringList(), QStringList());
emit setSlotDescription("unblockSceneGraphUpdates()", tr("Enable Scenegraph Updates (e.g. before loading or adding a large number of files)"),QStringList(), QStringList());
} }
void Core::deleteObject( int _id ){ void Core::deleteObject( int _id ){
......
...@@ -696,6 +696,12 @@ public slots: ...@@ -696,6 +696,12 @@ public slots:
/// return the list of available object that has the given selection and type /// return the list of available object that has the given selection and type
QList<int> objectList (QString _selection, QStringList _types); QList<int> objectList (QString _selection, QStringList _types);
/// Block the scenegraph updates
void blockSceneGraphUpdates();
/// Unblock the scenegraph updates
void unblockSceneGraphUpdates();
//=========================================================================== //===========================================================================
/** @name Scripting functions for controlling view modes /** @name Scripting functions for controlling view modes
* @{ */ * @{ */
......
...@@ -323,6 +323,17 @@ void Core::setToolBoxActive(QString _toolBoxName, bool _active) ...@@ -323,6 +323,17 @@ void Core::setToolBoxActive(QString _toolBoxName, bool _active)
} }
} }
/// Block the scenegraph updates
void Core::blockSceneGraphUpdates() {
OpenFlipper::Options::blockSceneGraphUpdates();
}
/// Unblock the scenegraph updates
void Core::unblockSceneGraphUpdates() {
OpenFlipper::Options::unblockSceneGraphUpdates();
}
//============================================================================= //=============================================================================
//== Script Special Functions ================================================= //== Script Special Functions =================================================
//============================================================================= //=============================================================================
......
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