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

#include <editorcommands.h>

Inheritance diagram for MovePartsCommand:
Inheritance graph
Collaboration diagram for MovePartsCommand:
Collaboration graph

Public Member Functions

 MovePartsCommand (const QPointF &, ElementScene *, const QList< QGraphicsItem * > &, QUndoCommand *=nullptr)
 
 ~MovePartsCommand () override
 Destructeur. More...
 
void undo () override
 Annule le deplacement. More...
 
void redo () override
 Refait le deplacement. More...
 
- Public Member Functions inherited from ElementEditionCommand
 ElementEditionCommand (ElementScene *=nullptr, ElementView *=nullptr, QUndoCommand *=nullptr)
 ElementEditionCommand::ElementEditionCommand Constructs an ElementEditionCommand, thus embedding the provided scene and view. More...
 
 ElementEditionCommand (const QString &, ElementScene *=nullptr, ElementView *=nullptr, QUndoCommand *=nullptr)
 ElementEditionCommand::ElementEditionCommand Constructs an ElementEditionCommand, thus embedding the provided scene and view. More...
 
 ~ElementEditionCommand () override
 
ElementSceneelementScene () const
 
void setElementScene (ElementScene *)
 
ElementViewelementView () const
 
void setElementView (ElementView *)
 

Private Member Functions

 MovePartsCommand (const MovePartsCommand &)
 

Private Attributes

QList< QGraphicsItem * > moved_parts
 List of moved primitives. More...
 
QPointF movement
 applied movement More...
 
bool first_redo
 Prevent the first call to redo() More...
 

Additional Inherited Members

- Protected Attributes inherited from ElementEditionCommand
ElementScenem_scene
 Element editor/view/scene the command should take place on. More...
 
ElementViewm_view
 

Detailed Description

This command moves primitives when editing an electrical element.

Constructor & Destructor Documentation

◆ MovePartsCommand() [1/2]

MovePartsCommand::MovePartsCommand ( const QPointF &  m,
ElementScene scene,
const QList< QGraphicsItem * > &  parts,
QUndoCommand *  parent = nullptr 
)

Constructeur

Parameters
mMouvement sous forme de QPointF
sceneElementScene concernee
partsListe des parties deplacees
parentQUndoCommand parent

◆ ~MovePartsCommand()

MovePartsCommand::~MovePartsCommand ( )
override

Destructeur.

◆ MovePartsCommand() [2/2]

MovePartsCommand::MovePartsCommand ( const MovePartsCommand )
private

Member Function Documentation

◆ redo()

void MovePartsCommand::redo ( )
override

Refait le deplacement.

◆ undo()

void MovePartsCommand::undo ( )
override

Annule le deplacement.

Member Data Documentation

◆ first_redo

bool MovePartsCommand::first_redo
private

Prevent the first call to redo()

◆ moved_parts

QList<QGraphicsItem *> MovePartsCommand::moved_parts
private

List of moved primitives.

◆ movement

QPointF MovePartsCommand::movement
private

applied movement


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