aboutsummaryrefslogtreecommitdiff
path: root/scatterplot.h
diff options
context:
space:
mode:
authorSamuel Fadel <samuelfadel@gmail.com>2016-02-11 11:24:20 -0200
committerSamuel Fadel <samuelfadel@gmail.com>2016-02-11 11:24:27 -0200
commit0a2ce9c254e5cf84531bd7ef24923956cc8d5048 (patch)
treec11013249112ccbeb78b5b4bb641436f32a73817 /scatterplot.h
parent710e5d87d285ac4d3123597fe012ba7951d6542f (diff)
Scatterplot: glyph size is now a Q_PROPERTY.
In addition, the updateView parameter was removed from all methods that had it.
Diffstat (limited to 'scatterplot.h')
-rw-r--r--scatterplot.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/scatterplot.h b/scatterplot.h
index 1b40040..f12c658 100644
--- a/scatterplot.h
+++ b/scatterplot.h
@@ -16,6 +16,7 @@ class Scatterplot
: public QQuickItem
{
Q_OBJECT
+ Q_PROPERTY(float glyphSize READ glyphSize WRITE setGlyphSize NOTIFY glyphSizeChanged)
public:
static const int PADDING = 20;
@@ -24,9 +25,8 @@ public:
arma::mat XY() const;
void setColorScale(const ColorScale &colorScale);
void setAutoScale(bool autoScale);
- Q_INVOKABLE bool saveToFile(const QUrl &url);
-
- Q_INVOKABLE float glyphSize() const { return m_glyphSize; }
+ float glyphSize() const { return m_glyphSize; }
+ void setGlyphSize(float glyphSize);
void setDragEnabled(bool enabled) { m_dragEnabled = enabled; }
bool isDragEnabled() const { return m_dragEnabled; }
@@ -50,7 +50,6 @@ public slots:
void setScale(const LinearScale<float> &sx, const LinearScale<float> &sy);
void setSelection(const std::vector<bool> &selection);
void brushItem(int item);
- Q_INVOKABLE void setGlyphSize(float glyphSize, bool updateView = true);
protected:
QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *);