changeset 1191:6d09ad2ab21f spectrogram-minor-refactor

Create, but don't yet use, a renderer in the colour 3d plot layer
author Chris Cannam
date Wed, 13 Jul 2016 13:06:28 +0100
parents f6998e304b36
children 9884efa1f88a
files data/model/Dense3DModelPeakCache.cpp data/model/Dense3DModelPeakCache.h data/model/FFTModel.cpp data/model/FFTModel.h
diffstat 4 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/data/model/Dense3DModelPeakCache.cpp	Thu Jun 23 14:43:00 2016 +0100
+++ b/data/model/Dense3DModelPeakCache.cpp	Wed Jul 13 13:06:28 2016 +0100
@@ -17,7 +17,7 @@
 
 #include "base/Profiler.h"
 
-Dense3DModelPeakCache::Dense3DModelPeakCache(DenseThreeDimensionalModel *source,
+Dense3DModelPeakCache::Dense3DModelPeakCache(const DenseThreeDimensionalModel *source,
 					     int columnsPerPeak) :
     m_source(source),
     m_columnsPerPeak(columnsPerPeak)
--- a/data/model/Dense3DModelPeakCache.h	Thu Jun 23 14:43:00 2016 +0100
+++ b/data/model/Dense3DModelPeakCache.h	Wed Jul 13 13:06:28 2016 +0100
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _DENSE_3D_MODEL_PEAK_CACHE_H_
-#define _DENSE_3D_MODEL_PEAK_CACHE_H_
+#ifndef DENSE_3D_MODEL_PEAK_CACHE_H
+#define DENSE_3D_MODEL_PEAK_CACHE_H
 
 #include "DenseThreeDimensionalModel.h"
 #include "EditableDenseThreeDimensionalModel.h"
@@ -24,7 +24,7 @@
     Q_OBJECT
 
 public:
-    Dense3DModelPeakCache(DenseThreeDimensionalModel *source,
+    Dense3DModelPeakCache(const DenseThreeDimensionalModel *source,
                           int columnsPerPeak);
     ~Dense3DModelPeakCache();
 
@@ -91,7 +91,7 @@
     void sourceModelAboutToBeDeleted();
 
 private:
-    DenseThreeDimensionalModel *m_source;
+    const DenseThreeDimensionalModel *m_source;
     mutable EditableDenseThreeDimensionalModel *m_cache;
     mutable std::vector<bool> m_coverage; // must be bool, for space efficiency
                                           // (vector of bool uses 1-bit elements)
--- a/data/model/FFTModel.cpp	Thu Jun 23 14:43:00 2016 +0100
+++ b/data/model/FFTModel.cpp	Wed Jul 13 13:06:28 2016 +0100
@@ -331,7 +331,7 @@
 }
 
 FFTModel::PeakLocationSet
-FFTModel::getPeaks(PeakPickType type, int x, int ymin, int ymax)
+FFTModel::getPeaks(PeakPickType type, int x, int ymin, int ymax) const
 {
     Profiler profiler("FFTModel::getPeaks");
 
@@ -479,7 +479,7 @@
 
 FFTModel::PeakSet
 FFTModel::getPeakFrequencies(PeakPickType type, int x,
-                             int ymin, int ymax)
+                             int ymin, int ymax) const
 {
     Profiler profiler("FFTModel::getPeakFrequencies");
 
--- a/data/model/FFTModel.h	Thu Jun 23 14:43:00 2016 +0100
+++ b/data/model/FFTModel.h	Wed Jul 13 13:06:28 2016 +0100
@@ -126,13 +126,13 @@
      * ymax is zero, getHeight()-1 will be used.
      */
     virtual PeakLocationSet getPeaks(PeakPickType type, int x,
-                                     int ymin = 0, int ymax = 0);
+                                     int ymin = 0, int ymax = 0) const;
 
     /**
      * Return locations and estimated stable frequencies of peak bins.
      */
     virtual PeakSet getPeakFrequencies(PeakPickType type, int x,
-                                       int ymin = 0, int ymax = 0);
+                                       int ymin = 0, int ymax = 0) const;
 
     QString getTypeName() const { return tr("FFT"); }