aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scatterplot.cpp2
-rw-r--r--scatterplot.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/scatterplot.cpp b/scatterplot.cpp
index 5b7e82d..8f08fee 100644
--- a/scatterplot.cpp
+++ b/scatterplot.cpp
@@ -26,7 +26,7 @@ Scatterplot::Scatterplot(QQuickItem *parent)
setFlag(QQuickItem::ItemHasContents);
}
-void Scatterplot::setColorScale(ColorScale *colorScale)
+void Scatterplot::setColorScale(const ColorScale *colorScale)
{
if (!colorScale) {
return;
diff --git a/scatterplot.h b/scatterplot.h
index f577819..2997425 100644
--- a/scatterplot.h
+++ b/scatterplot.h
@@ -17,7 +17,7 @@ public:
Scatterplot(QQuickItem *parent = 0);
arma::mat XY() const;
- void setColorScale(ColorScale *colorScale);
+ void setColorScale(const ColorScale *colorScale);
void setXY(const arma::mat &xy, bool updateView);
void setColorData(const arma::vec &colorData, bool updateView);
void setOpacityData(const arma::vec &opacityData, bool updateView);
@@ -78,7 +78,7 @@ private:
bool m_shouldUpdateGeometry, m_shouldUpdateMaterials;
- ColorScale *m_colorScale;
+ const ColorScale *m_colorScale;
arma::vec m_colorData;
arma::vec m_opacityData;