Mercurial > hg > svcore
comparison base/Layer.h @ 29:8460b3bf8f04
* Implement play mute, level and pan controls and a layer visibility control
* Handle swapping the buffers in AudioCallbackPlaySource more gracefully, so
that in many cases it can be done inaudibly. Still gets it wrong when
playing in a noncontiguous selection.
* Fix to SV file save for non-2d sparse models
* Fixes to LED button drawing and AudioDial mouse functionality
* Add progress bar for Ogg file import
* Reshuffle PropertyContainer and its subclasses so it can be a QObject
* Add layer dormancy (invisible layer permitted to free its cache space)
* Optimisations to SpectrogramLayer, removing locks when reading/writing
individual pixels in the cache (should be unnecessary there) -- there's
still an issue here as we need a lock when reading from the model in
case the model is replaced, and we don't currently have one
* Several munlock() calls to make it harder to exhaust real memory if
running in an RT mode with mlockall() active
author | Chris Cannam |
---|---|
date | Fri, 17 Feb 2006 18:04:26 +0000 |
parents | 4b16526b011b |
children | 5e28cbb431d0 |
comparison
equal
deleted
inserted
replaced
28:4b16526b011b | 29:8460b3bf8f04 |
---|---|
28 * The base class for visual representations of the data found in a | 28 * The base class for visual representations of the data found in a |
29 * Model. Layers are expected to be able to draw themselves onto a | 29 * Model. Layers are expected to be able to draw themselves onto a |
30 * View, and may also be editable. | 30 * View, and may also be editable. |
31 */ | 31 */ |
32 | 32 |
33 class Layer : public QObject, | 33 class Layer : public PropertyContainer, |
34 public PropertyContainer, | |
35 public XmlExportable | 34 public XmlExportable |
36 { | 35 { |
37 Q_OBJECT | 36 Q_OBJECT |
38 | 37 |
39 public: | 38 public: |
197 /** | 196 /** |
198 * Indicate that a layer is not currently visible and is not | 197 * Indicate that a layer is not currently visible and is not |
199 * expected to become visible in the near future (for example | 198 * expected to become visible in the near future (for example |
200 * because the user has explicitly removed or hidden it). The | 199 * because the user has explicitly removed or hidden it). The |
201 * layer may respond by (for example) freeing any cache memory it | 200 * layer may respond by (for example) freeing any cache memory it |
202 * is using, until next time its paint method is called. | 201 * is using, until next time its paint method is called. It does |
203 */ | 202 * not need to remember not to draw itself; the view will handle |
204 virtual void setLayerDormant() { } | 203 * that. |
205 | 204 */ |
206 virtual PlayParameters *getPlayParameters() const; | 205 virtual void setLayerDormant(bool dormant) { m_dormant = dormant; } |
206 | |
207 /** | |
208 * Return whether the layer is dormant (i.e. hidden). | |
209 */ | |
210 virtual bool isLayerDormant() const { return m_dormant; } | |
211 | |
212 virtual PlayParameters *getPlayParameters(); | |
213 | |
214 public slots: | |
215 void showLayer(bool show); | |
207 | 216 |
208 signals: | 217 signals: |
209 void modelChanged(); | 218 void modelChanged(); |
210 void modelCompletionChanged(); | 219 void modelCompletionChanged(); |
211 void modelChanged(size_t startFrame, size_t endFrame); | 220 void modelChanged(size_t startFrame, size_t endFrame); |
214 void layerParametersChanged(); | 223 void layerParametersChanged(); |
215 void layerNameChanged(); | 224 void layerNameChanged(); |
216 | 225 |
217 protected: | 226 protected: |
218 View *m_view; | 227 View *m_view; |
228 bool m_dormant; | |
219 }; | 229 }; |
220 | 230 |
221 #endif | 231 #endif |
222 | 232 |