QElectroTech
0.70
|
#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 | |
Diagram * | m_diagram |
Conductor * | m_conductor |
QList< Conductor * > | conductor_list |
QUndoCommand * | m_parent_undo |
Definition at line 29 of file conductorautonumerotation.h.
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)
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.
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().
|
static |
ConductorAutoNumerotation::newProperties Create a new properties according to the current autonum rule of diagram.
d | |
cp | |
seq |
Definition at line 109 of file conductorautonumerotation.cpp.
References QETProject::addConductorAutoNum(), QETProject::conductorAutoNum(), QETProject::conductorCurrentAutoNum(), Diagram::conductorsAutonumName(), NumerotationContext::isEmpty(), ConductorProperties::m_formula, NumerotationContextCommands::next(), autonum::numerotationContextToFormula(), Diagram::project(), and autonum::setSequential().
Referenced by ConductorCreator::setUpPropertieToUse().
void ConductorAutoNumerotation::numerate | ( | ) |
ConductorAutoNumerotation::numerate execute the automatic numerotation.
Definition at line 49 of file conductorautonumerotation.cpp.
References conductor_list, m_conductor, ConductorProperties::Multi, numerateNewConductor(), numeratePotential(), and Conductor::type().
Referenced by ElementsMover::endMovement(), Terminal::mouseReleaseEvent(), and MultiPasteDialog::on_m_button_box_accepted().
|
private |
ConductorAutoNumerotation::numerateNewConductor create and apply a new numerotation to .
Definition at line 181 of file conductorautonumerotation.cpp.
References QETProject::addConductorAutoNum(), applyText(), QETProject::conductorAutoNum(), QETProject::conductorCurrentAutoNum(), Diagram::conductorsAutonumName(), autonum::AssignVariables::formulaToLabel(), NumerotationContext::isEmpty(), m_conductor, m_diagram, ConductorProperties::m_formula, autonum::numerotationContextToFormula(), Diagram::project(), Conductor::rSequenceNum(), Conductor::setProperties(), and autonum::setSequential().
Referenced by numerate().
|
private |
ConductorAutoNumerotation::numeratePotential Numerate a conductor on an existing potential.
Definition at line 130 of file conductorautonumerotation.cpp.
References ConductorProperties::applyForEqualAttributes(), conductor_list, Conductor::diagramEditor(), QET::eachStrIsEqual(), m_conductor, ConductorProperties::m_formula, m_parent_undo, Conductor::properties, Conductor::rSequenceNum(), Conductor::setProperties(), and ConductorProperties::text.
Referenced by numerate().
|
private |
Definition at line 48 of file conductorautonumerotation.h.
Referenced by applyText(), numerate(), and numeratePotential().
|
private |
Definition at line 47 of file conductorautonumerotation.h.
Referenced by applyText(), numerate(), numerateNewConductor(), and numeratePotential().
|
private |
Definition at line 46 of file conductorautonumerotation.h.
Referenced by applyText(), and numerateNewConductor().
|
private |
Definition at line 49 of file conductorautonumerotation.h.
Referenced by applyText(), and numeratePotential().