aboutsummaryrefslogtreecommitdiff
path: root/scatterplot.h
diff options
context:
space:
mode:
authorSamuel Fadel <samuelfadel@gmail.com>2016-01-15 22:35:13 +0100
committerSamuel Fadel <samuelfadel@gmail.com>2016-01-15 22:35:13 +0100
commit7ad4b526899f8bc764192e88e65306c788a9ed32 (patch)
treeb2e7dae9ceb06b12709ab3b76fc749304c7a2a92 /scatterplot.h
parente3a4e5827ada7836468d785b12a57e0022b653e6 (diff)
VoronoiSplat & Scatterplot: splatting is now a separate component.
The change was due to future functionality requirements, this separation provides grater flexibility. As a nice side effect, the cropping bug when first rendering the splat is now gone.
Diffstat (limited to 'scatterplot.h')
-rw-r--r--scatterplot.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/scatterplot.h b/scatterplot.h
index 6510c54..656ed09 100644
--- a/scatterplot.h
+++ b/scatterplot.h
@@ -1,16 +1,16 @@
#ifndef SCATTERPLOT_H
#define SCATTERPLOT_H
-#include <memory>
-#include <armadillo>
#include <QtQuick>
#include <QSet>
-#include <QEasingCurve>
+
+#include <armadillo>
#include "colorscale.h"
#include "scale.h"
-class Scatterplot : public QQuickItem
+class Scatterplot
+ : public QQuickItem
{
Q_OBJECT
public:
@@ -31,7 +31,6 @@ signals:
void colorDataChanged(const arma::vec &colorData) const;
void opacityDataChanged(const arma::vec &opacityData) 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:
@@ -39,7 +38,6 @@ public slots:
void setColorData(const arma::vec &colorData);
void setOpacityData(const arma::vec &opacityData);
void setSelection(const QSet<int> &selection);
- void setDisplaySplat(bool displaySplat);
void setScale(const LinearScale<float> &sx, const LinearScale<float> &sy);
protected:
@@ -50,15 +48,14 @@ protected:
private:
QSGNode *newSceneGraph();
- QSGNode *newSplatNode();
QSGNode *newGlyphTree();
- bool updateSelection(bool mergeSelection);
void applyManipulation();
- void updateSplat(QSGNode *node);
void updateGlyphs(QSGNode *node);
+ bool updateSelection(bool mergeSelection);
+
arma::mat m_xy;
void autoScale();
@@ -79,7 +76,6 @@ private:
bool m_shouldUpdateGeometry, m_shouldUpdateMaterials;
- bool m_displaySplat;
ColorScale *m_colorScale;
arma::vec m_colorData;