SetDialogueCommandsCommand.h header

#include <ew/core/branching/SetDialogueCommandsCommand.h>

Namespace ew::core::branching

SetDialogueCommandsCommand class

class ew::core::branching::SetDialogueCommandsCommand

Command that replaces the project's dialogue-command vocabulary (used to add, edit or remove one by pushing the new list). Undo restores the previous list.

Whole-list rather than per-command, for the reason SetVariablesCommand beside it is: nothing else is in play when a panel edits a project-wide registry, so the tempting shortcut is to call the setter directly – which compiles, works, and silently makes the edit un-undoable.

Members

ew::core::branching::SetDialogueCommandsCommand::SetDialogueCommandsCommand(ew::core::project::Project &project, std::vector< DialogueCommand > commands)

Creates a command that sets the vocabulary to commands when applied.

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

Destroys the command.

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

Records the current vocabulary and applies the new list.

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

Restores the previous vocabulary.

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

Returns a short description for the undo/redo UI.

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

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