1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
5 - University of LYON http://www.universite-lyon.fr/
6 - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr
7 - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the copyright notices for more information.
13 It is distributed under dual licence
15 - BSD See included LICENSE.txt file
16 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ======================================================================-====*/
21 #include "vvToolBaseBase.h"
22 #include "vvToolCreator.h"
24 //------------------------------------------------------------------------------
25 template<class ToolType>
26 class vvToolBase : public vvToolBaseBase {
28 vvToolBase(vvMainWindowBase * m);
29 static void Initialize(); // can't be virtual, must be overwritten
31 static void SetToolName(QString n) { vvToolCreator<ToolType>::mSingleton->mToolName = n; }
32 static void SetToolMenuName(QString n) { vvToolCreator<ToolType>::mSingleton->mToolMenuName = n; }
33 static void SetToolIconFilename(QString n) { vvToolCreator<ToolType>::mSingleton->mToolIconFilename = n; }
34 static void SetToolTip(QString n) { vvToolCreator<ToolType>::mSingleton->mToolTip = n; }
35 static void SetToolExperimental(bool exp) { vvToolCreator<ToolType>::mSingleton->mExperimental = exp; }
37 void AddImage(vvImage::Pointer image,std::string filename) {
38 CREATOR(ToolType)->GetMainWindow()->AddImage(image,filename);
41 void setSender(QObject *s) { mSender = s; }
46 //------------------------------------------------------------------------------
48 #include "vvToolBase.txx"