Add cable management: drawing, cores, numbering, cross-references and cable list

Cables are drawn line objects (toolbar button next to the auto
break/reconnect button, click-move-click, right click cancels), not
components. The type comes from a CSV catalog following the material
list pattern (designation, cores, core colours, editable through the
entry dialog with "Nouvelle entrée" / "Modifier l'entrée").

Each core is bound to the wire its colour label stands on, and the
cable reference is generated per core and written into the Conductor
entry via Conductor::setCableReference(label, cable uuid, slot). The
conductor entry is where it has to live because the terminal strip
plan (Klemmenplan) consumes it in the next step.

Numbering: "Cables" rule under Programmeinstellungen/Neues
Projekt/Nummerierung auto (mirrored in project properties), literal
"W" fallback without a rule, French gate dialog when no rule exists,
Nummerierung menu with the renumber dialog (preferred axis, per-folio
counter, rule and counter state written back, hand-typed names ask,
whole-project scope).

Also included: label block and under-line texts with per-text font and
alignment plus the material-list cell margins, free-core placement and
right-click removal, claim questions for wires of other cables,
multi-selection drag as one undo step, type change with confirmation,
cross-references for type "Cable" (%f-%l%c, own font, clickable links
in exported PDFs), report propagation of the cable definition,
Listes menu (table of contents, material list, terminal strip manager,
terminal generator plugin, cable list), cable list with freely
selectable columns (installation/localisation of cable, start and end,
Blatt start/end, length, used cores...), CSV export dialog with column
pick and preview in the Projekt menu, script API (addTable kind
"cable_list", exportCableList) and a unit test for the type catalog.
This commit is contained in:
Kellermorph
2026-10-08 15:56:00 +02:00
parent 1ca13ce62d
commit bf9b34398d
108 changed files with 18482 additions and 293 deletions
+26
View File
@@ -1786,6 +1786,32 @@ ConductorProperties Conductor::properties() const
return(m_properties);
}
/**
@brief Conductor::setCableReference
Record the cable core this conductor shows, together with the label
that assignment generates. Called only by CableManager, which works
the values out from the cable itself: the user never types them.
@param label the generated cable field, e.g. "15W1:br", empty to
detach the conductor from its cable
@param cable_uuid the cable this conductor is a core of
@param slot which core of that cable it shows, -1 when none
*/
void Conductor::setCableReference(const QString &label,
const QUuid &cable_uuid,
int slot)
{
if (m_properties.m_cable == label
&& m_properties.m_cable_uuid == cable_uuid
&& m_properties.m_cable_slot == slot) {
return;
}
m_properties.m_cable = label;
m_properties.m_cable_uuid = cable_uuid;
m_properties.m_cable_slot = slot;
emit propertiesChange();
}
/**
@return true si le conducteur est mis en evidence
*/