macdeployqt only deploys libqcocoa, so running QElectroTech with
QT_QPA_PLATFORM=offscreen aborts on the signed macOS bundle. This
prevents headless use (e.g. qet_mcp.py) without opening a Cocoa app.
Deploy platforms/libqoffscreen.dylib with macdeployqt -extra-plugins.
If it is not deployed, copy it from the Homebrew Qt and point its Qt
framework references to the bundle. The build stops if the plugin is
still missing. The existing signing loops already sign it with the
other plugins.
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>
qet.setHouseStyle() only saved the setting, so an assistant reading
qet-assistant.json saw the old text until QElectroTech restarted.
AssistantInfo::refresh() writes the file again, but only in a
QElectroTech that writes it at all: a headless --run would otherwise
replace the open QElectroTech's live channel with its own empty one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
QetSettings::houseStyle()/setHouseStyle() (assistant/house_style),
qet.houseStyle()/qet.setHouseStyle() in the script API, a house_style
field in qet-assistant.json, and qet_about in the qet MCP server
showing it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
At the printer's own resolution (600-1200 dpi) symbols and texts were
replayed many times too big next to the wires and grid. Seen on a test
print to PDF; the same page now matches qet_export's PDF.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
QElectroTech (LiveServer):
- print: folios to the default (or a named) printer with no print dialog,
always after asking the user (paper cannot be undone); or to a new PDF
file. Rendered as the PDF export draws a folio (no grid, no terminals).
- save_project (own file, or save as a new file, never over one) and
close_project (only without unsaved changes: never discards work).
- changes: the undo history, each step marked assistant or user, with
"since" to ask what changed after a point.
- snapshot: a copy of the open project as on screen, for a check to read,
without saving it or changing its file.
- qet.elementTextGeometry(): where a symbol's text is drawn on the folio.
qet MCP server:
- qet_live_print, qet_live_save_project, qet_live_close_project,
qet_live_changes, qet_live_layout_check (snapshot + qet_layout_check, no
"run this script?" window); write paths never overwrite.
- Layout rules from the house style, for file and live checks alike:
label_on_wire, four_way_junction, misaligned_branch.
- The element index is saved under ~/.cache/qet-mcp: a new server process
loads 8839 symbols in 0.4 s instead of parsing them for 6.9 s; the
change check is a third faster.
- qet_about lists the installation's standard symbols
(standard-symbols.json in QElectroTech's data folder) when there are any.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
openAndAddProject() asked "Créer une copie de sauvegarde ?" even when
called non-interactively, so open_project waited for an answer from the
user in front of the window. Only live mode opens projects that way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Live mode asked at every start (the "Mode direct" warning) and forgot
"always" for scripts when QElectroTech closed, so a user who works
with an assistant every day re-enabled it every day. Both are now
opt-in and remembered: the warning has a "Ne plus demander au
démarrage" checkbox (scripting/live_skip_warning), and the ask-first
choice is saved (scripting/live_ask_first; the Assistant panel's
checkbox and "Toujours" in the script window). The status bar still
shows live mode whenever it is open. Switching live mode off in the
settings clears "don't ask again", so turning it back on warns again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
open_project opens a .qet and makes it current, as File > Open does but
with no file dialog and no error windows: a missing, unreadable or
foreign file is refused in the answer. A project already open is only
made current. switch_project makes another open project current, by its
index or its file. status now lists every open project (index, title,
file, folios, unsaved changes, current), so the assistant sees what it
can switch to. MCP: qet_live_open_project, qet_live_switch_project; both
paths go through the workspace policy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An assistant in live mode could only work on the project already open.
new_project makes one as File > New does -- this installation's
new-folio defaults, optional title and number of folios -- and makes it
the current project, so the next request works on it. An optional
absolute path saves it at once, never over an existing file: QElectroTech
refuses, and the MCP server refuses before asking (a new never-overwrite
class in its path policy, so an "overwrite" flag cannot get round it).
Pages and links across pages already worked through scripts
(qet.addFolio, setFolioTitle, linkElements across folios); the tool's
description now says so.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A request with "timing": true gets queue, confirm and exec times in its
answer; with QET_LIVE_PERF_LOG set, QElectroTech also appends one JSON
line per request, with the time until the folio is next painted. The
qet MCP server logs its side of each live call to the same file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
The qet theme now lists Nuri's app icon PNGs under the name
qelectrotech, and the wizard loads its logo by that name instead of
the 256 px file path. The files stay in ico/breeze-icons/, where the
packaging scripts install them from.
Part of #1269.
ellipse-to-bezier, rect-to-bezier and rect-to-polyline are now drawn
pixel by pixel at 16 and 22 px, with the 1 px lines and hollow handles
of the line tool, and follow the theme's text color. The polyline is
simpler: at menu size the three-segment line with a handle on every
corner was too much detail to read, so it is now two segments rising
to a peak with a handle at each foot. Andre agreed to the redraw under
GPL-2.0-or-later.
Part of #1269.
Each folder now holds icons from one source: qet/ for QET's own SVGs,
breeze/ for KDE Breeze (with breeze/added/), flags/, colors/, and
themes/ for script output (with themes/generated/). The unused
128x128/terminalstrip.svg is removed. The generator, qrc files,
qeticons.cpp and ico/copyright follow the new paths. ico/README.md
lists each folder's source, script and license.
Part of #1269.
Cause: in list mode `drawAsContacts()` adds a margin (`adjust(-30, -4, 4, 4)`) to `boundingRect()`, and the horizontal test in `stackAtBottom()` uses that rect. Two lists overlapping only inside the empty margin (1.4 units in my log) count as overlapping. `gap` only changes how far the raised ones move, not which ones.
Fix: test the content only in list mode (`rect.adjust(30, 0, -4, 0)`), with the two margins as constants shared with `drawAsContacts()`.
Result: all references stay at the bottom (980 -> 980), none raised by mistake, also when moving an element sideways.
Checked: [to complete: same-column coils in list mode still stack, cross mode unchanged]
A text group kept at the bottom of the page, on a master element,
connects to its project's XRefPropertiesChanged with a lambda that has
no context object. The connection belongs to the project, so it
outlives the group: once the group is deleted (paste a coil, undo,
then make any other edit), changing a cross-reference setting in the
project properties calls QTimer::singleShot() on the freed group and
QElectroTech crashes.
Pass the group as the context of that connection and of the
linkedElementChanged one beside it, so Qt removes both when the group
goes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
startEdition() records the bounding rect, but the aligned point was only
restored in endEdition(), so a right/centre/bottom-aligned text grew from
its old left/top edge while being typed into and jumped into place when
the edition ended. Re-anchor after every content change during inline
edition.
endEdition() now always clears previous_text, which marks an edition in
progress. It used to stay set after an edition that left the text
unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>