From 893380be1bde766736c1e099731bacb87f239a3a Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Thu, 11 Feb 2016 20:37:33 -0200 Subject: BarChart: correctly displays current selection. --- barchart.h | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'barchart.h') diff --git a/barchart.h b/barchart.h index e9de96d..98e3521 100644 --- a/barchart.h +++ b/barchart.h @@ -46,21 +46,28 @@ protected: private: QSGNode *newSceneGraph() const; QSGNode *newBarNode() const; + QSGNode *newSelectionBarNode() const; void updateViewport(QSGNode *root) const; - void updateBarNodeGeom(QSGNode *barNode, float x, float width, float height); - void updateBarNodeColor(QSGNode *barNode, const QColor &color); - void updateBars(QSGNode *node); - void updateBrush(QSGNode *node); + void updateBarNodeGeom(QSGNode *barNode, float x, float width, float height) const; + void updateBarNodeColor(QSGNode *barNode, const QColor &color) const; + void updateBars(QSGNode *node) const; bool m_shouldUpdateBars; - int m_brushedItem; - void updateSelectionRect(QSGNode *node); - bool m_shouldUpdateSelectionRect; - void interactiveSelection(float start, float end); + void updatePreSelection(QSGNode *node) const; + bool m_shouldUpdatePreSelection; float m_dragStartPos, m_dragLastPos; + + void updateSelectionBar(QSGNode *node, float x, float barWidth, const QColor &color) const; + void updateSelectionBars(QSGNode *node) const; + bool m_shouldUpdateSelection; + + void interactiveSelection(float start, float end); std::vector m_selection; + void updateBrush(QSGNode *node) const; + int m_brushedItem; + int itemAt(float x, bool includeSelectorWidth = false) const; arma::vec m_values; -- cgit v1.2.3