Mercurial > hg > svgui
comparison layer/Colour3DPlotLayer.h @ 922:26da827e8fb5 tonioni
Merge from cxx11 branch
author | Chris Cannam |
---|---|
date | Mon, 23 Mar 2015 11:26:28 +0000 |
parents | 4a578a360011 |
children | 94e4952a6774 1c37aa13bfd8 |
comparison
equal
deleted
inserted
replaced
921:4968bbaf1ed8 | 922:26da827e8fb5 |
---|---|
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; |
164 virtual void toXml(QTextStream &stream, QString indent = "", | 164 virtual void toXml(QTextStream &stream, QString indent = "", |
165 QString extraAttributes = "") const; | 165 QString extraAttributes = "") const; |
166 | 166 |
167 protected slots: | 167 protected slots: |
168 void cacheInvalid(); | 168 void cacheInvalid(); |
169 void cacheInvalid(int startFrame, int endFrame); | 169 void cacheInvalid(sv_frame_t startFrame, sv_frame_t endFrame); |
170 void modelChanged(); | 170 void modelChanged(); |
171 void modelChangedWithin(int, int); | 171 void modelChangedWithin(sv_frame_t, sv_frame_t); |
172 | 172 |
173 protected: | 173 protected: |
174 const DenseThreeDimensionalModel *m_model; // I do not own this | 174 const DenseThreeDimensionalModel *m_model; // I do not own this |
175 | 175 |
176 mutable QImage *m_cache; | 176 mutable QImage *m_cache; |
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 /** | |
208 * As getYForBin, but rounding to integer values. | |
209 */ | |
210 int getIYForBin(View *, int bin) const; | |
211 | |
207 /** | 212 /** |
208 * Return the bin number, possibly fractional, at the given y | 213 * Return the bin number, possibly fractional, at the given y |
209 * coordinate. Note that the whole numbers occur at the positions | 214 * coordinate. Note that the whole numbers occur at the positions |
210 * 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, |
211 * if the vertical scale is the usual way up). | 216 * if the vertical scale is the usual way up). |
212 */ | 217 */ |
213 float getBinForY(View *, float y) const; | 218 double getBinForY(View *, double y) const; |
219 | |
220 /** | |
221 * As getBinForY, but rounding to integer values. | |
222 */ | |
223 int getIBinForY(View *, int y) const; | |
214 | 224 |
215 DenseThreeDimensionalModel::Column getColumn(int col) const; | 225 DenseThreeDimensionalModel::Column getColumn(int col) const; |
216 | 226 |
217 /** | 227 /** |
218 * True if we have the opaque or smooth flag set, or if the cells | 228 * True if we have the opaque or smooth flag set, or if the cells |