#ifndef COLORSCALE_H #define COLORSCALE_H #include #include #include class ColorScale { public: ColorScale(const QColor &firstColor, const QColor &lastColor); ColorScale(std::initializer_list colors); ColorScale(const QList &colors); ~ColorScale(); void setExtents(qreal min, qreal max); QColor color(qreal t) const; private: qreal m_min, m_max; QList m_colors; }; #endif // COLORSCALE_H