SetBranchSceneTitleCommand.h header

#include <ew/core/SetBranchSceneTitleCommand.h>

Namespace ew::core

SetBranchSceneTitleCommand class

class ew::core::SetBranchSceneTitleCommand

Command that renames a branching scene. Undo restores the previous title and redo re-applies the new one.

Separate from SetBranchSceneCommand, which carries the graph – nodes, links and the start node. A rename is not a graph edit and must not have to restate the graph to happen; every other content type that has a title has the same pair.

Members

ew::core::branching::SetBranchSceneTitleCommand::SetBranchSceneTitleCommand(BranchScene &scene, QString title)

Creates a command that sets scene's title to title when applied.

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

Destroys the command.

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

Records the scene's current title and applies the new one.

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

Restores the previous title.

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

Returns a short description for the undo/redo UI.

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

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