]> Creatis software - clitk.git/blob - vv/vvMainWindowBase.h
- toolbase
[clitk.git] / vv / vvMainWindowBase.h
1 /*=========================================================================
2
3  Program:   vv
4   Module:   $RCSfile: vvMainWindowBase.h,v $
5  Language:  C++
6  Author :   David Sarrut (david.sarrut@creatis.insa-lyon.fr)
7
8 Copyright (C) 2010
9 Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr
10 CREATIS-LRMN http://www.creatis.insa-lyon.fr
11
12 This program is free software: you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation, version 3 of the License.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 GNU General Public License for more details.
20
21   You should have received a copy of the GNU General Public License
22   along with this program.  If not, see <http://www.gnu.org/licenses/>.
23
24   =========================================================================*/
25
26 #ifndef VVMAINWINDOWBASE_H
27 #define VVMAINWINDOWBASE_H
28
29 #include "clitkCommon.h"
30 #include "vvImage.h"
31 #include <qmainwindow.h>
32
33 class vvSlicerManager;
34 class QMenu;
35
36 //------------------------------------------------------------------------------
37 class vvMainWindowBase : public QMainWindow
38 {
39    Q_OBJECT
40
41 public:
42   vvMainWindowBase() { mSlicerManagerCurrentIndex = -1; }
43   ~vvMainWindowBase() { }
44
45   virtual void AddImage(vvImage::Pointer image,std::string filename) = 0;
46   virtual void UpdateCurrentSlicer() = 0;
47   const std::vector<vvSlicerManager*> & GetSlicerManagers() const { return mSlicerManagers; }
48   QMenu * GetMenu() const { return mMenuTools; }
49   int GetSlicerManagerCurrentIndex() const { return mSlicerManagerCurrentIndex; }
50   QWidget * GetMainWidget() { return mMainWidget; }
51
52 signals:
53   void AnImageIsBeingClosed(vvSlicerManager *);
54
55 protected:
56   std::vector<vvSlicerManager*> mSlicerManagers;
57   QMenu * mMenuTools;
58   int mSlicerManagerCurrentIndex;
59   QWidget* mMainWidget;
60 };
61 //------------------------------------------------------------------------------
62
63 #endif