Mercurial > hg > svgui
comparison layer/SpectrogramLayer.h @ 1470:696e569ff21b by-id
Further layer updates for ById
author | Chris Cannam |
---|---|
date | Fri, 28 Jun 2019 17:37:22 +0100 |
parents | 6cf3cb6641e1 |
children | dbff4b290bf0 |
comparison
equal
deleted
inserted
replaced
1469:11a150e65ee1 | 1470:696e569ff21b |
---|---|
58 | 58 |
59 SpectrogramLayer(Configuration = FullRangeDb); | 59 SpectrogramLayer(Configuration = FullRangeDb); |
60 ~SpectrogramLayer(); | 60 ~SpectrogramLayer(); |
61 | 61 |
62 const ZoomConstraint *getZoomConstraint() const override { return this; } | 62 const ZoomConstraint *getZoomConstraint() const override { return this; } |
63 const Model *getModel() const override { return m_model; } | 63 ModelId getModel() const override { return m_model; } |
64 void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override; | 64 void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override; |
65 void setSynchronousPainting(bool synchronous) override; | 65 void setSynchronousPainting(bool synchronous) override; |
66 | 66 |
67 int getVerticalScaleWidth(LayerGeometryProvider *v, bool detailed, QPainter &) const override; | 67 int getVerticalScaleWidth(LayerGeometryProvider *v, bool detailed, QPainter &) const override; |
68 void paintVerticalScale(LayerGeometryProvider *v, bool detailed, QPainter &paint, QRect rect) const override; | 68 void paintVerticalScale(LayerGeometryProvider *v, bool detailed, QPainter &paint, QRect rect) const override; |
79 | 79 |
80 void measureDoubleClick(LayerGeometryProvider *, QMouseEvent *) override; | 80 void measureDoubleClick(LayerGeometryProvider *, QMouseEvent *) override; |
81 | 81 |
82 bool hasLightBackground() const override; | 82 bool hasLightBackground() const override; |
83 | 83 |
84 void setModel(const DenseTimeValueModel *model); | 84 void setModel(ModelId model); // a DenseTimeValueModel |
85 | 85 |
86 PropertyList getProperties() const override; | 86 PropertyList getProperties() const override; |
87 QString getPropertyLabel(const PropertyName &) const override; | 87 QString getPropertyLabel(const PropertyName &) const override; |
88 QString getPropertyIconName(const PropertyName &) const override; | 88 QString getPropertyIconName(const PropertyName &) const override; |
89 PropertyType getPropertyType(const PropertyName &) const override; | 89 PropertyType getPropertyType(const PropertyName &) const override; |
232 int getVerticalZoomSteps(int &defaultStep) const override; | 232 int getVerticalZoomSteps(int &defaultStep) const override; |
233 int getCurrentVerticalZoomStep() const override; | 233 int getCurrentVerticalZoomStep() const override; |
234 void setVerticalZoomStep(int) override; | 234 void setVerticalZoomStep(int) override; |
235 RangeMapper *getNewVerticalZoomRangeMapper() const override; | 235 RangeMapper *getNewVerticalZoomRangeMapper() const override; |
236 | 236 |
237 const Model *getSliceableModel() const override; | 237 ModelId getSliceableModel() const override; |
238 | 238 |
239 protected slots: | 239 protected slots: |
240 void cacheInvalid(); | 240 void cacheInvalid(); |
241 void cacheInvalid(sv_frame_t startFrame, sv_frame_t endFrame); | 241 void cacheInvalid(sv_frame_t startFrame, sv_frame_t endFrame); |
242 | 242 |
243 void preferenceChanged(PropertyContainer::PropertyName name); | 243 void preferenceChanged(PropertyContainer::PropertyName name); |
244 | 244 |
245 protected: | 245 protected: |
246 const DenseTimeValueModel *m_model; // I do not own this | 246 ModelId m_model; // a DenseTimeValueModel |
247 | 247 |
248 int m_channel; | 248 int m_channel; |
249 int m_windowSize; | 249 int m_windowSize; |
250 WindowType m_windowType; | 250 WindowType m_windowType; |
251 int m_windowHopLevel; | 251 int m_windowHopLevel; |
304 else return m_windowSize / (1 << (m_windowHopLevel - 1)); | 304 else return m_windowSize / (1 << (m_windowHopLevel - 1)); |
305 } | 305 } |
306 | 306 |
307 int getFFTSize() const; // m_windowSize * getOversampling() | 307 int getFFTSize() const; // m_windowSize * getOversampling() |
308 | 308 |
309 FFTModel *m_fftModel; | 309 ModelId m_fftModel; |
310 FFTModel *getFFTModel() const { return m_fftModel; } | |
311 Dense3DModelPeakCache *m_wholeCache; | 310 Dense3DModelPeakCache *m_wholeCache; |
312 Dense3DModelPeakCache *m_peakCache; | 311 Dense3DModelPeakCache *m_peakCache; |
313 Dense3DModelPeakCache *getPeakCache() const { return m_peakCache; } | 312 Dense3DModelPeakCache *getPeakCache() const { return m_peakCache; } |
314 int m_peakCacheDivisor; | 313 int m_peakCacheDivisor; |
315 void checkCacheSpace(int *suggestedPeakDivisor, | 314 void checkCacheSpace(int *suggestedPeakDivisor, |