]> Creatis software - clitk.git/blobdiff - vv/vvToolManager.cxx
disable tools at startup of vv
[clitk.git] / vv / vvToolManager.cxx
index ac699cef92ca5062fe11a3f581bad785e37bd10c..01835f8cda5c82b7e043f240b153c9bde3e8d9a9 100644 (file)
@@ -19,7 +19,7 @@
 #include "vvToolManager.h"
 #include "vvToolCreatorBase.h"
 #include "vvMainWindowBase.h"
-
+#include <QAction>
 //------------------------------------------------------------------------------
 /// Unique static instance
 vvToolManager* vvToolManager::mSingleton=0;
@@ -55,3 +55,13 @@ void vvToolManager::InsertToolsInMenu(vvMainWindowBase * m)
 }
 //------------------------------------------------------------------------------
 
+
+//------------------------------------------------------------------------------
+void vvToolManager::EnableToolsInMenu(vvMainWindowBase * m, bool enable){
+  std::vector<vvToolCreatorBase *>::iterator it;
+  for(it=GetInstance()->mListOfTools.begin(); it!=GetInstance()->mListOfTools.end(); ++it){
+    if((*it)->mAction){
+      (*it)->mAction->setEnabled(enable);
+    }
+  }
+}