24 #ifndef GRADIENT_SLIDER_HPP
25 #define GRADIENT_SLIDER_HPP
38 Q_PROPERTY(QBrush background READ background WRITE setBackground)
39 Q_PROPERTY(QGradientStops colors READ colors WRITE setColors DESIGNABLE false)
40 Q_PROPERTY(QColor firstColor READ firstColor WRITE setFirstColor STORED false)
41 Q_PROPERTY(QColor lastColor READ lastColor WRITE setLastColor STORED false)
42 Q_PROPERTY(QLinearGradient gradient READ gradient WRITE setGradient)
46 explicit
Gradient_Slider(Qt::Orientation orientation, QWidget *parent = 0);
50 QBrush background() const;
52 void setBackground(const QBrush &bg);
55 QGradientStops colors() const;
57 void setColors(const QGradientStops &colors);
60 QLinearGradient gradient() const;
62 void setGradient(const QLinearGradient &gradient);
67 void setColors(const QVector<QColor> &colors);
74 void setFirstColor(const QColor &c);
82 void setLastColor(const QColor &c);
89 QColor firstColor() const;
96 QColor lastColor() const;
99 void paintEvent(QPaintEvent *ev);
106 #endif // GRADIENT_SLIDER_HPP
A slider that mover on top of a gradient.
Definition: gradient_slider.hpp:35
Definition: gradient_slider.cpp:32
#define QCP_EXPORT
Definition: colorpicker_global.hpp:9