comparison layer/WaveformLayer.h @ 905:b66fb15de477 cxx11

Working through the float/double and int/sv_frame_t fixes
author Chris Cannam
date Mon, 09 Mar 2015 14:35:21 +0000
parents 1d526ba11a24
children 4a578a360011
comparison
equal deleted inserted replaced
904:e0f08e108064 905:b66fb15de477
154 * effectively no space at the very top of the layer; 1.0 would 154 * effectively no space at the very top of the layer; 1.0 would
155 * indicate that the waveform occupies no space at the very 155 * indicate that the waveform occupies no space at the very
156 * bottom; the default value of 0.5 indicates that it occupies the 156 * bottom; the default value of 0.5 indicates that it occupies the
157 * whole layer, centred at the middle. 157 * whole layer, centred at the middle.
158 */ 158 */
159 void setMiddleLineHeight(float height); 159 void setMiddleLineHeight(double);
160 float getMiddleLineHeight() const { return m_middleLineHeight; } 160 double getMiddleLineHeight() const { return m_middleLineHeight; }
161 161
162 /** 162 /**
163 * Enable or disable aggressive pixmap cacheing. If enabled, 163 * Enable or disable aggressive pixmap cacheing. If enabled,
164 * waveforms will be rendered to an off-screen pixmap and 164 * waveforms will be rendered to an off-screen pixmap and
165 * refreshed from there instead of being redrawn from the peak 165 * refreshed from there instead of being redrawn from the peak
182 182
183 virtual bool isLayerScrollable(const View *) const; 183 virtual bool isLayerScrollable(const View *) const;
184 184
185 virtual int getCompletion(View *) const; 185 virtual int getCompletion(View *) const;
186 186
187 virtual bool getValueExtents(float &min, float &max, 187 virtual bool getValueExtents(double &min, double &max,
188 bool &log, QString &unit) const; 188 bool &log, QString &unit) const;
189 189
190 virtual bool getYScaleValue(const View *v, int y, 190 virtual bool getYScaleValue(const View *v, int y,
191 float &value, QString &unit) const; 191 double &value, QString &unit) const;
192 192
193 virtual bool getYScaleDifference(const View *v, int y0, int y1, 193 virtual bool getYScaleDifference(const View *v, int y0, int y1,
194 float &diff, QString &unit) const; 194 double &diff, QString &unit) const;
195 195
196 virtual void toXml(QTextStream &stream, QString indent = "", 196 virtual void toXml(QTextStream &stream, QString indent = "",
197 QString extraAttributes = "") const; 197 QString extraAttributes = "") const;
198 198
199 virtual void setProperties(const QXmlAttributes &attributes); 199 virtual void setProperties(const QXmlAttributes &attributes);
209 209
210 /// Return value is number of channels displayed 210 /// Return value is number of channels displayed
211 int getChannelArrangement(int &min, int &max, 211 int getChannelArrangement(int &min, int &max,
212 bool &merging, bool &mixing) const; 212 bool &merging, bool &mixing) const;
213 213
214 int getYForValue(const View *v, float value, int channel) const; 214 int getYForValue(const View *v, double value, int channel) const;
215 215
216 float getValueForY(const View *v, int y, int &channel) const; 216 double getValueForY(const View *v, int y, int &channel) const;
217 217
218 bool getSourceFramesForX(View *v, int x, int modelZoomLevel, 218 bool getSourceFramesForX(View *v, int x, int modelZoomLevel,
219 int &f0, int &f1) const; 219 int &f0, int &f1) const;
220 220
221 float getNormalizeGain(View *v, int channel) const; 221 float getNormalizeGain(View *v, int channel) const;
227 bool m_showMeans; 227 bool m_showMeans;
228 bool m_greyscale; 228 bool m_greyscale;
229 ChannelMode m_channelMode; 229 ChannelMode m_channelMode;
230 int m_channel; 230 int m_channel;
231 Scale m_scale; 231 Scale m_scale;
232 float m_middleLineHeight; 232 double m_middleLineHeight;
233 bool m_aggressive; 233 bool m_aggressive;
234 234
235 mutable std::vector<float> m_effectiveGains; 235 mutable std::vector<float> m_effectiveGains;
236 236
237 mutable QPixmap *m_cache; 237 mutable QPixmap *m_cache;