aboutsummaryrefslogtreecommitdiff
path: root/historygraph.h
diff options
context:
space:
mode:
authorSamuel Fadel <samuelfadel@gmail.com>2015-09-29 16:01:00 -0300
committerSamuel Fadel <samuelfadel@gmail.com>2015-09-29 16:01:00 -0300
commit75c5affd4d7919a969ab65a4a28b6306686e5f9c (patch)
treea2f7da22e641dfaba352da42e066e8e659cf72f8 /historygraph.h
parent30f327b2fd25104916bffe6fe76823f0dbe35a72 (diff)
HistoryGraph now notifies when the active item changes. Scatterplot now differentiates between interactive and programatic changes in x/y data.
Diffstat (limited to 'historygraph.h')
-rw-r--r--historygraph.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/historygraph.h b/historygraph.h
index 564845c..60cce94 100644
--- a/historygraph.h
+++ b/historygraph.h
@@ -11,20 +11,26 @@ public:
HistoryGraph(QQuickItem *parent = 0);
~HistoryGraph();
+signals:
+ void currentItemChanged(const arma::mat &item);
+
public slots:
void addHistoryItem(const arma::mat &item);
protected:
QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *);
+ void mousePressEvent(QMouseEvent *event);
private:
class HistoryItemNode;
+ HistoryItemNode *nodeAt(const QPointF &pos) const;
+ HistoryItemNode *nodeAt(const QPointF &pos, HistoryItemNode *node) const;
+
QSGNode *createNodeTree();
void updateNodeTree(QSGNode *root);
void addScatterplot(QSGNode *node, const HistoryItemNode *historyItemNode, float x, float y, float w, float h);
-
HistoryItemNode *m_firstNode, *m_currentNode;
bool m_needsUpdate;
};