]> Creatis software - clitk.git/blob - vv/vvIntensityValueSlider.h
Debug RTStruct conversion with empty struc
[clitk.git] / vv / vvIntensityValueSlider.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 VVINTENSITYVALUESLIDER_H
19 #define VVINTENSITYVALUESLIDER_H
20
21 // qt
22 #include <QtGlobal>
23 #if QT_VERSION >= 0x050000
24 #include <QtUiPlugin/QDesignerExportWidget>
25 #else
26 #include <QtDesigner/QDesignerExportWidget>
27 #endif
28 #include <QDialog>
29
30 // clitk 
31 #include "clitkCommon.h"
32
33 // vv
34 #include "ui_vvIntensityValueSlider.h"
35 #include "vvImage.h"
36 #include "vtkImageData.h"
37
38 //------------------------------------------------------------------------------
39 class vvIntensityValueSlider:
40   public QWidget, private Ui::vvIntensityValueSlider {
41   Q_OBJECT
42     public:
43   vvIntensityValueSlider(QWidget * parent=0, Qt::WindowFlags f=0);
44   ~vvIntensityValueSlider();
45
46   void SetText(QString t);
47   void SetImage(vvImage * im);
48   void Update();
49   double GetValue() const { return mValue; }
50   void SetValue(double d);
51   void SetMaximum(double max);
52   void SetMinimum(double min);
53   void SetSingleStep(double step);                         
54   void resetMinimum() { SetMinimum(mMin); }
55   void resetMaximum() { SetMaximum(mMax); }
56
57  public slots:
58   void valueChangedFromSpinBox(double v);
59   void valueChangedFromSlider(int v);
60   void SingleStepPlusClicked();
61   void SingleStepMinusClicked();
62
63  signals:
64   void valueChanged(double);
65
66  protected:
67   Ui::vvIntensityValueSlider ui;
68   vvImage * mImage;
69   double mMin;
70   double mMax;
71   double mWidth;
72   double mSliderFactor;
73   double mValue;
74   bool mIsInteger;
75
76 }; // end class vvIntensityValueSlider
77 //------------------------------------------------------------------------------
78
79 #endif
80