comparison layer/Colour3DPlotLayer.h @ 904:e0f08e108064 cxx11

Move to using double rather than float for floating-point calculations (float only for storage); more build fixes
author Chris Cannam
date Mon, 09 Mar 2015 12:02:10 +0000
parents 1757933ce5a7
children 4a578a360011
comparison
equal deleted inserted replaced
903:1757933ce5a7 904:e0f08e108064
54 virtual int getVerticalScaleWidth(View *v, bool, QPainter &) const; 54 virtual int getVerticalScaleWidth(View *v, bool, QPainter &) const;
55 virtual void paintVerticalScale(View *v, bool, QPainter &paint, QRect rect) const; 55 virtual void paintVerticalScale(View *v, bool, QPainter &paint, QRect rect) const;
56 56
57 virtual QString getFeatureDescription(View *v, QPoint &) const; 57 virtual QString getFeatureDescription(View *v, QPoint &) const;
58 58
59 virtual bool snapToFeatureFrame(View *v, int &frame, 59 virtual bool snapToFeatureFrame(View *v, sv_frame_t &frame,
60 int &resolution, 60 int &resolution,
61 SnapType snap) const; 61 SnapType snap) const;
62 62
63 virtual void setLayerDormant(const View *v, bool dormant); 63 virtual void setLayerDormant(const View *v, bool dormant);
64 64
143 bool getOpaque() const; 143 bool getOpaque() const;
144 144
145 void setSmooth(bool i); 145 void setSmooth(bool i);
146 bool getSmooth() const; 146 bool getSmooth() const;
147 147
148 virtual bool getValueExtents(float &min, float &max, 148 virtual bool getValueExtents(double &min, double &max,
149 bool &logarithmic, QString &unit) const; 149 bool &logarithmic, QString &unit) const;
150 150
151 virtual bool getDisplayExtents(float &min, float &max) const; 151 virtual bool getDisplayExtents(double &min, double &max) const;
152 virtual bool setDisplayExtents(float min, float max); 152 virtual bool setDisplayExtents(double min, double max);
153 153
154 virtual bool getYScaleValue(const View *, int /* y */, 154 virtual bool getYScaleValue(const View *, int /* y */,
155 float &/* value */, QString &/* unit */) const; 155 double &/* value */, QString &/* unit */) const;
156 156
157 virtual int getVerticalZoomSteps(int &defaultStep) const; 157 virtual int getVerticalZoomSteps(int &defaultStep) const;
158 virtual int getCurrentVerticalZoomStep() const; 158 virtual int getCurrentVerticalZoomStep() const;
159 virtual void setVerticalZoomStep(int); 159 virtual void setVerticalZoomStep(int);
160 virtual RangeMapper *getNewVerticalZoomRangeMapper() const; 160 virtual RangeMapper *getNewVerticalZoomRangeMapper() const;
200 * Return the y coordinate at which the given bin "starts" 200 * Return the y coordinate at which the given bin "starts"
201 * (i.e. at the bottom of the bin, if the given bin is an integer 201 * (i.e. at the bottom of the bin, if the given bin is an integer
202 * and the vertical scale is the usual way up). Bin number may be 202 * and the vertical scale is the usual way up). Bin number may be
203 * fractional, to obtain a position part-way through a bin. 203 * fractional, to obtain a position part-way through a bin.
204 */ 204 */
205 float getYForBin(View *, float bin) const; 205 double getYForBin(View *, double bin) const;
206 206
207 /** 207 /**
208 * As getYForBin, but rounding to integer values. 208 * As getYForBin, but rounding to integer values.
209 */ 209 */
210 int getIYForBin(View *, int bin) const; 210 int getIYForBin(View *, int bin) const;
213 * Return the bin number, possibly fractional, at the given y 213 * Return the bin number, possibly fractional, at the given y
214 * coordinate. Note that the whole numbers occur at the positions 214 * coordinate. Note that the whole numbers occur at the positions
215 * at which the bins "start" (i.e. the bottom of the visible bin, 215 * at which the bins "start" (i.e. the bottom of the visible bin,
216 * if the vertical scale is the usual way up). 216 * if the vertical scale is the usual way up).
217 */ 217 */
218 float getBinForY(View *, float y) const; 218 double getBinForY(View *, double y) const;
219 219
220 /** 220 /**
221 * As getBinForY, but rounding to integer values. 221 * As getBinForY, but rounding to integer values.
222 */ 222 */
223 int getIBinForY(View *, int y) const; 223 int getIBinForY(View *, int y) const;