Program: vv
Module: $RCSfile: vvToolCreatorBase.txx,v $
Language: C++
- Date: $Date: 2010/01/29 13:54:37 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2010/02/24 11:42:42 $
+ Version: $Revision: 1.2 $
Author : David Sarrut (david.sarrut@creatis.insa-lyon.fr)
Copyright (C) 2008
=========================================================================*/
-#include "vvMainWindow.h"
-#include "vvSlicerManager.h"
-
//------------------------------------------------------------------------------
+// Called when the tool is created
template<class ToolType>
void vvToolCreatorBase::CreateTool() {
- DD("Create new tool ");
+ // Get information on the current image
+ mMainWindow->UpdateCurrentSlicer();
+ // Create the tool
ToolType * tool = new ToolType(mMainWindow);
+ // Put it in the list of open tools
+ mListOfTool.push_back(tool);
+ // Go !
tool->show();
}
//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-template<class ToolType>
-void vvToolCreator<ToolType>::Initialize(vvMainWindow * m) {
- // Set MainWindow pointer
- mMainWindow = m;
-
- // Default Initialization
- mToolMenuName = mToolName;
- mToolIconFilename = "noicon";
- mToolTip = mToolName;
-
- // User Tool Initialization
- ToolType::Initialize();
-
- // Common Initialization (insertion into menu)
- vvToolCreatorBase::Initialize(mMainWindow);
-}
-//------------------------------------------------------------------------------
-
-// template<class ToolType>
-// void vvToolCreator<ToolType>::UpdateInfoFromMainWindow() { mMainWindowToolInfo = CREATOR(ToolType)->mMainWindow->GetInfoForTool(); }