|
Zrythm v2.0.0-alpha.1
a highly automated and intuitive digital audio workstation
|
Generic base for hardware-accelerated waveform rendering. More...
#include <src/gui/qquick/waveform_canvas_item.h>


Signals | |
| void | waveformColorChanged () |
| void | outlineColorChanged () |
| Signals inherited from zrythm::gui::qquick::ClipCanvasItemBase | |
| void | referenceWidthChanged () |
| void | referenceXChanged () |
| void | loopPreviewChanged () |
Public Member Functions | |
| WaveformCanvasItem (QQuickItem *parent=nullptr) | |
| QCanvasPainterItemRenderer * | createItemRenderer () const override |
| QColor | waveformColor () const |
| void | setWaveformColor (const QColor &color) |
| QColor | outlineColor () const |
| void | setOutlineColor (const QColor &color) |
| const juce::AudioSampleBuffer * | audioBuffer () const |
| uint64_t | bufferGeneration () const |
| Monotonically increasing counter bumped on each buffer change. | |
| Public Member Functions inherited from zrythm::gui::qquick::ClipCanvasItemBase | |
| ClipCanvasItemBase (QQuickItem *parent=nullptr) | |
| qreal | referenceWidth () const |
| void | setReferenceWidth (qreal w) |
| qreal | referenceX () const |
| void | setReferenceX (qreal x) |
| qreal | effectiveReferenceWidth () const |
| Returns referenceWidth if set (> 0), otherwise the actual width(). | |
| bool | loopPreview () const |
| When true, the renderer wraps content into the loop region even if the clip is not currently looped. | |
| void | setLoopPreview (bool preview) |
Protected Member Functions | |
| void | notifyBufferChanged () |
| Bumps the generation counter and schedules a repaint. | |
Protected Attributes | |
| juce::AudioSampleBuffer | audio_buffer_ |
Properties | |
| QColor | waveformColor |
| QColor | outlineColor |
| Properties inherited from zrythm::gui::qquick::ClipCanvasItemBase | |
| qreal | referenceWidth |
| qreal | referenceX |
| bool | loopPreview |
Generic base for hardware-accelerated waveform rendering.
Owns the audio buffer storage and visual properties. Subclasses provide the buffer data by calling setAudioBuffer(). Not registered to QML — use a derived class for QML usage.
Definition at line 24 of file waveform_canvas_item.h.
|
inline |
Definition at line 41 of file waveform_canvas_item.h.
|
inline |
Monotonically increasing counter bumped on each buffer change.
The renderer compares this against its own stored value to decide whether peak recomputation is needed — pure read-only access.
Definition at line 52 of file waveform_canvas_item.h.
|
protected |
Bumps the generation counter and schedules a repaint.
Call after writing directly into audio_buffer_.
|
inline |
Definition at line 38 of file waveform_canvas_item.h.
|
inline |
Definition at line 36 of file waveform_canvas_item.h.
|
protected |
Definition at line 62 of file waveform_canvas_item.h.
|
readwrite |
Definition at line 29 of file waveform_canvas_item.h.
|
readwrite |
Definition at line 28 of file waveform_canvas_item.h.