From 41e1b2bfb8e2ba3d0e74180200e7cc109171213e Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Tue, 26 Jan 2016 18:15:50 +0100 Subject: Scatterplot & BarChart: initial brushing mechanism. * Both components now support brushing (support in Scatterplot for activating a brush is still incomplete, though it can be brushed on by other components) * Added a handler for linking the brushing between components * Added crosshair geometry handler to geometry lib * Fixed issue #15 --- scatterplot.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scatterplot.h') diff --git a/scatterplot.h b/scatterplot.h index 0fb12ba..040f272 100644 --- a/scatterplot.h +++ b/scatterplot.h @@ -38,6 +38,8 @@ signals: void opacityDataChanged(const arma::vec &opacityData) const; void selectionChanged(const std::vector &selection) const; void selectionInteractivelyChanged(const std::vector &selection) const; + void itemBrushed(int item) const; + void itemInteractivelyBrushed(int item) const; void scaleChanged(const LinearScale &sx, const LinearScale &sy) const; void glyphSizeChanged(float glyphSize) const; @@ -46,6 +48,7 @@ public slots: void setColorData(const arma::vec &colorData); void setOpacityData(const arma::vec &opacityData); void setSelection(const std::vector &selection); + void brushItem(int item); void setScale(const LinearScale &sx, const LinearScale &sy); Q_INVOKABLE void setGlyphSize(float glyphSize); @@ -61,6 +64,7 @@ private: void applyManipulation(); void updateGlyphs(QSGNode *node); + void updateBrush(QSGNode *node); // Data arma::mat m_xy; @@ -78,6 +82,7 @@ private: // Internal state bool interactiveSelection(bool mergeSelection); std::vector m_selection; + int m_brushedItem; enum InteractionState { INTERACTION_NONE, -- cgit v1.2.3