comparison layer/SpectrumLayer.h @ 1241:b7d3bd4ff43b

Overrides
author Chris Cannam <cannam@all-day-breakfast.com>
date Wed, 22 Feb 2017 11:19:51 +0000
parents 4d0ca1ab4cd0
children a34a2a25907c
comparison
equal deleted inserted replaced
1240:c2e923aa4015 1241:b7d3bd4ff43b
38 public: 38 public:
39 SpectrumLayer(); 39 SpectrumLayer();
40 ~SpectrumLayer(); 40 ~SpectrumLayer();
41 41
42 void setModel(DenseTimeValueModel *model); 42 void setModel(DenseTimeValueModel *model);
43 virtual const Model *getModel() const { return m_originModel; } 43 virtual const Model *getModel() const override { return m_originModel; }
44 44
45 virtual bool getCrosshairExtents(LayerGeometryProvider *, QPainter &, QPoint cursorPos, 45 virtual bool getCrosshairExtents(LayerGeometryProvider *, QPainter &, QPoint cursorPos,
46 std::vector<QRect> &extents) const; 46 std::vector<QRect> &extents) const override;
47 virtual void paintCrosshairs(LayerGeometryProvider *, QPainter &, QPoint) const; 47 virtual void paintCrosshairs(LayerGeometryProvider *, QPainter &, QPoint) const override;
48 48
49 virtual QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const; 49 virtual QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const override;
50 50
51 virtual void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const; 51 virtual void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override;
52 52
53 virtual VerticalPosition getPreferredFrameCountPosition() const { 53 virtual VerticalPosition getPreferredFrameCountPosition() const override {
54 return PositionTop; 54 return PositionTop;
55 } 55 }
56 56
57 virtual PropertyList getProperties() const; 57 virtual PropertyList getProperties() const override;
58 virtual QString getPropertyLabel(const PropertyName &) const; 58 virtual QString getPropertyLabel(const PropertyName &) const override;
59 virtual QString getPropertyIconName(const PropertyName &) const; 59 virtual QString getPropertyIconName(const PropertyName &) const override;
60 virtual PropertyType getPropertyType(const PropertyName &) const; 60 virtual PropertyType getPropertyType(const PropertyName &) const override;
61 virtual QString getPropertyGroupName(const PropertyName &) const; 61 virtual QString getPropertyGroupName(const PropertyName &) const override;
62 virtual int getPropertyRangeAndValue(const PropertyName &, 62 virtual int getPropertyRangeAndValue(const PropertyName &,
63 int *min, int *max, int *deflt) const; 63 int *min, int *max, int *deflt) const override;
64 virtual QString getPropertyValueLabel(const PropertyName &, 64 virtual QString getPropertyValueLabel(const PropertyName &,
65 int value) const; 65 int value) const override;
66 virtual RangeMapper *getNewPropertyRangeMapper(const PropertyName &) const; 66 virtual RangeMapper *getNewPropertyRangeMapper(const PropertyName &) const override;
67 virtual void setProperty(const PropertyName &, int value); 67 virtual void setProperty(const PropertyName &, int value) override;
68 virtual void setProperties(const QXmlAttributes &); 68 virtual void setProperties(const QXmlAttributes &) override;
69 69
70 virtual bool getXScaleValue(const LayerGeometryProvider *v, int x, 70 virtual bool getXScaleValue(const LayerGeometryProvider *v, int x,
71 double &value, QString &unit) const; 71 double &value, QString &unit) const override;
72 72
73 virtual bool getYScaleValue(const LayerGeometryProvider *, int y, 73 virtual bool getYScaleValue(const LayerGeometryProvider *, int y,
74 double &value, QString &unit) const; 74 double &value, QString &unit) const override;
75 75
76 virtual bool getYScaleDifference(const LayerGeometryProvider *, int y0, int y1, 76 virtual bool getYScaleDifference(const LayerGeometryProvider *, int y0, int y1,
77 double &diff, QString &unit) const; 77 double &diff, QString &unit) const override;
78 78
79 virtual bool isLayerScrollable(const LayerGeometryProvider *) const { return false; } 79 virtual bool isLayerScrollable(const LayerGeometryProvider *) const override { return false; }
80 80
81 void setChannel(int); 81 void setChannel(int);
82 int getChannel() const { return m_channel; } 82 int getChannel() const { return m_channel; }
83 83
84 void setWindowSize(int); 84 void setWindowSize(int);
92 92
93 void setShowPeaks(bool); 93 void setShowPeaks(bool);
94 bool getShowPeaks() const { return m_showPeaks; } 94 bool getShowPeaks() const { return m_showPeaks; }
95 95
96 virtual void toXml(QTextStream &stream, QString indent = "", 96 virtual void toXml(QTextStream &stream, QString indent = "",
97 QString extraAttributes = "") const; 97 QString extraAttributes = "") const override;
98 98
99 virtual double getFrequencyForX(const LayerGeometryProvider *, 99 virtual double getFrequencyForX(const LayerGeometryProvider *,
100 double x) const override; 100 double x) const override;
101 virtual double getXForFrequency(const LayerGeometryProvider *, 101 virtual double getXForFrequency(const LayerGeometryProvider *,
102 double freq) const override; 102 double freq) const override;
116 116
117 mutable QMutex m_fftMutex; 117 mutable QMutex m_fftMutex;
118 118
119 void setupFFT(); 119 void setupFFT();
120 120
121 virtual void getBiasCurve(BiasCurve &) const; 121 virtual void getBiasCurve(BiasCurve &) const override;
122 BiasCurve m_biasCurve; 122 BiasCurve m_biasCurve;
123 123
124 int getWindowIncrement() const { 124 int getWindowIncrement() const {
125 if (m_windowHopLevel == 0) return m_windowSize; 125 if (m_windowHopLevel == 0) return m_windowSize;
126 else if (m_windowHopLevel == 1) return (m_windowSize * 3) / 4; 126 else if (m_windowHopLevel == 1) return (m_windowSize * 3) / 4;