Mercurial > hg > svcore
diff 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 |
line wrap: on
line diff
--- a/data/model/EditableDenseThreeDimensionalModel.h Tue Mar 11 17:30:35 2014 +0000 +++ b/data/model/EditableDenseThreeDimensionalModel.h Tue Mar 11 17:32:31 2014 +0000 @@ -127,10 +127,61 @@ */ virtual void setColumn(size_t x, const Column &values); + /** + * Return the name of bin n. This is a single label per bin that + * does not vary from one column to the next. + */ virtual QString getBinName(size_t n) const; + + /** + * Set the name of bin n. + */ virtual void setBinName(size_t n, QString); + + /** + * Set the names of all bins. + */ virtual void setBinNames(std::vector<QString> names); + /** + * Return true if the bins have values as well as names. (The + * values may have been derived from the names, e.g. by parsing + * numbers from them.) If this returns true, getBinValue() may be + * used to retrieve the values. + */ + virtual bool hasBinValues() const; + + /** + * Return the value of bin n, if any. This is a "vertical scale" + * value which does not vary from one column to the next. This is + * only meaningful if hasBinValues() returns true. + */ + virtual float getBinValue(size_t n) const; + + /** + * Set the values of all bins (separate from their labels). These + * are "vertical scale" values which do not vary from one column + * to the next. + */ + virtual void setBinValues(std::vector<float> values); + + /** + * Obtain the name of the unit of the values returned from + * getBinValue(), if any. + */ + virtual QString getBinValueUnit() const; + + /** + * Set the name of the unit of the values return from + * getBinValue() if any. + */ + virtual void setBinValueUnit(QString unit); + + /** + * Return true if the distribution of values in the bins is such + * as to suggest a log scale (mapping to colour etc) may be better + * than a linear one. + */ bool shouldUseLogValueScale() const; virtual void setCompletion(int completion, bool update = true); @@ -162,6 +213,8 @@ Column expandAndRetrieve(size_t index) const; std::vector<QString> m_binNames; + std::vector<float> m_binValues; + QString m_binValueUnit; size_t m_startFrame; size_t m_sampleRate;