Commit Graph

31 Commits

Author SHA1 Message Date
Laurent Trinques 2bb3343d2d Revert "Add cable management: drawing, cores, numbering, cross-references and cable list" 2026-10-10 16:49:39 +02:00
Kellermorph 9771ca96c9 Make the cable feature speak English like the rest of the interface
English has been the source language of the program for a while now
(upstream: "Make English the source language ..."), the cable feature
came in with French ones: about 200 translatable strings over 30 files,
the two settings pages built from .ui files, four comments and one test
which asserted the old wording (blocking review comment by ispyisail).

The wording follows what the code base already uses where it exists:
Plant (=) and Location (+) as qetinformation.cpp names those element
information, Designation for the field the cable form calls its BMK,
Length, Sheet for folio, Automatic numbering, Cross-reference, and Right
aligned / Centred / Left aligned the way cabletextformatdialog.cpp
already spells the three alignment entries.

Two things are more than a word-for-word swap:

- xrefpropertieswidget.cpp:291 wrote the label of the master field on
  every type change with a hardcoded tr("Maitre"), so the English
  "Master" coming from the .ui was overwritten for every type, cable or
  not: a real bug next to being French. The wording now comes back from
  the .ui and only a cable renames the field to "Text:", so the two
  cannot drift apart again.

- tst_cabletypelist kept asserting that a new catalogue is *labelled*
  in French. That label line is the translated header and reads English
  now. The test still reads files with French headers on purpose:
  headerAliasMap() keeps the five old French labels as aliases next to
  the English ones, so catalogues written by earlier builds, including
  the one the reviewer reads her own types from, keep loading.

The .ts files are deliberately not regenerated here. Upstream
regenerates them on master, as it did for the language change itself,
and a translation is keyed on the source string: while the sources were
French a German user saw French in the cable dialogs, and an English
source string with no translation yet shows as it is.

Build clean, ctest 92/93, the one failure being the pre-existing
headless tst_menubarkeyboard.
2026-10-10 13:48:45 +02:00
Kellermorph 69eb071f45 Merge upstream/master: translation wave plus generic device
Upstream moved 56 commits ahead of the last merge. Six files conflicted,
all of them files where upstream's French -> English tr() translation wave
touched lines we had also touched with the cable feature. Resolution rule
applied everywhere: take upstream's English source strings, keep our cable
additions.

Resolved:

- sources/ui/xrefpropertieswidget.ui : kept our structure (m_labels_gb
  pulled out of the display group, m_slave_row, the m_font_pb "Police..."
  button of the cable cross-reference) and mechanically applied upstream's
  20 English string replacements on top of it.

- sources/ui/xrefpropertieswidget.cpp : our version plus upstream's 7
  translated combo entries; the tr("Cable") item we add for the cable
  cross-reference type stays.

- sources/autoNum/ui/numparteditorw.cpp : upstream's English part names
  ("number format 1", "Sheet no.", "Plant", "Location", ...) for the
  number-format list, with our comment explaining why type 3 (cable) takes
  the conductor kinds of variable.

- sources/ui/configpage/configpages.cpp : upstream's English tab titles
  (Conductors / Elements / Sheets) plus our Cables tab.

- sources/ui/configpage/projectconfigpages.cpp : upstream's "Sheets" tab
  title plus our Cables tab block (single-rule SelectAutonumW(3)).

- sources/qetdiagrameditor.cpp : union of both sides - upstream's new
  "Add a generic device" action (icon, status tip, data id) and its
  English menu names ("File"/"Edit"/"Project"/"Display"), together with our
  cable action, the Numbering and Lists menus, the cable list actions and
  the CSV export in the Project menu.

Kept French: our own cable tr() source strings stay French for now. That
is the smaller change and the translation pass can follow separately.

