RemoveCanvasConnectionCommand.h header
#include <ew/core/RemoveCanvasConnectionCommand.h>
Namespace ew::core
RemoveCanvasConnectionCommand class
class ew::core::RemoveCanvasConnectionCommand
Command that removes the (undirected) connection between two cards on a research canvas. Undo restores it; a no-op if the pair was not connected.
Members
ew::core::RemoveCanvasConnectionCommand::RemoveCanvasConnectionCommand(Canvas &canvas, ContentId a, ContentId b)
Creates a command that unlinks the cards for a and b on canvas when applied.
ew::core::RemoveCanvasConnectionCommand::~RemoveCanvasConnectionCommand() override
Destroys the command.
void ew::core::RemoveCanvasConnectionCommand::apply() override
Removes the connection, recording whether one was present.
void ew::core::RemoveCanvasConnectionCommand::undo() override
Re-adds the connection if this command removed it.
QString ew::core::RemoveCanvasConnectionCommand::description() const override
Returns a short description for the undo/redo UI.