Mercurial > hg > svgui
diff layer/WaveformLayer.h @ 1486:ac0a8addabcf
Merge from branch by-id
author | Chris Cannam |
---|---|
date | Wed, 17 Jul 2019 14:25:16 +0100 |
parents | 696e569ff21b |
children | 10fe8124dc17 |
line wrap: on
line diff
--- a/layer/WaveformLayer.h Thu Jun 13 15:35:01 2019 +0100 +++ b/layer/WaveformLayer.h Wed Jul 17 14:25:16 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;