Verified: full build 1065/1065, ctest 91/92 (only the pre-existing
headless tst_menubarkeyboard fails: no window manager, so Alt+F and F10
cannot open a menu bar), smoke start exit 124, no conflict marker left in
the tree.
2026-10-09 20:44:58 +02:00
Kellermorph 955dfb3a73 Merge remote-tracking branch 'upstream/master' into wiring-manager
Conflicts resolved in 24 files. Notable decisions:

- ico/icon-themes.qrc: upstream's icon folder restructure kept; the 36
  cable icon entries re-added under the new qet/qet-dark path scheme
  (XML valid, every referenced file exists).
- Toolbar system: upstream's DiagramToolbarSettings now owns the
  toolbar filling. The cable tool is registered as
  diagrameditor.add_cable (generic group loop) and listed on the
  "diagram" toolbar right after the auto-break conductor action,
  separated by a divider, exactly like before the merge.
- Paste: the cable lines of a copy are handed to
  PasteNumberingImport::push() as extra commands, so paste + cable
  lines + the numbering question stay ONE undo step on both paste
  paths (DiagramView::paste and DiagramEventAddPaste::commit).
- PDF links: upstream's deterministic link sorting kept together with
  the cable cross-reference injector (injectLinkTo -> links list).
- Element renumbering: upstream's ElementAutoNumSchemeCommand::renumber
  replaces the old formula-based body of
  QETProject::renumberElementsBySchemeTitle; the cable numbering rule
  API (cableAutoNum, axis priority, rule name) is kept in full.
- Auto-numbering pages: upstream's scheme management kept, the Câbles
  tab added as index 4 (changeToCableTab), both entry points
  changeToCable() and changeToElement() kept side by side.
- SelectAutonumW: dirty tracking and the contextEdited signal moved
  into upstream's insertPartRow() row API, so single-rule mode, the
  rule-removable button and "confirm without change leaves the project
  alone" keep working.
- xrefpropertieswidget: upstream's offset clamping kept; the cable
  branch (Texte field, Police button, hidden display options) kept;
  the stack-overlapping checkbox is hidden for cables.

Verified after the merge: build green (515/515, no errors), ctest
85/86 (only the pre-existing headless tst_menubarkeyboard failure),
offscreen smoke exit 124.
2026-10-09 14:09:08 +02:00
Kellermorph bf9b34398d 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.
2026-10-08 15:56:00 +02:00
ispyisail f5962ecd06 Make English the source language of the interface text
Every tr() source string in the code and the forms is now the English
text, and French is a translation (qet_fr.ts) like the other languages.
Generated, not hand-edited: master ef795a21e5 converted by
qet-en-source (harness 4c4ddc9).

