QElectroTech 0.200.1-dev
Loading...
Searching...
No Matches
ChangeConductorCommand Class Reference

The ChangeConductorCommand class This command changes a particular conductor. More...

#include <diagramcommands.h>

Inherits QUndoCommand.

Collaboration diagram for ChangeConductorCommand:
Collaboration graph

Public Member Functions

 ChangeConductorCommand (Conductor *, const ConductorProfile &, const ConductorProfile &, Qt::Corner, QUndoCommand *=nullptr)
 ChangeConductorCommand::ChangeConductorCommand Constructeur.
 ~ChangeConductorCommand () override
 ChangeConductorCommand::~ChangeConductorCommand Destructeur.
void undo () override
 ChangeConductorCommand::undo Annule la modification du conducteur.
void redo () override
 ChangeConductorCommand::redo Refait la modification du conducteur.
virtual void setConductorTextItemMove (const QPointF &, const QPointF &)
 ChangeConductorCommand::setConductorTextItemMove Integre dans cet objet d'annulation le repositionnement du champ de texte du conducteur.

Private Member Functions

 ChangeConductorCommand (const ChangeConductorCommand &)

Private Attributes

Conductorconductor
 changed conductor
ConductorProfile old_profile
 profile before the change
ConductorProfile new_profile
 profile after the change
Qt::Corner path_type
 Path type of the modified conductor.
QPointF text_pos_before_mov_
 position of the text item before the change
QPointF text_pos_after_mov_
 position of the text item after the change
bool first_redo
 prevent the first call to redo()
Diagramdiagram

Detailed Description

The ChangeConductorCommand class This command changes a particular conductor.

Constructor & Destructor Documentation

◆ ChangeConductorCommand() [1/2]

ChangeConductorCommand::ChangeConductorCommand ( Conductor * c,
const ConductorProfile & old_p,
const ConductorProfile & new_p,
Qt::Corner path_t,
QUndoCommand * parent = nullptr )

ChangeConductorCommand::ChangeConductorCommand Constructeur.

Parameters
cConducteur modifie
old_pancien profil du conducteur
new_pnouveau profil du conducteur
path_tTrajectoire du trajet modifie
parentQUndoCommand parent
Here is the caller graph for this function:

◆ ~ChangeConductorCommand()

ChangeConductorCommand::~ChangeConductorCommand ( )
override

◆ ChangeConductorCommand() [2/2]

ChangeConductorCommand::ChangeConductorCommand ( const ChangeConductorCommand & )
private
Here is the call graph for this function:

Member Function Documentation

◆ redo()

void ChangeConductorCommand::redo ( )
override

ChangeConductorCommand::redo Refait la modification du conducteur.

◆ setConductorTextItemMove()

void ChangeConductorCommand::setConductorTextItemMove ( const QPointF & pos_before,
const QPointF & pos_after )
virtual

ChangeConductorCommand::setConductorTextItemMove Integre dans cet objet d'annulation le repositionnement du champ de texte du conducteur.

Parameters
pos_beforePosition du texte avant la modification du conducteur
pos_afterPosition du texte apres la modification du conducteur

◆ undo()

void ChangeConductorCommand::undo ( )
override

ChangeConductorCommand::undo Annule la modification du conducteur.

Member Data Documentation

◆ conductor

Conductor* ChangeConductorCommand::conductor
private

changed conductor

◆ diagram

Diagram* ChangeConductorCommand::diagram
private

◆ first_redo

bool ChangeConductorCommand::first_redo
private

prevent the first call to redo()

◆ new_profile

ConductorProfile ChangeConductorCommand::new_profile
private

profile after the change

◆ old_profile

ConductorProfile ChangeConductorCommand::old_profile
private

profile before the change

◆ path_type

Qt::Corner ChangeConductorCommand::path_type
private

Path type of the modified conductor.

◆ text_pos_after_mov_

QPointF ChangeConductorCommand::text_pos_after_mov_
private

position of the text item after the change

◆ text_pos_before_mov_

QPointF ChangeConductorCommand::text_pos_before_mov_
private

position of the text item before the change


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