aboutsummaryrefslogtreecommitdiff
path: root/scatterplot.h
diff options
context:
space:
mode:
authorSamuel Fadel <samuelfadel@gmail.com>2015-05-20 18:53:07 -0300
committerSamuel Fadel <samuelfadel@gmail.com>2015-05-21 18:09:16 -0300
commitb3c7ac156e1c4ac5d7455ce61e89549291ac85b1 (patch)
tree024ee0050cf68534b2e977d48c266303a2c9bdc8 /scatterplot.h
parent02e2ebf10c30ca278dc8a85649c6a7db87858cde (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.h9
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;