QElectroTech  0.8-dev
conductorcreator.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 CONDUCTORCREATOR_H
19 #define CONDUCTORCREATOR_H
20 
21 class Diagram;
22 class QPolygonF;
23 class Terminal;
24 class Conductor;
25 
26 #include "conductorproperties.h"
27 #include "conductorproperties.h"
28 #include "assignvariables.h"
29 
30 #include <QList>
31 
32 
39 {
40  public:
41  ConductorCreator(Diagram *d, QList<Terminal *> terminals_list);
42  static void create(Diagram *d, const QPolygonF &polygon);
43 
44  private:
45  void setUpPropertieToUse();
46  QList<Conductor *> existingPotential();
48 
49 
50  QList<Terminal *> m_terminals_list;
53 
54 };
55 
56 #endif // CONDUCTORCREATOR_H
Terminal::Type
@ Type
Definition: terminal.h:106
diagramcommands.h
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
Element::linkedElements
QList< Element * > linkedElements()
Element::linkedElements.
Definition: element.h:258
conductor.h
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
ConductorCreator::setUpPropertieToUse
void setUpPropertieToUse()
ConductorCreator::propertieToUse.
Definition: conductorcreator.cpp:99
assignvariables.h
ConductorCreator::m_sequential_number
autonum::sequentialNumbers m_sequential_number
Definition: conductorcreator.h:52
ConductorCreator::hubTerminal
Terminal * hubTerminal()
ConductorCreator::hubTerminal.
Definition: conductorcreator.cpp:181
conductorcreator.h
ConductorCreator::m_properties
ConductorProperties m_properties
Definition: conductorcreator.h:51
Diagram
The Diagram class This class represents an electric diagram. It manages its various child elements,...
Definition: diagram.h:56
ConductorCreator::m_terminals_list
QList< Terminal * > m_terminals_list
Definition: conductorcreator.h:50
QET::Icons::Conductor
QIcon Conductor
Definition: qeticons.cpp:35
ConductorCreator::existingPotential
QList< Conductor * > existingPotential()
ConductorCreator::existingPotential Return the list of existing potential of the terminal list.
Definition: conductorcreator.cpp:139
ConductorCreator
The ConductorCreator class This class create one or several or several conductors in a given context.
Definition: conductorcreator.h:39
potentialselectordialog.h
AddItemCommand
The AddItemCommand class This command add an item in a diagram The item to add is template,...
Definition: diagramcommands.h:42
element.h
PotentialSelectorDialog::chosenProperties
static ConductorProperties chosenProperties(QList< ConductorProperties > list, QWidget *parent=nullptr)
Definition: potentialselectordialog.cpp:187
ConductorCreator::create
static void create(Diagram *d, const QPolygonF &polygon)
ConductorCreator::create Create an electrical potential between the terminals of the diagram d,...
Definition: conductorcreator.cpp:77
Element
Definition: element.h:41
Diagram::undoStack
QUndoStack & undoStack()
Diagram::undoStack.
Definition: diagram.h:397
Element::AllReport
@ AllReport
Definition: element.h:54
Conductor::setSequenceNum
void setSequenceNum(const autonum::sequentialNumbers &sn)
Definition: conductor.cpp:1721
conductorproperties.h
conductorautonumerotation.h
Conductor::relatedPotentialConductors
QSet< Conductor * > relatedPotentialConductors(const bool all_diagram=true, QList< Terminal * > *t_list=nullptr)
Conductor::relatedPotentialConductors Return all conductors at the same potential of this conductor,...
Definition: conductor.cpp:1647
ConductorCreator::ConductorCreator
ConductorCreator(Diagram *d, QList< Terminal * > terminals_list)
ConductorCreator::ConductorCreator Create an electrical potential between all terminals of terminals_...
Definition: conductorcreator.cpp:37
ConductorProperties
The ConductorProperties class This class represents the functional properties of a particular conduct...
Definition: conductorproperties.h:68
Element::conductors
QList< Conductor * > conductors() const
Element::conductors.
Definition: element.cpp:146
Conductor
Definition: conductor.h:43
terminal.h
Terminal
The Terminal class This class represents a terminal of an electrical element, i.e....
Definition: terminal.h:35
QET::Icons::tr
QIcon tr
Definition: qeticons.cpp:206
diagram.h