QElectroTech  0.8-dev
conductorautonumerotation.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2020 The QElectroTech team
3  This file is part of QElectroTech.
4 
5  QElectroTech is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 2 of the License, or
8  (at your option) any later version.
9 
10  QElectroTech is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
17 */
18 #ifndef CONDUCTORAUTONUMEROTATION_H
19 #define CONDUCTORAUTONUMEROTATION_H
20 
21 #include <QList>
22 #include "assignvariables.h"
23 
24 class Diagram;
25 class Conductor;
26 class QUndoCommand;
28 
33 {
34  public:
35  //constructors & destructor
37  Diagram *diagram,
38  QUndoCommand *undo_parent = nullptr);
39 
40  //methods
41  void numerate ();
42  void applyText (const QString&);
43  static void newProperties(Diagram *diagram,
46 
47  private:
48  //methods
49  void numeratePotential ();
50  void numerateNewConductor ();
51 
52  //attributes
55  QList <Conductor *> conductor_list;
56  QUndoCommand *m_parent_undo;
57 };
58 
59 #endif // CONDUCTORAUTONUMEROTATION_H
ConductorProperties::Multi
@ Multi
Definition: conductorproperties.h:79
ConductorAutoNumerotation::numeratePotential
void numeratePotential()
ConductorAutoNumerotation::numeratePotential Numerate a conductor on an existing potential.
Definition: conductorautonumerotation.cpp:165
autonum::sequentialNumbers
Definition: assignvariables.h:35
Conductor::setProperties
void setProperties(const ConductorProperties &property)
Conductor::setProperties Set property as current property of conductor.
Definition: conductor.cpp:1538
ConductorAutoNumerotation::conductor_list
QList< Conductor * > conductor_list
Definition: conductorautonumerotation.h:55
conductor.h
QETProject::addConductorAutoNum
void addConductorAutoNum(const QString &key, const NumerotationContext &context)
QETProject::addConductorAutoNum Add a new conductor numerotation context. If key already exist,...
Definition: qetproject.cpp:587
NumerotationContext::isEmpty
bool isEmpty() const
NumerotationContext::isEmpty.
Definition: numerotationcontext.cpp:101
ConductorAutoNumerotation::ConductorAutoNumerotation
ConductorAutoNumerotation(Conductor *conductor, Diagram *diagram, QUndoCommand *undo_parent=nullptr)
ConductorAutoNumerotation::ConductorAutoNumerotation Constructor of autonum, after create a class,...
Definition: conductorautonumerotation.cpp:42
ConductorAutoNumerotation::newProperties
static void newProperties(Diagram *diagram, ConductorProperties &cp, autonum::sequentialNumbers &seq)
ConductorAutoNumerotation::newProperties Create a new properties according to the current autonum rul...
Definition: conductorautonumerotation.cpp:140
NumerotationContextCommands
The NumerotationContextCommands class this class provide methods to handle content of NumerotationCon...
Definition: numerotationcontextcommands.h:31
ConductorAutoNumerotation::m_diagram
Diagram * m_diagram
Definition: conductorautonumerotation.h:53
autonum::numerotationContextToFormula
QString numerotationContextToFormula(const NumerotationContext &nc)
numerotationContextToFormula
Definition: assignvariables.cpp:473
ConductorAutoNumerotation::m_parent_undo
QUndoCommand * m_parent_undo
Definition: conductorautonumerotation.h:56
assignvariables.h
NumerotationContext
Definition: numerotationcontext.h:31
ConductorAutoNumerotation::numerate
void numerate()
ConductorAutoNumerotation::numerate execute the automatic numerotation.
Definition: conductorautonumerotation.cpp:56
Diagram::project
QETProject * project() const
Diagram::project.
Definition: diagram.cpp:2326
QET::eachStrIsEqual
bool eachStrIsEqual(const QStringList &qsl)
QET::eachStrIsEqual.
Definition: qet.cpp:624
numerotationcontextcommands.h
NumerotationContextCommands::next
NumerotationContext next()
NumerotationContextCommands::next.
Definition: numerotationcontextcommands.cpp:41
Diagram
The Diagram class This class represents an electric diagram. It manages its various child elements,...
Definition: diagram.h:56
qet.h
Conductor::rSequenceNum
autonum::sequentialNumbers & rSequenceNum()
Definition: conductor.h:132
autonum::setSequential
void setSequential(const QString &label, sequentialNumbers &seqStruct, NumerotationContext &context, Diagram *diagram, const QString &hashKey)
setSequential Fill seqStruct
Definition: assignvariables.cpp:434
ConductorProperties::applyForEqualAttributes
void applyForEqualAttributes(QList< ConductorProperties > list)
ConductorProperties::applyForEqualAttributes Test each attribute of properties in the list separatly....
Definition: conductorproperties.cpp:464
potentialselectordialog.h
ConductorAutoNumerotation::m_conductor
Conductor * m_conductor
Definition: conductorautonumerotation.h:54
Diagram::conductorsAutonumName
QString conductorsAutonumName() const
Diagram::conductorsAutonumName.
Definition: diagram.cpp:564
Conductor::properties
ConductorProperties properties
Definition: conductor.h:48
qpropertyundocommand.h
Diagram::undoStack
QUndoStack & undoStack()
Diagram::undoStack.
Definition: diagram.h:397
QETProject::conductorAutoNum
QHash< QString, NumerotationContext > conductorAutoNum() const
QETProject::conductorAutoNum.
Definition: qetproject.cpp:493
autonum::AssignVariables::formulaToLabel
static QString formulaToLabel(QString formula, sequentialNumbers &seqStruct, Diagram *diagram, const Element *elmt=nullptr)
AssignVariables::formulaToLabel Return the formula with variable assigned (ready to be displayed)
Definition: assignvariables.cpp:187
conductorautonumerotation.h
ConductorAutoNumerotation
The ConductorAutoNumerotation class.
Definition: conductorautonumerotation.h:33
ConductorAutoNumerotation::numerateNewConductor
void numerateNewConductor()
ConductorAutoNumerotation::numerateNewConductor create and apply a new numerotation to m_conductor.
Definition: conductorautonumerotation.cpp:220
ConductorAutoNumerotation::applyText
void applyText(const QString &)
ConductorAutoNumerotation::applyText apply the text t to conductor_ and all conductors at the same po...
Definition: conductorautonumerotation.cpp:69
ConductorProperties::m_formula
QString m_formula
Definition: conductorproperties.h:94
PotentialSelectorDialog
The PotentialSelectorDialog class This dialog is used when user try to connect two existing potential...
Definition: potentialselectordialog.h:69
ConductorProperties
The ConductorProperties class This class represents the functional properties of a particular conduct...
Definition: conductorproperties.h:68
qetdiagrameditor.h
Conductor
Definition: conductor.h:43
QPropertyUndoCommand
The QPropertyUndoCommand class This undo command manage QProperty of a QObject. This undo command can...
Definition: qpropertyundocommand.h:34
ConductorProperties::text
QString text
Definition: conductorproperties.h:89
Conductor::diagramEditor
QETDiagramEditor * diagramEditor() const
Conductor::diagramEditor.
Definition: conductor.cpp:1703
QET::Icons::tr
QIcon tr
Definition: qeticons.cpp:206
diagram.h
QETProject::conductorCurrentAutoNum
QString conductorCurrentAutoNum() const
QETProject::conductorCurrentAutoNum.
Definition: qetproject.cpp:560