QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MoveConductorsTextsCommand Class Reference

The MoveConductorsTextsCommand class This command moves text items related to conductors on a particular diagram. More...

#include <diagramcommands.h>

Inherits QUndoCommand.

Collaboration diagram for MoveConductorsTextsCommand:
Collaboration graph

Public Member Functions

 MoveConductorsTextsCommand (Diagram *, QUndoCommand *=nullptr)
 MoveConductorsTextsCommand::MoveConductorsTextsCommand Constructeur.
 
 ~MoveConductorsTextsCommand () override
 MoveConductorsTextsCommand::~MoveConductorsTextsCommand Destructeur.
 
void undo () override
 MoveConductorsTextsCommand::undo annule le deplacement.
 
void redo () override
 MoveConductorsTextsCommand::redo refait le deplacement.
 
virtual void addTextMovement (ConductorTextItem *, const QPointF &, const QPointF &, bool=false)
 MoveConductorsTextsCommand::addTextMovement Ajout un mouvement de champ de texte a cet objet.
 

Private Member Functions

 MoveConductorsTextsCommand (const MoveConductorsTextsCommand &)
 
void regenerateTextLabel ()
 MoveConductorsTextsCommand::regenerateTextLabel Genere la description de l'objet d'annulation.
 

Private Attributes

Diagramdiagram
 diagram the movement takes place on.
 
QHash< ConductorTextItem *, QPair< QPointF, bool > > texts_to_move_
 text items to be moved
 
bool first_redo
 prevent the first call to redo()
 

Detailed Description

The MoveConductorsTextsCommand class This command moves text items related to conductors on a particular diagram.

Constructor & Destructor Documentation

◆ MoveConductorsTextsCommand() [1/2]

MoveConductorsTextsCommand::MoveConductorsTextsCommand ( Diagram diagram,
QUndoCommand *  parent = nullptr 
)

MoveConductorsTextsCommand::MoveConductorsTextsCommand Constructeur.

Parameters
diagramSchema sur lequel on deplace des champs de texte
parentQUndoCommand parent

◆ ~MoveConductorsTextsCommand()

MoveConductorsTextsCommand::~MoveConductorsTextsCommand ( )
override

◆ MoveConductorsTextsCommand() [2/2]

MoveConductorsTextsCommand::MoveConductorsTextsCommand ( const MoveConductorsTextsCommand )
private

Member Function Documentation

◆ addTextMovement()

void MoveConductorsTextsCommand::addTextMovement ( ConductorTextItem text_item,
const QPointF &  old_pos,
const QPointF &  new_pos,
bool  already_moved = false 
)
virtual

MoveConductorsTextsCommand::addTextMovement Ajout un mouvement de champ de texte a cet objet.

Parameters
text_itemChamp de texte deplace ; si celui-ci est deja connu de l'objet d'annulation, il sera ignore
old_posPosition du champ de texte avant le mouvement
new_posPosition du champ de texte apres le mouvement
already_movedtrue si le champ de texte etait deja a une position personnalisee par l'utilisateur, false sinon
Here is the call graph for this function:

◆ redo()

void MoveConductorsTextsCommand::redo ( )
override

MoveConductorsTextsCommand::redo refait le deplacement.

◆ regenerateTextLabel()

void MoveConductorsTextsCommand::regenerateTextLabel ( )
private

MoveConductorsTextsCommand::regenerateTextLabel Genere la description de l'objet d'annulation.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ undo()

void MoveConductorsTextsCommand::undo ( )
override

MoveConductorsTextsCommand::undo annule le deplacement.

Member Data Documentation

◆ diagram

Diagram* MoveConductorsTextsCommand::diagram
private

diagram the movement takes place on.

◆ first_redo

bool MoveConductorsTextsCommand::first_redo
private

prevent the first call to redo()

◆ texts_to_move_

QHash<ConductorTextItem *, QPair<QPointF, bool> > MoveConductorsTextsCommand::texts_to_move_
private

text items to be moved


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