|
QElectroTech
0.8-dev
|
Go to the documentation of this file.
48 QString
name,
bool hiddenName,
Element * =
nullptr);
64 void paint (QPainter *,
const QStyleOptionGraphicsItem *,
93 QDomElement
toXml (QDomDocument &)
const;
106 enum {
Type = UserType + 1002 };
109 static const qreal
Z;
155 QString
name,
bool hiddenName);
183 const bool all_diagram =
true);
@ Terminale
Definition: element.h:57
static bool valideXml(QDomElement &)
Terminal::valideXml Permet de savoir si un element XML represente une borne.
Definition: terminal.cpp:746
Qet::Orientation m_orientation
m_orientation Orientation of the terminal
Definition: terminaldata.h:43
QList< Conductor * > conductors() const
Terminal::conductors.
Definition: terminal.cpp:715
static bool isOpposed(Qet::Orientation a, Qet::Orientation b)
Qet::isOpposed.
Definition: qet.cpp:77
static QColor background_color
background color of diagram
Definition: diagram.h:99
autonum::sequentialNumbers sequenceNum
Definition: conductor.h:49
@ West
Definition: qet.h:209
@ Type
Definition: terminal.h:106
void conductorWasRemoved(Conductor *conductor)
Terminal * terminal2
Definition: conductor.h:68
void setProperties(const ConductorProperties &property)
Conductor::setProperties Set property as current property of conductor.
Definition: conductor.cpp:1538
QString number_terminal_
Number of Terminal.
Definition: terminal.h:147
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) override
Terminal::paint Fonction de dessin des bornes.
Definition: terminal.cpp:253
void updatePath(const QRectF &=QRectF())
Definition: conductor.cpp:161
QColor hovered_color_
Color used for the hover effect.
Definition: terminal.h:145
bool lineContainsPoint(const QLineF &, const QPointF &)
Definition: qet.cpp:150
Diagram * diagram() const
Terminal::diagram.
Definition: terminal.cpp:814
Element * parent_element_
Parent electrical element.
Definition: terminal.h:129
void mouseReleaseEvent(QGraphicsSceneMouseEvent *) override
Terminal::mouseReleaseEvent.
Definition: terminal.cpp:596
QString name() const
Terminal::name.
Definition: terminal.h:178
bool name_terminal_hidden
Definition: terminal.h:150
QList< Terminal * > relatedPotentialTerminal(const Terminal *terminal, const bool all_diagram)
Conductor::relatedPotentialTerminal Return terminal at the same potential from the same parent elemen...
Definition: terminal.cpp:841
static const qreal Z
Definition: terminal.h:109
QLineF HelpLine() const
Terminal::HelpLine.
Definition: terminal.cpp:386
QPointF m_pos
m_pos Position of the terminal. The second point is calculated from this position and the orientation
Definition: terminaldata.h:82
bool fromXml(QDomElement &)
Terminal::fromXml Permet de savoir si un element XML represente cette borne. Attention,...
Definition: terminal.cpp:788
Element * parentElement() const
Terminal::parentElement.
Definition: terminal.cpp:822
QPointF dock_elmt_
docking point for parent element
Definition: terminal.h:131
void setNumber(QString number)
Terminal::setNumber.
Definition: terminal.cpp:195
QUuid uuid() const
Definition: terminal.cpp:826
void numerate()
ConductorAutoNumerotation::numerate execute the automatic numerotation.
Definition: conductorautonumerotation.cpp:56
static QColor neutralColor
default color
Definition: terminal.h:112
Terminal * terminal1
Definition: conductor.h:67
static QColor warningColor
color for allowed but fuzzy or not recommended actions
Definition: terminal.h:116
void hoverEnterEvent(QGraphicsSceneHoverEvent *) override
Terminal::hoverEnterEvent Gere l'entree de la souris sur la zone de la Borne.
Definition: terminal.cpp:500
static QColor forbiddenColor
color for forbidden actions
Definition: terminal.h:118
bool isLinkedTo(Terminal *)
Terminal::isLinkedTo.
Definition: terminal.cpp:680
The Diagram class This class represents an electric diagram. It manages its various child elements,...
Definition: diagram.h:56
QGraphicsLineItem * m_help_line_a
Definition: terminal.h:123
autonum::sequentialNumbers & rSequenceNum()
Definition: conductor.h:132
TerminalData * d
Definition: terminal.h:126
QIcon Conductor
Definition: qeticons.cpp:35
int type() const override
type Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a Terminal
Definition: terminal.h:62
void removeConductor(Conductor *conductor)
Terminal::removeConductor Remove a conductor from this terminal.
Definition: terminal.cpp:239
The TerminalData class Data of the terminal. Stored in extra class so it can be used by PartTerminal ...
Definition: terminaldata.h:20
Terminal * previous_terminal_
Last terminal seen through an attached conductor.
Definition: terminal.h:141
Orientation
Orientation (used for electrical elements and their terminals)
Definition: qet.h:206
void setName(QString name, bool hiddenName)
Terminal::setName.
Definition: terminal.cpp:204
The AddItemCommand class This command add an item in a diagram The item to add is template,...
Definition: diagramcommands.h:42
ConductorProperties properties
Definition: conductor.h:48
~Terminal() override
Definition: terminal.cpp:163
QList< Conductor * > conductors_
List of conductors attached to the terminal.
Definition: terminal.h:133
void hoverMoveEvent(QGraphicsSceneHoverEvent *) override
Terminal::hoverMoveEvent Gere les mouvements de la souris sur la zone de la Borne.
Definition: terminal.cpp:509
QList< Terminal * > terminals() const
Element::terminals.
Definition: element.cpp:136
QString name_terminal_
Name of Terminal.
Definition: terminal.h:149
void drawHelpLine(bool draw=true)
Terminal::drawHelpLine.
Definition: terminal.cpp:359
@ AllReport
Definition: element.h:54
bool addConductor(Conductor *conductor)
Terminal::addConductor Add a conductor to this terminal.
Definition: terminal.cpp:215
bool canBeLinkedTo(Terminal *)
Terminal::canBeLinkedTo Checking if the terminal can be linked to other_terminal or not Reasons for n...
Definition: terminal.cpp:703
void hoverLeaveEvent(QGraphicsSceneHoverEvent *) override
Terminal::hoverLeaveEvent Gere le fait que la souris sorte de la zone de la Borne.
Definition: terminal.cpp:516
QList< Terminal * > relatedPotentialTerminal(const Terminal *terminal, const bool all_diagram=true)
Conductor::relatedPotentialTerminal Return terminal at the same potential from the same parent elemen...
Definition: terminal.cpp:841
static bool isHorizontal(Qet::Orientation)
Qet::isHorizontal.
Definition: qet.cpp:107
The ConductorAutoNumerotation class.
Definition: conductorautonumerotation.h:33
@ North
Definition: qet.h:206
void conductorWasAdded(Conductor *conductor)
void init(QString number, QString name, bool hiddenName)
Terminal::init Methode privee pour initialiser la borne.
Definition: terminal.cpp:43
int conductorsCount() const
Terminal::conductorsCount.
Definition: terminal.h:162
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
QGraphicsLineItem * m_help_line
Definition: terminal.h:122
QRectF boundingRect() const override
Terminal::boundingRect.
Definition: terminal.cpp:418
QString number() const
Terminal::number.
Definition: terminal.h:170
@ South
Definition: qet.h:208
bool m_draw_help_line
Definition: terminal.h:121
The ConductorProperties class This class represents the functional properties of a particular conduct...
Definition: conductorproperties.h:68
Terminal(const Terminal &)
Terminal * alignedWithTerminal() const
Terminal::alignedWithTerminal If this terminal is aligned with an other terminal and is orientation i...
Definition: terminal.cpp:441
QUuid m_uuid
m_uuid Uuid of the terminal.
Definition: terminaldata.h:64
void updateConductor()
Terminal::updateConductor Update the path of conductor docked to this terminal.
Definition: terminal.cpp:670
QDomElement toXml(QDomDocument &) const
Terminal::toXml Methode d'export en XML.
Definition: terminal.cpp:725
QPointF dockConductor() const
Terminal::dockConductor.
Definition: terminal.cpp:805
Definition: conductor.h:43
@ East
Definition: qet.h:207
Terminal(QPointF, Qet::Orientation, Element *=nullptr)
Definition: terminal.cpp:103
void setParent(QGraphicsObject *parent)
TerminalData::setParent.
Definition: terminaldata.cpp:30
The Terminal class This class represents a terminal of an electrical element, i.e....
Definition: terminal.h:35
void mousePressEvent(QGraphicsSceneMouseEvent *) override
Terminal::mousePressEvent Gere le fait qu'on enfonce un bouton de la souris sur la Borne.
Definition: terminal.cpp:526
static const qreal terminalSize
Definition: terminal.h:108
QRectF * br_
Definition: terminal.h:139
void mouseMoveEvent(QGraphicsSceneMouseEvent *) override
Terminal::mouseMoveEvent Gere le fait qu'on bouge la souris sur la Borne.
Definition: terminal.cpp:540
QIcon tr
Definition: qeticons.cpp:206
Qet::Orientation orientation() const
Definition: terminal.cpp:175
static QColor allowedColor
color for legal actions
Definition: terminal.h:114
bool hovered_
Whether the mouse pointer is hovering the terminal.
Definition: terminal.h:143