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