AddCanvasConnectionCommand.h header
#include <ew/core/AddCanvasConnectionCommand.h>
Namespace ew::core
AddCanvasConnectionCommand class
class ew::core::AddCanvasConnectionCommand
Command that connects two cards on a research canvas with an (undirected) link. Undo removes the link; a no-op if the pair could not be connected (same card, missing card, or already connected).
Members
ew::core::AddCanvasConnectionCommand::AddCanvasConnectionCommand(Canvas &canvas, ContentId a, ContentId b)
Creates a command that links the cards for a and b on canvas when applied.
ew::core::AddCanvasConnectionCommand::~AddCanvasConnectionCommand() override
Destroys the command.
void ew::core::AddCanvasConnectionCommand::apply() override
Adds the connection, recording whether it was actually added.
void ew::core::AddCanvasConnectionCommand::undo() override
Removes the connection if this command added it.
QString ew::core::AddCanvasConnectionCommand::description() const override
Returns a short description for the undo/redo UI.