blob: 6e6501237a6d2bc259f69b69f5a5e8baabe8ed77 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#ifndef COLORSCALE_H
#define COLORSCALE_H
#include <initializer_list>
#include <QColor>
#include <QList>
class ColorScale
{
public:
ColorScale(const QColor &firstColor, const QColor &lastColor);
ColorScale(std::initializer_list<QColor> colors);
ColorScale(const QList<QColor> &colors);
virtual ~ColorScale();
virtual QColor color(qreal t) const;
void setExtents(qreal min, qreal max);
protected:
qreal m_min, m_max;
QList<QColor> m_colors;
};
#endif // COLORSCALE_H
|