![]() |
QElectroTech 0.200.1-dev
|
#include "autobreakconductor.h"#include "diagram.h"#include "qetproject.h"#include "conductorautonumerotation.h"#include "qetgraphicsitem/element.h"#include "qetgraphicsitem/terminal.h"#include "qetgraphicsitem/conductor.h"#include "undocommand/addgraphicsobjectcommand.h"#include "undocommand/deleteqgraphicsitemcommand.h"#include <QPainterPath>#include <QMap>#include <limits>
Namespaces | |
| namespace | anonymous_namespace{autobreakconductor.cpp} |
Functions | |
| qreal | anonymous_namespace{autobreakconductor.cpp}::distanceToSegment (const QPointF &point, const QLineF &segment) |
| distanceToSegment | |
| QSet< Terminal * > | autoBreakConductors (Diagram *diagram, Element *element, QUndoCommand *parent, QList< Conductor * > &conductors_handled, QSet< Terminal * > &used_terminals) |
| autoBreakConductors For each terminal of element, check if its dock point lies on an existing conductor. If so, break the conductor and reconnect through the element's terminal. Broken conductors from the same circuit (sharing the same far-end endpoint) are broken together; independent crossing conductors are left untouched. | |
| QSet< Terminal * > autoBreakConductors | ( | Diagram * | diagram, |
| Element * | element, | ||
| QUndoCommand * | parent, | ||
| QList< Conductor * > & | conductors_handled, | ||
| QSet< Terminal * > & | used_terminals ) |
autoBreakConductors For each terminal of element, check if its dock point lies on an existing conductor. If so, break the conductor and reconnect through the element's terminal. Broken conductors from the same circuit (sharing the same far-end endpoint) are broken together; independent crossing conductors are left untouched.
| diagram | the diagram containing the conductors |
| element | the element whose terminals trigger breaks |
| parent | undo command under which break/reconnect sub-commands are created |
| conductors_handled | shared list of conductors already claimed by a previous call in the same batch (prevents double-processing when multiple elements are broken in one pass) |
| used_terminals | shared set of terminals already used as connect_to or other_terminal in the same batch |

