Mercurial > hg > svcore
changeset 139:8ce30801f39a
* some work on scaling and zooming for spectrogram
author | Chris Cannam |
---|---|
date | Wed, 19 Jul 2006 16:55:29 +0000 |
parents | 6332e41c1619 |
children | a35098a9c814 |
files | base/Layer.h |
diffstat | 1 files changed, 28 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/base/Layer.h Fri Jul 14 17:12:16 2006 +0000 +++ b/base/Layer.h Wed Jul 19 16:55:29 2006 +0000 @@ -232,13 +232,41 @@ virtual bool needsTextLabelHeight() const { return false; } + /** + * Return the minimum and maximum values for the y axis of the + * model in this layer, as well as whether the layer is configured + * to use a logarithmic y axis display. Also return the unit for + * these values if known. + * + * This function returns the "normal" extents for the layer, not + * necessarily the extents actually in use in the display. + */ virtual bool getValueExtents(float &min, float &max, bool &logarithmic, QString &unit) const = 0; + /** + * Return the minimum and maximum values within the displayed + * range for the y axis, if only a subset of the whole range of + * the model (returned by getValueExtents) is being displayed. + * Return false if the layer is not imposing a particular display + * extent (using the normal layer extents or deferring to whatever + * is in use for the same units elsewhere in the view). + */ virtual bool getDisplayExtents(float &min, float &max) const { return false; } + /** + * Set the displayed minimum and maximum values for the y axis to + * the given range, if supported. Return false if not supported + * on this layer (and set nothing). In most cases, layers that + * return false for getDisplayExtents should also return false for + * this function. + */ + virtual bool setDisplayExtents(float min, float max) { + return false; + } + public slots: void showLayer(View *, bool show);