From d414b68cea008edc063e26133564d120a7430bd2 Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Thu, 21 Jan 2016 19:36:14 +0100 Subject: Added selection linking. Needs more tests. --- scatterplot.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'scatterplot.h') diff --git a/scatterplot.h b/scatterplot.h index c15215b..0fb12ba 100644 --- a/scatterplot.h +++ b/scatterplot.h @@ -1,8 +1,9 @@ #ifndef SCATTERPLOT_H #define SCATTERPLOT_H +#include + #include -#include #include @@ -35,7 +36,8 @@ signals: void xyInteractivelyChanged(const arma::mat &XY) const; void colorDataChanged(const arma::vec &colorData) const; void opacityDataChanged(const arma::vec &opacityData) const; - void selectionChanged(const QSet &selection) const; + void selectionChanged(const std::vector &selection) const; + void selectionInteractivelyChanged(const std::vector &selection) const; void scaleChanged(const LinearScale &sx, const LinearScale &sy) const; void glyphSizeChanged(float glyphSize) const; @@ -43,7 +45,7 @@ public slots: void setXY(const arma::mat &xy); void setColorData(const arma::vec &colorData); void setOpacityData(const arma::vec &opacityData); - void setSelection(const QSet &selection); + void setSelection(const std::vector &selection); void setScale(const LinearScale &sx, const LinearScale &sy); Q_INVOKABLE void setGlyphSize(float glyphSize); @@ -74,8 +76,8 @@ private: LinearScale m_sx, m_sy; // Internal state - bool updateSelection(bool mergeSelection); - QSet m_selectedGlyphs; + bool interactiveSelection(bool mergeSelection); + std::vector m_selection; enum InteractionState { INTERACTION_NONE, -- cgit v1.2.3