]> Creatis software - clitk.git/blob - vv/vvToolCreatorBase.h
added the new headers
[clitk.git] / vv / vvToolCreatorBase.h
1 /*=========================================================================
2   Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
3
4   Authors belong to: 
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
8
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.
12
13   It is distributed under dual licence
14
15   - BSD        See included LICENSE.txt file
16   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ======================================================================-====*/
18 #ifndef VVTOOLCREATORBASE_H
19 #define VVTOOLCREATORBASE_H
20 #include <QObject>
21 #include "vvSlicerManager.h"
22 #include "vvMainWindowBase.h"
23
24 class QAction;
25 class vvToolBaseBase;
26
27 //------------------------------------------------------------------------------
28 class vvToolCreatorBase: public QObject {
29   Q_OBJECT
30   public:
31
32   vvToolCreatorBase(QString name);
33   virtual ~vvToolCreatorBase() {;}  
34   virtual void InsertToolInMenu(vvMainWindowBase * m);
35   template<class ToolType> void CreateTool();
36   virtual void MenuSpecificToolSlot() = 0;
37   vvMainWindowBase * GetMainWindow() const { return mMainWindow; }
38
39   QString mToolName;
40   QString mToolMenuName;
41   QString mToolIconFilename;
42   QString mToolTip;
43   QAction * mAction;
44   bool mExperimental;
45
46 public slots:
47   virtual void MenuToolSlot() { MenuSpecificToolSlot(); }
48
49 protected:
50   vvMainWindowBase * mMainWindow;
51   std::vector<vvToolBaseBase*> mListOfTool;
52 };
53 //------------------------------------------------------------------------------
54
55 #include "vvToolCreatorBase.txx"
56
57 #endif
58