Zrythm v2.0.0-alpha.1
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::gui::qquick::ClipCanvasItemBase Class Reference

Base for clip canvas items. More...

#include <src/gui/qquick/clip_canvas_item_base.h>

Inheritance diagram for zrythm::gui::qquick::ClipCanvasItemBase:
Collaboration diagram for zrythm::gui::qquick::ClipCanvasItemBase:

Signals

void referenceWidthChanged ()
void referenceXChanged ()
void loopPreviewChanged ()

Public Member Functions

 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)

Properties

qreal referenceWidth
qreal referenceX
bool loopPreview

Detailed Description

Base for clip canvas items.

During a resize drag the delegate gets wider or narrower, but the content inside should keep its original density. referenceWidth tells the renderer "pretend you are this many pixels wide" regardless of the actual width. referenceX shifts the content left edge (used when resizing from the start). Both default to 0, meaning "use the real width / no offset".

Definition at line 20 of file clip_canvas_item_base.h.

Constructor & Destructor Documentation

◆ ClipCanvasItemBase()

zrythm::gui::qquick::ClipCanvasItemBase::ClipCanvasItemBase ( QQuickItem * parent = nullptr)
inlineexplicit

Definition at line 29 of file clip_canvas_item_base.h.

Member Function Documentation

◆ effectiveReferenceWidth()

qreal zrythm::gui::qquick::ClipCanvasItemBase::effectiveReferenceWidth ( ) const
inline

Returns referenceWidth if set (> 0), otherwise the actual width().

Definition at line 59 of file clip_canvas_item_base.h.

◆ loopPreview()

bool zrythm::gui::qquick::ClipCanvasItemBase::loopPreview ( ) const
inline

When true, the renderer wraps content into the loop region even if the clip is not currently looped.

Used during loop-resize drag of a non-looped clip so the user can preview the looped content.

Definition at line 67 of file clip_canvas_item_base.h.

◆ referenceWidth()

qreal zrythm::gui::qquick::ClipCanvasItemBase::referenceWidth ( ) const
inline

Definition at line 38 of file clip_canvas_item_base.h.

◆ referenceX()

qreal zrythm::gui::qquick::ClipCanvasItemBase::referenceX ( ) const
inline

Definition at line 48 of file clip_canvas_item_base.h.

◆ setLoopPreview()

void zrythm::gui::qquick::ClipCanvasItemBase::setLoopPreview ( bool preview)
inline

Definition at line 68 of file clip_canvas_item_base.h.

◆ setReferenceWidth()

void zrythm::gui::qquick::ClipCanvasItemBase::setReferenceWidth ( qreal w)
inline

Definition at line 39 of file clip_canvas_item_base.h.

◆ setReferenceX()

void zrythm::gui::qquick::ClipCanvasItemBase::setReferenceX ( qreal x)
inline

Definition at line 49 of file clip_canvas_item_base.h.

Property Documentation

◆ loopPreview

bool zrythm::gui::qquick::ClipCanvasItemBase::loopPreview
readwrite

Definition at line 26 of file clip_canvas_item_base.h.

◆ referenceWidth

qreal zrythm::gui::qquick::ClipCanvasItemBase::referenceWidth
readwrite

Definition at line 24 of file clip_canvas_item_base.h.

◆ referenceX

qreal zrythm::gui::qquick::ClipCanvasItemBase::referenceX
readwrite

Definition at line 25 of file clip_canvas_item_base.h.


The documentation for this class was generated from the following file: