comparison data/model/Dense3DModelPeakCache.h @ 1580:c01cbe41aeb5 fix-static-analysis

Use override throughout
author Chris Cannam
date Mon, 26 Nov 2018 13:48:45 +0000
parents df59bf0b4236
children 0d89abd631ac
comparison
equal deleted inserted replaced
1579:232d6ddf257d 1580:c01cbe41aeb5
26 public: 26 public:
27 Dense3DModelPeakCache(const 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 bool isOK() const override {
32 return m_source && m_source->isOK(); 32 return m_source && m_source->isOK();
33 } 33 }
34 34
35 virtual sv_samplerate_t getSampleRate() const { 35 sv_samplerate_t getSampleRate() const override {
36 return m_source->getSampleRate(); 36 return m_source->getSampleRate();
37 } 37 }
38 38
39 virtual sv_frame_t getStartFrame() const { 39 sv_frame_t getStartFrame() const override {
40 return m_source->getStartFrame(); 40 return m_source->getStartFrame();
41 } 41 }
42 42
43 virtual sv_frame_t getEndFrame() const { 43 sv_frame_t getEndFrame() const override {
44 return m_source->getEndFrame(); 44 return m_source->getEndFrame();
45 } 45 }
46 46
47 virtual int getResolution() const { 47 int getResolution() const override {
48 return m_source->getResolution() * m_columnsPerPeak; 48 return m_source->getResolution() * m_columnsPerPeak;
49 } 49 }
50 50
51 virtual int getColumnsPerPeak() const { 51 virtual int getColumnsPerPeak() const {
52 return m_columnsPerPeak; 52 return m_columnsPerPeak;
53 } 53 }
54 54
55 virtual int getWidth() const { 55 int getWidth() const override {
56 int sourceWidth = m_source->getWidth(); 56 int sourceWidth = m_source->getWidth();
57 if ((sourceWidth % m_columnsPerPeak) == 0) { 57 if ((sourceWidth % m_columnsPerPeak) == 0) {
58 return sourceWidth / m_columnsPerPeak; 58 return sourceWidth / m_columnsPerPeak;
59 } else { 59 } else {
60 return sourceWidth / m_columnsPerPeak + 1; 60 return sourceWidth / m_columnsPerPeak + 1;
61 } 61 }
62 } 62 }
63 63
64 virtual int getHeight() const { 64 int getHeight() const override {
65 return m_source->getHeight(); 65 return m_source->getHeight();
66 } 66 }
67 67
68 virtual float getMinimumLevel() const { 68 float getMinimumLevel() const override {
69 return m_source->getMinimumLevel(); 69 return m_source->getMinimumLevel();
70 } 70 }
71 71
72 virtual float getMaximumLevel() const { 72 float getMaximumLevel() const override {
73 return m_source->getMaximumLevel(); 73 return m_source->getMaximumLevel();
74 } 74 }
75 75
76 /** 76 /**
77 * Retrieve the peaks column at peak-cache column number col. This 77 * Retrieve the peaks column at peak-cache column number col. This
78 * will consist of the peak values in the underlying model from 78 * will consist of the peak values in the underlying model from
79 * columns (col * getColumnsPerPeak()) to ((col+1) * 79 * columns (col * getColumnsPerPeak()) to ((col+1) *
80 * getColumnsPerPeak() - 1) inclusive. 80 * getColumnsPerPeak() - 1) inclusive.
81 */ 81 */
82 virtual Column getColumn(int col) const; 82 Column getColumn(int col) const override;
83 83
84 virtual float getValueAt(int col, int n) const; 84 float getValueAt(int col, int n) const override;
85 85
86 virtual QString getBinName(int n) const { 86 QString getBinName(int n) const override {
87 return m_source->getBinName(n); 87 return m_source->getBinName(n);
88 } 88 }
89 89
90 virtual bool shouldUseLogValueScale() const { 90 bool shouldUseLogValueScale() const override {
91 return m_source->shouldUseLogValueScale(); 91 return m_source->shouldUseLogValueScale();
92 } 92 }
93 93
94 QString getTypeName() const { return tr("Dense 3-D Peak Cache"); } 94 QString getTypeName() const override { return tr("Dense 3-D Peak Cache"); }
95 95
96 virtual int getCompletion() const { 96 int getCompletion() const override {
97 return m_source->getCompletion(); 97 return m_source->getCompletion();
98 } 98 }
99 99
100 protected slots: 100 protected slots:
101 void sourceModelChanged(); 101 void sourceModelChanged();