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 ======================================================================-====*/
18 #ifndef VVTOOLCREATORBASE_H
19 #define VVTOOLCREATORBASE_H
21 #include "vvSlicerManager.h"
22 #include "vvMainWindowBase.h"
27 //------------------------------------------------------------------------------
28 class vvToolCreatorBase: public QObject {
32 vvToolCreatorBase(QString name);
33 virtual ~vvToolCreatorBase() {;}
34 virtual void InsertToolInMenu(vvMainWindowBase * m);
35 virtual void InsertToolInContextMenu();
36 template<class ToolType> void CreateTool();
37 virtual void MenuSpecificToolSlot() = 0;
38 vvMainWindowBase * GetMainWindow() const { return mMainWindow; }
39 void addMenuToContextMenu(QMenu * m);
42 QString mToolMenuName;
43 QString mToolIconFilename;
49 std::vector<QAction*> mListOfActions;
52 virtual void MenuToolSlot();
55 vvMainWindowBase * mMainWindow;
56 std::vector<vvToolBaseBase*> mListOfTool;
59 //------------------------------------------------------------------------------
61 #include "vvToolCreatorBase.txx"