diff layer/SpectrogramLayer.h @ 1093:cd22f74dc159 spectrogram-minor-refactor

Use enums from origin classes
author Chris Cannam
date Thu, 07 Jul 2016 19:18:01 +0100
parents 9b826dd23c84
children d84a0033b305
line wrap: on
line diff
--- a/layer/SpectrogramLayer.h	Thu Jul 07 12:39:56 2016 +0100
+++ b/layer/SpectrogramLayer.h	Thu Jul 07 19:18:01 2016 +0100
@@ -29,6 +29,7 @@
 #include "ScrollableImageCache.h"
 #include "VerticalBinLayer.h"
 #include "ColourScale.h"
+#include "Colour3DPlotRenderer.h"
 
 #include <QMutex>
 #include <QWaitCondition>
@@ -42,7 +43,6 @@
 class QTimer;
 class FFTModel;
 class Dense3DModelPeakCache;
-class Colour3DPlotRenderer;
 
 /**
  * SpectrogramLayer represents waveform data (obtained from a
@@ -146,28 +146,17 @@
     void setColourScale(ColourScale::Scale);
     ColourScale::Scale getColourScale() const;
 
-    enum FrequencyScale {
-	LinearFrequencyScale,
-	LogFrequencyScale
-    };
-    
     /**
      * Specify the scale for the y axis.
      */
-    void setFrequencyScale(FrequencyScale);
-    FrequencyScale getFrequencyScale() const;
+    void setBinScale(Colour3DPlotRenderer::BinScale);
+    Colour3DPlotRenderer::BinScale getBinScale() const;
 
-    enum BinDisplay {
-	AllBins,
-	PeakBins,
-	PeakFrequencies
-    };
-    
     /**
      * Specify the processing of frequency bins for the y axis.
      */
-    void setBinDisplay(BinDisplay);
-    BinDisplay getBinDisplay() const;
+    void setBinDisplay(Colour3DPlotRenderer::BinDisplay);
+    Colour3DPlotRenderer::BinDisplay getBinDisplay() const;
 
     /**
      * Specify the normalization mode for bin values.
@@ -258,8 +247,8 @@
     ColourScale::Scale  m_colourScale;
     int                 m_colourMap;
     QColor              m_crosshairColour;
-    FrequencyScale      m_frequencyScale;
-    BinDisplay          m_binDisplay;
+    Colour3DPlotRenderer::BinScale m_binScale;
+    Colour3DPlotRenderer::BinDisplay m_binDisplay;
     ColumnOp::Normalization m_normalization;
     int                 m_lastEmittedZoomStep;
     bool                m_synchronous;