SetBarksCommand.h header

#include <ew/core/SetBarksCommand.h>

Namespace ew::core

SetBarksCommand class

class ew::core::SetBarksCommand

Command that replaces a bark collection's lines. Undo restores the previous list.

Whole-list rather than per-bark, exactly as ew::core::voice::SetVoiceScriptLinesCommand is: the panel edits a table, and a table edit is one gesture whatever it touched – a typed line, a pasted block of forty, a deletion of six. Per-bark commands would turn a paste into forty undo steps an author has to press Ctrl+Z forty times to take back.

Members

ew::core::branching::SetBarksCommand::SetBarksCommand(BarkCollection &collection, std::vector< Bark > barks)

Creates a command applying barks to collection.

ew::core::branching::SetBarksCommand::~SetBarksCommand() override

Destroys the command.

void ew::core::branching::SetBarksCommand::apply() override

Records the collection's current barks and applies the new ones.

void ew::core::branching::SetBarksCommand::undo() override

Restores the previous barks.

QString ew::core::branching::SetBarksCommand::description() const override

Returns a short description for the undo/redo UI.

ew::core::foundation::OperationSubject ew::core::branching::SetBarksCommand::subject() const override

Returns the subject this command changes. See Command::subject().