SetCanvasCardCommand.h header
#include <ew/core/SetCanvasCardCommand.h>
Namespace ew::core
SetCanvasCardCommand class
class ew::core::SetCanvasCardCommand
Command that places an object's card on a research canvas at a position, adding the card or moving an existing one. Undo restores the card's previous position, or removes the card if this command added it.
Members
ew::core::SetCanvasCardCommand::SetCanvasCardCommand(Canvas &canvas, ContentId objectId, double x, double y)
Creates a command that places objectId at (x, y) on canvas when applied.
ew::core::SetCanvasCardCommand::~SetCanvasCardCommand() override
Defaulted.
void ew::core::SetCanvasCardCommand::apply() override
Records the card's previous state and places it at the new position.
void ew::core::SetCanvasCardCommand::undo() override
Restores the card's previous position, or removes it if the command added it.
QString ew::core::SetCanvasCardCommand::description() const override
Returns a short description for the undo/redo UI.