diff options
Diffstat (limited to 'barchart.h')
-rw-r--r-- | barchart.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -7,6 +7,7 @@ #include <armadillo> +#include "colorscale.h" #include "scale.h" class BarChart @@ -19,9 +20,11 @@ public: signals: void valuesChanged(const arma::vec &values) const; + void colorScaleChanged(const ColorScale *scale) const; public slots: void setValues(const arma::vec &values); + void setColorScale(const ColorScale *scale); protected: QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *); @@ -31,10 +34,12 @@ protected: private: QSGNode *newBarNode() const; void updateBarNodeGeom(QSGNode *barNode, float x, float width, float height); + void updateBarNodeColor(QSGNode *barNode, const QColor &color); void updateBars(QSGNode *root); bool m_shouldUpdateBars; arma::vec m_values; + const ColorScale *m_colorScale; std::vector<int> m_originalIndices; LinearScale<float> m_scale; }; |