Mercurial > hg > svgui
comparison 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 |
comparison
equal
deleted
inserted
replaced
1536:5a215033b853 | 1537:4f8c72adbf43 |
---|---|
455 * model in this layer, as well as whether the layer is configured | 455 * model in this layer, as well as whether the layer is configured |
456 * to use a logarithmic y axis display. Also return the unit for | 456 * to use a logarithmic y axis display. Also return the unit for |
457 * these values if known. | 457 * these values if known. |
458 * | 458 * |
459 * This function returns the "normal" extents for the layer, not | 459 * This function returns the "normal" extents for the layer, not |
460 * necessarily the extents actually in use in the display. | 460 * necessarily the extents actually in use in the display (see |
461 * getDisplayExtents). | |
461 */ | 462 */ |
462 virtual bool getValueExtents(double &min, double &max, | 463 virtual bool getValueExtents(double &min, double &max, |
463 bool &logarithmic, QString &unit) const = 0; | 464 bool &logarithmic, QString &unit) const = 0; |
464 | 465 |
465 /** | 466 /** |
466 * Return the minimum and maximum values within the displayed | 467 * Return the minimum and maximum values within the visible area |
467 * range for the y axis, if only a subset of the whole range of | 468 * for the y axis of this layer. |
468 * the model (returned by getValueExtents) is being displayed. | 469 * |
469 * Return false if the layer is not imposing a particular display | 470 * Return false if the layer has no display extents of its |
470 * extent (using the normal layer extents or deferring to whatever | 471 * own. This could be because the layer is "auto-aligning" against |
471 * is in use for the same units elsewhere in the view). | 472 * another layer with the same units elsewhere in the view, or |
473 * because the layer has no concept of a vertical scale at all. | |
472 */ | 474 */ |
473 virtual bool getDisplayExtents(double & /* min */, | 475 virtual bool getDisplayExtents(double & /* min */, |
474 double & /* max */) const { | 476 double & /* max */) const { |
475 return false; | 477 return false; |
476 } | 478 } |