]> Creatis software - clitk.git/blob - vv/vvToolInputSelectorWidget.h
Merge branch 'master' into VTK6_Qt5
[clitk.git] / vv / vvToolInputSelectorWidget.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://www.centreleonberard.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 #ifndef VVTOOLINPUTSELECTORWIDGET_H
19 #define VVTOOLINPUTSELECTORWIDGET_H
20
21 // qt
22 #include <QtUiPlugin/QDesignerExportWidget>
23 #include <QDialog>
24
25 // vv
26 #include "ui_vvToolInputSelectorWidget.h"
27
28 class vvSlicerManager;
29 class vvToolSimpleInputSelectorWidget;
30
31 //------------------------------------------------------------------------------
32 class vvToolInputSelectorWidget: public QWidget, private Ui::vvToolInputSelectorWidget 
33 {
34   Q_OBJECT
35     public:
36   vvToolInputSelectorWidget(QWidget * parent=0, Qt::WindowFlags f=0);
37   ~vvToolInputSelectorWidget() {}
38   
39   void AddInputSelector(QString & s, const std::vector<vvSlicerManager*> & l, int index, bool allowSkip=false);  
40   void Initialize();
41   std::vector<vvSlicerManager*> & GetSelectedInputs();
42   void AnImageIsBeingClosed(vvSlicerManager * m);
43   int GetNumberOfInput();
44
45  public slots:
46   void accept(); // to change ! in something like acceptOneMoreInput
47   void reject();
48   void skip();
49
50  signals:
51   void accepted();
52   void rejected();
53
54  protected:
55   void AddInputSelector(vvToolSimpleInputSelectorWidget * input, 
56                         std::vector<vvSlicerManager*> l, int index);
57   Ui::vvToolInputSelectorWidget ui;
58   std::vector<vvSlicerManager*> mSlicerManagerList;
59   int mCurrentIndex;
60   vvSlicerManager * mCurrentSliceManager;
61   int mNumberOfAcceptedInputs;
62   std::vector<vvToolSimpleInputSelectorWidget *> mListOfSimpleInputWidget;
63   std::vector<bool> mSkipInput;
64 }; // end class vvToolInputSelectorWidget
65 //------------------------------------------------------------------------------
66
67 #endif
68