From 664dc43127bf0dc5791423898ffab6748f016dd7 Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Thu, 21 Jan 2016 14:49:12 +0100 Subject: BarChart: added selection mechanisms. --- barchart.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'barchart.h') diff --git a/barchart.h b/barchart.h index 91cce78..d785aa9 100644 --- a/barchart.h +++ b/barchart.h @@ -4,6 +4,7 @@ #include #include +#include #include @@ -21,6 +22,7 @@ public: signals: void valuesChanged(const arma::vec &values) const; void colorScaleChanged(const ColorScale &scale) const; + void selectionChanged(const QSet &selection) const; public slots: void setValues(const arma::vec &values); @@ -49,6 +51,12 @@ private: bool m_shouldUpdateBars; float m_hoverPos; + void updateSelectionRect(QSGNode *node); + bool m_shouldUpdateSelectionRect; + void selectBarsInRange(float start, float end); + float m_dragStartPos, m_dragLastPos; + QSet m_selection; + arma::vec m_values; ColorScale m_colorScale; std::vector m_originalIndices; -- cgit v1.2.3