SetEntityNameCommand.h header

#include <ew/core/SetEntityNameCommand.h>

Namespace ew::core

SetEntityNameCommand class

class ew::core::SetEntityNameCommand

Command that sets an entity's display name. Undo restores the previous name and redo re-applies the new one.

Members

ew::core::SetEntityNameCommand::SetEntityNameCommand(Entity &entity, QString name)

Creates a command that renames entity to name when applied.

ew::core::SetEntityNameCommand::~SetEntityNameCommand() override

Destroys the command.

void ew::core::SetEntityNameCommand::apply() override

Records the current name and sets the new one.

void ew::core::SetEntityNameCommand::undo() override

Restores the previous name.

QString ew::core::SetEntityNameCommand::description() const override

Returns a short description for the undo/redo UI.