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