Commit Graph

259 Commits

Author SHA1 Message Date
ispyisail 140f9f6e39 Merge pull request #1355 from ispyisail/feat/upright-symbol-texts
Linux build and tests / Build and test (Qt 6, Debug) (push) Failing after 1m54s
Add an option to keep texts of turned symbols horizontal
2026-10-07 21:39:49 +13:00
ispyisail fd0df50c17 Merge pull request #1354 from ispyisail/feat/1335-flip-elements
Add horizontal and vertical mirror for symbols on a folio (#1335)
2026-10-07 21:30:18 +13:00
ispyisail aac004bcdd Merge pull request #1368 from bhangart/refactor/image-pixmap-from-source
Compute a picture's displayed pixmap from its source
2026-10-07 21:24:39 +13:00
ispyisail 3662032289 Merge feat/1335-flip-elements into feat/upright-symbol-texts
Brings in master's DXF blocks (#1339) through #1354. The upright texts
now live in drawSymbol() too, and a turned symbol whose texts stay
horizontal is drawn in full like a mirrored one: an INSERT would turn
its texts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 21:17:38 +13:00
ispyisail 14a31e895e Merge master into feat/1335-flip-elements
Conflicts with the DXF blocks export (#1350) and the picture factory
leak fix. The mirror now lives in drawSymbol(); a mirrored symbol is
drawn in full rather than as an INSERT of its block, since a negative
INSERT scale would mirror its texts too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 21:11:00 +13:00
ispyisail 0fef6b19ce Add a Customise window: toolbars, shortcut bar, keyboard, gestures
Configuration > Personnaliser... (also at the bottom of a toolbar's
right-click menu) opens one window with a tab for each page that sets
how the user works: Barres d'outils, Contenu des barres, Barre de
raccourcis, Raccourcis and Gestes de la souris, like SolidWorks'
Tools > Customize. The tabs are the same pages the configuration
dialog shows, which keeps them. OK applies every tab, Cancel none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 19:31:42 +13:00
ispyisail b6bbcfdd7a Merge branch 'feature/customise-gesture-list' into feature/customise-dialog
# Conflicts:
#	tests/qttest/CMakeLists.txt
2026-10-07 18:41:40 +13:00
ispyisail 46e041fe01 Mouse gestures: own command list, 4 or 8 directions
The right-drag ring showed the shortcut bar's commands for the selection.
A new Preferences page, "Gestes de la souris", lets the user pick the
ring's commands per selection context, one per direction, and choose 4 or
8 directions. Commands are dropped from the list onto a slot of a ring
editor, or placed with a button; Delete empties a slot.

A context the user never edits keeps following the shortcut bar, and 8
directions stays the default, so nothing changes for anyone who does not
open the page. A picked list is positional: a direction left empty, or
holding a command this build lacks, stays empty instead of shifting the
others. Stored like ShortcutBarSettings: diagrameditor/gestures/<context>
id lists in QSettings, defaults not stored.

tst_gesturesettings covers the defaults, positional lists, the 4/8
setting, the overlay's sectors and empty slots, and the page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 18:38:25 +13:00
ispyisail 3a61513f29 Let the user choose what each folio editor toolbar holds
Configure QElectroTech > Toolbar contents: pick a toolbar, drag or add
commands from the list on the left, remove them with Delete, reorder,
add separators, and add, rename or delete toolbars of one's own.
Reset to defaults gives a toolbar its original contents back.

Each toolbar is stored as a list of command ids in QSettings
(diagrameditor/toolbars/<objectName>), the same pattern the shortcut
bar uses. A toolbar the user never changed stores nothing and is built
exactly as before; an id no command carries any more is skipped. The
four buttons that are widgets rather than commands (handle size, text
grid, background colour, conductor colour) get ids of their own and
can each be on one toolbar at a time. Stored scripts can go on any
toolbar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 18:34:51 +13:00
Laurent Trinques 437729df15 Merge pull request #1327 from ispyisail/feature/customise-toolbar-options
Add a Toolbars settings page: icon size, text with icons, lock
2026-10-07 06:50:11 +02:00
Laurent Trinques a79eaf8af6 Merge pull request #1345 from bhangart/fix/unreadable-element-test-windows
Skip tst_unreadableelement where a file cannot be made unreadable
2026-10-07 06:41:12 +02:00
Laurent Trinques 60237d7070 Merge pull request #1353 from ispyisail/feat/dxf-block-data
Add symbol part data to DXF blocks as hidden attributes (#1339)
2026-10-07 06:34:16 +02:00
Laurent Trinques 9396a367db Merge pull request #1352 from ispyisail/feat/dxf-block-labels
Add an option to export symbol texts as DXF block attributes (#1339)
2026-10-07 06:33:37 +02:00
Laurent Trinques 7e9b479a57 Merge pull request #1351 from ispyisail/feat/dxf-symbol-blocks
Add an option to export symbols as DXF blocks (#1339)
2026-10-07 06:32:51 +02:00
Laurent Trinques 3d5100789b Merge pull request #1350 from ispyisail/fix/1339-dxf
Fix DXF export of circles, arcs and right-side title blocks (#1339)
2026-10-07 06:31:57 +02:00
Beat Hangartner 1b0ab6d26a Compute a picture's displayed pixmap from its source
The displayed pixmap and imageSource (original, crop rectangle,
transparent colours) were two undo values that had to change together,
although the pixmap follows from the source. An action that updated
one and not the other would bring back the bug fixed in #1310.

setImageSource() now recomputes the displayed pixmap, and crop, colour
key, mirror and replace push one undo step on imageSource alone. A
plain QUndoCommand holds the property change, so two identical actions
in a row stay two steps. Loading a project still shows the saved pixmap
as before.

tst_imagecropundo also checks the size of the saved picture after undo
and after redo.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-07 06:25:14 +02:00
Beat Hangartner 1fdb0ee32e Skip tst_unreadableelement on Windows only
The skip applied wherever setPermissions() failed, which on Linux and
macOS would hide a real failure. Only Windows cannot take read
permission away; elsewhere the call must succeed as before.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-07 01:51:00 +02:00
ispyisail 592cbdbf0b Keep the texts of turned symbols horizontal, per project (#1335)
A project can now keep the texts drawn in its symbols, and the names of
their terminals, horizontal when a symbol is turned: Project properties >
General, "Garder horizontaux les textes des symboles pivotés". The box of
each text turns with the symbol; the text does not, and reads as it does
in the symbol itself.

It is a project setting, saved as <symbol_texts upright="true"/> and
only when on. A new project starts with it on; a project saved without
it (every existing one) reads with it off, so it looks and saves exactly
as before, and looks the same on every computer. The MCP server's new
projects start with it on too.

It builds on the mirror of #1354, which already redraws the texts of a
mirrored symbol readable: what the symbol does to its texts is now its
mirrors and, with the setting on, its turn (Element::symbolTextsTransform()).
ElementPictureFactory caches one drawing per such transform, terminal
names undo it the same way, and the DXF export places the texts alike.

The fields of a symbol (label, comment...) already keep their angle with
"Garder la rotation visuelle" and are left as they are.

Known limit: two texts stacked in a symbol end up side by side when it is
turned, and can overlap when kept horizontal; the setting can be turned
off for such a project.

Test: tst_uprightsymboltexts turns the symbols of a folio and checks the
angle of each motor's "M" in the DXF, with the setting off and on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 12:43:04 +13:00
ispyisail a5b5d49b98 Add horizontal and vertical mirror for symbols on a folio (#1335)
Edit > "Miroir horizontal" (M) and "Miroir vertical" (F), also in the
folio's right-click menu, mirror the selected symbols in place. The keys
are the ones the element editor uses for the same two actions.

An element keeps two mirrors about its own axes, applied before its
rotation, and saves them as mirror="horizontal|vertical|both" on its
<element> (written only when set, so other projects save byte for byte
as before). On a symbol turned by 90 or 270 degrees, a mirror of the
folio is the other mirror of the symbol itself, so the rotation never
changes: a label kept upright does not swing round, and "Pivoter" still
turns a mirrored symbol clockwise.

- Terminals face the mirrored way (Terminal::orientation()), so wires
  follow.
- The symbol stays where it was: its centre is kept, on the grid, since
  the hotspot is often a corner.
- Texts read normally. The element's texts, text groups and cross
  reference are mirrored a second time about the centre of their own box
  (Element::keepReadable()), and ElementPictureFactory draws the texts
  of the symbol itself the same way, in a cached picture per mirror.
  Groups and cross references held at the bottom of the folio stay
  centred under their element.
- DXF export mirrors the symbol's lines, arcs and texts.
- Scripting: qet.mirrorElement(folio, uuid, vertical) and
  qet.elementMirror(folio, uuid); live mode may run both menu commands;
  the MCP server gets a mirror_element op and qet_diff reports mirrors.

Not done: the parts of a PLC table drawn at run time
(Element::drawPlcTable()) are not kept readable on a mirrored PLC; the
project database has no column for it, as it has none for the rotation.

Test: tst_scriptmirror mirrors a symbol through --run, checks every
terminal's side and facing, the round trip, undo, a save and reload,
and a symbol turned by 90 degrees.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 11:05:17 +13:00
ispyisail aa6abe6e81 Export a symbol's part data as hidden attributes of its DXF block (#1339)
With symbols as blocks, every non-empty information field of a symbol
(label, manufacturer, reference, supplier, quantity...) is written as a
hidden attribute of its INSERT, tagged with the field's name. A CAD
program can then list the parts from the drawing, as with AutoCAD's
attribute extraction; hidden, they change nothing on screen, in any
reader. A field already written as a visible attribute (with
--dxf-attributes) is not repeated. The label formula is left out: it is
how the label is made, not part data.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 10:14:13 +13:00
ispyisail 9699b314b0 Add an option to export a symbol's texts as DXF block attributes (#1339)
With symbols as blocks and the new "DXF : textes des symboles en
attributs" option (--dxf-attributes on the command line), a symbol's own
texts (its label, function, comment...) are attributes of its INSERT
instead of loose texts, so a CAD program moves them with the symbol and
can list or edit them. Each is written exactly where, and as, the text
was. A text showing an information field is tagged with its name
(LABEL, FUNCTION...), a typed text TEXT1, TEXT2...; a text's second line
gets _2. The block defines each tag once, placed where the first symbol
has it.

Its own option, off by default, because LibreCAD (2.2.1.5) does not
show attributes: the labels would vanish there. AutoCAD shows them.

The text geometry moves into textLines(), shared with the text loop,
so the attributes and the plain texts cannot drift apart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 10:12:20 +13:00
ispyisail c3ed2daca8 Add an option to export symbols as DXF blocks (#1339)
With "DXF : symboles en blocs" ticked in the export dialog, or
--dxf-blocks on the command line, each symbol definition a folio uses is
written once as a DXF block and every placed symbol as an INSERT of it.
A CAD program then selects, counts and replaces a symbol as one object.

The block is drawn by the same code as a symbol drawn in full, as if
the symbol sat unturned at the folio's origin, which is DXF (0,
sheetHeight): that is the block's base point, so the INSERT carries the
symbol's position and quarter-turn and nothing else. Blocks have to come
before any entity, so the export collects them first and dxfBegin()
writes them in its BLOCKS section. Entities in a block keep their own
layers. Off by default; with it off the file is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 09:50:18 +13:00
ispyisail 83f72c95c6 Fix DXF export of circles, arcs and the title block at the right (#1339)
Circles and arcs: drawArcEllipse() split each curve into quarters and
fitted a circular ARC through a point half way between the curve and its
chord, so every circle came out as a flattened diamond. A circle or an
arc of one is now one exact CIRCLE or ARC. R10 has no ELLIPSE entity, so
a true ellipse is a polyline through the curve, one point every 5
degrees. The export also used a different scale on each axis, which made
round things oval; it now uses one, the largest that fits the sheet.

Title block at the right: the DXF laid the horizontal template out in
the narrow vertical strip, squashing it into the top corner. It is now
laid out horizontally and turned a quarter, as draw() turns the painter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 08:13:52 +13:00
saschbe 8ff5fbac0c Preserve imported image colours by default in dark mode 2026-10-06 21:09:41 +02:00
ispyisail 27403acc2c Merge remote-tracking branch 'upstream/master' into feature/customise-toolbar-options
# Conflicts:
#	tests/qttest/CMakeLists.txt
2026-10-07 07:33:20 +13:00
ispyisail bf3c0fc633 Toolbars settings: only update windows that took them
applyToAll() restyled every QMainWindow, including the terminal strip
editor and the print window, which never read the settings when they
open: they changed on OK and went back to defaults when reopened.
applyTo() now marks the window, and applyToAll() only updates marked
windows, so the page covers the folio, element and title block editors
as described.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 07:05:12 +13:00
Beat Hangartner 210a26b29e Skip tst_unreadableelement where a file cannot be made unreadable
anUnreadableSymbolIsNotACollision() takes every permission away from a
symbol file to check that an unreadable symbol is reported as such, not
as a collision. QFile::setPermissions() cannot do that on Windows, where
Qt only knows the read-only flag, so it returns false and the test
failed there. It now skips, as it already does when run as root, which
reads the file anyway.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-06 17:17:12 +02:00
Laurent Trinques 0708338bce Merge pull request #1332 from bhangart/fix/autonumids-settings-dir
Linux build and tests / Build and test (Qt 6, Debug) (push) Failing after 1m49s
Fix tst_elementautonumids on macOS and Windows: pass its settings through QET_SETTINGS_DIR
2026-10-06 16:57:40 +02:00
Laurent Trinques 4af441f895 Merge pull request #1326 from ispyisail/feature/customise-shortcuts-page
Add icons, menu locations, key search and copy to the Shortcuts page
2026-10-06 16:29:26 +02:00
Laurent Trinques 0e36f4efb6 Merge pull request #1324 from bhangart/fix/dxf-wrapped-text
Export wrapped texts to DXF line by line
2026-10-06 16:25:53 +02:00
Laurent Trinques 33b0069e17 Merge pull request #1321 from bhangart/feature/text-resize-handles
Add corner handles to change the width of a text box
2026-10-06 16:19:42 +02:00
Laurent Trinques e4e8cc2892 Merge pull request #1320 from bhangart/feature/free-text-width
Let free texts keep a width they wrap to
2026-10-06 16:18:25 +02:00
Laurent Trinques 6a5ff20f51 Merge pull request #1310 from bhangart/fix/image-crop-undo
Undo the crop, colours and original of a picture together with its pixels
2026-10-06 16:12:13 +02:00
Beat Hangartner 43cc013e54 Fix tst_elementautonumids on macOS: give the binary its settings through QET_SETTINGS_DIR
duplicatesAreNotNumberedWhenSwitchedOff turns two preferences off by
writing <home>/config/QElectroTech/QElectroTech.conf and pointing
XDG_CONFIG_HOME there. Only Linux reads settings from that file. macOS
keeps them in the system preferences, so the binary never saw the two
preferences, numbered the pasted duplicates anyway, and the test failed
on macOS, on master too.

Write the file where QET_SETTINGS_DIR points instead (#1178), and set that
variable for every run of the binary, so no run reads the user's own
settings either.

No file-format change. Tests: tst_elementautonumids fails on master on
macOS and passes with this change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Beat Hangartner <beat@hangartners.ch>
2026-10-06 10:53:10 +02:00
Beat Hangartner f6ac685ebe Drop a machine-specific path from the DXF test fixture
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 09:53:49 +02:00
Beat Hangartner 4b187e049f Keep the DXF text lines of master for texts that do not wrap
layoutLines() trimmed the trailing spaces of every line and kept
non-breaking spaces, which the DXF export used to write as plain spaces
(toPlainText()). A DXF R10 file has no code page, so a reader assuming
Windows-1252 could show them as 'Â '. Now a paragraph that does not
wrap gives exactly its line of toPlainText().split('\n') again
(trailing spaces and tabs kept, non-breaking spaces as plain spaces,
<br> as a line break). In a paragraph that wraps, every line loses its
trailing spaces, so spaces that wrap to a line of their own give an
empty line: not written, but it keeps the spacing of the next lines.

Test: tst_textlines compares with toPlainText() for trailing spaces,
tabs, non-breaking spaces, <br> and paragraphs, and checks wrapped
lines (fails before).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 09:53:49 +02:00
Beat Hangartner 069cf1e7b5 Tidy the free text width
- setTextWidth() returns without a signal when the width does not
  change, which is also the case on every load of a text without one.
- Say why IndependentTextItem::textWidth()/setTextWidth() hide the
  non-virtual QGraphicsTextItem functions, and what that means for code
  holding a base pointer.
- The fixture no longer carries a /tmp path from the machine it was
  made on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 09:50:08 +02:00
Beat Hangartner 315de47a12 Keep the width of free texts in the project database
The independent_text table had the text and rotation of a free text but
not its width, and a width change did not update the row at all -- not
even its width and height, which follow the wrapped text. Add a
text_width column (NULL for the automatic width) and update the row on
textWidthChanged.

Test: tst_scriptfreetextwidth reads the table with qet.query() (fails
before).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 09:50:08 +02:00
Beat Hangartner 5cad0c6159 Keep the text resize handles working after a scene change
A scene drops the event filters of an item that leaves it. The handles
installed theirs once, in the constructor, and only if the text was in
a scene: after the text was removed and added back (undoing a delete
does that), or when the handles were made before the text was in a
scene, they no longer reacted, and a drag moved the text instead.
TextResizeHandles now installs the filters again whenever it enters a
scene.

Tests: dragAfterLeavingTheScene, dragWhenCreatedOutsideAScene (both
fail before).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 09:46:17 +02:00
ispyisail 9eef8f95c9 Add a Toolbars settings page: icon size, text with icons, lock
A new page in Configurer QElectroTech, "Barres d'outils", sets for
every window (folio editor, element editor, title block editor):
- the icon size: default, 16, 24, 32 or 48 px
- the buttons: icon only, text beside the icon, or text under it
- locking the toolbars so they can't be dragged out of place

OK applies it to the open windows at once. The defaults are Qt's
own, and a default value removes its key, so nothing changes for
anyone who never opens the page. A toolbar inside a panel is left
alone; only the window's own toolbars are locked.

New test tst_toolbarsettings: defaults change nothing, saved values
reach every toolbar of an open window, back to defaults removes the
keys.

Third stage of discussion #1319.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 09:14:35 +13:00
ispyisail 896c38435d Add icons, menu locations, key search and copy to the Shortcuts page
The Shortcuts page now shows:
- each command's icon, and a Menu column saying where it is
  ("Projet › Scripts"); the text filter matches that too
- a category filter beside the existing Bound/Unbound/Conflicts one
- "Rechercher par touche": press a key combination and only the
  commands using it are listed, however the key is spelled in the
  user's language. A key also finds the two-key shortcuts it starts.
- "Copier la liste": the shown rows go on the clipboard as
  tab-separated text with a header, so they paste into a spreadsheet
  one cell per column

ShortcutManager::ShortcutInfo carries the icon and the first live
QAction so the page needs no second registry.

New test tst_shortcutspage covers the menu path, the columns, both
filters and the copied text.

Second stage of discussion #1319.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 08:17:16 +13:00
Beat Hangartner d464428642 Export wrapped texts to DXF line by line
A symbol text with a width (text_width) is drawn wrapped on the folio,
but the DXF export split texts on '\n' only, so it was written as one
long line, running past its box and over the drawing. The export now
writes the lines of folio texts as they are laid out
(TextLines::layoutLines(), new header-only textlines.h). Texts without
a width give the same lines as before.

Tests: tst_textlines, tst_dxfwrappedtext (fails without this change).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 18:00:26 +02:00
Laurent Trinques 85342f4b56 Merge pull request #1318 from ispyisail/feature/bom-skip-junctions-slaves
Linux build and tests / Build and test (Qt 6, Debug) (push) Failing after 2m7s
Add options to leave junctions and contact blocks out of the parts list
2026-10-05 17:59:05 +02:00
Beat Hangartner 010e44ab8a Add corner handles to change the width of a text box
TextResizeHandles puts four handles at the corners of a selected text
(any QGraphicsTextItem with a qreal "textWidth" property, -1 = automatic
width). Dragging one changes the width: the opposite corner stays in
place in scene coordinates, for any rotation and rotation point, the
text wraps and the height follows it. Vertical mouse movements are
ignored, the width never goes below the longest word and is rounded to
whole pixels, and a click without a move changes nothing.
Double-clicking a handle goes back to the automatic width.

The handles are a child of the text, so they follow it when it moves,
rotates or is zoomed (as for the symbol text handles, #1002). The width
is changed live; the owner makes it undoable with TextResizeCommand,
which sets the width then the position on both undo and redo -- a text
may move itself when its width changes, so two property commands would
restore them in the wrong order.

The geometry is header-only (textresize.h). Nothing uses the handles
yet: the follow-up changes add them to free texts and to text fields in
the element editor.

Test: tst_textresizehandles, on a plain QGraphicsTextItem.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 17:53:38 +02:00
Beat Hangartner 1e3c618495 Let free texts keep a width they wrap to
A free text (IndependentTextItem) gets a textWidth property: -1 is the
automatic width (one line, or lines broken by hand, as today); a
positive width makes the text wrap between words. Its top-left corner
stays in place. The property is what a spin box and resize handles will
set in follow-up changes.

File format: the width is saved as text_width on <input>, only when one
is set, so a project without widths is saved byte-identical
(tst_resaveunchanged). An older QElectroTech ignores the attribute and
shows the text on one line, with no load error.

DiagramTextItem::setHtml() no longer widens a centred or right-aligned
rich text to idealWidth() + 40 when the text has a width of its own;
with the automatic width it still does.

Test: tst_freetextwidth (--resave keeps the width only where set,
--export-svg draws the text wrapped).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 17:52:27 +02:00
Beat Hangartner 0513344b92 Address review: drop dummy undo children, applyCrop() returns bool
- replaceImage(), mirror() and setTransparentColor() no longer add a
  dummy QUndoCommand child: the imageSource child already keeps
  QPropertyUndoCommand::mergeWith() from merging two of them.
- The explanation of the position and pivot maths moves from crop() to
  applyCrop(), where that code now lives; the stale older doc block of
  crop() goes.
- applyCrop() returns false when nothing was cropped, and
  qet.cropImage() passes that on. tst_imagecropundo checks it for the
  current crop, an empty rectangle and one outside the picture.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 13:01:30 +02:00
ispyisail 8434b88eb8 Add options to leave junctions and contact blocks out of the parts list (#1178)
Since #849 the parts list has a row for every contact block (slave) and
terminal-type element. Users who draw the dots and bends where wires
branch as terminal-type symbols (114_connections) get one empty row per
junction: 109 of 151 rows on one reported cabinet.

Two options, both off by default so existing exports are unchanged:
- leave out the contact blocks: --no-slaves, "no_slaves" in qet_export,
  or uncheck the new "Contacts esclaves" element type in the dialog;
- leave out the junctions: terminal-type elements with no label,
  designation, manufacturer or manufacturer reference. --no-junctions,
  "no_junctions", or "Laisser de côté les jonctions" in the dialog.
  A terminal block with a label or a part number stays.

The element type filter had no box for slaves, so every query it built
left them out: the export dialog never listed contact blocks, although
the command line has since #849. The dialog now checks the new box by
default and gives the same rows as --export-bom. The box is unchecked by
default elsewhere, so nomenclature tables keep their rows.

docs/smart-device-bom.md still said slaves and terminals were excluded;
corrected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 22:08:44 +13:00
ispyisail 527b0f3b2d Fix repeatable PDF changing with the output folder (#1178)
Rewriting the links copied the old trailer up to %%EOF, so the old
startxref stayed in the file before the new one. Its offset is the size
the file had before the rewrite, and the links carry the output path,
so the same project exported to two folders gave different bytes, and
a different document id. Both rewrites now copy the trailer dictionary
only, through one helper; the print window's rewrite no longer leaves a
stray %%EOF either.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 21:43:28 +13:00
Beat Hangartner 05b71e07a0 Add qet.cropImage() and qet.imageCrop() to the script API
Crop a picture as the crop tool does, in one undo step, and read its
crop rectangle back. tst_imagecropundo uses them on the real binary:
a crop that was undone is not saved, and redoing it saves it again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 22:41:58 +02:00
Laurent Trinques ecf995174e Merge pull request #1309 from plc-user/master
Linux build and tests / Build and test (Qt 6, Debug) (push) Failing after 1m54s
FIX copyright-date in cmake-files
2026-10-04 21:26:39 +02:00