]> Creatis software - clitk.git/blob - vv/vvMainWindowBase.h
cosmetic
[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 vvSlicerManager * AddImage(vvImage::Pointer image,std::string filename) = 0;
39   virtual void UpdateCurrentSlicer() = 0;
40   virtual QTabWidget * GetTab() = 0;
41   const std::vector<vvSlicerManager*> & GetSlicerManagers() const { return mSlicerManagers; }
42   QMenu * GetToolMenu() const { return mMenuTools; }
43   QMenu * GetMenu(std::string menuName) const;// { return mMenuTools; }
44   QMenu * GetContextMenu() const { return mContextMenu; }
45   QMenu * GetExperimentalToolMenu() const { return mMenuExperimentalTools; }
46   int GetSlicerManagerCurrentIndex() const { return mSlicerManagerCurrentIndex; }
47   QWidget * GetMainWidget() { return mMainWidget; }
48   const QString & GetInputPathName() { return mInputPathName; }
49
50 signals:
51   void AnImageIsBeingClosed(vvSlicerManager *);
52   void SelectedImageHasChanged(vvSlicerManager *);
53
54 protected:
55   std::vector<vvSlicerManager*> mSlicerManagers;
56   QMenu * mMenuTools;
57   QMenu * mMenuSegmentation;
58   QMenu * mContextMenu;
59   QMenu * mMenuExperimentalTools;
60   int mSlicerManagerCurrentIndex;
61   QWidget* mMainWidget;
62   QString mInputPathName;
63
64 };
65 //------------------------------------------------------------------------------
66
67 #endif