]> Creatis software - clitk.git/blob - vv/vvToolBase.h
removed headers
[clitk.git] / vv / vvToolBase.h
1 #ifndef VVTOOLBASE_H
2 #define VVTOOLBASE_H
3 #include "vvToolBaseBase.h"
4 #include "vvToolCreator.h"
5
6 //------------------------------------------------------------------------------
7 template<class ToolType>
8 class vvToolBase : public vvToolBaseBase {
9 public:
10   vvToolBase(vvMainWindowBase * m);
11   static void Initialize();  // can't be virtual, must be overwritten
12
13   static void SetToolName(QString n) { vvToolCreator<ToolType>::mSingleton->mToolName = n; }
14   static void SetToolMenuName(QString n) { vvToolCreator<ToolType>::mSingleton->mToolMenuName = n; }
15   static void SetToolIconFilename(QString n) { vvToolCreator<ToolType>::mSingleton->mToolIconFilename = n; }
16   static void SetToolTip(QString n) { vvToolCreator<ToolType>::mSingleton->mToolTip = n; }
17   static void SetToolExperimental(bool exp) { vvToolCreator<ToolType>::mSingleton->mExperimental = exp; }
18
19   void AddImage(vvImage::Pointer image,std::string filename) {
20     CREATOR(ToolType)->GetMainWindow()->AddImage(image,filename); 
21   }
22
23 };
24 //------------------------------------------------------------------------------
25
26 #include "vvToolBase.txx"
27
28 #endif
29