Mercurial > hg > svgui
comparison view/View.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 | bfacecf7ea7e |
comparison
equal
deleted
inserted
replaced
1536:5a215033b853 | 1537:4f8c72adbf43 |
---|---|
348 * Render the view contents between the given frame extents to a | 348 * Render the view contents between the given frame extents to a |
349 * new SVG file. | 349 * new SVG file. |
350 */ | 350 */ |
351 virtual bool renderPartToSvgFile(QString filename, | 351 virtual bool renderPartToSvgFile(QString filename, |
352 sv_frame_t f0, sv_frame_t f1); | 352 sv_frame_t f0, sv_frame_t f1); |
353 | 353 |
354 int getTextLabelHeight(const Layer *layer, QPainter &) const override; | 354 /** |
355 | 355 * Return the visible vertical extents for the given unit, if any. |
356 bool getValueExtents(QString unit, double &min, double &max, | 356 * Overridden from LayerGeometryProvider (see docs there). |
357 bool &log) const override; | 357 */ |
358 bool getVisibleExtentsForUnit(QString unit, double &min, double &max, | |
359 bool &log) const override; | |
360 | |
361 /** | |
362 * Return some visible vertical extents and unit. That is, if at | |
363 * least one non-dormant layer has a non-empty unit and returns | |
364 * some values from its getDisplayExtents() method, return the | |
365 * extents and unit from the topmost of those. Otherwise return | |
366 * false. | |
367 */ | |
368 bool getVisibleExtentsForAnyUnit(double &min, double &max, | |
369 bool &logarithmic, QString &unit) const; | |
370 | |
371 int getTextLabelYCoord(const Layer *layer, QPainter &) const override; | |
358 | 372 |
359 void toXml(QTextStream &stream, QString indent = "", | 373 void toXml(QTextStream &stream, QString indent = "", |
360 QString extraAttributes = "") const override; | 374 QString extraAttributes = "") const override; |
361 | 375 |
362 // First frame actually in model, to right of scale, if present | 376 // First frame actually in model, to right of scale, if present |