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