Mercurial > hg > svcore
comparison data/model/EditableDenseThreeDimensionalModel.h @ 1580:c01cbe41aeb5 fix-static-analysis
Use override throughout
author | Chris Cannam |
---|---|
date | Mon, 26 Nov 2018 13:48:45 +0000 |
parents | 48e9f538e6e9 |
children | ad5f892c0c4d |
comparison
equal
deleted
inserted
replaced
1579:232d6ddf257d | 1580:c01cbe41aeb5 |
---|---|
46 int resolution, | 46 int resolution, |
47 int height, | 47 int height, |
48 CompressionType compression, | 48 CompressionType compression, |
49 bool notifyOnAdd = true); | 49 bool notifyOnAdd = true); |
50 | 50 |
51 virtual bool isOK() const; | 51 bool isOK() const override; |
52 | 52 |
53 virtual sv_samplerate_t getSampleRate() const; | 53 sv_samplerate_t getSampleRate() const override; |
54 virtual sv_frame_t getStartFrame() const; | 54 sv_frame_t getStartFrame() const override; |
55 virtual sv_frame_t getEndFrame() const; | 55 sv_frame_t getEndFrame() const override; |
56 | 56 |
57 /** | 57 /** |
58 * Set the frame offset of the first column. | 58 * Set the frame offset of the first column. |
59 */ | 59 */ |
60 virtual void setStartFrame(sv_frame_t); | 60 virtual void setStartFrame(sv_frame_t); |
61 | 61 |
62 /** | 62 /** |
63 * Return the number of sample frames covered by each set of bins. | 63 * Return the number of sample frames covered by each set of bins. |
64 */ | 64 */ |
65 virtual int getResolution() const; | 65 int getResolution() const override; |
66 | 66 |
67 /** | 67 /** |
68 * Set the number of sample frames covered by each set of bins. | 68 * Set the number of sample frames covered by each set of bins. |
69 */ | 69 */ |
70 virtual void setResolution(int sz); | 70 virtual void setResolution(int sz); |
71 | 71 |
72 /** | 72 /** |
73 * Return the number of columns. | 73 * Return the number of columns. |
74 */ | 74 */ |
75 virtual int getWidth() const; | 75 int getWidth() const override; |
76 | 76 |
77 /** | 77 /** |
78 * Return the number of bins in each column. | 78 * Return the number of bins in each column. |
79 */ | 79 */ |
80 virtual int getHeight() const; | 80 int getHeight() const override; |
81 | 81 |
82 /** | 82 /** |
83 * Set the number of bins in each column. | 83 * Set the number of bins in each column. |
84 * | 84 * |
85 * You can set (via setColumn) a vector of any length as a column, | 85 * You can set (via setColumn) a vector of any length as a column, |
92 virtual void setHeight(int sz); | 92 virtual void setHeight(int sz); |
93 | 93 |
94 /** | 94 /** |
95 * Return the minimum value of the value in each bin. | 95 * Return the minimum value of the value in each bin. |
96 */ | 96 */ |
97 virtual float getMinimumLevel() const; | 97 float getMinimumLevel() const override; |
98 | 98 |
99 /** | 99 /** |
100 * Set the minimum value of the value in a bin. | 100 * Set the minimum value of the value in a bin. |
101 */ | 101 */ |
102 virtual void setMinimumLevel(float sz); | 102 virtual void setMinimumLevel(float sz); |
103 | 103 |
104 /** | 104 /** |
105 * Return the maximum value of the value in each bin. | 105 * Return the maximum value of the value in each bin. |
106 */ | 106 */ |
107 virtual float getMaximumLevel() const; | 107 float getMaximumLevel() const override; |
108 | 108 |
109 /** | 109 /** |
110 * Set the maximum value of the value in a bin. | 110 * Set the maximum value of the value in a bin. |
111 */ | 111 */ |
112 virtual void setMaximumLevel(float sz); | 112 virtual void setMaximumLevel(float sz); |
113 | 113 |
114 /** | 114 /** |
115 * Get the set of bin values at the given column. | 115 * Get the set of bin values at the given column. |
116 */ | 116 */ |
117 virtual Column getColumn(int x) const; | 117 Column getColumn(int x) const override; |
118 | 118 |
119 /** | 119 /** |
120 * Get a single value, from the n'th bin of the given column. | 120 * Get a single value, from the n'th bin of the given column. |
121 */ | 121 */ |
122 virtual float getValueAt(int x, int n) const; | 122 float getValueAt(int x, int n) const override; |
123 | 123 |
124 /** | 124 /** |
125 * Set the entire set of bin values at the given column. | 125 * Set the entire set of bin values at the given column. |
126 */ | 126 */ |
127 virtual void setColumn(int x, const Column &values); | 127 virtual void setColumn(int x, const Column &values); |
128 | 128 |
129 /** | 129 /** |
130 * Return the name of bin n. This is a single label per bin that | 130 * Return the name of bin n. This is a single label per bin that |
131 * does not vary from one column to the next. | 131 * does not vary from one column to the next. |
132 */ | 132 */ |
133 virtual QString getBinName(int n) const; | 133 QString getBinName(int n) const override; |
134 | 134 |
135 /** | 135 /** |
136 * Set the name of bin n. | 136 * Set the name of bin n. |
137 */ | 137 */ |
138 virtual void setBinName(int n, QString); | 138 virtual void setBinName(int n, QString); |
146 * Return true if the bins have values as well as names. (The | 146 * Return true if the bins have values as well as names. (The |
147 * values may have been derived from the names, e.g. by parsing | 147 * values may have been derived from the names, e.g. by parsing |
148 * numbers from them.) If this returns true, getBinValue() may be | 148 * numbers from them.) If this returns true, getBinValue() may be |
149 * used to retrieve the values. | 149 * used to retrieve the values. |
150 */ | 150 */ |
151 virtual bool hasBinValues() const; | 151 bool hasBinValues() const override; |
152 | 152 |
153 /** | 153 /** |
154 * Return the value of bin n, if any. This is a "vertical scale" | 154 * Return the value of bin n, if any. This is a "vertical scale" |
155 * value which does not vary from one column to the next. This is | 155 * value which does not vary from one column to the next. This is |
156 * only meaningful if hasBinValues() returns true. | 156 * only meaningful if hasBinValues() returns true. |
157 */ | 157 */ |
158 virtual float getBinValue(int n) const; | 158 float getBinValue(int n) const override; |
159 | 159 |
160 /** | 160 /** |
161 * Set the values of all bins (separate from their labels). These | 161 * Set the values of all bins (separate from their labels). These |
162 * are "vertical scale" values which do not vary from one column | 162 * are "vertical scale" values which do not vary from one column |
163 * to the next. | 163 * to the next. |
166 | 166 |
167 /** | 167 /** |
168 * Obtain the name of the unit of the values returned from | 168 * Obtain the name of the unit of the values returned from |
169 * getBinValue(), if any. | 169 * getBinValue(), if any. |
170 */ | 170 */ |
171 virtual QString getBinValueUnit() const; | 171 QString getBinValueUnit() const override; |
172 | 172 |
173 /** | 173 /** |
174 * Set the name of the unit of the values return from | 174 * Set the name of the unit of the values return from |
175 * getBinValue() if any. | 175 * getBinValue() if any. |
176 */ | 176 */ |
179 /** | 179 /** |
180 * Return true if the distribution of values in the bins is such | 180 * Return true if the distribution of values in the bins is such |
181 * as to suggest a log scale (mapping to colour etc) may be better | 181 * as to suggest a log scale (mapping to colour etc) may be better |
182 * than a linear one. | 182 * than a linear one. |
183 */ | 183 */ |
184 bool shouldUseLogValueScale() const; | 184 bool shouldUseLogValueScale() const override; |
185 | 185 |
186 virtual void setCompletion(int completion, bool update = true); | 186 virtual void setCompletion(int completion, bool update = true); |
187 virtual int getCompletion() const { return m_completion; } | 187 int getCompletion() const override { return m_completion; } |
188 | 188 |
189 QString getTypeName() const { return tr("Editable Dense 3-D"); } | 189 QString getTypeName() const override { return tr("Editable Dense 3-D"); } |
190 | 190 |
191 virtual QString toDelimitedDataString(QString delimiter) const; | 191 QString toDelimitedDataString(QString delimiter) const override; |
192 virtual QString toDelimitedDataStringSubset(QString delimiter, sv_frame_t f0, sv_frame_t f1) const; | 192 QString toDelimitedDataStringSubset(QString delimiter, sv_frame_t f0, sv_frame_t f1) const override; |
193 | 193 |
194 virtual void toXml(QTextStream &out, | 194 void toXml(QTextStream &out, |
195 QString indent = "", | 195 QString indent = "", |
196 QString extraAttributes = "") const; | 196 QString extraAttributes = "") const override; |
197 | 197 |
198 protected: | 198 protected: |
199 typedef std::vector<Column> ValueMatrix; | 199 typedef std::vector<Column> ValueMatrix; |
200 ValueMatrix m_data; | 200 ValueMatrix m_data; |
201 | 201 |