QElectroTech  0.8-dev
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MoveElementsCommand Class Reference

The MoveElementsCommand class This command moves some content on a particular diagram. More...

#include <diagramcommands.h>

Inherits QUndoCommand.

Collaboration diagram for MoveElementsCommand:
Collaboration graph

Public Member Functions

 MoveElementsCommand (Diagram *, const DiagramContent &, const QPointF &m, QUndoCommand *=nullptr)
 MoveElementsCommand::MoveElementsCommand Constructor. More...
 
 ~MoveElementsCommand () override
 MoveElementsCommand::~MoveElementsCommand Destructor. More...
 
void undo () override
 MoveElementsCommand::undo. More...
 
void redo () override
 MoveElementsCommand::redo. More...
 
virtual void move (const QPointF &)
 MoveElementsCommand::move Move item and conductor to actual_movement. More...
 

Private Member Functions

 MoveElementsCommand (const MoveElementsCommand &)
 
void setupAnimation (QObject *target, const QByteArray &propertyName, const QVariant &start, const QVariant &end)
 MoveElementsCommand::setupAnimation Set up the animation for this undo command. More...
 

Private Attributes

Diagramdiagram
 diagram the movement takes place on. More...
 
DiagramContent content_to_move
 moved content More...
 
QPointF movement
 applied movement More...
 
QParallelAnimationGroup * m_anim_group
 animation group More...
 
bool first_redo
 prevent the first call to redo() More...
 

Detailed Description

The MoveElementsCommand class This command moves some content on a particular diagram.

Constructor & Destructor Documentation

◆ MoveElementsCommand() [1/2]

MoveElementsCommand::MoveElementsCommand ( Diagram dia,
const DiagramContent diagram_content,
const QPointF &  m,
QUndoCommand *  parent = nullptr 
)

MoveElementsCommand::MoveElementsCommand Constructor.

Parameters
diadiagram
diagram_contentdiagram content (contain all items to be moved)
mmovement to applied
parentparent undo command
Here is the call graph for this function:

◆ ~MoveElementsCommand()

MoveElementsCommand::~MoveElementsCommand ( )
override

◆ MoveElementsCommand() [2/2]

MoveElementsCommand::MoveElementsCommand ( const MoveElementsCommand )
private

Member Function Documentation

◆ move()

void MoveElementsCommand::move ( const QPointF &  actual_movement)
virtual

MoveElementsCommand::move Move item and conductor to actual_movement.

Parameters
actual_movementmovement to be applied
Here is the call graph for this function:
Here is the caller graph for this function:

◆ redo()

void MoveElementsCommand::redo ( )
override

MoveElementsCommand::redo.

Here is the call graph for this function:

◆ setupAnimation()

void MoveElementsCommand::setupAnimation ( QObject *  target,
const QByteArray &  propertyName,
const QVariant &  start,
const QVariant &  end 
)
private

MoveElementsCommand::setupAnimation Set up the animation for this undo command.

Parameters
targetobject to anim
propertyNameproperty to animate
startvalue at start
endvalue at end
Here is the caller graph for this function:

◆ undo()

void MoveElementsCommand::undo ( )
override

Member Data Documentation

◆ content_to_move

DiagramContent MoveElementsCommand::content_to_move
private

moved content

◆ diagram

Diagram* MoveElementsCommand::diagram
private

diagram the movement takes place on.

◆ first_redo

bool MoveElementsCommand::first_redo
private

prevent the first call to redo()

◆ m_anim_group

QParallelAnimationGroup* MoveElementsCommand::m_anim_group
private

animation group

◆ movement

QPointF MoveElementsCommand::movement
private

applied movement


The documentation for this class was generated from the following files: