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