comparison layer/Layer.h @ 1389:1eb560b363e7 spectrogramparam

Make "zoom to region" work sensibly for slice/spectrum layers; ensure that min/max bin are remapped properly when changing fft size
author Chris Cannam
date Tue, 13 Nov 2018 14:06:48 +0000
parents 1d7921b1852f
children 3c99083a4d83
comparison
equal deleted inserted replaced
1388:81dda64a7edc 1389:1eb560b363e7
412 412
413 virtual PlayParameters *getPlayParameters(); 413 virtual PlayParameters *getPlayParameters();
414 414
415 virtual bool needsTextLabelHeight() const { return false; } 415 virtual bool needsTextLabelHeight() const { return false; }
416 416
417 /**
418 * Return true if the X axis on the layer is time proportional to
419 * audio frames, false otherwise. Almost all layer types return
420 * true here: the exceptions are spectrum and slice layers.
421 */
417 virtual bool hasTimeXAxis() const { return true; } 422 virtual bool hasTimeXAxis() const { return true; }
423
424 /**
425 * Update the X and Y axis scales, where appropriate, to focus on
426 * the given rectangular region. This should *only* be overridden
427 * by layers whose hasTimeXAxis() returns false - the pane handles
428 * zooming appropriately in every "normal" case.
429 */
430 virtual void zoomToRegion(const LayerGeometryProvider *, QRect) {
431 return;
432 }
418 433
419 /** 434 /**
420 * Return the minimum and maximum values for the y axis of the 435 * Return the minimum and maximum values for the y axis of the
421 * model in this layer, as well as whether the layer is configured 436 * model in this layer, as well as whether the layer is configured
422 * to use a logarithmic y axis display. Also return the unit for 437 * to use a logarithmic y axis display. Also return the unit for