Mercurial > hg > svgui
comparison layer/Colour3DPlotLayer.h @ 1107:6d720fe1c8cc spectrogram-minor-refactor
Remove almost all of the "old" paint logic from Colour3DPlotLayer
author | Chris Cannam |
---|---|
date | Thu, 14 Jul 2016 17:12:08 +0100 |
parents | ea5ae9dd10ba |
children | 67dd16e33a3d |
comparison
equal
deleted
inserted
replaced
1106:8abdefce36a6 | 1107:6d720fe1c8cc |
---|---|
156 void modelChangedWithin(sv_frame_t, sv_frame_t); | 156 void modelChangedWithin(sv_frame_t, sv_frame_t); |
157 | 157 |
158 protected: | 158 protected: |
159 const DenseThreeDimensionalModel *m_model; // I do not own this | 159 const DenseThreeDimensionalModel *m_model; // I do not own this |
160 | 160 |
161 mutable QImage *m_cache; | |
162 mutable QImage *m_peaksCache; | |
163 mutable int m_cacheValidStart; | |
164 mutable int m_cacheValidEnd; | |
165 | |
166 ColourScaleType m_colourScale; | 161 ColourScaleType m_colourScale; |
167 bool m_colourScaleSet; | 162 bool m_colourScaleSet; |
168 int m_colourMap; | 163 int m_colourMap; |
169 float m_gain; | 164 float m_gain; |
170 BinScale m_binScale; | 165 BinScale m_binScale; |
192 Dense3DModelPeakCache *getPeakCache() const; | 187 Dense3DModelPeakCache *getPeakCache() const; |
193 | 188 |
194 typedef std::map<int, Colour3DPlotRenderer *> ViewRendererMap; // key is view id | 189 typedef std::map<int, Colour3DPlotRenderer *> ViewRendererMap; // key is view id |
195 mutable ViewRendererMap m_renderers; | 190 mutable ViewRendererMap m_renderers; |
196 Colour3DPlotRenderer *getRenderer(LayerGeometryProvider *) const; | 191 Colour3DPlotRenderer *getRenderer(LayerGeometryProvider *) const; |
192 void invalidateRenderers(); | |
197 | 193 |
198 /** | 194 /** |
199 * Return the y coordinate at which the given bin "starts" | 195 * Return the y coordinate at which the given bin "starts" |
200 * (i.e. at the bottom of the bin, if the given bin is an integer | 196 * (i.e. at the bottom of the bin, if the given bin is an integer |
201 * and the vertical scale is the usual way up). Bin number may be | 197 * and the vertical scale is the usual way up). Bin number may be |
216 /** | 212 /** |
217 * True if we have the opaque or smooth flag set, or if the cells | 213 * True if we have the opaque or smooth flag set, or if the cells |
218 * are so small you can't see their borders. False for big, | 214 * are so small you can't see their borders. False for big, |
219 * translucent cells. | 215 * translucent cells. |
220 */ | 216 */ |
221 bool shouldPaintDenseIn(const LayerGeometryProvider *) const; | 217 //!!! bool shouldPaintDenseIn(const LayerGeometryProvider *) const; |
222 | 218 |
223 int getColourScaleWidth(QPainter &) const; | 219 int getColourScaleWidth(QPainter &) const; |
224 void fillCache(int firstBin, int lastBin) const; | 220 |
225 void paintDense(LayerGeometryProvider *v, QPainter &paint, QRect rect) const; | 221 void paintWithRenderer(LayerGeometryProvider *v, QPainter &paint, QRect rect) const; |
226 | |
227 void paintAlternative(LayerGeometryProvider *v, QPainter &paint, QRect rect) const; | |
228 | |
229 }; | 222 }; |
230 | 223 |
231 #endif | 224 #endif |