|
Zrythm v2.0.0-alpha.1
a highly automated and intuitive digital audio workstation
|
QML-facing operator for edits on a single clip (the clip-editor scope), mirroring the ArrangerObjectCreator pattern: one instance per project, owned by ProjectSession, with its dependencies (object registry and undo stack) injected in C++.
More...
#include <src/actions/clip_operator.h>


Public Member Functions | |
| ClipOperator (utils::IObjectRegistry ®istry, undo::UndoStack &undoStack, QObject *parent=nullptr) | |
| structure::arrangement::Clip * | clip () const |
| void | setClip (structure::arrangement::Clip *clip) |
| Q_SIGNAL void | clipChanged () |
| Q_INVOKABLE void | beginClipLoopPointsDrag () |
| Begin a loop-points drag gesture. | |
| Q_INVOKABLE void | updateClipLoopPointsDrag (double clipStartTicks, double loopStartTicks, double loopEndTicks) |
| Live-update the clip's loop points to the given content-tick positions for visual feedback. | |
| Q_INVOKABLE void | endClipLoopPointsDrag () |
Commit the drag: push one SetClipLoopPointsCommand capturing the before/after states. | |
| Q_INVOKABLE void | abortClipLoopPointsDrag () |
| Revert the live preview to the pre-drag state without pushing a command. | |
Properties | |
| zrythm::structure::arrangement::Clip * | clip |
QML-facing operator for edits on a single clip (the clip-editor scope), mirroring the ArrangerObjectCreator pattern: one instance per project, owned by ProjectSession, with its dependencies (object registry and undo stack) injected in C++.
Loop-point dragging uses a preview-then-commit lifecycle: updateClipLoopPointsDrag mutates the clip directly for live visual feedback, and endClipLoopPointsDrag pushes a single immutable SetClipLoopPointsCommand capturing the before/after states. An entire drag is therefore one undo entry, and no command is ever mutated once it is on the stack. abortClipLoopPointsDrag reverts the live preview without pushing.
Definition at line 30 of file clip_operator.h.
| Q_INVOKABLE void zrythm::actions::ClipOperator::beginClipLoopPointsDrag | ( | ) |
Begin a loop-points drag gesture.
Captures the pre-drag state; the command is pushed only on endClipLoopPointsDrag.
|
inline |
Definition at line 43 of file clip_operator.h.
| Q_INVOKABLE void zrythm::actions::ClipOperator::endClipLoopPointsDrag | ( | ) |
Commit the drag: push one SetClipLoopPointsCommand capturing the before/after states.
A no-op gesture (no net change) pushes nothing.
| Q_INVOKABLE void zrythm::actions::ClipOperator::updateClipLoopPointsDrag | ( | double | clipStartTicks, |
| double | loopStartTicks, | ||
| double | loopEndTicks ) |
Live-update the clip's loop points to the given content-tick positions for visual feedback.
The caller passes the pre-drag values for axes not being dragged.
|
readwrite |
Definition at line 33 of file clip_operator.h.