diff options
author | Samuel Fadel <samuelfadel@gmail.com> | 2016-01-12 17:37:20 +0100 |
---|---|---|
committer | Samuel Fadel <samuelfadel@gmail.com> | 2016-01-12 17:37:26 +0100 |
commit | a5378abcbb3d8ee8dc3b76380dd50a43a2eec22e (patch) | |
tree | 11f29228bdb020f953fbabcfa397b9254d89db4a /scatterplot.h | |
parent | 44914a9253408d6903272f69bacac1a9144b0e18 (diff) |
Scatterplot: autoscaling & signals.
* Added methods & signal/slots to handle auto/manual scaling
* The subsample plot is now scaled by the full data plot,
naturally superimposing them
* LAMP was corrected in order to always preserve the mapping of
the subsample
Diffstat (limited to 'scatterplot.h')
-rw-r--r-- | scatterplot.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scatterplot.h b/scatterplot.h index fb664a1..1c61656 100644 --- a/scatterplot.h +++ b/scatterplot.h @@ -20,6 +20,8 @@ public: void setColorScale(ColorScale *colorScale); void setXY(const arma::mat &xy, bool updateView); void setColorData(const arma::vec &colorData, bool updateView); + void setScale(const LinearScale<float> &sx, const LinearScale<float> &sy, bool updateView); + void setAutoScale(bool autoScale); Q_INVOKABLE bool saveToFile(const QUrl &url); signals: @@ -28,12 +30,14 @@ signals: void colorDataChanged(const arma::vec &colorData) const; void selectionChanged(const QSet<int> &selection) const; void displaySplatChanged(bool displaySplat) const; + void scaleChanged(const LinearScale<float> &sx, const LinearScale<float> &sy) const; public slots: void setXY(const arma::mat &xy); void setColorData(const arma::vec &colorData); void setSelection(const QSet<int> &selection); void setDisplaySplat(bool displaySplat); + void setScale(const LinearScale<float> &sx, const LinearScale<float> &sy); protected: QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *); @@ -56,6 +60,9 @@ private: void updateGlyphs(QSGNode *node); arma::mat m_xy; + + void autoScale(); + bool m_autoScale; LinearScale<float> m_sx, m_sy; enum InteractionState { |