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 --- scatterplot.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'scatterplot.h') diff --git a/scatterplot.h b/scatterplot.h index 3d7fa36..43bfc57 100644 --- a/scatterplot.h +++ b/scatterplot.h @@ -6,6 +6,7 @@ #include #include "colorscale.h" +#include "scale.h" class Scatterplot : public QQuickItem { @@ -37,21 +38,19 @@ private: QSGNode *createGlyphNodeTree(); bool updateSelection(bool mergeSelection); - float fromDataXToScreenX(float x) const; - float fromDataYToScreenY(float y) const; - void applyManipulation(); void updateGeometry(); void updateMaterials(); arma::mat m_xy; - float m_xmin, m_xmax, m_ymin, m_ymax; + LinearScale m_sx, m_sy; enum InteractionState { INTERACTION_NONE, INTERACTION_SELECTING, INTERACTION_SELECTED, + INTERACTION_BEGIN_MOVING, INTERACTION_MOVING } m_currentInteractionState; -- cgit v1.2.3