]> Creatis software - clitk.git/blob - vv/vvToolSimpleInputSelectorWidget.h
Debug RTStruct conversion with empty struc
[clitk.git] / vv / vvToolSimpleInputSelectorWidget.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 VVTOOLSIMPLEINPUTSELECTORWIDGET_H
19 #define VVTOOLSIMPLEINPUTSELECTORWIDGET_H
20
21 #include <QtGlobal>
22 #if QT_VERSION >= 0x050000
23 #include <QtUiPlugin/QDesignerExportWidget>
24 #else
25 #include <QtDesigner/QDesignerExportWidget>
26 #endif
27 #include <QDialog>
28 #include "ui_vvToolSimpleInputSelectorWidget.h"
29
30 class vvSlicerManager;
31
32 //------------------------------------------------------------------------------
33 class vvToolSimpleInputSelectorWidget: public QWidget, private Ui::vvToolSimpleInputSelectorWidget 
34 {
35   Q_OBJECT
36     public:
37   vvToolSimpleInputSelectorWidget(QWidget * parent=0, Qt::WindowFlags f=0);
38   ~vvToolSimpleInputSelectorWidget() {}
39   
40   void SetInputList(const std::vector<vvSlicerManager*> & l, int index);
41   void Initialize();
42   int GetSelectedInputIndex() { return mCurrentIndex; }
43   vvSlicerManager * GetSelectedInput();
44   void SetText(QString & s);
45   void EnableAllowSkip(bool b);
46
47  public slots:
48   void accept();
49   void reject();
50   void setEnabled(bool b);
51   void skip(QAbstractButton*);
52
53  signals:
54   void accepted();
55   void rejected();
56   void sigskip();
57
58  protected slots:
59   void changeInput(int i);
60   
61  protected:
62   Ui::vvToolSimpleInputSelectorWidget ui;
63   std::vector<vvSlicerManager*> mSlicerManagerList;
64   int mCurrentIndex;
65   vvSlicerManager * mCurrentSliceManager;
66   bool mAllowSkip;
67
68 }; // end class vvToolSimpleInputSelectorWidget
69 //------------------------------------------------------------------------------
70
71 #endif
72