RemoveObjectCommand.h header

#include <ew/core/RemoveObjectCommand.h>

Namespace ew::core

RemoveObjectCommand class

class ew::core::RemoveObjectCommand

Command that removes a content object from a project. Undo adds it back; the removed object is retained so it can be restored on undo and removed again on redo.

Members

ew::core::RemoveObjectCommand::RemoveObjectCommand(Project &project, ContentId id)

Creates a command that will remove the object identified by id from project.

ew::core::RemoveObjectCommand::~RemoveObjectCommand() override

Destroys the command.

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

Removes the object from the project, reclaiming ownership of it.

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

Adds the retained object back to the project.

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

Returns a short description for the undo/redo UI.