Mercurial > hg > svgui
comparison layer/Layer.h @ 1395:32bbb86094c3
Merge from branch spectrogramparam
author | Chris Cannam |
---|---|
date | Wed, 14 Nov 2018 14:23:17 +0000 |
parents | c39f2d439d59 |
children | a18e78b9c78b |
comparison
equal
deleted
inserted
replaced
1380:78eecb19e688 | 1395:32bbb86094c3 |
---|---|
134 QPainter &) const = 0; | 134 QPainter &) const = 0; |
135 | 135 |
136 virtual void paintVerticalScale(LayerGeometryProvider *, bool /* detailed */, | 136 virtual void paintVerticalScale(LayerGeometryProvider *, bool /* detailed */, |
137 QPainter &, QRect) const { } | 137 QPainter &, QRect) const { } |
138 | 138 |
139 virtual int getHorizontalScaleHeight(LayerGeometryProvider *, QPainter &) const { return 0; } | |
140 | |
139 virtual bool getCrosshairExtents(LayerGeometryProvider *, QPainter &, QPoint /* cursorPos */, | 141 virtual bool getCrosshairExtents(LayerGeometryProvider *, QPainter &, QPoint /* cursorPos */, |
140 std::vector<QRect> &) const { | 142 std::vector<QRect> &) const { |
141 return false; | 143 return false; |
142 } | 144 } |
143 virtual void paintCrosshairs(LayerGeometryProvider *, QPainter &, QPoint) const { } | 145 virtual void paintCrosshairs(LayerGeometryProvider *, QPainter &, QPoint) const { } |
410 */ | 412 */ |
411 virtual bool isLayerDormant(const LayerGeometryProvider *v) const; | 413 virtual bool isLayerDormant(const LayerGeometryProvider *v) const; |
412 | 414 |
413 virtual PlayParameters *getPlayParameters(); | 415 virtual PlayParameters *getPlayParameters(); |
414 | 416 |
417 /** | |
418 * True if this layer will need to place text labels when it is | |
419 * painted. The view will take into account how many layers are | |
420 * requesting this, and will provide a distinct y-coord to each | |
421 * layer on request via View::getTextLabelHeight(). | |
422 */ | |
415 virtual bool needsTextLabelHeight() const { return false; } | 423 virtual bool needsTextLabelHeight() const { return false; } |
416 | 424 |
425 /** | |
426 * Return true if the X axis on the layer is time proportional to | |
427 * audio frames, false otherwise. Almost all layer types return | |
428 * true here: the exceptions are spectrum and slice layers. | |
429 */ | |
417 virtual bool hasTimeXAxis() const { return true; } | 430 virtual bool hasTimeXAxis() const { return true; } |
431 | |
432 /** | |
433 * Update the X and Y axis scales, where appropriate, to focus on | |
434 * the given rectangular region. This should *only* be overridden | |
435 * by layers whose hasTimeXAxis() returns false - the pane handles | |
436 * zooming appropriately in every "normal" case. | |
437 */ | |
438 virtual void zoomToRegion(const LayerGeometryProvider *, QRect) { | |
439 return; | |
440 } | |
418 | 441 |
419 /** | 442 /** |
420 * Return the minimum and maximum values for the y axis of the | 443 * 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 | 444 * 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 | 445 * to use a logarithmic y axis display. Also return the unit for |