From 30f327b2fd25104916bffe6fe76823f0dbe35a72 Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Tue, 29 Sep 2015 14:59:59 -0300 Subject: Inital history graph implementation and using linear scales where applicable. - geometry.h for geometry calculation functions - scale.h for implementations of scales (currently only the linear scale) - updated main_view.qml for the new HistoryGraph component - HistoryGraph displays each subsample used as a mini scatterplot (no colors currently) - Scatterplot now uses scale.h for transformations - Code cleanup and some bug fixes --- historygraph.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'historygraph.h') diff --git a/historygraph.h b/historygraph.h index b854d1e..564845c 100644 --- a/historygraph.h +++ b/historygraph.h @@ -1,20 +1,32 @@ #ifndef HISTORYGRAPH_H #define HISTORYGRAPH_H -#include #include +#include class HistoryGraph : public QQuickItem { Q_OBJECT public: HistoryGraph(QQuickItem *parent = 0); + ~HistoryGraph(); public slots: - void addHistoryItem(const int &item); + void addHistoryItem(const arma::mat &item); protected: QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *); + +private: + class HistoryItemNode; + + 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; }; #endif // HISTORYGRAPH_H -- cgit v1.2.3