AddObjectCommand.h header
#include <ew/core/AddObjectCommand.h>
Namespace ew::core
AddObjectCommand class
class ew::core::AddObjectCommand
Command that adds a content object to a project. Undo removes it and retains the object so redo can add it back.
Members
ew::core::AddObjectCommand::AddObjectCommand(Project &project, std::unique_ptr< ContentObject > object)
Creates a command that will add object to project when applied.
ew::core::AddObjectCommand::~AddObjectCommand() override
Destroys the command.
void ew::core::AddObjectCommand::apply() override
Adds the held object to the project.
void ew::core::AddObjectCommand::undo() override
Removes the object from the project, reclaiming ownership of it.
QString ew::core::AddObjectCommand::description() const override
Returns a short description for the undo/redo UI.