Files

24 lines
401 B
C++
Raw Permalink Normal View History

2026-05-24 23:21:33 +02:00
#ifndef COLORSLIDER_H
#define COLORSLIDER_H
#include <QSlider>
#include <QPaintEvent>
class ColorSlider : public QSlider {
Q_OBJECT
public:
ColorSlider(QWidget* parent = 0);
~ColorSlider();
//h∈(0, 360), s∈(0, 1), v∈(0, 1)
QColor getColor(qreal h, qreal s, qreal v);
protected:
void paintEvent(QPaintEvent *ev);
private:
int m_value;
};
#endif // COLORSLIDER_H