From b3c7ac156e1c4ac5d7455ce61e89549291ac85b1 Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Wed, 20 May 2015 18:53:07 -0300 Subject: Nearly complete implementation of interaction. Interaction still does not work due to signals not being correctly emitted. --- scatterplot.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'scatterplot.h') diff --git a/scatterplot.h b/scatterplot.h index 58774a9..5423a82 100644 --- a/scatterplot.h +++ b/scatterplot.h @@ -2,8 +2,8 @@ #define SCATTERPLOT_H #include -#include #include +#include #include "colorscale.h" @@ -14,11 +14,11 @@ public: Scatterplot(QQuickItem *parent = 0); ~Scatterplot(); - void setData(const arma::mat &data); - signals: + void dataChanged(const arma::mat &data); public slots: + void setData(const arma::mat &data); protected: QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *); @@ -28,6 +28,8 @@ protected: private: QSGNode *newGlyphNodeTree(); + bool selectGlyphs(bool mergeSelection); + void updateData(); enum InteractionState { INTERACTION_NONE, @@ -36,6 +38,7 @@ private: INTERACTION_MOVING } m_currentState; QPointF m_dragOriginPos, m_dragCurrentPos; + QList m_selectedGlyphs; arma::mat m_data; ColorScale m_colorScale; -- cgit v1.2.3