Workspace 6.21.5
Public Member Functions | List of all members
AddOperationCmd Class Reference

Command class for adding an operation to a workspace.

#include <Workspace/DataExecution/UndoCommands/addoperationcmd.h>

Inheritance diagram for AddOperationCmd:
[legend]

Public Member Functions

 AddOperationCmd (Workspace &workspace, const OperationFactory &opFactory, const QUuid &newId)
 
 AddOperationCmd (Workspace &workspace, const QString &plugin, const QString &opName, const QUuid &newId)
 
const QString & getCreatedOpIdPath () const
 
const QUuid & getOpId () const
 
void redo () override
 
void undo () override
 

Constructor & Destructor Documentation

◆ AddOperationCmd() [1/2]

AddOperationCmd ( Workspace workspace,
const QString &  plugin,
const QString &  opName,
const QUuid &  newId 
)

◆ AddOperationCmd() [2/2]

AddOperationCmd ( Workspace workspace,
const OperationFactory opFactory,
const QUuid &  newId 
)

Member Function Documentation

◆ getCreatedOpIdPath()

const QString & getCreatedOpIdPath ( ) const
Returns
The ID path of the operation created by redo(). This function can only be called after redo() has actually been called, which means only after the command has been added to a QUndoStack. After that, the ID path should be the same no matter how many times the command is undone/redone.

◆ getOpId()

const QUuid & getOpId ( ) const
inline

◆ redo()

void redo ( )
override

◆ undo()

void undo ( )
override