diff options
author | Samuel Fadel <samuelfadel@gmail.com> | 2015-05-20 18:53:07 -0300 |
---|---|---|
committer | Samuel Fadel <samuelfadel@gmail.com> | 2015-05-20 18:53:07 -0300 |
commit | 07eb2224a70e29683ec9fd5008662ede32c05639 (patch) | |
tree | 024ee0050cf68534b2e977d48c266303a2c9bdc8 /scatterplot.h | |
parent | ecc6ada9f64a9858f29b5da2e733fec0ec6f8bad (diff) |
Nearly complete implementation of interaction.
Interaction still does not work due to signals not being correctly emitted.
Diffstat (limited to 'scatterplot.h')
-rw-r--r-- | scatterplot.h | 9 |
1 files changed, 6 insertions, 3 deletions
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 <armadillo> -#include <vector> #include <QQuickItem> +#include <QSGNode> #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<bool> m_selectedGlyphs; arma::mat m_data; ColorScale m_colorScale; |