comparison layer/WaveformLayer.h @ 709:def489f5ce92 tonioni

Adjustable middle-line height for waveform. Not 100% supported (only really for basic waveform rendering)
author Chris Cannam
date Wed, 08 Jan 2014 17:47:34 +0000
parents 5b72899d692b
children 1d526ba11a24
comparison
equal deleted inserted replaced
708:1c4bbf8952bc 709:def489f5ce92
145 */ 145 */
146 void setScale(Scale); 146 void setScale(Scale);
147 Scale getScale() const { return m_scale; } 147 Scale getScale() const { return m_scale; }
148 148
149 /** 149 /**
150 * Specify the height of the middle of the waveform track or
151 * tracks within the layer, from 0.0 to 1.0.
152 *
153 * A value of 0.0 would indicate that the waveform occupies
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
156 * bottom; the default value of 0.5 indicates that it occupies the
157 * whole layer, centred at the middle.
158 */
159 void setMiddleLineHeight(float height);
160 float getMiddleLineHeight() const { return m_middleLineHeight; }
161
162 /**
150 * Enable or disable aggressive pixmap cacheing. If enabled, 163 * Enable or disable aggressive pixmap cacheing. If enabled,
151 * waveforms will be rendered to an off-screen pixmap and 164 * waveforms will be rendered to an off-screen pixmap and
152 * refreshed from there instead of being redrawn from the peak 165 * refreshed from there instead of being redrawn from the peak
153 * data each time. This may be faster if the data and zoom level 166 * data each time. This may be faster if the data and zoom level
154 * do not change often, but it may be slower for frequently zoomed 167 * do not change often, but it may be slower for frequently zoomed
214 bool m_showMeans; 227 bool m_showMeans;
215 bool m_greyscale; 228 bool m_greyscale;
216 ChannelMode m_channelMode; 229 ChannelMode m_channelMode;
217 int m_channel; 230 int m_channel;
218 Scale m_scale; 231 Scale m_scale;
232 float m_middleLineHeight;
219 bool m_aggressive; 233 bool m_aggressive;
220 234
221 mutable std::vector<float> m_effectiveGains; 235 mutable std::vector<float> m_effectiveGains;
222 236
223 mutable QPixmap *m_cache; 237 mutable QPixmap *m_cache;