From 75c5affd4d7919a969ab65a4a28b6306686e5f9c Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Tue, 29 Sep 2015 16:01:00 -0300 Subject: HistoryGraph now notifies when the active item changes. Scatterplot now differentiates between interactive and programatic changes in x/y data. --- historygraph.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'historygraph.h') 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; }; -- cgit v1.2.3