SetEntityCategoryCommand.h header
#include <ew/core/SetEntityCategoryCommand.h>
Namespace ew::core
SetEntityCategoryCommand class
class ew::core::SetEntityCategoryCommand
Command that moves an entity into a different category (a null id leaves it uncategorised). Undo restores the previous category and redo re-applies the new one.
Members
ew::core::SetEntityCategoryCommand::SetEntityCategoryCommand(Entity &entity, CategoryId categoryId)
Creates a command that files entity under category categoryId.
ew::core::SetEntityCategoryCommand::~SetEntityCategoryCommand() override
Destroys the command.
void ew::core::SetEntityCategoryCommand::apply() override
Records the entity's current category and sets the new one.
void ew::core::SetEntityCategoryCommand::undo() override
Restores the previous category.
QString ew::core::SetEntityCategoryCommand::description() const override
Returns a short description for the undo/redo UI.