Mercurial > hg > svgui
comparison layer/SpectrogramLayer.h @ 1406:a18e78b9c78b fix-static-analysis
Use override throughout
author | Chris Cannam |
---|---|
date | Mon, 26 Nov 2018 13:52:27 +0000 |
parents | b6cca362bbf4 |
children | 6cf3cb6641e1 |
comparison
equal
deleted
inserted
replaced
1405:4c359c2b220c | 1406:a18e78b9c78b |
---|---|
57 enum Configuration { FullRangeDb, MelodicRange, MelodicPeaks }; | 57 enum Configuration { FullRangeDb, MelodicRange, MelodicPeaks }; |
58 | 58 |
59 SpectrogramLayer(Configuration = FullRangeDb); | 59 SpectrogramLayer(Configuration = FullRangeDb); |
60 ~SpectrogramLayer(); | 60 ~SpectrogramLayer(); |
61 | 61 |
62 virtual const ZoomConstraint *getZoomConstraint() const { return this; } | 62 const ZoomConstraint *getZoomConstraint() const override { return this; } |
63 virtual const Model *getModel() const { return m_model; } | 63 const Model *getModel() const override { return m_model; } |
64 virtual void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const; | 64 void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override; |
65 virtual void setSynchronousPainting(bool synchronous); | 65 void setSynchronousPainting(bool synchronous) override; |
66 | 66 |
67 virtual int getVerticalScaleWidth(LayerGeometryProvider *v, bool detailed, QPainter &) const; | 67 int getVerticalScaleWidth(LayerGeometryProvider *v, bool detailed, QPainter &) const override; |
68 virtual void paintVerticalScale(LayerGeometryProvider *v, bool detailed, QPainter &paint, QRect rect) const; | 68 void paintVerticalScale(LayerGeometryProvider *v, bool detailed, QPainter &paint, QRect rect) const override; |
69 | 69 |
70 virtual bool getCrosshairExtents(LayerGeometryProvider *, QPainter &, QPoint cursorPos, | 70 bool getCrosshairExtents(LayerGeometryProvider *, QPainter &, QPoint cursorPos, |
71 std::vector<QRect> &extents) const; | 71 std::vector<QRect> &extents) const override; |
72 virtual void paintCrosshairs(LayerGeometryProvider *, QPainter &, QPoint) const; | 72 void paintCrosshairs(LayerGeometryProvider *, QPainter &, QPoint) const override; |
73 | 73 |
74 virtual QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const; | 74 QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const override; |
75 | 75 |
76 virtual bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame, | 76 bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame, |
77 int &resolution, | 77 int &resolution, |
78 SnapType snap) const; | 78 SnapType snap) const override; |
79 | 79 |
80 virtual void measureDoubleClick(LayerGeometryProvider *, QMouseEvent *); | 80 void measureDoubleClick(LayerGeometryProvider *, QMouseEvent *) override; |
81 | 81 |
82 virtual bool hasLightBackground() const; | 82 bool hasLightBackground() const override; |
83 | 83 |
84 void setModel(const DenseTimeValueModel *model); | 84 void setModel(const DenseTimeValueModel *model); |
85 | 85 |
86 virtual PropertyList getProperties() const; | 86 PropertyList getProperties() const override; |
87 virtual QString getPropertyLabel(const PropertyName &) const; | 87 QString getPropertyLabel(const PropertyName &) const override; |
88 virtual QString getPropertyIconName(const PropertyName &) const; | 88 QString getPropertyIconName(const PropertyName &) const override; |
89 virtual PropertyType getPropertyType(const PropertyName &) const; | 89 PropertyType getPropertyType(const PropertyName &) const override; |
90 virtual QString getPropertyGroupName(const PropertyName &) const; | 90 QString getPropertyGroupName(const PropertyName &) const override; |
91 virtual int getPropertyRangeAndValue(const PropertyName &, | 91 int getPropertyRangeAndValue(const PropertyName &, |
92 int *min, int *max, int *deflt) const; | 92 int *min, int *max, int *deflt) const override; |
93 virtual QString getPropertyValueLabel(const PropertyName &, | 93 QString getPropertyValueLabel(const PropertyName &, |
94 int value) const; | 94 int value) const override; |
95 virtual QString getPropertyValueIconName(const PropertyName &, | 95 QString getPropertyValueIconName(const PropertyName &, |
96 int value) const; | 96 int value) const override; |
97 virtual RangeMapper *getNewPropertyRangeMapper(const PropertyName &) const; | 97 RangeMapper *getNewPropertyRangeMapper(const PropertyName &) const override; |
98 virtual void setProperty(const PropertyName &, int value); | 98 void setProperty(const PropertyName &, int value) override; |
99 | 99 |
100 /** | 100 /** |
101 * Specify the channel to use from the source model. | 101 * Specify the channel to use from the source model. |
102 * A value of -1 means to mix all available channels. | 102 * A value of -1 means to mix all available channels. |
103 * The default is channel 0. | 103 * The default is channel 0. |
189 * Specify the colourmap rotation for the colour scale. | 189 * Specify the colourmap rotation for the colour scale. |
190 */ | 190 */ |
191 void setColourRotation(int); | 191 void setColourRotation(int); |
192 int getColourRotation() const; | 192 int getColourRotation() const; |
193 | 193 |
194 virtual VerticalPosition getPreferredFrameCountPosition() const { | 194 VerticalPosition getPreferredFrameCountPosition() const override { |
195 return PositionTop; | 195 return PositionTop; |
196 } | 196 } |
197 | 197 |
198 virtual bool isLayerOpaque() const { return true; } | 198 bool isLayerOpaque() const override { return true; } |
199 | 199 |
200 virtual ColourSignificance getLayerColourSignificance() const { | 200 ColourSignificance getLayerColourSignificance() const override { |
201 return ColourHasMeaningfulValue; | 201 return ColourHasMeaningfulValue; |
202 } | 202 } |
203 | 203 |
204 double getYForFrequency(const LayerGeometryProvider *v, double frequency) const; | 204 double getYForFrequency(const LayerGeometryProvider *v, double frequency) const; |
205 double getFrequencyForY(const LayerGeometryProvider *v, int y) const; | 205 double getFrequencyForY(const LayerGeometryProvider *v, int y) const; |
206 | 206 |
207 //!!! VerticalBinLayer methods. Note overlap with get*BinRange() | 207 //!!! VerticalBinLayer methods. Note overlap with get*BinRange() |
208 double getYForBin(const LayerGeometryProvider *, double bin) const; | 208 double getYForBin(const LayerGeometryProvider *, double bin) const override; |
209 double getBinForY(const LayerGeometryProvider *, double y) const; | 209 double getBinForY(const LayerGeometryProvider *, double y) const override; |
210 | 210 |
211 virtual int getCompletion(LayerGeometryProvider *v) const; | 211 int getCompletion(LayerGeometryProvider *v) const override; |
212 virtual QString getError(LayerGeometryProvider *v) const; | 212 QString getError(LayerGeometryProvider *v) const override; |
213 | 213 |
214 virtual bool getValueExtents(double &min, double &max, | 214 bool getValueExtents(double &min, double &max, |
215 bool &logarithmic, QString &unit) const; | 215 bool &logarithmic, QString &unit) const override; |
216 | 216 |
217 virtual bool getDisplayExtents(double &min, double &max) const; | 217 bool getDisplayExtents(double &min, double &max) const override; |
218 | 218 |
219 virtual bool setDisplayExtents(double min, double max); | 219 bool setDisplayExtents(double min, double max) override; |
220 | 220 |
221 virtual bool getYScaleValue(const LayerGeometryProvider *, int, double &, QString &) const; | 221 bool getYScaleValue(const LayerGeometryProvider *, int, double &, QString &) const override; |
222 | 222 |
223 virtual void toXml(QTextStream &stream, QString indent = "", | 223 void toXml(QTextStream &stream, QString indent = "", |
224 QString extraAttributes = "") const; | 224 QString extraAttributes = "") const override; |
225 | 225 |
226 void setProperties(const QXmlAttributes &attributes); | 226 void setProperties(const QXmlAttributes &attributes) override; |
227 | 227 |
228 virtual void setLayerDormant(const LayerGeometryProvider *v, bool dormant); | 228 void setLayerDormant(const LayerGeometryProvider *v, bool dormant) override; |
229 | 229 |
230 virtual bool isLayerScrollable(const LayerGeometryProvider *) const; | 230 bool isLayerScrollable(const LayerGeometryProvider *) const override; |
231 | 231 |
232 virtual int getVerticalZoomSteps(int &defaultStep) const; | 232 int getVerticalZoomSteps(int &defaultStep) const override; |
233 virtual int getCurrentVerticalZoomStep() const; | 233 int getCurrentVerticalZoomStep() const override; |
234 virtual void setVerticalZoomStep(int); | 234 void setVerticalZoomStep(int) override; |
235 virtual RangeMapper *getNewVerticalZoomRangeMapper() const; | 235 RangeMapper *getNewVerticalZoomRangeMapper() const override; |
236 | 236 |
237 virtual const Model *getSliceableModel() const; | 237 const Model *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 |
332 void paintDetailedScale(LayerGeometryProvider *v, | 332 void paintDetailedScale(LayerGeometryProvider *v, |
333 QPainter &paint, QRect rect) const; | 333 QPainter &paint, QRect rect) const; |
334 void paintDetailedScalePhase(LayerGeometryProvider *v, | 334 void paintDetailedScalePhase(LayerGeometryProvider *v, |
335 QPainter &paint, QRect rect) const; | 335 QPainter &paint, QRect rect) const; |
336 | 336 |
337 virtual void updateMeasureRectYCoords(LayerGeometryProvider *v, | 337 void updateMeasureRectYCoords(LayerGeometryProvider *v, |
338 const MeasureRect &r) const; | 338 const MeasureRect &r) const override; |
339 virtual void setMeasureRectYCoord(LayerGeometryProvider *v, | 339 void setMeasureRectYCoord(LayerGeometryProvider *v, |
340 MeasureRect &r, bool start, int y) const; | 340 MeasureRect &r, bool start, int y) const override; |
341 }; | 341 }; |
342 | 342 |
343 #endif | 343 #endif |