3144 messages get an English source, 665 already had one, 0 left French; 8 shared-wording pairs disambiguated.
C++: 2904 literals in 233 files. Forms: 809 strings in 65 files. All 34 .ts files re-keyed; qet_fr.ts filled.
lupdate check: PASS. What each of 38 languages shows, old vs new: same 118266, English instead of French 38433, comment fallback 51, differences 0.
2026-10-08 12:50:13 +13:00
ispyisail b8eb5c90a1 Cross references at the folio bottom: stack only when texts overlap, add a checkbox (#1287 follow-up)
The stacking added in #1287 tested the crosses' bounding rects, so
crosses whose frames or empty margins touched were raised although no
text was hidden (the list display case found in review). The texts each
cross really draws are now recorded while its geometry is built, and a
cross is raised only when one of its texts would be drawn over a text of
another one.

A new "Empiler les références dont les textes se chevauchent" checkbox
in the cross reference properties, per type, turns the stacking off;
the crosses of that type are then only centred, as before #1287. It is
saved in the project (xref attribute "stackoverlapping") and in the
settings, and is on when absent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 17:24:11 +13:00
Kellermorph c1cc9a5b98 Show all master-defined slaves in the contact comb behind a new option
Add a new cross reference setting per xref type (coil, protection,
commutator, PLC), labelled "Afficher tous les esclaves definis par le
maitre" and persisted as showallconfiguredslaves. When it is enabled,
the contacts display is selected and the master declares contact
groups, the contact comb draws every contact group of the master in the
master's own order, even when no slave is linked to it yet. Masters
without declared contact groups and the option turned off keep the
previous behaviour exactly: linked slaves only, sorted by position.

- XRefProperties: new property stored in the settings and in the
  project XML (attribute showallconfiguredslaves, absent means false so
  old files are unaffected), included in operator==.
- XRefPropertiesWidget: new checkbox placed after the terminal names
  one, enabled only while "Afficher en contacts" is selected; its
  enabled state is now also set explicitly when a type is loaded (a
  radio button that does not change emits no toggled()).
- For the PLC type the contacts/cross radios, the two display
  checkboxes and the cross options group are hidden: a PLC master is
  always drawn as its IO table, those settings have no effect there.
  Positioning and label settings, which the table really uses, stay.
- CrossRefItem: free slots draw the symbol of the group plus the
  terminal names the master defines (pairs swapped for a single pole
  NO/NC contact, labels of a changeover contact rotated one step
  counter-clockwise), without position text and without hover/click.
  Linked slaves keep drawing from their own data at their assigned
  group position; links without a group are appended at the end in
  position order.
- Xref lifecycle: the item is created and kept without linked slaves
  for snap-to-bottom (MasterElement::mustShowXrefWithoutSlave) and for
  snap-to-label (DynamicElementTextItem::updateXref and
  ElementTextItemGroup::updateXref, which now also run when the element
  lands on the scene and re-establish their project connection), so a
  freshly placed master shows its comb immediately instead of only
  after the next settings change. updateLabel() resets its geometry
  when the option is turned off again, so no stale ghost stays.
2026-09-24 09:59:21 +02:00
Kellermorph 6208c7e5df Add configurable distance between label and slave XRef 2026-08-22 12:03:35 +02:00
Laurent Trinques ddf5ffcd89 xref: add option to hide terminal names in cross-references
Add a new boolean property 'showTerminalName' (default: true) to
XRefProperties, with full persistence in XML and QSettings.

A new checkbox "Afficher les numéros de bornes dans les Xrefs" is
added to the XRefPropertiesWidget in the main display group (not in
the cross-only group), so it is active in both Cross and Contacts modes.

When unchecked, terminal names are hidden in all three rendering paths:
  - drawContact()            (Contacts mode: NO/NC/SW symbols)
  - fillCrossRef()           (Cross mode: NO and NC columns)
  - setUpCrossBoundingRect() (Cross mode: bounding rect sizing)

Backward compatible: existing project files without the attribute
default to showTerminalName=true (no visual change).

Files changed:
  sources/properties/xrefproperties.h
  sources/properties/xrefproperties.cpp
  sources/ui/xrefpropertieswidget.ui
  sources/ui/xrefpropertieswidget.cpp
  sources/qetgraphicsitem/crossrefitem.cpp
2026-05-23 19:23:43 +02:00
Lars Biskupek b2782bc460 Tab-stop definitions inserted where appropriate
Tab stop definitions inserted in some dialogs, so that the order of tab-stops-moves corresponds as closely as possible to the fields' position in the window.
2021-02-22 13:47:39 +01:00
Laurent Trinques 3fa071841c Merge and clean Stromie patch : feature set xref slave position 2019-08-31 07:37:34 +02:00
scorpio810 58fb59491b Revert last commits
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5624 bfdf4180-ca20-0410-9c96-a3a8aa849046
2018-12-01 12:55:05 +00:00
scorpio810 ee91337d75 Add new fild and titleblock "Function group"
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5622 bfdf4180-ca20-0410-9c96-a3a8aa849046
2018-11-30 23:53:13 +00:00
blacksun bb8cb53144 Minor : Configure qet dialog is bigger than screen (for little screen) and can't be resized, remove minimum size property
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4703 bfdf4180-ca20-0410-9c96-a3a8aa849046
2016-09-13 14:55:40 +00:00
scorpio810 5575959a9e Minor
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4665 bfdf4180-ca20-0410-9c96-a3a8aa849046
2016-08-25 11:15:54 +00:00
scorpio810 a0c55ea4ad Add variable for properties %machine and %locmach
can now be called in the xref propertie widget (run now for slave and
master)


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4632 bfdf4180-ca20-0410-9c96-a3a8aa849046
2016-08-17 06:04:37 +00:00
scorpio810 1f627708ce Minor : Add information variable for properties %machine and %locmach
can now be called in the xref propertie widget (run only for slave
contact)


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4631 bfdf4180-ca20-0410-9c96-a3a8aa849046
2016-08-17 05:04:41 +00:00
dfochi 373f3bf5a6 Xref: Change Vertical Offset of Cross References
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4547 bfdf4180-ca20-0410-9c96-a3a8aa849046
2016-06-07 17:01:59 +00:00
scorpio810 c0abc82aec Translate widget to French
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4512 bfdf4180-ca20-0410-9c96-a3a8aa849046
2016-05-24 13:19:42 +00:00
dfochi ada71484e8 Added Cross Reference Labels for Master and Slave Element. Removed View Mode
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4511 bfdf4180-ca20-0410-9c96-a3a8aa849046
2016-05-23 22:01:22 +00:00
scorpio810 dd87737df4 Translate to French widgets
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4501 bfdf4180-ca20-0410-9c96-a3a8aa849046
2016-05-23 01:09:34 +00:00
dfochi aa45a98ad5 Added view mode in Cross References - included Folio Field
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4493 bfdf4180-ca20-0410-9c96-a3a8aa849046
2016-05-20 20:31:55 +00:00
dfochi 99f1a0e83a Reverted commit due to change in lang/qet_en.ts
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4492 bfdf4180-ca20-0410-9c96-a3a8aa849046
2016-05-20 20:22:44 +00:00
dfochi 940a7230e3 Added view mode in Cross References - included Folio Field
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4491 bfdf4180-ca20-0410-9c96-a3a8aa849046
2016-05-20 20:16:28 +00:00
blacksun 844167f181 xref: switch contact is managed by cross ref
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3201 bfdf4180-ca20-0410-9c96-a3a8aa849046
2014-07-07 14:36:53 +00:00
blacksun 68e9d33e88 xref properties widget: user can define the behavior of xref for coil and protection.
They don't work now with official collection, because we must to update the information of element (type coil or protection).
You can test it by creating new master element (dont forget to define the master type, coil or protection).


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3185 bfdf4180-ca20-0410-9c96-a3a8aa849046
2014-07-03 08:52:14 +00:00
blacksun 8379163061 Xref item: item position can be set under the texte field "label" of master element.
Double clic in xref open the properties dialog of master.


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3183 bfdf4180-ca20-0410-9c96-a3a8aa849046
2014-06-27 18:34:18 +00:00
blacksun 56bf8b1c6b Cross ref item: when xref is show has table, user can add prefix to the text of power and delay contact.
Minor improvemnt: the table update is size according to his content


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3060 bfdf4180-ca20-0410-9c96-a3a8aa849046
2014-05-07 20:56:51 +00:00
blacksun 91552373cf Cross ref item: user can select if xref must be displayed has a table or a contacts list.
Option is found in config dialog under the tab Cross ref.


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3033 bfdf4180-ca20-0410-9c96-a3a8aa849046
2014-04-28 15:41:58 +00:00
blacksun c7aaf5b509 -add class for store Xref properties
-add widget for edit it
-make link betwen QET -> QETproject -> Diagram, for transmit the xrefproperties
-xrefpropertie can save/load to xml and setting.
-XRefItem don't use the properties yet


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2983 bfdf4180-ca20-0410-9c96-a3a8aa849046
2014-04-11 09:51:21 +00:00