diff options
author | Samuel Fadel <samuelfadel@gmail.com> | 2016-02-11 20:37:33 -0200 |
---|---|---|
committer | Samuel Fadel <samuelfadel@gmail.com> | 2016-02-11 20:37:33 -0200 |
commit | 893380be1bde766736c1e099731bacb87f239a3a (patch) | |
tree | d02b188f44102178847c9ba443774c64cedfd13d /barchart.h | |
parent | b722ac36aef378ed9837f7f4595b4ce2d255f4ac (diff) |
BarChart: correctly displays current selection.
Diffstat (limited to 'barchart.h')
-rw-r--r-- | barchart.h | 23 |
1 files changed, 15 insertions, 8 deletions
@@ -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<bool> m_selection; + void updateBrush(QSGNode *node) const; + int m_brushedItem; + int itemAt(float x, bool includeSelectorWidth = false) const; arma::vec m_values; |