diff options
Diffstat (limited to 'colorscale.h')
-rw-r--r-- | colorscale.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/colorscale.h b/colorscale.h index 6e65012..af74b5c 100644 --- a/colorscale.h +++ b/colorscale.h @@ -13,11 +13,15 @@ public: ColorScale(const QList<QColor> &colors); virtual ~ColorScale(); - virtual QColor color(qreal t) const; - void setExtents(qreal min, qreal max); + QColor operator ()(float t) const { return color(t); } + virtual QColor color(float t) const; + + void setExtents(float min, float max); + float min() const { return m_min; } + float max() const { return m_max; } protected: - qreal m_min, m_max; + float m_min, m_max; QList<QColor> m_colors; }; |