Mercurial > hg > svcore
comparison data/model/EditableDenseThreeDimensionalModel.h @ 886:48410857b03c
Add bin-values and bin-value unit to EditableDense3DModel
author | Chris Cannam |
---|---|
date | Thu, 06 Feb 2014 18:26:18 +0000 |
parents | 816c751a7979 |
children | 59e7fe1b1003 |
comparison
equal
deleted
inserted
replaced
885:12a6140b3ae0 | 886:48410857b03c |
---|---|
142 * Set the names of all bins. | 142 * Set the names of all bins. |
143 */ | 143 */ |
144 virtual void setBinNames(std::vector<QString> names); | 144 virtual void setBinNames(std::vector<QString> names); |
145 | 145 |
146 /** | 146 /** |
147 * Return true if the bins have values as well as names. (The | |
148 * values may have been derived from the names, e.g. by parsing | |
149 * numbers from them.) If this returns true, getBinValue() may be | |
150 * used to retrieve the values. | |
151 */ | |
152 virtual bool hasBinValues() const; | |
153 | |
154 /** | |
155 * Return the value of bin n, if any. This is a "vertical scale" | |
156 * value which does not vary from one column to the next. This is | |
157 * only meaningful if hasBinValues() returns true. | |
158 */ | |
159 virtual float getBinValue(size_t n) const; | |
160 | |
161 /** | |
162 * Set the values of all bins (separate from their labels). These | |
163 * are "vertical scale" values which do not vary from one column | |
164 * to the next. | |
165 */ | |
166 virtual void setBinValues(std::vector<float> values); | |
167 | |
168 /** | |
169 * Obtain the name of the unit of the values returned from | |
170 * getBinValue(), if any. | |
171 */ | |
172 virtual QString getBinValueUnit() const; | |
173 | |
174 /** | |
175 * Set the name of the unit of the values return from | |
176 * getBinValue() if any. | |
177 */ | |
178 virtual void setBinValueUnit(QString unit); | |
179 | |
180 /** | |
147 * Return true if the distribution of values in the bins is such | 181 * Return true if the distribution of values in the bins is such |
148 * as to suggest a log scale (mapping to colour etc) may be better | 182 * as to suggest a log scale (mapping to colour etc) may be better |
149 * than a linear one. | 183 * than a linear one. |
150 */ | 184 */ |
151 bool shouldUseLogValueScale() const; | 185 bool shouldUseLogValueScale() const; |
177 std::vector<signed char> m_trunc; | 211 std::vector<signed char> m_trunc; |
178 void truncateAndStore(size_t index, const Column & values); | 212 void truncateAndStore(size_t index, const Column & values); |
179 Column expandAndRetrieve(size_t index) const; | 213 Column expandAndRetrieve(size_t index) const; |
180 | 214 |
181 std::vector<QString> m_binNames; | 215 std::vector<QString> m_binNames; |
216 std::vector<float> m_binValues; | |
217 QString m_binValueUnit; | |
182 | 218 |
183 size_t m_startFrame; | 219 size_t m_startFrame; |
184 size_t m_sampleRate; | 220 size_t m_sampleRate; |
185 size_t m_resolution; | 221 size_t m_resolution; |
186 size_t m_yBinCount; | 222 size_t m_yBinCount; |