From 7c4333eed407886114f33d803a3199c50556e4e3 Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Mon, 18 May 2015 18:33:50 -0300 Subject: Updated UI. - Removed unnecessary UI elements from QML file; - Added the ColorScale class and implemented glyph color mapping from class labels; - Mark geometry nodes of individual glyphs as dirty when updating the schene graph. --- colorscale.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 colorscale.h (limited to 'colorscale.h') diff --git a/colorscale.h b/colorscale.h new file mode 100644 index 0000000..6e1212d --- /dev/null +++ b/colorscale.h @@ -0,0 +1,24 @@ +#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 -- cgit v1.2.3