From 181680e6f1875ead0c2a5c40f51a47510923d6c5 Mon Sep 17 00:00:00 2001 From: plc-user <74435298+plc-user@users.noreply.github.com> Date: Sat, 22 Feb 2025 09:20:46 +0100 Subject: [PATCH] add English comments --- sources/diagramevent/diagrameventaddelement.cpp | 6 +++--- sources/qetgraphicsitem/terminal.cpp | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sources/diagramevent/diagrameventaddelement.cpp b/sources/diagramevent/diagrameventaddelement.cpp index c6c8bdb4d..2ac8f038e 100644 --- a/sources/diagramevent/diagrameventaddelement.cpp +++ b/sources/diagramevent/diagrameventaddelement.cpp @@ -248,9 +248,9 @@ void DiagramEventAddElement::addElement() QUndoCommand *undo_object = new QUndoCommand(tr("Ajouter %1").arg(element->name())); new AddGraphicsObjectCommand(element, m_diagram, m_element -> pos(), undo_object); - //When we search for free aligned terminal we - //temporally remove m_element to avoid any interaction with the function Element::AlignedFreeTerminals - //this is useful when an element who have two (or more) terminals opposite, + //When we search for free aligned terminal we temporally remove m_element to + //avoid any interaction with the function Element::AlignedFreeTerminals + //This is useful when an element has two (or more) terminals on opposite sides, //because m_element is exactly at the same pos of the new element //added to the scene so new conductor are created between terminal of the new element //and the opposite terminal of m_element. diff --git a/sources/qetgraphicsitem/terminal.cpp b/sources/qetgraphicsitem/terminal.cpp index b0028a0dc..205f6b33d 100644 --- a/sources/qetgraphicsitem/terminal.cpp +++ b/sources/qetgraphicsitem/terminal.cpp @@ -695,11 +695,15 @@ bool Terminal::valideXml(QDomElement &terminal) /** @brief Terminal::fromXml + Enables you to find out whether an XML element represents this terminal. + Warning, the XML element is not checked Permet de savoir si un element XML represente cette borne. Attention, l'element XML n'est pas verifie - @param terminal Le QDomElement a analyser + @param terminal Le QDomElement a analyser / QDomElement to check @return true si la borne "se reconnait" (memes coordonnes, meme orientation), false sinon + true, if the terminal ‘recognises’ itself (same coordinates, + same orientation), false otherwise */ bool Terminal::fromXml(QDomElement &terminal) {