comparison 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
comparison
equal deleted inserted replaced
1092:9b826dd23c84 1093:cd22f74dc159
27 #include "data/model/FFTModel.h" 27 #include "data/model/FFTModel.h"
28 28
29 #include "ScrollableImageCache.h" 29 #include "ScrollableImageCache.h"
30 #include "VerticalBinLayer.h" 30 #include "VerticalBinLayer.h"
31 #include "ColourScale.h" 31 #include "ColourScale.h"
32 #include "Colour3DPlotRenderer.h"
32 33
33 #include <QMutex> 34 #include <QMutex>
34 #include <QWaitCondition> 35 #include <QWaitCondition>
35 #include <QImage> 36 #include <QImage>
36 #include <QPixmap> 37 #include <QPixmap>
40 class QImage; 41 class QImage;
41 class QPixmap; 42 class QPixmap;
42 class QTimer; 43 class QTimer;
43 class FFTModel; 44 class FFTModel;
44 class Dense3DModelPeakCache; 45 class Dense3DModelPeakCache;
45 class Colour3DPlotRenderer;
46 46
47 /** 47 /**
48 * SpectrogramLayer represents waveform data (obtained from a 48 * SpectrogramLayer represents waveform data (obtained from a
49 * DenseTimeValueModel) in spectrogram form. 49 * DenseTimeValueModel) in spectrogram form.
50 */ 50 */
144 * scaling. The default is LogColourScale. 144 * scaling. The default is LogColourScale.
145 */ 145 */
146 void setColourScale(ColourScale::Scale); 146 void setColourScale(ColourScale::Scale);
147 ColourScale::Scale getColourScale() const; 147 ColourScale::Scale getColourScale() const;
148 148
149 enum FrequencyScale {
150 LinearFrequencyScale,
151 LogFrequencyScale
152 };
153
154 /** 149 /**
155 * Specify the scale for the y axis. 150 * Specify the scale for the y axis.
156 */ 151 */
157 void setFrequencyScale(FrequencyScale); 152 void setBinScale(Colour3DPlotRenderer::BinScale);
158 FrequencyScale getFrequencyScale() const; 153 Colour3DPlotRenderer::BinScale getBinScale() const;
159 154
160 enum BinDisplay {
161 AllBins,
162 PeakBins,
163 PeakFrequencies
164 };
165
166 /** 155 /**
167 * Specify the processing of frequency bins for the y axis. 156 * Specify the processing of frequency bins for the y axis.
168 */ 157 */
169 void setBinDisplay(BinDisplay); 158 void setBinDisplay(Colour3DPlotRenderer::BinDisplay);
170 BinDisplay getBinDisplay() const; 159 Colour3DPlotRenderer::BinDisplay getBinDisplay() const;
171 160
172 /** 161 /**
173 * Specify the normalization mode for bin values. 162 * Specify the normalization mode for bin values.
174 */ 163 */
175 void setNormalization(ColumnOp::Normalization); 164 void setNormalization(ColumnOp::Normalization);
256 int m_maxFrequency; 245 int m_maxFrequency;
257 int m_initialMaxFrequency; 246 int m_initialMaxFrequency;
258 ColourScale::Scale m_colourScale; 247 ColourScale::Scale m_colourScale;
259 int m_colourMap; 248 int m_colourMap;
260 QColor m_crosshairColour; 249 QColor m_crosshairColour;
261 FrequencyScale m_frequencyScale; 250 Colour3DPlotRenderer::BinScale m_binScale;
262 BinDisplay m_binDisplay; 251 Colour3DPlotRenderer::BinDisplay m_binDisplay;
263 ColumnOp::Normalization m_normalization; 252 ColumnOp::Normalization m_normalization;
264 int m_lastEmittedZoomStep; 253 int m_lastEmittedZoomStep;
265 bool m_synchronous; 254 bool m_synchronous;
266 255
267 mutable bool m_haveDetailedScale; 256 mutable bool m_haveDetailedScale;