comparison layer/SpectrogramLayer.h @ 1266:a34a2a25907c

Untabify
author Chris Cannam
date Thu, 01 Mar 2018 18:02:22 +0000
parents b10bd0611d16
children d79e21855aef
comparison
equal deleted inserted replaced
1265:6e724c81f18f 1266:a34a2a25907c
47 * SpectrogramLayer represents waveform data (obtained from a 47 * SpectrogramLayer represents waveform data (obtained from a
48 * DenseTimeValueModel) in spectrogram form. 48 * DenseTimeValueModel) in spectrogram form.
49 */ 49 */
50 50
51 class SpectrogramLayer : public VerticalBinLayer, 51 class SpectrogramLayer : public VerticalBinLayer,
52 public PowerOfSqrtTwoZoomConstraint 52 public PowerOfSqrtTwoZoomConstraint
53 { 53 {
54 Q_OBJECT 54 Q_OBJECT
55 55
56 public: 56 public:
57 enum Configuration { FullRangeDb, MelodicRange, MelodicPeaks }; 57 enum Configuration { FullRangeDb, MelodicRange, MelodicPeaks };
72 virtual void paintCrosshairs(LayerGeometryProvider *, QPainter &, QPoint) const; 72 virtual void paintCrosshairs(LayerGeometryProvider *, QPainter &, QPoint) const;
73 73
74 virtual QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const; 74 virtual QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const;
75 75
76 virtual bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame, 76 virtual bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame,
77 int &resolution, 77 int &resolution,
78 SnapType snap) const; 78 SnapType snap) const;
79 79
80 virtual void measureDoubleClick(LayerGeometryProvider *, QMouseEvent *); 80 virtual void measureDoubleClick(LayerGeometryProvider *, QMouseEvent *);
81 81
82 virtual bool hasLightBackground() const; 82 virtual bool hasLightBackground() const;
83 83
89 virtual PropertyType getPropertyType(const PropertyName &) const; 89 virtual PropertyType getPropertyType(const PropertyName &) const;
90 virtual QString getPropertyGroupName(const PropertyName &) const; 90 virtual QString getPropertyGroupName(const PropertyName &) const;
91 virtual int getPropertyRangeAndValue(const PropertyName &, 91 virtual int getPropertyRangeAndValue(const PropertyName &,
92 int *min, int *max, int *deflt) const; 92 int *min, int *max, int *deflt) const;
93 virtual QString getPropertyValueLabel(const PropertyName &, 93 virtual QString getPropertyValueLabel(const PropertyName &,
94 int value) const; 94 int value) const;
95 virtual QString getPropertyValueIconName(const PropertyName &, 95 virtual QString getPropertyValueIconName(const PropertyName &,
96 int value) const; 96 int value) const;
97 virtual RangeMapper *getNewPropertyRangeMapper(const PropertyName &) const; 97 virtual RangeMapper *getNewPropertyRangeMapper(const PropertyName &) const;
98 virtual void setProperty(const PropertyName &, int value); 98 virtual void setProperty(const PropertyName &, int value);
99 99
187 */ 187 */
188 void setColourRotation(int); 188 void setColourRotation(int);
189 int getColourRotation() const; 189 int getColourRotation() const;
190 190
191 virtual VerticalPosition getPreferredFrameCountPosition() const { 191 virtual VerticalPosition getPreferredFrameCountPosition() const {
192 return PositionTop; 192 return PositionTop;
193 } 193 }
194 194
195 virtual bool isLayerOpaque() const { return true; } 195 virtual bool isLayerOpaque() const { return true; }
196 196
197 virtual ColourSignificance getLayerColourSignificance() const { 197 virtual ColourSignificance getLayerColourSignificance() const {
285 bool getXBinRange(LayerGeometryProvider *v, int x, double &windowMin, double &windowMax) const; 285 bool getXBinRange(LayerGeometryProvider *v, int x, double &windowMin, double &windowMax) const;
286 bool getYBinRange(LayerGeometryProvider *v, int y, double &freqBinMin, double &freqBinMax) const; 286 bool getYBinRange(LayerGeometryProvider *v, int y, double &freqBinMin, double &freqBinMax) const;
287 287
288 bool getYBinSourceRange(LayerGeometryProvider *v, int y, double &freqMin, double &freqMax) const; 288 bool getYBinSourceRange(LayerGeometryProvider *v, int y, double &freqMin, double &freqMax) const;
289 bool getAdjustedYBinSourceRange(LayerGeometryProvider *v, int x, int y, 289 bool getAdjustedYBinSourceRange(LayerGeometryProvider *v, int x, int y,
290 double &freqMin, double &freqMax, 290 double &freqMin, double &freqMax,
291 double &adjFreqMin, double &adjFreqMax) const; 291 double &adjFreqMin, double &adjFreqMax) const;
292 bool getXBinSourceRange(LayerGeometryProvider *v, int x, RealTime &timeMin, RealTime &timeMax) const; 292 bool getXBinSourceRange(LayerGeometryProvider *v, int x, RealTime &timeMin, RealTime &timeMax) const;
293 bool getXYBinSourceRange(LayerGeometryProvider *v, int x, int y, double &min, double &max, 293 bool getXYBinSourceRange(LayerGeometryProvider *v, int x, int y, double &min, double &max,
294 double &phaseMin, double &phaseMax) const; 294 double &phaseMin, double &phaseMax) const;
295 295
296 int getWindowIncrement() const { 296 int getWindowIncrement() const {
297 if (m_windowHopLevel == 0) return m_windowSize; 297 if (m_windowHopLevel == 0) return m_windowSize;
298 else if (m_windowHopLevel == 1) return (m_windowSize * 3) / 4; 298 else if (m_windowHopLevel == 1) return (m_windowSize * 3) / 4;
299 else return m_windowSize / (1 << (m_windowHopLevel - 1)); 299 else return m_windowSize / (1 << (m_windowHopLevel - 1));