From a9236429e5691159f1ddc017b28ee0c060e0092d Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Sun, 17 Jan 2016 16:09:51 +0100 Subject: Added a options panel. * Added screenshot action that saves two images: one of the main view (plot + splat) and one of the bottom view (bar chart) * Added methods/signals/slots to Scatterplot for handling glyph sizes * Added methods/signals/slots to VoronoiSplat for handling the alpha/beta parameters, which are now also no longer fixed * Options panel: - glyph sizes of both CPs and RPs - splat opacity - splat parameters (alpha & beta) - color scale combo box currently does nothing --- voronoisplat.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'voronoisplat.h') diff --git a/voronoisplat.h b/voronoisplat.h index f334261..6682fed 100644 --- a/voronoisplat.h +++ b/voronoisplat.h @@ -16,12 +16,14 @@ public: Renderer *createRenderer() const; - const std::vector &sites() const { return m_sites; } - const std::vector &values() const { return m_values; } + const std::vector &sites() const { return m_sites; } + const std::vector &values() const { return m_values; } const std::vector &colorScale() const { return m_cmap; } + Q_INVOKABLE float alpha() const { return m_alpha; } + Q_INVOKABLE float beta() const { return m_beta; } - bool sitesChanged() const { return m_sitesChanged; } - bool valuesChanged() const { return m_valuesChanged; } + bool sitesChanged() const { return m_sitesChanged; } + bool valuesChanged() const { return m_valuesChanged; } bool colorScaleChanged() const { return m_colorScaleChanged; } void setSitesChanged(bool sitesChanged) { @@ -38,6 +40,7 @@ signals: void sitesChanged(const arma::mat &sites) const; void valuesChanged(const arma::vec &values) const; void colorScaleChanged(const ColorScale &scale) const; + void alphaChanged(float alpha) const; public slots: // 'points' should be a 2D points matrix (each point in a row) @@ -49,8 +52,15 @@ public slots: // Set colorScale data based on the given color scale void setColorScale(const ColorScale &scale); + // Shepard blur radius + Q_INVOKABLE void setAlpha(float alpha); + + // Maximum blur radius + Q_INVOKABLE void setBeta(float beta); + private: std::vector m_sites, m_values, m_cmap; + float m_alpha, m_beta; bool m_sitesChanged, m_valuesChanged, m_colorScaleChanged; }; -- cgit v1.2.3