Mercurial > hg > svgui
comparison layer/SpectrogramLayer.h @ 906:12ab113ca2b1 cxx11
A few more fixes
author | Chris Cannam |
---|---|
date | Mon, 09 Mar 2015 15:59:04 +0000 |
parents | b66fb15de477 |
children | 28d05ae8741c |
comparison
equal
deleted
inserted
replaced
905:b66fb15de477 | 906:12ab113ca2b1 |
---|---|
241 | 241 |
242 virtual const Model *getSliceableModel() const; | 242 virtual const Model *getSliceableModel() const; |
243 | 243 |
244 protected slots: | 244 protected slots: |
245 void cacheInvalid(); | 245 void cacheInvalid(); |
246 void cacheInvalid(int startFrame, int endFrame); | 246 void cacheInvalid(sv_frame_t startFrame, sv_frame_t endFrame); |
247 | 247 |
248 void preferenceChanged(PropertyContainer::PropertyName name); | 248 void preferenceChanged(PropertyContainer::PropertyName name); |
249 | 249 |
250 void fillTimerTimedOut(); | 250 void fillTimerTimedOut(); |
251 | 251 |
313 int startFrame; | 313 int startFrame; |
314 int zoomLevel; | 314 int zoomLevel; |
315 }; | 315 }; |
316 typedef std::map<const View *, ImageCache> ViewImageCache; | 316 typedef std::map<const View *, ImageCache> ViewImageCache; |
317 void invalidateImageCaches(); | 317 void invalidateImageCaches(); |
318 void invalidateImageCaches(int startFrame, int endFrame); | 318 void invalidateImageCaches(sv_frame_t startFrame, sv_frame_t endFrame); |
319 mutable ViewImageCache m_imageCaches; | 319 mutable ViewImageCache m_imageCaches; |
320 | 320 |
321 /** | 321 /** |
322 * When painting, we draw directly onto the draw buffer and then | 322 * When painting, we draw directly onto the draw buffer and then |
323 * copy this to the part of the image cache that needed refreshing | 323 * copy this to the part of the image cache that needed refreshing |
326 */ | 326 */ |
327 mutable QImage m_drawBuffer; | 327 mutable QImage m_drawBuffer; |
328 | 328 |
329 mutable QTimer *m_updateTimer; | 329 mutable QTimer *m_updateTimer; |
330 | 330 |
331 mutable int m_candidateFillStartFrame; | 331 mutable sv_frame_t m_candidateFillStartFrame; |
332 bool m_exiting; | 332 bool m_exiting; |
333 | 333 |
334 void initialisePalette(); | 334 void initialisePalette(); |
335 void rotatePalette(int distance); | 335 void rotatePalette(int distance); |
336 | 336 |
340 | 340 |
341 void illuminateLocalFeatures(View *v, QPainter &painter) const; | 341 void illuminateLocalFeatures(View *v, QPainter &painter) const; |
342 | 342 |
343 double getEffectiveMinFrequency() const; | 343 double getEffectiveMinFrequency() const; |
344 double getEffectiveMaxFrequency() const; | 344 double getEffectiveMaxFrequency() const; |
345 | |
346 struct LayerRange { | |
347 int startFrame; | |
348 int zoomLevel; | |
349 int modelStart; | |
350 int modelEnd; | |
351 }; | |
352 | 345 |
353 // Note that the getYBin... methods return the nominal bin in the | 346 // Note that the getYBin... methods return the nominal bin in the |
354 // un-smoothed spectrogram. This is not necessarily the same bin | 347 // un-smoothed spectrogram. This is not necessarily the same bin |
355 // as is pulled from the spectrogram and drawn at the given | 348 // as is pulled from the spectrogram and drawn at the given |
356 // position, if the spectrogram has oversampling smoothing. Use | 349 // position, if the spectrogram has oversampling smoothing. Use |
378 int getFFTSize(const View *v) const; | 371 int getFFTSize(const View *v) const; |
379 FFTModel *getFFTModel(const View *v) const; | 372 FFTModel *getFFTModel(const View *v) const; |
380 Dense3DModelPeakCache *getPeakCache(const View *v) const; | 373 Dense3DModelPeakCache *getPeakCache(const View *v) const; |
381 void invalidateFFTModels(); | 374 void invalidateFFTModels(); |
382 | 375 |
383 typedef std::pair<FFTModel *, int> FFTFillPair; // model, last fill | 376 typedef std::pair<FFTModel *, sv_frame_t> FFTFillPair; // model, last fill |
384 typedef std::map<const View *, FFTFillPair> ViewFFTMap; | 377 typedef std::map<const View *, FFTFillPair> ViewFFTMap; |
385 typedef std::map<const View *, Dense3DModelPeakCache *> PeakCacheMap; | 378 typedef std::map<const View *, Dense3DModelPeakCache *> PeakCacheMap; |
386 mutable ViewFFTMap m_fftModels; | 379 mutable ViewFFTMap m_fftModels; |
387 mutable PeakCacheMap m_peakCaches; | 380 mutable PeakCacheMap m_peakCaches; |
388 mutable Model *m_sliceableModel; | 381 mutable Model *m_sliceableModel; |