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://www.centreleonberard.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 ===========================================================================**/
18 #ifndef VVTOOLCREATORBASE_H
19 #define VVTOOLCREATORBASE_H
25 #include "vvSlicerManager.h"
26 #include "vvMainWindowBase.h"
31 //------------------------------------------------------------------------------
32 class vvToolCreatorBase: public QObject {
36 vvToolCreatorBase(QString name);
37 virtual ~vvToolCreatorBase() {;}
38 virtual void InsertToolInMenu(vvMainWindowBase * m);
39 virtual void InsertToolInContextMenu();
40 template<class ToolType> void CreateTool();
41 virtual void MenuSpecificToolSlot() = 0;
42 vvMainWindowBase * GetMainWindow() const { return mMainWindow; }
43 void addMenuToContextMenu(QMenu * m);
44 void SetMenuName(std::string m) { m_MenuName = m; }
47 QString mToolMenuName;
48 QString mToolIconFilename;
54 std::vector<QAction*> mListOfActions;
57 virtual void MenuToolSlot();
60 vvMainWindowBase * mMainWindow;
61 std::vector<vvToolBaseBase*> mListOfTool;
63 std::string m_MenuName;
65 //------------------------------------------------------------------------------
67 #include "vvToolCreatorBase.txx"