]> Creatis software - clitk.git/blob - vv/vvMainWindowBase.h
- add "convert to" in context menu
[clitk.git] / vv / vvMainWindowBase.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
19 #ifndef VVMAINWINDOWBASE_H
20 #define VVMAINWINDOWBASE_H
21 #include "clitkCommon.h"
22 #include "vvImage.h"
23 #include <qmainwindow.h>
24
25 class vvSlicerManager;
26 class QMenu;
27
28 //------------------------------------------------------------------------------
29 class vvMainWindowBase : public QMainWindow
30 {
31    Q_OBJECT
32
33 public:
34   vvMainWindowBase() { mSlicerManagerCurrentIndex = -1; }
35   ~vvMainWindowBase() { }
36
37   virtual void AddImage(vvImage::Pointer image,std::string filename) = 0;
38   virtual void UpdateCurrentSlicer() = 0;
39   const std::vector<vvSlicerManager*> & GetSlicerManagers() const { return mSlicerManagers; }
40   QMenu * GetToolMenu() const { return mMenuTools; }
41   QMenu * GetContextMenu() const { return mContextMenu; }
42   QMenu * GetExperimentalToolMenu() const { return mMenuExperimentalTools; }
43   int GetSlicerManagerCurrentIndex() const { return mSlicerManagerCurrentIndex; }
44   QWidget * GetMainWidget() { return mMainWidget; }
45
46 signals:
47   void AnImageIsBeingClosed(vvSlicerManager *);
48
49 protected:
50   std::vector<vvSlicerManager*> mSlicerManagers;
51   QMenu * mMenuTools;
52   QMenu * mContextMenu;
53   QMenu * mMenuExperimentalTools;
54   int mSlicerManagerCurrentIndex;
55   QWidget* mMainWidget;
56 };
57 //------------------------------------------------------------------------------
58
59 #endif