diff layer/SpectrogramLayer.h @ 193:57c2350a8c40

* Add slice layers (so you can display a slice of a colour 3d plot as if it were a spectrum) * Make spectrum layer a subclass of slice layer
author Chris Cannam
date Fri, 26 Jan 2007 16:59:57 +0000
parents e7cf6044c2a0
children 22c99c8aa1e0
line wrap: on
line diff
--- a/layer/SpectrogramLayer.h	Wed Jan 24 17:14:24 2007 +0000
+++ b/layer/SpectrogramLayer.h	Fri Jan 26 16:59:57 2007 +0000
@@ -16,7 +16,7 @@
 #ifndef _SPECTROGRAM_LAYER_H_
 #define _SPECTROGRAM_LAYER_H_
 
-#include "Layer.h"
+#include "SliceableLayer.h"
 #include "base/Window.h"
 #include "base/RealTime.h"
 #include "base/Thread.h"
@@ -43,7 +43,7 @@
  * DenseTimeValueModel) in spectrogram form.
  */
 
-class SpectrogramLayer : public Layer,
+class SpectrogramLayer : public SliceableLayer,
 			 public PowerOfSqrtTwoZoomConstraint
 {
     Q_OBJECT
@@ -215,6 +215,8 @@
     virtual void setVerticalZoomStep(int);
     virtual RangeMapper *getNewVerticalZoomRangeMapper() const;
 
+    virtual const Model *getSliceableModel() const;
+
 protected slots:
     void cacheInvalid();
     void cacheInvalid(size_t startFrame, size_t endFrame);
@@ -337,6 +339,7 @@
     typedef std::map<const View *, FFTFillPair> ViewFFTMap;
     typedef std::vector<float> FloatVector;
     mutable ViewFFTMap m_fftModels;
+    mutable Model *m_sliceableModel;
 
     class MagnitudeRange {
     public: