Mercurial > hg > svcore
comparison data/model/EditableDenseThreeDimensionalModel.h @ 891:8962f80f5d8e tony_integration
Merge from default branch
author | Chris Cannam |
---|---|
date | Tue, 11 Mar 2014 17:32:31 +0000 |
parents | 48410857b03c |
children | 59e7fe1b1003 |
comparison
equal
deleted
inserted
replaced
890:4cbf8c6a462d | 891:8962f80f5d8e |
---|---|
125 /** | 125 /** |
126 * Set the entire set of bin values at the given column. | 126 * Set the entire set of bin values at the given column. |
127 */ | 127 */ |
128 virtual void setColumn(size_t x, const Column &values); | 128 virtual void setColumn(size_t x, const Column &values); |
129 | 129 |
130 /** | |
131 * Return the name of bin n. This is a single label per bin that | |
132 * does not vary from one column to the next. | |
133 */ | |
130 virtual QString getBinName(size_t n) const; | 134 virtual QString getBinName(size_t n) const; |
135 | |
136 /** | |
137 * Set the name of bin n. | |
138 */ | |
131 virtual void setBinName(size_t n, QString); | 139 virtual void setBinName(size_t n, QString); |
140 | |
141 /** | |
142 * Set the names of all bins. | |
143 */ | |
132 virtual void setBinNames(std::vector<QString> names); | 144 virtual void setBinNames(std::vector<QString> names); |
133 | 145 |
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 /** | |
181 * Return true if the distribution of values in the bins is such | |
182 * as to suggest a log scale (mapping to colour etc) may be better | |
183 * than a linear one. | |
184 */ | |
134 bool shouldUseLogValueScale() const; | 185 bool shouldUseLogValueScale() const; |
135 | 186 |
136 virtual void setCompletion(int completion, bool update = true); | 187 virtual void setCompletion(int completion, bool update = true); |
137 virtual int getCompletion() const { return m_completion; } | 188 virtual int getCompletion() const { return m_completion; } |
138 | 189 |
160 std::vector<signed char> m_trunc; | 211 std::vector<signed char> m_trunc; |
161 void truncateAndStore(size_t index, const Column & values); | 212 void truncateAndStore(size_t index, const Column & values); |
162 Column expandAndRetrieve(size_t index) const; | 213 Column expandAndRetrieve(size_t index) const; |
163 | 214 |
164 std::vector<QString> m_binNames; | 215 std::vector<QString> m_binNames; |
216 std::vector<float> m_binValues; | |
217 QString m_binValueUnit; | |
165 | 218 |
166 size_t m_startFrame; | 219 size_t m_startFrame; |
167 size_t m_sampleRate; | 220 size_t m_sampleRate; |
168 size_t m_resolution; | 221 size_t m_resolution; |
169 size_t m_yBinCount; | 222 size_t m_yBinCount; |