Workspace 6.21.5
|
Command class for disabling a connection.
#include <Workspace/DataExecution/UndoCommands/toggleconnectionenabledcmd.h>
Public Member Functions | |
ToggleConnectionEnabledCmd (Connection &connection) | |
void | redo () override |
void | undo () override |
ToggleConnectionEnabledCmd | ( | Connection & | connection | ) |
Sets the commands text based on the connections enabled state so that it reads intuitively to the user.
The implementation of this function stores the reference to the connection in such a way that it is agnostic to the specific instance that was passed to it, which can be important for particular actions. For an example of where the underlying connection may change add a connection to the workspace, disable the connection, remove the connection, undo the removal of the connection, undo the disable of the connection (when the undo the disable happens the connection reference will have changed from the original connection reference that was used when it was disabled (since it was removed/destroyed and then replaced/recreated through the "remove" / "undo remove")). See also ConnectionCommonCmd.
|
override |
Toggles the connections enabled state.
|
override |
Toggles the connections enabled state to what it was before the command happened.