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