X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvToolCreatorBase.txx;h=334771e65713a2586251d28a83ca5ad908050205;hb=0a85e47a06c7d046d06a4645b724c4e81b19998d;hp=1548266c480785abf0aa60debf2afa8081b8cfef;hpb=6bfb777400c8ef3778564641cb1d27fed28f2db1;p=clitk.git diff --git a/vv/vvToolCreatorBase.txx b/vv/vvToolCreatorBase.txx index 1548266..334771e 100644 --- a/vv/vvToolCreatorBase.txx +++ b/vv/vvToolCreatorBase.txx @@ -3,8 +3,8 @@ 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 @@ -25,36 +25,18 @@ =========================================================================*/ -#include "vvMainWindow.h" -#include "vvSlicerManager.h" - //------------------------------------------------------------------------------ +// Called when the tool is created template 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 -void vvToolCreator::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 -// void vvToolCreator::UpdateInfoFromMainWindow() { mMainWindowToolInfo = CREATOR(ToolType)->mMainWindow->GetInfoForTool(); }