comparison layer/Colour3DPlotLayer.h @ 725:c27a3604fe6f

Toward getYScaleValue in Colour3DPlotLayer
author Chris Cannam
date Thu, 06 Feb 2014 18:34:43 +0000
parents 67e6d518ac27
children 1d526ba11a24
comparison
equal deleted inserted replaced
724:5d3a6ecdf2db 725:c27a3604fe6f
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(float &min, float &max) const;
152 virtual bool setDisplayExtents(float min, float max); 152 virtual bool setDisplayExtents(float min, float max);
153 153
154 virtual bool getYScaleValue(const View *, int /* y */,
155 float &/* value */, QString &/* unit */) const;
156
154 virtual int getVerticalZoomSteps(int &defaultStep) const; 157 virtual int getVerticalZoomSteps(int &defaultStep) const;
155 virtual int getCurrentVerticalZoomStep() const; 158 virtual int getCurrentVerticalZoomStep() const;
156 virtual void setVerticalZoomStep(int); 159 virtual void setVerticalZoomStep(int);
157 virtual RangeMapper *getNewVerticalZoomRangeMapper() const; 160 virtual RangeMapper *getNewVerticalZoomRangeMapper() const;
158 161
186 bool m_invertVertical; 189 bool m_invertVertical;
187 bool m_opaque; 190 bool m_opaque;
188 bool m_smooth; 191 bool m_smooth;
189 size_t m_peakResolution; 192 size_t m_peakResolution;
190 193
194 // Minimum and maximum bin numbers visible within the view. We
195 // always snap to whole bins at view edges.
191 int m_miny; 196 int m_miny;
192 int m_maxy; 197 int m_maxy;
198
199 /**
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
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.
204 */
205 float getYForBin(View *, float bin) const;
206
207 /**
208 * Return the bin number, possibly fractional, at the given y
209 * coordinate. Note that the whole numbers occur at the positions
210 * at which the bins "start" (i.e. the bottom of the visible bin,
211 * if the vertical scale is the usual way up).
212 */
213 float getBinForY(View *, float y) const;
193 214
194 DenseThreeDimensionalModel::Column getColumn(size_t col) const; 215 DenseThreeDimensionalModel::Column getColumn(size_t col) const;
195 216
196 int getColourScaleWidth(QPainter &) const; 217 int getColourScaleWidth(QPainter &) const;
197 void fillCache(size_t firstBin, size_t lastBin) const; 218 void fillCache(size_t firstBin, size_t lastBin) const;
198 void paintDense(View *v, QPainter &paint, QRect rect) const; 219 void paintDense(View *v, QPainter &paint, QRect rect) const;
199
200 float getYForBin(View *, float bin) const;
201 float getBinForY(View *, float y) const;
202 }; 220 };
203 221
204 #endif 222 #endif