diff layer/WaveformLayer.h @ 1470:696e569ff21b by-id

Further layer updates for ById
author Chris Cannam
date Fri, 28 Jun 2019 17:37:22 +0100
parents 05d614f6e46d
children 10fe8124dc17
line wrap: on
line diff
--- a/layer/WaveformLayer.h	Thu Jun 27 13:16:25 2019 +0100
+++ b/layer/WaveformLayer.h	Fri Jun 28 17:37:22 2019 +0100
@@ -36,10 +36,8 @@
     WaveformLayer();
     ~WaveformLayer();
 
-    const ZoomConstraint *getZoomConstraint() const override {
-        return m_model ? m_model->getZoomConstraint() : 0;
-    }
-    const Model *getModel() const override { return m_model; }
+    const ZoomConstraint *getZoomConstraint() const override;
+    ModelId getModel() const override { return m_model; }
     void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override;
 
     QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const override;
@@ -51,7 +49,7 @@
     int getVerticalScaleWidth(LayerGeometryProvider *v, bool detailed, QPainter &) const override;
     void paintVerticalScale(LayerGeometryProvider *v, bool detailed, QPainter &paint, QRect rect) const override;
 
-    void setModel(const RangeSummarisableTimeValueModel *model);
+    void setModel(ModelId model); // a RangeSummarisableTimeValueModel
 
     PropertyList getProperties() const override;
     QString getPropertyLabel(const PropertyName &) const override;
@@ -196,7 +194,7 @@
 protected:
     double dBscale(double sample, int m) const;
 
-    const RangeSummarisableTimeValueModel *m_model; // I do not own this
+    ModelId m_model; 
 
     typedef std::vector<RangeSummarisableTimeValueModel::RangeBlock> RangeVec;