diff layer/Layer.h @ 1537:4f8c72adbf43

Clarify naming of some view-related methods. Rename LayerGeometryProvider::getValueExtents to getVisibleExtentsForUnit, and View::getTextLabelHeight to getTextLabelYCoord. Add View::getVisibleExtentsForAnyUnit to be used to determine which unit to adopt in a new e.g. box layer.
author Chris Cannam
date Tue, 15 Oct 2019 11:40:56 +0100
parents 4eafe5a1b655
children e6362cf5ff1d
line wrap: on
line diff
--- a/layer/Layer.h	Tue Oct 15 09:32:24 2019 +0100
+++ b/layer/Layer.h	Tue Oct 15 11:40:56 2019 +0100
@@ -457,18 +457,20 @@
      * these values if known.
      *
      * This function returns the "normal" extents for the layer, not
-     * necessarily the extents actually in use in the display.
+     * necessarily the extents actually in use in the display (see
+     * getDisplayExtents).
      */
     virtual bool getValueExtents(double &min, double &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).
+     * Return the minimum and maximum values within the visible area
+     * for the y axis of this layer.
+     *
+     * Return false if the layer has no display extents of its
+     * own. This could be because the layer is "auto-aligning" against
+     * another layer with the same units elsewhere in the view, or
+     * because the layer has no concept of a vertical scale at all.
      */
     virtual bool getDisplayExtents(double & /* min */,
                                    double & /* max */) const {