SetVoiceScriptLinesCommand.h header
#include <ew/core/SetVoiceScriptLinesCommand.h>
Namespace ew::core
SetVoiceScriptLinesCommand class
class ew::core::SetVoiceScriptLinesCommand
Command that replaces a script's lines. Undo restores the previous ones.
Whole-list rather than per line, matching SetBranchSceneCommand: extracting from a scene rewrites many lines at once, and an author who pressed one button expects one Ctrl+Z to undo it.
Members
ew::core::voice::SetVoiceScriptLinesCommand::SetVoiceScriptLinesCommand(VoiceScript &script, std::vector< VoiceLine > lines)
Creates a command applying lines to script.
ew::core::voice::SetVoiceScriptLinesCommand::~SetVoiceScriptLinesCommand() override
Destroys the command.
void ew::core::voice::SetVoiceScriptLinesCommand::apply() override
Records the script's current lines and applies the new ones.
void ew::core::voice::SetVoiceScriptLinesCommand::undo() override
Restores the previous lines.
QString ew::core::voice::SetVoiceScriptLinesCommand::description() const override
Returns a short description for the undo/redo UI.
ew::core::foundation::OperationSubject ew::core::voice::SetVoiceScriptLinesCommand::subject() const override
Returns the subject this command changes. See Command::subject().