QElectroTech  0.70
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
ConductorAutoNumerotation Class Reference

#include <conductorautonumerotation.h>

Public Member Functions

 ConductorAutoNumerotation (Conductor *conductor, Diagram *diagram, QUndoCommand *undo_parent=nullptr)
 ConductorAutoNumerotation::ConductorAutoNumerotation Constructor of autonum, after create a class, call numerate to apply the autonum. When autonum is applyed, they do with an undo command added to the stack of diagram. If you give a parent_undo at constructor, the undo command create in this class have parent_undo for parent, and wasn't added to the stack of diagram (it's the responsabillty of the parent_undo) More...
 
void numerate ()
 ConductorAutoNumerotation::numerate execute the automatic numerotation. More...
 
void applyText (const QString &)
 ConductorAutoNumerotation::applyText apply the text to and all conductors at the same potential. More...
 

Static Public Member Functions

static void newProperties (Diagram *diagram, ConductorProperties &cp, autonum::sequentialNumbers &seq)
 ConductorAutoNumerotation::newProperties Create a new properties according to the current autonum rule of diagram. More...
 

Private Member Functions

void numeratePotential ()
 ConductorAutoNumerotation::numeratePotential Numerate a conductor on an existing potential. More...
 
void numerateNewConductor ()
 ConductorAutoNumerotation::numerateNewConductor create and apply a new numerotation to . More...
 

Private Attributes

Diagramm_diagram
 
Conductorm_conductor
 
QList< Conductor * > conductor_list
 
QUndoCommand * m_parent_undo
 

Detailed Description

Definition at line 29 of file conductorautonumerotation.h.

Constructor & Destructor Documentation

◆ ConductorAutoNumerotation()

ConductorAutoNumerotation::ConductorAutoNumerotation ( Conductor conductor,
Diagram diagram,
QUndoCommand *  parent_undo = nullptr 
)

ConductorAutoNumerotation::ConductorAutoNumerotation Constructor of autonum, after create a class, call numerate to apply the autonum. When autonum is applyed, they do with an undo command added to the stack of diagram. If you give a parent_undo at constructor, the undo command create in this class have parent_undo for parent, and wasn't added to the stack of diagram (it's the responsabillty of the parent_undo)

Parameters
conductor: the conductor to apply automatic numerotation
diagram: the diagram of conductor
parent_undo: parent undo command

Definition at line 38 of file conductorautonumerotation.cpp.

Member Function Documentation

◆ applyText()

void ConductorAutoNumerotation::applyText ( const QString &  t)

ConductorAutoNumerotation::applyText apply the text to and all conductors at the same potential.

Definition at line 59 of file conductorautonumerotation.cpp.

References conductor_list, m_conductor, m_diagram, m_parent_undo, ConductorProperties::text, QET::Icons::tr, and Diagram::undoStack().

Referenced by numerateNewConductor().

◆ newProperties()

void ConductorAutoNumerotation::newProperties ( Diagram diagram,
ConductorProperties cp,
autonum::sequentialNumbers seq 
)
static

◆ numerate()

void ConductorAutoNumerotation::numerate ( )

◆ numerateNewConductor()

void ConductorAutoNumerotation::numerateNewConductor ( )
private

◆ numeratePotential()

void ConductorAutoNumerotation::numeratePotential ( )
private

Member Data Documentation

◆ conductor_list

QList<Conductor *> ConductorAutoNumerotation::conductor_list
private

Definition at line 48 of file conductorautonumerotation.h.

Referenced by applyText(), numerate(), and numeratePotential().

◆ m_conductor

Conductor* ConductorAutoNumerotation::m_conductor
private

◆ m_diagram

Diagram* ConductorAutoNumerotation::m_diagram
private

Definition at line 46 of file conductorautonumerotation.h.

Referenced by applyText(), and numerateNewConductor().

◆ m_parent_undo

QUndoCommand* ConductorAutoNumerotation::m_parent_undo
private

Definition at line 49 of file conductorautonumerotation.h.

Referenced by applyText(), and numeratePotential().


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