Mercurial > hg > svgui
comparison layer/Colour3DPlotLayer.h @ 997:296ccd36f626 tony-2.0-integration
Merge through to branch for Tony 2.0
author | Chris Cannam |
---|---|
date | Thu, 20 Aug 2015 14:54:21 +0100 |
parents | 1011ffb1b6d5 |
children | 7242fe160c19 |
comparison
equal
deleted
inserted
replaced
943:788b7623bfca | 997:296ccd36f626 |
---|---|
47 | 47 |
48 virtual const ZoomConstraint *getZoomConstraint() const { | 48 virtual const ZoomConstraint *getZoomConstraint() const { |
49 return m_model ? m_model->getZoomConstraint() : 0; | 49 return m_model ? m_model->getZoomConstraint() : 0; |
50 } | 50 } |
51 virtual const Model *getModel() const { return m_model; } | 51 virtual const Model *getModel() const { return m_model; } |
52 virtual void paint(View *v, QPainter &paint, QRect rect) const; | 52 virtual void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const; |
53 | 53 |
54 virtual int getVerticalScaleWidth(View *v, bool, QPainter &) const; | 54 virtual int getVerticalScaleWidth(LayerGeometryProvider *v, bool, QPainter &) const; |
55 virtual void paintVerticalScale(View *v, bool, QPainter &paint, QRect rect) const; | 55 virtual void paintVerticalScale(LayerGeometryProvider *v, bool, QPainter &paint, QRect rect) const; |
56 | 56 |
57 virtual QString getFeatureDescription(View *v, QPoint &) const; | 57 virtual QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const; |
58 | 58 |
59 virtual bool snapToFeatureFrame(View *v, sv_frame_t &frame, | 59 virtual bool snapToFeatureFrame(LayerGeometryProvider *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 LayerGeometryProvider *v, bool dormant); |
64 | 64 |
65 virtual bool isLayerScrollable(const View *v) const; | 65 virtual bool isLayerScrollable(const LayerGeometryProvider *v) const; |
66 | 66 |
67 virtual ColourSignificance getLayerColourSignificance() const { | 67 virtual ColourSignificance getLayerColourSignificance() const { |
68 return ColourHasMeaningfulValue; | 68 return ColourHasMeaningfulValue; |
69 } | 69 } |
70 | 70 |
71 void setModel(const DenseThreeDimensionalModel *model); | 71 void setModel(const DenseThreeDimensionalModel *model); |
72 | 72 |
73 virtual int getCompletion(View *) const { return m_model->getCompletion(); } | 73 virtual int getCompletion(LayerGeometryProvider *) const { return m_model->getCompletion(); } |
74 | 74 |
75 virtual PropertyList getProperties() const; | 75 virtual PropertyList getProperties() const; |
76 virtual PropertyType getPropertyType(const PropertyName &) const; | 76 virtual PropertyType getPropertyType(const PropertyName &) const; |
77 virtual QString getPropertyLabel(const PropertyName &) const; | 77 virtual QString getPropertyLabel(const PropertyName &) const; |
78 virtual QString getPropertyIconName(const PropertyName &) const; | 78 virtual QString getPropertyIconName(const PropertyName &) const; |
137 bool getNormalizeHybrid() const; | 137 bool getNormalizeHybrid() const; |
138 | 138 |
139 void setInvertVertical(bool i); | 139 void setInvertVertical(bool i); |
140 bool getInvertVertical() const; | 140 bool getInvertVertical() const; |
141 | 141 |
142 void setShowRectified(bool); | |
143 bool getShowRectified() const { return m_rectified; } | |
144 | |
142 void setOpaque(bool i); | 145 void setOpaque(bool i); |
143 bool getOpaque() const; | 146 bool getOpaque() const; |
144 | 147 |
145 void setSmooth(bool i); | 148 void setSmooth(bool i); |
146 bool getSmooth() const; | 149 bool getSmooth() const; |
149 bool &logarithmic, QString &unit) const; | 152 bool &logarithmic, QString &unit) const; |
150 | 153 |
151 virtual bool getDisplayExtents(double &min, double &max) const; | 154 virtual bool getDisplayExtents(double &min, double &max) const; |
152 virtual bool setDisplayExtents(double min, double max); | 155 virtual bool setDisplayExtents(double min, double max); |
153 | 156 |
154 virtual bool getYScaleValue(const View *, int /* y */, | 157 virtual bool getYScaleValue(const LayerGeometryProvider *, int /* y */, |
155 double &/* value */, QString &/* unit */) const; | 158 double &/* value */, QString &/* unit */) const; |
156 | 159 |
157 virtual int getVerticalZoomSteps(int &defaultStep) const; | 160 virtual int getVerticalZoomSteps(int &defaultStep) const; |
158 virtual int getCurrentVerticalZoomStep() const; | 161 virtual int getCurrentVerticalZoomStep() const; |
159 virtual void setVerticalZoomStep(int); | 162 virtual void setVerticalZoomStep(int); |
185 BinScale m_binScale; | 188 BinScale m_binScale; |
186 bool m_normalizeColumns; | 189 bool m_normalizeColumns; |
187 bool m_normalizeVisibleArea; | 190 bool m_normalizeVisibleArea; |
188 bool m_normalizeHybrid; | 191 bool m_normalizeHybrid; |
189 bool m_invertVertical; | 192 bool m_invertVertical; |
193 bool m_rectified; | |
190 bool m_opaque; | 194 bool m_opaque; |
191 bool m_smooth; | 195 bool m_smooth; |
192 int m_peakResolution; | 196 int m_peakResolution; |
193 | 197 |
194 // Minimum and maximum bin numbers visible within the view. We | 198 // Minimum and maximum bin numbers visible within the view. We |
200 * Return the y coordinate at which the given bin "starts" | 204 * 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 | 205 * (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 | 206 * and the vertical scale is the usual way up). Bin number may be |
203 * fractional, to obtain a position part-way through a bin. | 207 * fractional, to obtain a position part-way through a bin. |
204 */ | 208 */ |
205 double getYForBin(View *, double bin) const; | 209 double getYForBin(LayerGeometryProvider *, double bin) const; |
206 | 210 |
207 /** | 211 /** |
208 * As getYForBin, but rounding to integer values. | 212 * As getYForBin, but rounding to integer values. |
209 */ | 213 */ |
210 int getIYForBin(View *, int bin) const; | 214 int getIYForBin(LayerGeometryProvider *, int bin) const; |
211 | 215 |
212 /** | 216 /** |
213 * Return the bin number, possibly fractional, at the given y | 217 * Return the bin number, possibly fractional, at the given y |
214 * coordinate. Note that the whole numbers occur at the positions | 218 * coordinate. Note that the whole numbers occur at the positions |
215 * at which the bins "start" (i.e. the bottom of the visible bin, | 219 * at which the bins "start" (i.e. the bottom of the visible bin, |
216 * if the vertical scale is the usual way up). | 220 * if the vertical scale is the usual way up). |
217 */ | 221 */ |
218 double getBinForY(View *, double y) const; | 222 double getBinForY(LayerGeometryProvider *, double y) const; |
219 | 223 |
220 /** | 224 /** |
221 * As getBinForY, but rounding to integer values. | 225 * As getBinForY, but rounding to integer values. |
222 */ | 226 */ |
223 int getIBinForY(View *, int y) const; | 227 int getIBinForY(LayerGeometryProvider *, int y) const; |
224 | 228 |
225 DenseThreeDimensionalModel::Column getColumn(int col) const; | 229 DenseThreeDimensionalModel::Column getColumn(int col) const; |
226 | 230 |
227 /** | 231 /** |
228 * True if we have the opaque or smooth flag set, or if the cells | 232 * True if we have the opaque or smooth flag set, or if the cells |
229 * are so small you can't see their borders. False for big, | 233 * are so small you can't see their borders. False for big, |
230 * translucent cells. | 234 * translucent cells. |
231 */ | 235 */ |
232 bool shouldPaintDenseIn(const View *) const; | 236 bool shouldPaintDenseIn(const LayerGeometryProvider *) const; |
233 | 237 |
234 int getColourScaleWidth(QPainter &) const; | 238 int getColourScaleWidth(QPainter &) const; |
235 void fillCache(int firstBin, int lastBin) const; | 239 void fillCache(int firstBin, int lastBin) const; |
236 void paintDense(View *v, QPainter &paint, QRect rect) const; | 240 void paintDense(LayerGeometryProvider *v, QPainter &paint, QRect rect) const; |
237 }; | 241 }; |
238 | 242 |
239 #endif | 243 #endif |