RemoveCanvasCardCommand.h header
#include <ew/core/RemoveCanvasCardCommand.h>
Namespace ew::core
RemoveCanvasCardCommand class
class ew::core::RemoveCanvasCardCommand
Command that removes an object's card from a research canvas, along with any connections that touched it. Undo restores the card at its previous position and slot and re-adds those connections at their original slots; a no-op if the object had no card.
Members
ew::core::RemoveCanvasCardCommand::RemoveCanvasCardCommand(Canvas &canvas, ContentId objectId)
Creates a command that removes objectId's card from canvas when applied.
ew::core::RemoveCanvasCardCommand::~RemoveCanvasCardCommand() override
Destroys the command.
void ew::core::RemoveCanvasCardCommand::apply() override
Records the card's position and index (and its connections' positions) and removes it.
void ew::core::RemoveCanvasCardCommand::undo() override
Restores the removed card and its connections at their previous positions and slots.
QString ew::core::RemoveCanvasCardCommand::description() const override
Returns a short description for the undo/redo UI.