diff layer/SpectrogramLayer.h @ 1092:9b826dd23c84 spectrogram-minor-refactor

Colour scales (partly)
author Chris Cannam
date Thu, 07 Jul 2016 12:39:56 +0100
parents c8683d94442a
children cd22f74dc159
line wrap: on
line diff
--- a/layer/SpectrogramLayer.h	Thu Jul 07 11:24:28 2016 +0100
+++ b/layer/SpectrogramLayer.h	Thu Jul 07 12:39:56 2016 +0100
@@ -28,6 +28,7 @@
 
 #include "ScrollableImageCache.h"
 #include "VerticalBinLayer.h"
+#include "ColourScale.h"
 
 #include <QMutex>
 #include <QWaitCondition>
@@ -137,20 +138,13 @@
     void setMaxFrequency(int); // 0 -> no maximum
     int getMaxFrequency() const;
 
-    enum ColourScale {
-	LinearColourScale,
-	MeterColourScale,
-        dBSquaredColourScale,
-	dBColourScale,
-	PhaseColourScale
-    };
-
     /**
-     * Specify the scale for sample levels.  See WaveformLayer for
-     * details of meter and dB scaling.  The default is dBColourScale.
+     * Specify the scale for sample levels.  See ColourScale and
+     * WaveformLayer for comparison and details of meter and dB
+     * scaling.  The default is LogColourScale.
      */
-    void setColourScale(ColourScale);
-    ColourScale getColourScale() const;
+    void setColourScale(ColourScale::Scale);
+    ColourScale::Scale getColourScale() const;
 
     enum FrequencyScale {
 	LinearFrequencyScale,
@@ -261,7 +255,7 @@
     int                 m_minFrequency;
     int                 m_maxFrequency;
     int                 m_initialMaxFrequency;
-    ColourScale         m_colourScale;
+    ColourScale::Scale  m_colourScale;
     int                 m_colourMap;
     QColor              m_crosshairColour;
     FrequencyScale      m_frequencyScale;