krita
kis_double_widget.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef KIS_DOUBLE_WIDGET_H
00023 #define KIS_DOUBLE_WIDGET_H
00024
00025 #include <qwidget.h>
00026 #include <qslider.h>
00027
00028 class QHBoxLayout;
00029 class KDoubleSpinBox;
00030
00031 class KisDoubleWidget : public QWidget
00032 {
00033 Q_OBJECT
00034
00035 typedef QWidget super;
00036 public:
00037 KisDoubleWidget(QWidget* parent = 0, const char* name = 0);
00038 KisDoubleWidget(double min, double max, QWidget* parent = 0, const char* name = 0);
00039 ~KisDoubleWidget();
00040
00041 double value() const;
00042 void setRange(double min, double max);
00043
00044 void setTickmarks(QSlider::TickSetting tickMarks);
00045 void setTickInterval(double tickInterval);
00046 double tickInterval() const;
00047
00048 void setPrecision(int precision);
00049 void setLineStep(double step);
00050 void setPageStep(double step);
00051
00052 void setTracking(bool tracking);
00053 bool tracking() const;
00054
00055 signals:
00056 void valueChanged(double);
00057 void sliderPressed();
00058 void sliderReleased();
00059
00060 public slots:
00061 void setValue(double value);
00062
00063 protected slots:
00064 void setSliderValue(double);
00065 void sliderValueChanged(int);
00066
00067 private:
00068 void init(double min, double max);
00069
00070 protected:
00071 QHBoxLayout* m_layout;
00072 QSlider* m_slider;
00073 KDoubleSpinBox *m_spinBox;
00074 };
00075
00076 #endif // KIS_DOUBLE_WIDGET_H
00077
|