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

Command class for moving operation widgets. More...

#include <Workspace/Presentation/UndoCommands/moveselection.h>

Inheritance diagram for MoveSelection:
[legend]

Public Types

typedef QList< QUuid > IdList
 

Public Member Functions

 MoveSelection (DataExecution::Workspace &workspace, const IdList &selectedOpIds, const IdList &selectedAnchorIds, const IdList &selectedNoteItemIds, const IdList &selectedMiniOpRackIds, const QPointF &delta, bool skipFirstRedo=false)
 
int id () const override
 
bool mergeWith (const QUndoCommand *other) override
 
void redo () override
 
void undo () override
 

Detailed Description

Note that this command class doesn't require the selected operations to actually be selected. It's just that this class was originally created for the purpose of moving selected operations but it does not use or change the selection state of the operations in any way.

Member Typedef Documentation

◆ IdList

typedef QList<QUuid> IdList

Constructor & Destructor Documentation

◆ MoveSelection()

MoveSelection ( DataExecution::Workspace workspace,
const IdList selectedOpIds,
const IdList selectedAnchorIds,
const IdList selectedNoteItemIds,
const IdList selectedMiniOpRackIds,
const QPointF &  delta,
bool  skipFirstRedo = false 
)
Parameters
workspaceThe workspace in which the selected operations and anchors are to be moved.
selectedOpIdsArray of operation ID's specifying the operations to be moved.
selectedAnchorIdsArray of anchor ID's specifying the connection anchors to be moved.
selectedNoteItemIdsArray of note item ID's specifying the note items to be moved.
selectedMiniOpRackIdsArray of mini operation rack ID's specifying the racks to be moved.
deltaThe relative amount to move the specified operations and anchors.
skipFirstRedoIf this is true, then the first call to redo() will not apply the move. This is useful when the undoable command is being created but the change has already been applied.

This constructor is useful when you want to move a set of operations and anchors, typically from a user selection.

Member Function Documentation

◆ id()

int id ( ) const
override

◆ mergeWith()

bool mergeWith ( const QUndoCommand other)
override

◆ redo()

void redo ( )
override

◆ undo()

void undo ( )
override