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