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
+25
View File
@@ -117,6 +117,31 @@ namespace autonum
void setFolioSequentialToHash(QStringList &list, QHash<QString, QStringList> &hash, const QString& autoNumName);
void setSequential(const QString& label, autonum::sequentialNumbers &seqStruct, NumerotationContext &context, Diagram *diagram, const QString& hashKey);
QString numerotationContextToFormula(const NumerotationContext &nc);
/**
Put back every part of a numbering rule whose counter belongs to
one single folio -- "Chiffre 1 - Folio" and its two longer forms
-- to the beginning that folio is numbered from, which is the
initial value written into the rule itself. The parts which count
over the whole project are left exactly as they are: a folio
starts again, the project does not.
@param nc the rule to read
@return the same rule, with its folio-bound counters restarted
*/
NumerotationContext resetFolioCounters(const NumerotationContext &nc);
/**
Set every part of a numbering rule which counts back to its very
first value, so that numbering starts at the beginning again --
which is what numbering a whole project over has to do, whatever
the last number handed out happened to be. A part which counts
from an initial value of its own goes back to that value, a plain
number goes back to 1, a cyclic one to 0 and an alphabetic one to
"a". The parts which do not count -- a fixed text, the number of
the folio, the plant -- are left exactly as they are: they say
what a number is made of, they are not the part which goes on.
@param nc the rule to read
@return the same rule, with its counters at their beginning
*/
NumerotationContext resetContextCounters(const NumerotationContext &nc);
QString elementPrefixForLocation(const ElementsLocation &location);
}