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