]> Creatis software - clitk.git/blob - vv/vvToolWidgetBase.h
hide inputselector option
[clitk.git] / vv / vvToolWidgetBase.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 VVTOOLWIDGETBASE_H
20 #define VVTOOLWIDGETBASE_H
21
22 #include <QtDesigner/QDesignerExportWidget>
23 #include "ui_vvToolWidgetBase.h"
24 #include "clitkImageToImageGenericFilter.h"
25
26 class vvMainWindowBase;
27
28 //------------------------------------------------------------------------------
29 class vvToolWidgetBase:
30   public QDialog, 
31   public Ui::vvToolWidgetBase 
32 {
33   Q_OBJECT
34   public:
35
36   vvToolWidgetBase(vvMainWindowBase * parent=0, Qt::WindowFlags f=0);
37   vvToolWidgetBase(vvMainWindowBase * parent, Qt::WindowFlags f, bool b);
38   ~vvToolWidgetBase();
39
40   virtual void InputIsSelected(vvSlicerManager *m);
41   virtual void InputIsSelected(std::vector<vvSlicerManager*> & l);
42   void AddInputSelector(QString s, clitk::ImageToImageGenericFilterBase * f, bool allowSkip=false);
43   void AddInputSelector(QString s, bool allowSkip=false);
44   void HideInputSelector();
45
46 public slots:
47   virtual void apply() = 0;
48   virtual bool close();
49   void InputIsSelected();
50   void AnImageIsBeingClosed(vvSlicerManager * m);
51   void show();
52
53 protected:
54   void InitializeInputs();
55   Ui::vvToolWidgetBase ui;
56   clitk::ImageToImageGenericFilterBase * mFilter;
57   vvMainWindowBase * mMainWindow;
58   std::vector<vvSlicerManager*> mSlicerManagersCompatible;
59   vvSlicerManager * mCurrentSlicerManager;
60   int mCurrentCompatibleIndex;
61   vvImage * mCurrentImage;
62   bool mIsInitialized;
63
64 }; // end class vvToolWidgetBase
65 //------------------------------------------------------------------------------
66
67 #endif
68