63 const QStyleOptionGraphicsItem *,
77 QString
name ()
const;
89 QDomElement
toXml (QDomDocument &)
const;
102 enum {
Type = UserType + 1002 };
105 static const qreal
Z;
155 const bool all_diagram =
true);
Definition conductor.h:43
The Diagram class This class represents an electric diagram. It manages its various child elements,...
Definition diagram.h:56
Orientation
Orientation (used for electrical elements and their terminals)
Definition qet.h:210
The TerminalData class Data of the terminal. Stored in extra class so it can be used by PartTerminal ...
Definition terminaldata.h:37
The Terminal class This class represents a terminal of an electrical element, i.e....
Definition terminal.h:36
int conductorsCount() const
Terminal::conductorsCount.
Definition terminal.h:149
static QColor neutralColor
default color
Definition terminal.h:108
QGraphicsLineItem * m_help_line_a
Definition terminal.h:119
static const qreal terminalSize
Definition terminal.h:104
TerminalData * d
Definition terminal.h:122
bool m_draw_help_line
Definition terminal.h:117
QDomElement toXml(QDomDocument &) const
Terminal::toXml Methode d'export en XML.
Definition terminal.cpp:642
QList< Conductor * > m_conductors_list
List of conductors attached to the terminal.
Definition terminal.h:131
static bool valideXml(QDomElement &)
Terminal::valideXml Permet de savoir si un element XML represente une borne.
Definition terminal.cpp:661
QList< Conductor * > conductors() const
Terminal::conductors.
Definition terminal.cpp:631
void init(QPointF pf, Qet::Orientation o)
void removeConductor(Conductor *conductor)
Terminal::removeConductor Remove a conductor from this terminal.
Definition terminal.cpp:146
QPointF dock_elmt_
docking point for parent element
Definition terminal.h:128
bool addConductor(Conductor *conductor)
Terminal::addConductor Add a conductor to this terminal.
Definition terminal.cpp:119
QString name() const
Definition terminal.cpp:747
static const qreal Z
Definition terminal.h:105
void hoverMoveEvent(QGraphicsSceneHoverEvent *) override
Terminal::hoverMoveEvent Gere les mouvements de la souris sur la zone de la Borne.
Definition terminal.cpp:422
void conductorWasRemoved(Conductor *conductor)
Terminal * alignedWithTerminal() const
Terminal::alignedWithTerminal If this terminal is aligned with an other terminal and is orientation i...
Definition terminal.cpp:353
QColor m_hovered_color
Color used for the hover effect.
Definition terminal.h:138
QRectF m_br
Definition terminal.h:132
Diagram * diagram() const
Terminal::diagram.
Definition terminal.cpp:728
bool isLinkedTo(Terminal *)
Terminal::isLinkedTo.
Definition terminal.cpp:596
Terminal(const Terminal &)
static QColor allowedColor
color for legal actions
Definition terminal.h:110
Qet::Orientation orientation() const
Definition terminal.cpp:97
int type() const override
type Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a Terminal
Definition terminal.h:59
static QColor forbiddenColor
color for forbidden actions
Definition terminal.h:114
QRectF boundingRect() const override
Terminal::boundingRect.
Definition terminal.cpp:342
@ Type
Definition terminal.h:102
Element * parentElement() const
Terminal::parentElement.
Definition terminal.cpp:737
void mousePressEvent(QGraphicsSceneMouseEvent *) override
Terminal::mousePressEvent Gere le fait qu'on enfonce un bouton de la souris sur la Borne.
Definition terminal.cpp:439
void drawHelpLine(bool draw=true)
Terminal::drawHelpLine.
Definition terminal.cpp:283
void mouseReleaseEvent(QGraphicsSceneMouseEvent *) override
Terminal::mouseReleaseEvent.
Definition terminal.cpp:511
bool fromXml(QDomElement &)
Terminal::fromXml Permet de savoir si un element XML represente cette borne. Attention,...
Definition terminal.cpp:704
void updateConductor()
Terminal::updateConductor Update the path of conductor docked to this terminal.
Definition terminal.cpp:585
QGraphicsLineItem * m_help_line
Definition terminal.h:118
QUuid uuid() const
Definition terminal.cpp:742
QLineF HelpLine() const
Terminal::HelpLine.
Definition terminal.cpp:310
static QColor warningColor
color for allowed but fuzzy or not recommended actions
Definition terminal.h:112
QPointF dockConductor() const
Terminal::dockConductor.
Definition terminal.cpp:718
bool canBeLinkedTo(Terminal *)
Terminal::canBeLinkedTo Checking if the terminal can be linked to other_terminal or not Reasons for n...
Definition terminal.cpp:619
~Terminal() override
Terminal::~Terminal Destruction of the terminal, and also docked conductor.
Definition terminal.cpp:86
void hoverEnterEvent(QGraphicsSceneHoverEvent *) override
Terminal::hoverEnterEvent Gere l'entree de la souris sur la zone de la Borne.
Definition terminal.cpp:412
void init()
Terminal::init Methode privee pour initialiser la borne.
Definition terminal.cpp:44
void hoverLeaveEvent(QGraphicsSceneHoverEvent *) override
Terminal::hoverLeaveEvent Gere le fait que la souris sorte de la zone de la Borne.
Definition terminal.cpp:428
void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) override
Terminal::paint Fonction de dessin des bornes.
Definition terminal.cpp:160
bool m_hovered
Whether the mouse pointer is hovering the terminal.
Definition terminal.h:136
Element * parent_element_
Parent electrical element.
Definition terminal.h:125
void conductorWasAdded(Conductor *conductor)
void mouseMoveEvent(QGraphicsSceneMouseEvent *) override
Terminal::mouseMoveEvent Gere le fait qu'on bouge la souris sur la Borne.
Definition terminal.cpp:454
Terminal * m_previous_terminal
Last terminal seen through an attached conductor.
Definition terminal.h:134
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:763