Mercurial > hg > svgui
comparison layer/SliceLayer.h @ 918:4fe7a09be0fe osx-retina
Many fixes for the previous stuff
author | Chris Cannam |
---|---|
date | Tue, 17 Mar 2015 16:56:03 +0000 |
parents | 94e4952a6774 |
children | 4d0ca1ab4cd0 |
comparison
equal
deleted
inserted
replaced
917:77a1d42353ce | 918:4fe7a09be0fe |
---|---|
38 | 38 |
39 void setSliceableModel(const Model *model); | 39 void setSliceableModel(const Model *model); |
40 | 40 |
41 virtual void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const; | 41 virtual void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const; |
42 | 42 |
43 virtual QString getFeatureDescription(View *v, QPoint &) const; | 43 virtual QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const; |
44 | 44 |
45 virtual int getVerticalScaleWidth(View *v, bool, QPainter &) const; | 45 virtual int getVerticalScaleWidth(LayerGeometryProvider *v, bool, QPainter &) const; |
46 virtual void paintVerticalScale(View *v, bool, QPainter &paint, QRect rect) const; | 46 virtual void paintVerticalScale(LayerGeometryProvider *v, bool, QPainter &paint, QRect rect) const; |
47 | 47 |
48 virtual ColourSignificance getLayerColourSignificance() const { | 48 virtual ColourSignificance getLayerColourSignificance() const { |
49 return ColourAndBackgroundSignificant; | 49 return ColourAndBackgroundSignificant; |
50 } | 50 } |
51 | 51 |
65 virtual bool getValueExtents(double &min, double &max, | 65 virtual bool getValueExtents(double &min, double &max, |
66 bool &logarithmic, QString &unit) const; | 66 bool &logarithmic, QString &unit) const; |
67 | 67 |
68 virtual bool hasTimeXAxis() const { return false; } | 68 virtual bool hasTimeXAxis() const { return false; } |
69 | 69 |
70 virtual bool isLayerScrollable(const View *) const { return false; } | 70 virtual bool isLayerScrollable(const LayerGeometryProvider *) const { return false; } |
71 | 71 |
72 enum EnergyScale { LinearScale, MeterScale, dBScale, AbsoluteScale }; | 72 enum EnergyScale { LinearScale, MeterScale, dBScale, AbsoluteScale }; |
73 | 73 |
74 enum SamplingMode { NearestSample, SampleMean, SamplePeak }; | 74 enum SamplingMode { NearestSample, SampleMean, SamplePeak }; |
75 | 75 |
110 | 110 |
111 protected: | 111 protected: |
112 virtual double getXForBin(int bin, int totalBins, double w) const; | 112 virtual double getXForBin(int bin, int totalBins, double w) const; |
113 virtual int getBinForX(double x, int totalBins, double w) const; | 113 virtual int getBinForX(double x, int totalBins, double w) const; |
114 | 114 |
115 virtual double getYForValue(double value, const View *v, double &norm) const; | 115 virtual double getYForValue(double value, const LayerGeometryProvider *v, double &norm) const; |
116 virtual double getValueForY(double y, const View *v) const; | 116 virtual double getValueForY(double y, const LayerGeometryProvider *v) const; |
117 | 117 |
118 virtual QString getFeatureDescriptionAux(View *v, QPoint &, | 118 virtual QString getFeatureDescriptionAux(LayerGeometryProvider *v, QPoint &, |
119 bool includeBinDescription, | 119 bool includeBinDescription, |
120 int &minbin, int &maxbin, | 120 int &minbin, int &maxbin, |
121 int &range) const; | 121 int &range) const; |
122 | 122 |
123 // This curve may, of course, be flat -- the spectrum uses it for | 123 // This curve may, of course, be flat -- the spectrum uses it for |
139 bool m_normalize; | 139 bool m_normalize; |
140 float m_threshold; | 140 float m_threshold; |
141 float m_initialThreshold; | 141 float m_initialThreshold; |
142 float m_gain; | 142 float m_gain; |
143 mutable std::vector<int> m_scalePoints; | 143 mutable std::vector<int> m_scalePoints; |
144 mutable std::map<const View *, int> m_xorigins; | 144 mutable std::map<const LayerGeometryProvider *, int> m_xorigins; |
145 mutable std::map<const View *, int> m_yorigins; | 145 mutable std::map<const LayerGeometryProvider *, int> m_yorigins; |
146 mutable std::map<const View *, int> m_heights; | 146 mutable std::map<const LayerGeometryProvider *, int> m_heights; |
147 mutable sv_frame_t m_currentf0; | 147 mutable sv_frame_t m_currentf0; |
148 mutable sv_frame_t m_currentf1; | 148 mutable sv_frame_t m_currentf1; |
149 mutable std::vector<float> m_values; | 149 mutable std::vector<float> m_values; |
150 }; | 150 }; |
151 | 151 |