Mercurial > hg > svgui
comparison layer/SliceLayer.h @ 1417:2487521e857b
Merge
author | Chris Cannam |
---|---|
date | Wed, 23 Jan 2019 14:44:16 +0000 |
parents | a18e78b9c78b |
children | 696e569ff21b |
comparison
equal
deleted
inserted
replaced
1416:d794630429a7 | 1417:2487521e857b |
---|---|
30 | 30 |
31 public: | 31 public: |
32 SliceLayer(); | 32 SliceLayer(); |
33 ~SliceLayer(); | 33 ~SliceLayer(); |
34 | 34 |
35 virtual const Model *getModel() const { return 0; } | 35 const Model *getModel() const override { return 0; } |
36 | 36 |
37 void setSliceableModel(const Model *model); | 37 void setSliceableModel(const Model *model); |
38 | 38 |
39 virtual void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const; | 39 void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override; |
40 | 40 |
41 virtual QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const; | 41 QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const override; |
42 | 42 |
43 virtual int getVerticalScaleWidth(LayerGeometryProvider *v, bool, QPainter &) const; | 43 int getVerticalScaleWidth(LayerGeometryProvider *v, bool, QPainter &) const override; |
44 virtual void paintVerticalScale(LayerGeometryProvider *v, bool, QPainter &paint, QRect rect) const; | 44 void paintVerticalScale(LayerGeometryProvider *v, bool, QPainter &paint, QRect rect) const override; |
45 | 45 |
46 virtual ColourSignificance getLayerColourSignificance() const { | 46 ColourSignificance getLayerColourSignificance() const override { |
47 return ColourAndBackgroundSignificant; | 47 return ColourAndBackgroundSignificant; |
48 } | 48 } |
49 | 49 |
50 virtual bool hasLightBackground() const; | 50 bool hasLightBackground() const override; |
51 | 51 |
52 virtual PropertyList getProperties() const; | 52 PropertyList getProperties() const override; |
53 virtual QString getPropertyLabel(const PropertyName &) const; | 53 QString getPropertyLabel(const PropertyName &) const override; |
54 virtual QString getPropertyIconName(const PropertyName &) const; | 54 QString getPropertyIconName(const PropertyName &) const override; |
55 virtual PropertyType getPropertyType(const PropertyName &) const; | 55 PropertyType getPropertyType(const PropertyName &) const override; |
56 virtual QString getPropertyGroupName(const PropertyName &) const; | 56 QString getPropertyGroupName(const PropertyName &) const override; |
57 virtual int getPropertyRangeAndValue(const PropertyName &, | 57 int getPropertyRangeAndValue(const PropertyName &, |
58 int *min, int *max, int *deflt) const; | 58 int *min, int *max, int *deflt) const override; |
59 virtual QString getPropertyValueLabel(const PropertyName &, | 59 QString getPropertyValueLabel(const PropertyName &, |
60 int value) const; | 60 int value) const override; |
61 virtual RangeMapper *getNewPropertyRangeMapper(const PropertyName &) const; | 61 RangeMapper *getNewPropertyRangeMapper(const PropertyName &) const override; |
62 virtual void setProperty(const PropertyName &, int value); | 62 void setProperty(const PropertyName &, int value) override; |
63 virtual void setProperties(const QXmlAttributes &); | 63 void setProperties(const QXmlAttributes &) override; |
64 | 64 |
65 virtual bool getValueExtents(double &min, double &max, | 65 bool getValueExtents(double &min, double &max, |
66 bool &logarithmic, QString &unit) const; | 66 bool &logarithmic, QString &unit) const override; |
67 | 67 |
68 virtual bool getDisplayExtents(double &min, double &max) const; | 68 bool getDisplayExtents(double &min, double &max) const override; |
69 virtual bool setDisplayExtents(double min, double max); | 69 bool setDisplayExtents(double min, double max) override; |
70 | 70 |
71 virtual int getVerticalZoomSteps(int &defaultStep) const; | 71 int getVerticalZoomSteps(int &defaultStep) const override; |
72 virtual int getCurrentVerticalZoomStep() const; | 72 int getCurrentVerticalZoomStep() const override; |
73 virtual void setVerticalZoomStep(int); | 73 void setVerticalZoomStep(int) override; |
74 virtual RangeMapper *getNewVerticalZoomRangeMapper() const; | 74 RangeMapper *getNewVerticalZoomRangeMapper() const override; |
75 | 75 |
76 virtual bool hasTimeXAxis() const override { return false; } | 76 virtual bool hasTimeXAxis() const override { return false; } |
77 | 77 |
78 virtual void zoomToRegion(const LayerGeometryProvider *, QRect) override; | 78 virtual void zoomToRegion(const LayerGeometryProvider *, QRect) override; |
79 | 79 |
80 virtual bool isLayerScrollable(const LayerGeometryProvider *) const { return false; } | 80 bool isLayerScrollable(const LayerGeometryProvider *) const override { return false; } |
81 | 81 |
82 enum EnergyScale { LinearScale, MeterScale, dBScale, AbsoluteScale }; | 82 enum EnergyScale { LinearScale, MeterScale, dBScale, AbsoluteScale }; |
83 | 83 |
84 enum SamplingMode { NearestSample, SampleMean, SamplePeak }; | 84 enum SamplingMode { NearestSample, SampleMean, SamplePeak }; |
85 | 85 |
111 float getGain() const; | 111 float getGain() const; |
112 | 112 |
113 void setNormalize(bool n); | 113 void setNormalize(bool n); |
114 bool getNormalize() const; | 114 bool getNormalize() const; |
115 | 115 |
116 virtual void toXml(QTextStream &stream, QString indent = "", | 116 void toXml(QTextStream &stream, QString indent = "", |
117 QString extraAttributes = "") const; | 117 QString extraAttributes = "") const override; |
118 | 118 |
119 public slots: | 119 public slots: |
120 void sliceableModelReplaced(const Model *, const Model *); | 120 void sliceableModelReplaced(const Model *, const Model *); |
121 void modelAboutToBeDeleted(Model *); | 121 void modelAboutToBeDeleted(Model *); |
122 | 122 |
151 typedef std::vector<float> BiasCurve; | 151 typedef std::vector<float> BiasCurve; |
152 virtual void getBiasCurve(BiasCurve &) const { return; } | 152 virtual void getBiasCurve(BiasCurve &) const { return; } |
153 | 153 |
154 virtual float getThresholdDb() const; | 154 virtual float getThresholdDb() const; |
155 | 155 |
156 virtual int getDefaultColourHint(bool dark, bool &impose); | 156 int getDefaultColourHint(bool dark, bool &impose) override; |
157 | 157 |
158 // Determine how the bins are lined up | 158 // Determine how the bins are lined up |
159 // horizontally. BinsCentredOnScalePoint means we operate like a | 159 // horizontally. BinsCentredOnScalePoint means we operate like a |
160 // spectrum, where a bin maps to a specific frequency, and so the | 160 // spectrum, where a bin maps to a specific frequency, and so the |
161 // bin should be visually centred on the scale point that | 161 // bin should be visually centred on the scale point that |