comparison data/model/Dense3DModelPeakCache.h @ 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
comparison
equal deleted inserted replaced
1190:f6998e304b36 1191:6d09ad2ab21f
11 published by the Free Software Foundation; either version 2 of the 11 published by the Free Software Foundation; either version 2 of the
12 License, or (at your option) any later version. See the file 12 License, or (at your option) any later version. See the file
13 COPYING included with this distribution for more information. 13 COPYING included with this distribution for more information.
14 */ 14 */
15 15
16 #ifndef _DENSE_3D_MODEL_PEAK_CACHE_H_ 16 #ifndef DENSE_3D_MODEL_PEAK_CACHE_H
17 #define _DENSE_3D_MODEL_PEAK_CACHE_H_ 17 #define DENSE_3D_MODEL_PEAK_CACHE_H
18 18
19 #include "DenseThreeDimensionalModel.h" 19 #include "DenseThreeDimensionalModel.h"
20 #include "EditableDenseThreeDimensionalModel.h" 20 #include "EditableDenseThreeDimensionalModel.h"
21 21
22 class Dense3DModelPeakCache : public DenseThreeDimensionalModel 22 class Dense3DModelPeakCache : public DenseThreeDimensionalModel
23 { 23 {
24 Q_OBJECT 24 Q_OBJECT
25 25
26 public: 26 public:
27 Dense3DModelPeakCache(DenseThreeDimensionalModel *source, 27 Dense3DModelPeakCache(const DenseThreeDimensionalModel *source,
28 int columnsPerPeak); 28 int columnsPerPeak);
29 ~Dense3DModelPeakCache(); 29 ~Dense3DModelPeakCache();
30 30
31 virtual bool isOK() const { 31 virtual bool isOK() const {
32 return m_source && m_source->isOK(); 32 return m_source && m_source->isOK();
89 protected slots: 89 protected slots:
90 void sourceModelChanged(); 90 void sourceModelChanged();
91 void sourceModelAboutToBeDeleted(); 91 void sourceModelAboutToBeDeleted();
92 92
93 private: 93 private:
94 DenseThreeDimensionalModel *m_source; 94 const DenseThreeDimensionalModel *m_source;
95 mutable EditableDenseThreeDimensionalModel *m_cache; 95 mutable EditableDenseThreeDimensionalModel *m_cache;
96 mutable std::vector<bool> m_coverage; // must be bool, for space efficiency 96 mutable std::vector<bool> m_coverage; // must be bool, for space efficiency
97 // (vector of bool uses 1-bit elements) 97 // (vector of bool uses 1-bit elements)
98 int m_columnsPerPeak; 98 int m_columnsPerPeak;
99 99