diff options
author | Samuel Fadel <samuelfadel@gmail.com> | 2016-01-17 16:09:51 +0100 |
---|---|---|
committer | Samuel Fadel <samuelfadel@gmail.com> | 2016-01-17 16:09:51 +0100 |
commit | a9236429e5691159f1ddc017b28ee0c060e0092d (patch) | |
tree | 73abfac910e8b801105190e74b8fe3251c4c44bf /voronoisplat.h | |
parent | 2260996d93e723a55a72bf23447a8f77e98e1371 (diff) |
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
Diffstat (limited to 'voronoisplat.h')
-rw-r--r-- | voronoisplat.h | 18 |
1 files changed, 14 insertions, 4 deletions
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<float> &sites() const { return m_sites; } - const std::vector<float> &values() const { return m_values; } + const std::vector<float> &sites() const { return m_sites; } + const std::vector<float> &values() const { return m_values; } const std::vector<float> &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<float> m_sites, m_values, m_cmap; + float m_alpha, m_beta; bool m_sitesChanged, m_valuesChanged, m_colorScaleChanged; }; |