SummaryQueryWidget::queryStr() built its ORDER BY from the columns the user
chose to display, in the order they chose them:
column += key;
order_by += key;
So a summary whose first column is Title came out sorted alphabetically by
title, and one starting with Author sorted by author. A table of contents
lists the folios of a project; its order is the project's order, not
whatever the first column happens to be.
It now orders by "pos", the folio position that project_summary_view already
exposes from diagram.pos. That column is an INTEGER, so the sort is numeric
and folio 10 does not land between folio 1 and folio 2. One row per folio
means pos fully determines the order, so no secondary key is needed.
Demonstrated against a stand-in view holding four folios:
ORDER BY title, pos Apple(2) Banana(3) Mango(10) Zebra(1)
ORDER BY pos Zebra(1) Apple(2) Banana(3) Mango(10)
The hand-written query path (m_edit_sql_query_cb) returns before this and is
untouched, so anyone wanting a different order still has one.
ctest 4/4, Qt 5.15.18.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The File > Recently-opened submenu was filled once, at editor construction,
by copying the QActions that RecentFiles' menu happened to hold at that
moment:
recentfile->addActions(QETApp::projectsRecentFiles()->menu()->actions());
RecentFiles::buildMenu() runs on every fileWasOpened(), clears its menu and
creates fresh QActions. The editor's copy therefore never gained an entry,
and the list only ever looked correct after a restart.
The submenu is now the RecentFiles menu itself. QMenu::addMenu() adds the
submenu's menuAction() rather than reparenting it, so several editor windows
can share the one live menu, which is what an application-wide recent-files
list should do anyway.
Measured with a temporary probe comparing the live menu against what the
File menu actually shows, after one file had been opened in the same
session:
without the fix live=1 shownInFileMenu=0
with the fix live=1 shownInFileMenu=1
ctest 4/4, GUI starts clean with the menu bar intact. Qt 5.15.18.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Forum #3186 / issue #850: a user who has built up conductor and element
numbering rules in one project has no way to reuse them in the next one.
The only answer today is to open both .qet files in a text editor and copy
the XML across by hand.
Adds an "Import from another project..." button to the auto-numbering page
of the project properties dialog. It offers every numbering found in the
chosen file, per category, with names that already exist here unticked by
default and a "replace same-named numberings" option for when that is what
the user wants.
The source file is parsed as plain XML rather than opened as a QETProject.
Opening it would run the whole load path, including the modal dialog raised
for a file written by a different version of QElectroTech -- a dialog the
user has no reason to see, since nothing but the <newdiagrams> block is
being read.
Two supporting changes:
- readValuesFromProject() clears the three combo boxes before filling
them. It only ran once before; it now runs again after an import, and
without the clear every name appeared twice.
- FolioAutonumberingW::setContext() likewise replaces its list instead
of appending to it. It has a single caller, the line above.
This deliberately does not attempt the project-template feature also raised
on the forum thread. That needs decisions about where templates live and
what else they carry, and is better settled in a discussion first.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A slave and a terminal are both routinely separately orderable hardware. A
circuit breaker can carry ten or twenty auxiliary blocks, each with its own
order code, and a terminal block is a purchased part in its own right.
Neither was reaching the bill of materials.
Decided in discussion #847: @IBSYSLevi -- "I would not expect that a defined
piece of hardware is excluded from BOM when not specifically defined as so" --
with use cases from @jozi332 covering Siemens breakers with ten to twenty
auxiliary blocks and PLC cards carrying per-channel data.
Two filters had to change, which is easy to miss: BomExport::defaultQuery()
and, upstream of it, the WHERE clause of element_nomenclature_view itself.
Changing only the query does nothing for slaves, because the view had already
removed them. Terminals were already in the view, so they appeared as soon as
the query allowed them -- which made a half-finished change look like it had
worked.
Measured on examples/industrial.qet, which holds 96 terminals and 41 slaves:
258 rows before, 354 with terminals, 395 with both. A slave given a
manufacturer and part number now appears in the export; previously it could
not, at any setting.
Nothing that should stay out of a bill of materials is newly included. The
folio report arrows and the conductor definition are still excluded because
they are not hardware, and anything else -- a relay's own auxiliary contact,
which is not orderable separately -- is kept out with exclude_from_bom, which
the view already honours and which #721 and #765 made settable on the symbol
itself.
tst_smart_device is updated rather than weakened. @enesgursoy6110 wrote it in
#830 to prove the filter works, inserting rows designated "Must not be
exported"; the slave and terminal rows now carry real designations and are
asserted present, and a folio report arrow takes over as the negative case,
so the test still proves filtering happens -- at the boundary we now want.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Fifth site of the hash-ordering defect fixed in #844.
TitleBlockTemplatesProjectCollection::templates() returns
titleblock_templates_xml_.keys(), a QHash, and QETProject::toXml() iterated
it directly. A project embedding more than one template therefore wrote the
<titleblocktemplate> children in a different order on every save.
examples/affuteuse_250h.qet embeds three -- A4_1, DIN_A4 and DIN_A4_copy --
and two saves of it produced "DIN_A4 A4_1 DIN_A4_copy" and
"DIN_A4_copy A4_1 DIN_A4". It was the last of the two projects #844 could not
make reproducible.
Worth recording because the first reading of that diff was wrong: seeing
name="DIN_A4" on one side and name="DIN_A4_copy" on the other looked like the
save path renaming a template, which would have been far more serious -- a
diagram referring to it by name would have been left dangling. The file
simply contains both, and they had swapped places.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This reverts merge commit 3d5799773, restoring shortcutsconfigpage.cpp to
its state before it.
#759 and #821 fix the same issue (#757). #821 was opened on 8 September and
is the better fix; #759 was merged on 12 September without checking whether a
PR for it already existed, and its merge is what left #821 conflicting with
master. Reverting is the way to let the right change land.
#759 keys conflict detection on the row's category, which is a tr() string.
#821 keys on the shortcut ID prefix, which is stable and untranslated, and
encodes the overlaps the category cannot express: main-window actions are
live while any editor is open, and the depth.* actions are installed into
both the diagram and the element editor.
Checked against the registry rather than by reading -- 94 registered actions
plus the four depth.* ones registered through QObject::tr. On the shipped
defaults the two behave identically: all 24 shared sequences are legitimate
cross-editor duplicates and neither flags them. They diverge on shortcuts a
user assigns, where #759 misses four classes of real conflict that #821
catches: a diagram or element editor action given the main window's F1, and
a diagram or element action given a depth.* sequence.
The reason #759 looked adequate is that the scope prefix currently maps
one-to-one onto the translated category for all seven scopes, so same-scope
detection comes out the same either way. It fails only where scopes overlap,
which is the case #821 exists to handle.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Fourth and last instance of the ordering defect, and the inner half of the
one fixed in the previous commit. ProjectDBModel::toXml() builds each
section's role list from m_header_data.value(key).keys(), and m_header_data
is a QHash<int, QHash<int, QVariant>> -- so both levels are randomised per
process. Sorting the sections left the roles inside each section still
arriving shuffled, which showed up as <data> children with the same
section="0" swapping places between two saves.
With this, save idempotence across the shipped examples goes from 6 of 23 to
22 of 24.
The two that remain fail for unrelated reasons, not for ordering:
schema_indus.qet stores no uuid attribute on its elements at all, so
fromXml() invents a fresh one on every load; and affuteuse_250h.qet loses a
title block logo's storage attribute and renames a title block template on
save. Both are separate defects.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Third instance of the ordering defect the two previous commits fixed, and
the one that was still making five of the shipped examples save
irreproducibly after those: QETXML::modelHeaderDataToXml() iterates
data_hash.keys() directly, and data_hash is a QHash<int, QList<int>> whose
key order is randomised per process. The <data> children of <header_data>
therefore came out in a different order on every save, which is what a
diff of two saves of industrial.qet showed -- the same EditRole, FontRole
and TextAlignmentRole entries, shuffled.
Sorting the section list fixes it. The roles within a section are a QList
and were already written in a stable order, so they are left alone.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Same defect as the <xref> ordering fixed in the previous commit, in the same
function and left behind by it: conductorAutoNum(), folioAutoNum() and
elementAutoNum() are QHash, whose key order is randomised per process, and
all three were iterated directly. A project holding more than one scheme in
any of the three categories therefore wrote those children in a different
order on every save, so opening and saving without an edit produced a file
that differed from the original, and differed again next time.
Three of the shipped examples are affected: Projet_vierge.qet has 8 conductor
schemes, industrial.qet has 4 element and 2 folio schemes, and
tableau_domestique.qet has 2 element schemes.
Sorting the key list is the same remedy already applied to the xrefs, and
changes nothing else: the same children are written, with the same contents.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diagram::toXml() sorts elements by position alone. That is not a total
order: two elements can sit at the same x/y. lmdg.qet has a pair of
text elements both at 780,350, their sort keys are identical, and
std::stable_sort then falls back to the order QGraphicsScene handed us,
which varies between runs. The two swapped places on every save.
Appending the uuid gives a total order. This keeps the reasoning in the
existing comment intact rather than contradicting it: that comment warns
against sorting *by* uuid, because an element with no persisted uuid
attribute is given a fresh random one by fromXml() on every load. As a
tiebreaker the uuid is only consulted when two positions are equal, so
elements carrying a persisted uuid -- the colliding pair in lmdg.qet
included -- become deterministic, and a collision between two legacy
elements is no better ordered than before, but no worse.
Measured with tests/determinism, on top of the xref ordering fix:
before both fixes I1 0/23
xref ordering only I1 5/23
with this as well I1 6/23 (lmdg.qet newly reproducible)
No regressions against the baseline, I3 stays 23/23. Also checked
lmdg.qet directly three times rather than once, since the failure is
nondeterministic by nature and a single passing run proves nothing.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
QETProject::toXml() iterated defaultXRefProperties().keys() straight into
the document. That is a QHash, and Qt randomises hash iteration order per
process, so every save wrote the <xref> children in a different sequence.
Saving an unchanged project therefore produced a different file each
time. The content was identical -- same size, same elements -- but the
order moved, so version control showed spurious changes on every save and
comparing two saved files showed differences that were not there.
Sorting the keys before writing makes a save reproducible. This is the
same class of problem, and the same fix, as the sort already applied to
Diagram::toXml()'s <elements> and <conductors> blocks.
Measured with tests/determinism (resave twice, compare):
before: I1 idempotent save 0/23
after: I1 idempotent save 5/23
with ArduinoLCD, ShellyParts, convertisseur, schema_indus and
schema_unifilaire_voltaique2 newly reproducible, and no regressions
against the baseline.
Not the only remaining source of save instability -- the other 18
projects still fail I1 for other reasons. This fixes the hash-ordering
source only.
Note this is not a Qt6 regression. The Qt5 build happened to produce a
favourable hash order for four projects and Qt6 does not, but both were
writing an unspecified order; only the dice changed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Making the Informations tab visible for Slave elements is only half the
change: ElementScene::toXml() writes the <elementInformations> block for
Simple, Master, Terminal and Thumbnail, and Slave was not in that list. It
is the only place in the tree that writes that block, so the editor would
have shown an editable tab for a slave, accepted whatever the user typed
into it, and dropped it silently on save.
Visible in the shipped collection, which matches the condition exactly:
0 of 75 slave elements carry an <elementInformations> block, against 41 of
70 terminal elements.
Adding Slave is safe in both directions. ElementData::fromXml() reads
<elementInformations> unconditionally, with no check on the base type, so
existing slave elements are unaffected and newly written ones load back
correctly. It also makes populateTree()'s PLC-slave branch reachable for
the first time -- the five PLC info rows it adds are stored in
m_informations, so until now they could not have been saved either.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
exportBomCsv() calls query.value(i).toString(). QSqlQuery::value() returns
a QVariant, but the translation unit only ever sees the forward declaration
that arrives through qobject.h, so the call does not compile:
sources/bomexport.cpp:79:50: error: invalid use of incomplete type
'class QVariant'
79 | values.append(query.value(i).toString());
Reproduced on a clean checkout of master with Qt 5.15.18. Qt6 pulls the
full definition in by another path, so the Windows CI workflow does not
see it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N64mk33R9GdbU1PkYcc9SP
When a placed nomenclature or summary table cannot display every row its
model holds, checkInsufficientRowsCount() informs the user with a modal
message box. It used QMessageBox directly rather than QET::QetMessageBox,
so it ignored the non-interactive mode that main.cpp sets for the
command-line verbs, and every headless verb (--info, --resave, --export-*)
blocked forever on a dialog nobody could answer.
This is the same defect fixed in e3d11a499 for the other modals reachable
from the command line; this call site was missed.
Found with a gdb backtrace on a hung --info: the process was parked in
QDialog::exec() under this function.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6MRq2Ach1ogvnGcbuqNLr
ElementPictureFactory caches the QPicture it builds for an element
definition, keyed by that definition's uuid. Definitions saved before uuids
were written do not have one, and every one of them presented the same null
uuid. getPictures() spotted that and took an uncached path, so the drawing
was rebuilt from the XML for every instance the project placed.
Counted on the shipped examples:
examples/m_000.qet 831 builds for 97 definitions
examples/affuteuse_250h.qet 256 builds for 106 definitions
examples/industrial.qet 65 builds, 553 cache hits (has uuids)
13 of the 23 example projects carry definitions without a uuid, so this is
not a rare shape.
Derive a key from the location when the definition has no uuid of its own.
ElementsLocation::toString() qualifies an embedded path with the id of the
project owning it, and QETApp hands out project ids from an ever-increasing
counter and never reuses them, so the derived key cannot collide with an
element of another project.
Measured with callgrind, which counts instructions and so does not depend
on what else the machine is doing, opening examples/affuteuse_250h.qet:
4,801,381,735 -> 4,285,411,908 instructions (-10.7 %)
ElementPictureFactory::build 995 M -> 478 M
ElementPictureFactory::getPictures 1289 M -> 774 M
The halving of build() matches the counters independently: 106 definitions
against 256 instances is 41 %, and the cost falls to 48 %.
This also retires a latent aliasing bug rather than a measured one:
build() inserted into m_primitives_H under the same null uuid for every
definition lacking one, and getPrimitives() read back through that shared
key. Its only caller is the image export dialog, which the command line
does not reach, so no wrong output could be demonstrated here -- but the
entries could only ever have belonged to whichever element was built last.
--info stays byte identical on all 23 example projects, and the SVG export
of affuteuse_250h.qet -- a project whose definitions all lack uuids -- is
byte identical too.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6MRq2Ach1ogvnGcbuqNLr
setPainterStyle() built its QRegularExpression as a local, so the pattern
was compiled from scratch on every call -- and it is called for every
graphics primitive of every element instance a project places. A callgrind
profile of opening examples/affuteuse_250h.qet put 28 % of all instructions
inside libpcre2, and 12 % of the whole run inside this one function.
Making it static const compiles the pattern once for the life of the
process. Nothing else changes: same pattern, same matching, same named
captures.
Measured with callgrind, which counts instructions and so does not depend
on what else the machine is doing, opening examples/affuteuse_250h.qet:
4,801,381,735 -> 4,297,629,948 instructions (-10.5 %)
setPainterStyle 582 M (12.13 %) -> 79 M (1.83 %)
--info stays byte identical on all 23 example projects, and so does every
SVG this produces for industrial.qet -- which is the output that would
change if the styles were parsed any differently.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N64mk33R9GdbU1PkYcc9SP
Destroying a project cost more than loading it: on a 1000 folio project
--info reported its work done in 160 s but the process ran for 657 s, and
the difference was ~QETProject().
Timing each destructor puts 94 % of that teardown in
~QetGraphicsTableItem(), with the cost per table doubling as the project
grows (48 ms at 100 folios, 122 ms at 250). The database's own per-element
deletes are 1 % of it and linear; element and conductor teardown is linear.
A table destructor repairs the chain it belonged to, which relinks the
neighbouring tables, which assigns a model -- and one branch of
setPreviousTable() builds a fresh ProjectDBModel, whose copy constructor
calls setQuery(), which rebuilds the whole database. Destroying a 250 folio
project did that 12 times, for a project that is being thrown away.
So block the rebuild for the lifetime of the destructor, next to the
blockSignals(true) already there for the same reason. Nothing can observe
the result: the database is destroyed moments later as a member of the
project. Teardown drops about fivefold at every size measured -- 1.30 s to
0.26 s at 100 folios, 7.75 s to 1.73 s at 250, 19.92 s to 4.02 s at 400 --
and the number of full rebuilds in a run stops growing with project size.
Teardown is still superlinear, now dominated by
QetGraphicsTableItem::setUpColumnAndRowMinimumSize() measuring every cell of
the nomenclature each time a chain is relinked. That is left alone here.
--info stays byte identical on all 23 example projects, as do --export-bom,
--export-wires, --export-cables, --export-nets and --export-wiring.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6MRq2Ach1ogvnGcbuqNLr
ProjectDBModel::setQuery() calls projectDataBase::updateDB(), which drops
and repopulates every table in the database. The rebuild does not depend on
the query, so each table model that queries the database while a project is
being read triggers another complete repopulate of the same content.
Opening a 100 folio project ran updateDB() 26 times, 9.9 s of a 15.7 s load.
Two changes, because the first alone is not enough:
setUpdateBlocked() lets a bulk operation suppress the rebuild and do it
once when it is done. readProjectXml() already wrapped the load in
blockSignals(true) "to avoid hundreds of unnecessary emitted signal", but
that suppresses only the signal, not the work it announces; this extends
the same intent to the work. Both early returns in readProjectXml() sit
before the block, so no path leaves the database permanently blocked.
Further rebuilds are triggered after readProjectXml() returns, where the
load phase timers cannot see them -- with only the block in place
updateDB() still ran 5 times on examples/industrial.qet. So the database
now also tracks whether anything has changed since the last rebuild, and
skips repopulating when nothing has. dataBaseUpdated() is still emitted in
that case: callers and models rely on it to refresh, and what they read
back is the same either way. Every method of the class that writes rows
marks the flag; from outside, the database is reachable only through
newQuery(), and all five call sites read.
Repeating the rebuild was wasteful rather than wrong -- each
populate*Table() begins with a DELETE -- so this changes no output.
Verified byte identical --info on all 23 example projects, and identical
--export-bom, --export-wires, --export-cables, --export-nets and
--export-wiring on industrial.qet. Its load drops from 5.51 s to 5.31 s
(median of 6).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6MRq2Ach1ogvnGcbuqNLr
The remaining two defects from bugtracker #671's original analysis,
which #686 knowingly didn't cover (see that PR's review thread and the
comment on the now-closed #672).
## #671 item 5: the XML matching ignored nesting
prefixFromLabelFile() was a flat token scan: it matched any <category
name="..."> whose name equalled the next path segment, with no check
that the match was actually a *child* of the previous match. It gave
correct results on the shipped 10_electric/qet_labels.xml only because
that file's document order happens to line up with its hierarchy --
any file with a same-named category at the wrong nesting depth would
silently return the wrong prefix.
Reproduced with a synthetic file where a top-level sibling category
happens to share a name with what should be an unmatched grandchild:
the old (already re-verified-fixed-for-whitespace) lookup returns a
prefix from a completely unrelated branch of the document; this
rewrite correctly reports "not found".
Fixed by replacing the QXmlStreamReader token walk with a QDomDocument
walk that only ever considers a matched node's direct <category>
children (firstChildElement()/nextSiblingElement(), scoped to that
node), which cannot cross into a same-named sibling subtree. This also
makes the whitespace-dependence fixed in #686 moot for the same
reason: DOM parsing doesn't distinguish pretty-printed from minified
input to begin with.
The inheritance rule ("if a directory has no prefix, use its parent's,
and so on") and the empty-<prefix/>-overrides-inheritance behaviour
#686 added both carry over unchanged: a category's own <prefix> child,
even an empty one, always overrides whatever a shallower ancestor
already provided; a category with no <prefix> child at all leaves the
inherited value untouched.
## #671 item 2: common-collection trees other than 10_electric
The lookup only ever consulted commonElementsDir()/10_electric --
literally: `if (current_location.fileName() == "10_electric")`. The
common collection ships four other top-level trees (20_logic,
30_hydraulic, 50_pneumatic, 60_energy); none of them could carry a
qet_labels.xml at all, because nothing ever looked for one.
Generalised to commonElementsDir()/<tree>/qet_labels.xml for whichever
top-level tree the element's path actually walks up to, tried first,
then custom, then company -- each of the latter two tried against both
a from-root layout (matching a custom/company file organised as a
mirror of the common collection, tree name included) and a
tree-relative one (matching a file scoped to just one tree), so
existing custom files keep working either way. This is the same
multi-candidate structure #686 already established for custom-then-
company; it now also covers which common-collection tree to check.
## Testing
Same constraint as #686: no working full build in this sandbox
(missing generated headers/deps), so the exact functions as committed
were extracted into a standalone Qt6 harness and run against the real
shipped 10_electric/qet_labels.xml (pretty-printed and minified),
a synthetic empty-prefix-override file, and the nesting-trap file
above -- 9/9, including the three cases #686 already fixed (direct
prefix, inherited prefix, not-found) staying correct, confirming this
rewrite doesn't regress that work.
Not exercised here (needs a real running QETApp / ElementsLocation,
which the standalone harness can't stand up): the elementPrefixForLocation()
candidate-list wiring itself -- collection_root computation, the
from-root/tree-relative dual lookup, and the common-then-custom-then-
company ordering. That code is mechanical and was reviewed carefully
by hand, but it has not been run.
Requested by @scorpio810 in review: an empty <prefix/> in the custom
collection should cancel a company-collection prefix, not fall through
to it. QXmlStreamReader::readElementText() returns a null QString for an
empty element, and the caller's isNull() check treats that the same as
"not found" -- distinguish the two so an explicit override actually
overrides. Verified in a standalone harness against a synthetic
override file, pretty-printed and minified.
Two more while in the same function, both from the original bugtracker
#671 analysis that this PR only partially addressed:
- QString path[10] with an unbounded index becomes a QStringList. The
deepest category in the shipped collection already needs 9 of the 10
slots; a custom collection can nest deeper, and overflow was writing
QString objects past the end of a stack array (#671 item 3).
- The common-collection lookup still concatenated
commonElementsDir() + "10_electric/qet_labels.xml" directly.
commonElementsDir() returns the configured path verbatim with no
guaranteed trailing separator, so relocating the collection to a path
without one silently mangles this into one word and the file is never
found -- the single most-reported cause of "prefixes don't work"
(#671 item 1, forum #2178/#2651). QDir::filePath() joins correctly
either way; applied to all three lookups (common, custom, company).
Also fixes a defect not in that original analysis: the token-matching
loop in prefixFromLabelFile() advanced twice per matched element --
once explicitly after a match, once more unconditionally at the bottom
of the loop -- which only produced the right result because a
pretty-printed file inserts a whitespace Characters token between
adjacent elements for the second advance to land on. A minified
qet_labels.xml has no such token, so the second advance skips clean
over the very element being searched for and the lookup silently finds
nothing -- reproduced against the real shipped 10_electric/qet_labels.xml
(returns "" instead of "K" for a plain coil, on every case tested, not
just the inheritance one). A single `continue` after a handled match
removes the double advance.
Testing: extracted the exact functions as committed into a standalone
Qt6 harness (outside the full QET build, which needs a dependency
fetch this sandbox doesn't have) and ran them against the real shipped
qet_labels.xml, pretty-printed and minified, covering a direct prefix,
inherited-from-ancestor prefix, not-found, and the explicit-empty-
override case -- 8/8, matching between formats, no regressions in the
pretty-printed results. The QDir::filePath() fix was verified
separately against both a trailing-slash and no-trailing-slash base
path. Not yet built inside the actual application (pugixml and other
generated headers aren't available standalone); the algorithm itself,
which is where all four defects lived, is what was under test.
A .qm compiled from a 0%-translated .ts (fi, no, rs, sk, sl, sr) loads
successfully but contains no messages, so setLanguage() treated the
language as loaded and never fell back to qet_en: users got the French
source strings instead of English. Treat an empty translator as not
loaded.
Also log the QET and Qt .qm files actually loaded in the startup
diagnostics (MachineInfo), to make translation reports easier to triage.
windeployqt runs with --no-translations, so standard buttons (OK/Cancel)
and dialogs stayed in English. Copy each qtbase_XX.qm from the MSYS2 Qt
translations into files/lang/qt_XX.qm, where QETApp::setLanguage() looks,
with aliases for QET languages Qt only ships with a region (pt, zh).
Standard buttons (OK/Cancel) and dialogs are translated by qtbase_XX.qm,
which macdeployqt does not deploy. QETApp::setLanguage() falls back to
lang/qt_XX.qm, so copy each qtbase_XX.qm there, with aliases for QET
languages Qt only ships with a region (pt -> pt_PT, zh -> zh_CN).
macdeployqt kept /opt/homebrew paths (e.g. libbrotlicommon's install id).
Rewrite them to @rpath/libX.dylib, copying the library into Frameworks
if needed, over 3 passes to handle chained dependencies.
Recent Homebrew bottles (brotli, webp, sharpyuv) reference their deps as
@rpath/libX.dylib, which macdeployqt skips. Copy them from /opt/homebrew/lib
into Contents/Frameworks after macdeployqt, and abort if any @rpath or
/opt/homebrew reference remains unresolved. Drop the ineffective -libpath.
polluting the source directory during out-of-source builds and it is standard that these files should be located inside the build directory during the build step.
Second of @scorpio810's review notes on #630:
exportWiring() follows the existing CLI exporters (QTextStream, plain
QFile). On Qt6 the output is UTF-8, so encoding is fine. Once #830 is
in, it could optionally reuse BomExport::writeCsv() to get a BOM,
which Excel needs to detect UTF-8 when opening the file directly, and
an atomic write.
Done directly rather than waiting on #830, since neither half depends on
it and both are small.
The bytes were already UTF-8; what was missing is the mark that tells
Excel so. Opening a .csv without one, Excel falls back to the local
8-bit codepage and mangles any accented element label -- the common case
for this project's users.
QSaveFile replaces QFile so a failure part-way through leaves the
previous file intact instead of a truncated one. QSaveFile is already the
codebase's pattern for this (QET::writeToFile, qet.cpp:664).
Verified on perceuse.qet: output now starts ef bb bf, the header follows
intact, all 156 rows are preserved, and the file parses as utf-8-sig.
Pointing the exporter at a missing project leaves an existing target file
untouched, where before it would have been truncated.
Left the other CLI exporters alone. They share the same pattern, but
changing exportBom() would add a BOM to output that existing scripts
already consume, which is a behaviour change outside the scope of this
review note.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Follows @scorpio810's review note on merging #630:
ORDER BY diagram_position, wire_number sorts wire numbers as text,
so "10" comes before "9".
Confirmed against the corpus: perceuse.qet put 111 before 12, and
affuteuse_250h.qet put 45 before 5. industrial.qet happened to look
correct only because its wire numbers are all the same width.
Wire numbers are free text and are not always numeric -- perceuse.qet
also carries an unresolved "%sequ_1" -- so the ordering has to cope with
both. Numeric values come first, ordered by value; anything else follows,
ordered as text. The trailing wire_number keeps ties stable.
Fixed in both places the query appears: the CLI exporter and the wiring
list dialog. They had the same ORDER BY, so fixing only one would have
made the dialog and --export-wiring disagree about the order of the same
data.
Verified on perceuse, affuteuse_250h, industrial and tremie_vibrante:
zero out-of-order numeric pairs afterwards, row counts unchanged, and
"%sequ_1" now sorts after the numbers rather than among them. Folio 3 of
perceuse.qet reads 0 1 2 3 4 4 5 5 6 6 7 7 12 12 where it previously
interleaved 111 before 12.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Qt6 PrintSupport records Cups::Cups as a third-party dependency
(qprint_p.h includes <cups/ppd.h>), so find_package(Qt6 PrintSupport)
runs FindCups at configure time and fails without the CUPS headers.
Build-time only, nothing is staged.
#824 read the pixmap through the pointer overload, which Qt 5.15
deprecates, so the fix it introduced compiled with two deprecation
warnings of its own. Qt 5.15 offers the by-value form behind
Qt::ReturnByValue, so both branches can take the same overload and the
difference reduces to the argument.
Equivalent: the pointer overload returns nullptr when no pixmap is set,
which the old expression turned into a null QPixmap; pixmap(
Qt::ReturnByValue) returns a null QPixmap directly. It also drops the
null check, so the Qt5 branch is now a single expression.
Verified both arms of the #if, since a preprocessor-branched change is
only half tested otherwise:
- Qt 5.15.18: deprecation warnings for this file 2 -> 0, builds clean,
binary runs
- Qt 6.10.2: builds clean, 488/488, links
- 22 example projects load and export with no crash or hang
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
max_slaves records how many contacts a part is expected to carry. It was
enforced as a rule the drawing had to obey, which obstructs the way both
@scorpio810 and @IBSYSLevi described working in #819: draw the schematic
first, choose the physical hardware afterwards. A limit that refuses the
link forces the hardware decision up front, which is exactly what they
said gets in the way.
Two changes, both in the UI rather than in isFull(), which stays the
query it always was:
- MasterPropertiesWidget::on_link_button_clicked() now says the limit
is reached and asks whether to link anyway, defaulting to yes,
instead of refusing outright.
- LinkSingleElementWidget no longer removes a full master from the
candidate list. That was the worse half: a master at its limit simply
was not there, indistinguishable from one that does not exist, with
nothing to say why. It now stays selectable and the user decides.
PLC masters are deliberately left alone. Their limit is the number of
declared IO slots, which is structural rather than advisory -- a link
past it would have no IO index to map to -- and PlcLinkWidget already
tells the user when it hides one, via m_hidden_masters_label.
Only coils that opt into a limit are affected: max_slaves defaults to
-1, and no project in examples/ sets it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
lang1/ was a leftover from the pre-Qt6 translation pipeline.
Qt6/CMake now produces all .qm files directly into lang/, which
is already copied above, making this step dead code.
CFBundleIdentifier was "org.qelectrotech", but Qt derives
"org.qelectrotech.QElectroTech" from setOrganizationDomain()
and setApplicationName() for the app's own preferences file
(~/Library/Preferences/org.qelectrotech.QElectroTech.plist).
Align the two so the shipped bundle and the CMake target (see
CMakeLists.txt MACOSX_BUNDLE_GUI_IDENTIFIER) use the same
identifier regardless of build path.
Note: this changes the bundle's LaunchServices identity, so
users may need to redo "Open With QElectroTech" file
associations once after updating.
CMakeLists.txt marks the macOS target as MACOSX_BUNDLE but never sets
MACOSX_BUNDLE_GUI_IDENTIFIER, so CMake's default Info.plist template
substitutes an empty string for CFBundleIdentifier.
An .app with an empty identifier is never registered by LaunchServices
(`lsappinfo info` reports bundleID="" and bundle path=[NULL]). AppKit
runs the open/save panel in an XPC service keyed on the client's bundle
identifier: the service is spawned on each request but presents no
window, so QFileDialog::getOpenFileName() and getSaveFileName() return
an empty string without a panel ever appearing. In QET this means
File > Open and File > Save as silently do nothing -- openProject()
receives an empty path and returns at its `if (filepath.isEmpty())`
guard. Every macOS CMake build has been affected since the target
became a bundle.
Fill in the identifier along with the other bundle metadata CMake's
template expects. org.qelectrotech.QElectroTech is the identifier Qt
already derives from setOrganizationDomain("qelectrotech.org") and
setApplicationName("QElectroTech") for the app's own preferences file,
so the bundle now agrees with what the app writes at runtime.
Verified on macOS 27 with Qt 6.11: before the change File > Open and
File > Save as present nothing; after it both panels open normally. No
code signing step is needed -- the linker's ad-hoc signature still
reports the executable name as its identifier, and the panels work
regardless once the plist is correct.
An element can declare contact groups and a max_slaves that disagree with
each other, and nothing reconciles them.
The element editor keeps the two in step: max_slaves sizes the contact
group table, one row per slot. Nothing does so on load, so a hand
written or generated file can carry five groups and max_slaves=2. That
loads without complaint, isFull() then caps linking at two, and
ContactGroupSelectionDialog still offers all five groups -- so the user
is shown groups that cannot be linked to, with nothing to explain why.
When groups are declared they are the slots: a slave occupies exactly
one, and the selection dialog offers exactly these. So take the limit
from the group count, which is also the number the user can see.
max_slaves stays as the fallback for the elements that declare no
groups, which today is every element in the standard collection.
No element in the collection declares contact groups, so this changes
nothing for existing projects.
Verified with two purpose-built fixtures, since no real element
exercises either path: a coil declaring five groups with max_slaves=2
now takes the limit from the groups, and a coil with max_slaves and no
groups still takes the fallback path unchanged.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Two units were being stacked in the same block. The line above reports
max_slaves, which is a number of slots, so reporting the line below in
contacts made a coil with one 4 pole slave read "maximum 4 / used 4"
while three slots were still free.
The total goes back to counting linked elements, matching the unit of
the line above it and restoring the original behaviour of that line.
The per-type breakdown keeps the pole multiplier, because that is the
question it answers -- how many contacts an auxiliary block must
provide -- and is now prefixed "Contacts :" so the two units are not
mistaken for each other.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The earlier commit changed MasterElement::isFull() to compare the
contacts in use against max_slaves. That was wrong, and this restores
the original comparison against the number of linked elements.
max_slaves is a number of slots, not of contacts:
- it sizes the contact group table in the element editor, one row per
slot (ElementPropertiesEditorWidget::populateSlaveGroupsTable)
- a group must match the slave's own contact count before it can be
chosen, so a 4 pole slave needs a group declaring 4 and occupies
that single group (ContactGroupSelectionDialog)
- each slave stores exactly one group index
(Element::setGroupIndexForElement)
So a coil declaring 4 slots accepts 4 slaves, whatever their pole
count. Counting contacts made one 4 pole slave fill a 4 slot coil on
its own and refuse three further links that should have been allowed.
ContactUsage stays, and its per-type tally is still what the General
tab needs: how many contacts an auxiliary block must provide is a
different question from how many slots are occupied, and only the
former wants the pole multiplier. The header now says so.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Second half of #819: where a coil declares what contacts it provides, the
General tab now reports each type as used against declared rather than as
a bare count.
NO : 3/4, NC : 1/2, inverseurs : 0/1, autres : 0/0
MasterElement::contactCapacity() sums contactCount over the element's
SlaveContactGroup list, per type, reusing the same ContactUsage tally the
used count is built on. The mapping from ElementData::SlaveState onto the
tally's own type is factored into one helper so the used count and the
declared capacity cannot classify a contact differently.
Falls back to the plain count from the previous commit when an element
declares no groups, which is every element in the standard collection
today -- nothing in the corpus declares slaveContactGroups, so this
changes no existing display.
A type used beyond what is declared reads as e.g. "1/0". That is
deliberate: it says this contact does not fit the part.
Display only. Whether a declared capacity should also feed
MasterElement::isFull() is the open question in #819 and is not touched
here.
Verified end to end against a purpose-built fixture, since no existing
element exercises this path: a coil declaring two NO groups of two, one
NC group of two and one changeover group of one parses and reports
NO=4 NC=2 SW=1 other=0 total=7, matching the declaration exactly.
tst_contactusage gains a case covering capacity summed across groups
(10 cases, all passing).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Requested in #819: after drawing a schematic you need to know how many
NO, NC and changeover contacts a coil ended up using, so you can pick an
auxiliary block that satisfies it. Until now the General tab reported
only a single total, and counting the contacts by type meant counting
rows on the cross reference by hand.
Three changes to that block:
- the used count now counts contacts rather than linked elements. The
label already said "contacts" while the value was
linkedElements().count(), so a slave standing for several contacts
was under-reported. It reads MasterElement::contactUsage(), the
same count isFull() uses.
- a breakdown line is added below it, printed only when the master
actually has contacts to break down.
- a declared limit of -1 means "no limit set" rather than a real
limit, so it is printed as such instead of showing "-1", which
reads as a bad value.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
MasterElement::isFull() decided whether a coil had room left with
connected_elements.size() >= max_slaves
which counts linked *elements*. A slave stands for as many contacts as
its "number" kind information declares, so a 4 pole contact consumed a
single contact from the coil's budget instead of four. 36 elements in
the standard collection declare a number between 2 and 4, so this is
reachable, not theoretical.
Add ContactUsage, a header-only tally holding the two rules that are
easy to get wrong:
- a slave counts once per contact it declares, not once per element
- a changeover is counted once, as sw, and never as one NO plus one
NC. CrossRefItem::NOElements() and NCElements() both return
changeovers, so a count built by adding those two lists together
reports one changeover as two contacts.
The upcoming per-type displays (the used count in the element's General
tab, and the per-type budget on the cross reference) need exactly this
count, so it lives in one place rather than being written out three
times, and isFull() now reads it too.
The header carries no graphics dependency, so the counting rules are
unit tested on their own in tests/qttest/tst_contactusage.cpp,
following the same pattern as diagramsortkeys.h.
Verified: all 9 unit tests pass, and both rules were mutation checked
(counting elements instead of contacts fails 2 tests, counting a
changeover as both NO and NC fails 3). The 23 example projects still
load and export without crash or hang, and qet-lint reports no
regressions against its baseline.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ClickableImageLabel::mousePressEvent() calls pixmap().isNull() and
pixmap().width(). That is the Qt6 signature; in Qt5 QLabel::pixmap()
returns const QPixmap * and the code does not compile:
error: request for member 'isNull' in '...QLabel::pixmap()',
which is of pointer type 'const QPixmap*'
CMakeLists.txt defaults QT_VERSION_MAJOR to 5 when it is not specified,
so a default configuration of master has not built since 6b577ee75.
Read the pixmap once into a local, guarded the way the rest of the
codebase handles this split, which also drops four repeated pixmap()
calls in the same expression.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Follow-up to the positionKey() fix merged directly in #779
(b2f4ef5d2): per review request, add a small regression test so this
class of bug (fixed-precision "%.4f" formatting compares out of
numeric order once the integer part's digit count differs) can't
silently reappear.
positionKey()/coordinateKey() move out of diagram.cpp's anonymous
namespace into a small header-only diagramsortkeys.h so the test can
link against the exact same code Diagram::toXml() uses, instead of
duplicating the algorithm. Behavior is unchanged.
tst_diagramsortkeys covers: single- vs double-digit, double- vs
triple-digit, negative-vs-negative, negative-vs-positive, and
negative-vs-zero coordinate pairs, plus sub-precision deltas.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
update instead of the image a placeholder box is drawn and a warning is given during export.
Current dxf version is extremely old and does not support any image embedding. Future possible
update is the introduction of a newer dxf version export option which would allow to embed a link to an external
image file.
Plain fixed-precision formatting ("%.4f") produces strings that don't
compare in numeric order once the integer part has a different digit
count -- e.g. "15.0000" sorts before "5.0000" as text, even though
15 > 5. That silently broke the determinism goal of this branch for
any diagram with coordinates spanning more than one digit width.
Shift into a non-negative range and zero-pad to a fixed width instead,
so the formatted string sorts the same way the number does, including
negative values.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Each cascade delete (element_info/terminal/conductor/element) only
logged its error and fell through to the next query regardless, so a
mid-cascade failure (e.g. a locked DB) still let the diagram row get
deleted while its child rows survived -- the same inconsistency this
branch set out to fix, just via a different failure path. Wrap the
cascade in a transaction and roll back + bail on the first failed
exec(), matching the existing transaction pattern in updateDB().
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Mirror (M) and Flip (F) in the element editor reflected the selected
parts across the element origin: every part's mirror() and flip()
negated the scene x or y coordinate. A part drawn to the right of the
origin landed the same distance to the left, so the selection jumped
to the other side of the canvas instead of turning around.
MirrorElementsCommand and FlipElementsCommand now compute the united
scene bounding rectangle of the selected items and reflect across the
vertical or horizontal line through its center. The center is snapped
to the nearest half of the diagram grid, so points that were on the
grid stay on the grid after the reflection. Terminals in particular
keep their grid alignment.
Each part's mirror() and flip() takes the axis coordinate as a
parameter with a default of 0, so the previous behavior remains
available to any other caller. The command stores the axis when it is
created and undo reapplies the same reflection, which is its own
inverse, so the existing undo path is unchanged.
Parts covered: PartArc, PartDynamicTextField, PartEllipse, PartLine,
PartPolygon, PartRectangle, PartTerminal, PartText.
Fixes#812
Shapes and images can now be resized, rotated, and skewed directly
on the canvas, not just moved. Both share one small transform
struct (rotation, then skew, then scale, anchored on a movable
pivot) and one handle widget, so a corner drag, an edge skew, or
grabbing the rotate handle behaves the same way and runs through
the same matrix math everywhere, instead of every item type
reinventing its own.
Shapes also gained a proper pen tool (bezier paths, corner/smooth/
symmetric nodes), arc support, and mirroring. Images gained
non-destructive cropping and colour-keyed transparency, both
remember their own settings, so reopening the dialog picks up
where you left off instead of starting over.
Properties dialogs for both were extended to match (position,
size, angle, skew), with undo/redo wired through for every handle
drag.
Old XML files can read easily as the transformation is only added
if needed and the old syntax is still used and understood if it is
not needed.
1. Drop dead prepareGeometryChange()/update() calls in
setPotential(), split unrelated terminaleditor.h re-indent into its
own change
2. Removed: setPotential() had prepareGeometryChange()/update() left over from
the label-display mechanism that was dropped before this PR
windows-build.yml:
- Remove the Qt5 build job (build-windows). Qt6 is now the sole
Windows track built in CI.
- publish-nightly-assets: only delete/replace .exe and .zip assets
tagged "qt6" on the nightly release. Assets without "qt6" in the
name (the last Qt5 build ever published) are left untouched and
stay downloadable indefinitely as a frozen legacy build.
- Release notes: drop the "Try Qt6 — soon the only track" notice,
add a line explaining the Qt5 (frozen) vs Qt6 (maintained) split.
windows-msi.yml:
- Matrix reduced to the single "qt6" entry (flavor string kept as
"qt6", not renamed, since it seeds the MSI ProductCode and a
rename would break upgrade detection for existing installs).
- Sign the Qt6 MSI via SignPath (previously Qt5-only). Guard is now
just the upstream-repo fork check; no per-flavor exclusion left.
- deploy-pages: also detect legacy (non-"qt6") release assets and
pass them to generate-page.py as LEGACY_INSTALLER_URL /
LEGACY_PORTABLE_URL / LEGACY_MSI_URL.
generate-page.py:
- Drop the old Qt5/Qt6 dual-track rendering; INSTALLER_URL /
PORTABLE_URL / MSI_URL now point at the Qt6 build directly.
- Add an optional "Windows — x86_64 — Qt5 (legacy, unmaintained)"
card, rendered only when LEGACY_* URLs are set, with a frozen/
no-longer-updated notice.
Before merging: manually trigger the current (pre-merge) "Windows
Build" + "Windows MSI" workflows once to publish an up-to-date,
signed Qt5 snapshot — that run becomes the frozen legacy reference,
since the Qt5 job won't exist to re-run afterwards.
No changes to QElectroTech.wxs (Qt5/Qt6-agnostic, only
QtPlatformArgs varies and is already handled at the CI level).
New QLineEdit (m_potential_le) between Type and Nom: an optional,
symbol-author-chosen grouping identifier shared by terminals that
belong to the same physical terminal within a multi-terminal block.
Stored as TerminalData::m_potential (new field, persisted as the
"potential" XML attribute, empty by default).
Used by relatedPotentialTerminal() in terminal.cpp: when
potential_isolating is enabled on a Terminal-type element, terminals
sharing a non-empty, matching potential value now stay electrically
linked to each other instead of every terminal in the block being
isolated from every other one.
Tooltip on the field for explanation
Elements already inherited QetGraphicsItem::isMovable()/setMovable() --
the same mechanism images and drawn shapes use for their "lock position"
checkbox -- but nothing exposed it in the element properties panel, and
Element::toXml()/fromXml() never persisted it.
- ElementPropertiesWidget::generalWidget(): add a "Verrouiller la
position" checkbox mirroring ShapeGraphicsItemPropertiesWidget's
m_lock_pos_cb, toggling the element's inherited setMovable().
- Element::toXml()/fromXml(): persist is_movable, same attribute name
and default-true behavior as DiagramImageItem/QetShapeItem.
Verified via headless --resave round-trip: is_movable="0" survives
load -> save unchanged, existing elements without the attribute default
to movable.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HdWpDp3TrPKbHnv7YUcNJj
DiagramView::zoom() had the same unbounded scale() as the element editor:
a held scroll-wheel zoom could overflow the view transform. Clamp the
resulting scale to [m_min_zoom, m_max_zoom] before applying it.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HdWpDp3TrPKbHnv7YUcNJj
ElementView applied scale() on every wheel notch with no bound on the
resulting view transform. Held down, the scroll-wheel zoom drives the
transform scale (m11) to floating-point overflow; the transform becomes
non-invertible, mapToScene() returns NaN and the next background paint
aborts the editor ("program closes completely" as reported on Windows).
Route zoomIn/zoomOut/zoomInSlowly/zoomOutSlowly through a new
scaleClamped() helper that only applies the scale while the result stays
within [m_min_zoom, m_max_zoom] (0.1 .. 200). Behaviour within that range
is unchanged.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HdWpDp3TrPKbHnv7YUcNJj
CFBundleIconFile in misc/Info.plist was set to qelectrotech.icns, including the file extension.
Per Apple convention this key should hold the icon name without the extension — macOS appends .icns itself.
On recent macOS versions this mismatch causes the Finder to fall back to the generic placeholder icon instead of the actual app icon.
Fix: CFBundleIconFile → qelectrotech (no extension), matching the existing CFBundleTypeIconFile entries (elmt, titleblock, qet) which were already correct.
**1. `autonumberingmanagementw.ui`: legacy Qt5 font weight**
`uic` emitted `font.setWeight(75)` / `setWeight(50)` from old `<weight>` XML properties. Qt6's `QFont::setWeight()` takes a `QFont::Weight` enum instead of a raw int, so this fails to compile. GCC apparently tolerates it as a warning (`-fpermissive`), but it's a hard error on Apple Clang. `<bold>` was already set on every affected widget, so the `<weight>` tags were redundant — dropped.
**2. `CMakeLists.txt`: no macOS app bundle**
The executable target had no macOS-specific handling (`if(WIN32)/else()` only), so CMake produced a flat Mach-O binary instead of a `.app` bundle — nothing for `macdeployqt`/codesign/DMG steps to package. Added `MACOSX_BUNDLE` via `set_target_properties(APPLE)`. This in turn made `install(TARGETS ...)` fail configure (`no BUNDLE DESTINATION for MACOSX_BUNDLE executable`), so added `BUNDLE DESTINATION .`. Both changes are no-ops on Linux/Windows.
Built successfully end-to-end with `MacQetDeploy_arm64_cmake.sh` on macOS 14, arm64, Qt 6.11.1 (Homebrew) + KF6.
Without this, CMake produced a plain Mach-O binary on macOS instead
of a .app bundle, so MacQetDeploy_arm64_cmake.sh's cp/macdeployqt/
codesign steps had nothing to package. No effect on Linux/Windows.
Qt6's QFont::setWeight() now takes a QFont::Weight enum instead of
a raw int, so uic-generated code from the old <weight>75/50</weight>
XML properties fails to compile (worked on GCC via -fpermissive,
but hard error on Apple Clang for the macOS build).
<bold> is already set on all affected widgets, so <weight> was
redundant and can be dropped without any visual change.
Follow-up to the review of #790: four pre-existing messages whose source
is the DEGREE SIGN (U+00B0) were translated with the MASCULINE ORDINAL
INDICATOR (U+00BA) — GeneralConfigurationPage, IndiTextPropertiesWidget,
ReplaceConductorDialog and TextEditor. They render as an ordinal in the
rotation spin box suffixes.
Also fixes punctuation in the two SelectAutonumW help texts: a stray
space in "N ° página" / "n ° da página" and two unbalanced quotes.
Sources, comments, message count and ordering are untouched (2850
messages, 0 unfinished); .qm regenerated with lrelease.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N9qWZfNpKZqrAzUE2QB3TJ
QString::toDouble() reports a successful conversion for "nan"/"inf"/
"-inf" -- confirmed directly -- so the existing conv_ok checks in
Element::valideXml() and Terminal::valideXml() never caught a
non-finite x/y. A NaN-positioned element reaching the scene can hang
QGraphicsScene::addItem() forever: an existing conductor's itemChange()
runs a collision test (calculateTextItemPosition() ->
QGraphicsItem::collidesWithPath()) whose underlying QPathClipper spins
without terminating when fed a NaN-valued QPainterPath, since NaN
breaks the ordering comparisons the clipping algorithm's termination
depends on (#781). Short of that, a non-finite value that doesn't
happen to trigger a collision test simply gets written straight back
out on save with nothing to stop it (#782).
Element::valideXml() and Terminal::valideXml() now also check
qIsFinite() on the parsed x/y, rejecting the whole item the same way a
missing attribute already does. DynamicElementTextItem::fromXml() has
no such reject-the-item gate (void return, no caller check), so its x/y
are clamped to 0 instead -- the same fallback the attribute lookup
already uses when x/y is missing entirely.
Verified against both original findings' exact repro steps:
- #781: Habitat-Unifilaire.qet with x="nan" on one element -- hung
(SIGTERM'd by a 25s timeout) on an unfixed build, resaves cleanly
(exit 0) on this one.
- #782: grafcet.qet with y="nan" on a dynamic_elmt_text -- the value
passed straight through to the resaved file on an unfixed build;
clamped to 0 on this one. The specific field is now stable (y="0" on
two consecutive resaves) where it read "nan" both times before.
(grafcet.qet has an unrelated, already-known, unmerged fix
(PR #779) for element/terminal-order non-determinism, so a whole-file
diff across resaves still differs for reasons unconnected to this
change -- checked the specific once-NaN field in isolation instead.)
- Also checked -inf on affuteuse_250h.qet: same rejection, same result.
Full qet-dbcheck.py sweep of the unmutated example corpus (23
projects), 0 regressions.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Finish the 364 messages still marked unfinished in lang/qet_pt_BR.ts,
bringing pt_BR from 87.2% to 100% of the 2850 messages. Of those, 228
were empty and are translated here; the remaining 136 carried Linguist
suggestions that were reviewed, 14 of them corrected. Several contexts
were previously untranslated in full: ContactGroupSelectionDialog,
PlcLinkWidget, TerminalNumberingDialog, ShortcutsConfigPage,
BackupDialog, DiagnosticsReportDialog, GuidesPropertiesWidget,
PdfPagesDialog and EdzArchive.
Terminology follows what the file already established: "borne" ->
"terminal", "bornier" -> "régua de terminais", "folio" -> "página",
"cartouche" -> "bloco de legenda", "schéma" -> "esquema",
"maître/esclave" -> "mestre/escravo", "pivoter" -> "girar". PLC terms
use the Brazilian abbreviation CLP, and NO/NC contacts use NA/NF.
Notable fixes among the reviewed suggestions: "Annuler" read "Desfazer"
(undo) where it is a dialog button next to OK, and the degree symbol
used U+00BA MASCULINE ORDINAL INDICATOR instead of U+00B0 DEGREE SIGN.
Only <translation> elements are touched; sources, locations and
comments are unchanged. lang/qet_pt_BR.qm is regenerated with lrelease.
QETProject::removeDiagram() detaches a diagram from m_diagrams_list and
schedules it via deleteLater(), but that deferred delete only runs on
a future event-loop iteration. If ~QETProject() runs first (e.g. a
CLI/headless caller with no event loop, or a project closed
immediately after removeDiagram()), the diagram is still a QObject
child of the project and gets destroyed later by QObject's own
automatic child cleanup -- which runs after m_data_base has already
been torn down as a plain C++ member. Diagram::~Diagram() calls back
into dataBase()->removeElement() for each of its elements, so that
ordering is a use-after-free (SIGSEGV in QSqlResult::exec()).
Delete any such still-parented diagrams synchronously in ~QETProject()
while m_data_base is still alive, before the base QObject destructor
runs. Any deleteLater() event that does eventually fire afterward is a
safe no-op on an already-deleted QObject.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ProjectConfigPage::init() is documented as "Typically, you should call this
function in your subclass constructor" -- it runs initWidgets(), initLayout(),
and (if a project is set) readValuesFromProject() and adjustReadOnly(), in
that order. ProjectMainConfigPage's constructor follows this. Until now,
ProjectAutoNumConfigPage's did not: it called initWidgets(), its own
buildConnections(), and readValuesFromProject() directly, skipping both
initLayout() and adjustReadOnly() entirely, and calling
readValuesFromProject() with no null-project guard.
In practice this was harmless today -- this subclass's initLayout() and
adjustReadOnly() overrides are both empty, and every construction site
happens to pass a real project -- but it is exactly the kind of latent
inconsistency Joshua's own refactor notes call out for this class ("remove
inconsistent virtual method usage... allow subclasses independent
implementation"). The day someone fills in adjustReadOnly() for this page
(e.g. to disable auto-numbering editing on a read-only project, which is
what the empty override's own doc comment says it is for), the constructor
path would silently never call it.
Fixed narrowly: the constructor now calls init() like its sibling does.
buildConnections() moves to the end of initWidgets(), the same relative
position it held in the constructor, so behaviour for the paths already
exercised is unchanged. This is the safe, no-redesign half of Joshua's
note; removing the init()/initWidgets()/initLayout()/readValuesFromProject()
scaffolding itself, so subclasses are free to sequence things however they
want, is a real redesign of the ConfigPage contract and needs his sign-off
on what should replace it -- not attempted here.
Verified with a GUI capture rather than by reading: opened Project
Properties on examples/industrial.qet, selected "Numérotation auto", and
confirmed the Management tab renders with its saved policy (Conductor/Element
"Both", "Apply to Entire Project") and the Conducteurs tab's combo box comes
up pre-populated with the project's saved context ("de la nouvelle
numérotation"), which on selection correctly fills the Type/Valeur/Formule
fields -- proving both readValuesFromProject() and the buildConnections()
signal wiring still work end-to-end through the new call sequence.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
removeDiagram() only ever deleted the diagram's own row. No foreign key in
this schema is declared ON DELETE CASCADE (and SQLite foreign-key
enforcement is never turned on for this connection anyway), so removing a
diagram left every element, element_info, terminal and conductor row that
belonged to it behind in the database -- silently, since nothing reads them
until the next full updateDB() rebuild papers over it.
Traced why this had never crashed anything: Diagram::~Diagram() explicitly
walks and deletes its top-level items through removeItem() (which does call
dataBase()->removeElement() correctly), but deliberately skips conductors --
because a conductor's destructor touches both of its terminals
(terminal1->removeConductor(this)), and those terminals may belong to an
element already destroyed earlier in the same sweep. Conductors are instead
destroyed as a side effect of Terminal::~Terminal()'s qDeleteAll() on its own
conductor list, which is a plain C++ delete that never goes through
Diagram::removeItem() and therefore never calls dataBase()->removeConductor()
at all. So the object graph is torn down safely, but the database is never
told about the conductors or their terminals.
Fixed by adding the missing bulk deletes to projectDataBase::removeDiagram()
itself, run while the diagram (and its live scene) still exist -- verified
that QETProject::detachDiagram() emits diagramRemoved() (which this class's
constructor connects to this slot) synchronously, before the Diagram object
is scheduled for destruction via deleteLater(), so nothing here races the
C++ teardown described above. Order matters: element_info and terminal have
no diagram_uuid column of their own, so both are scoped through a subquery
on element and must run before element itself is deleted.
Verified against examples/industrial.qet (50 diagrams) by calling
projectDataBase::removeDiagram() directly and comparing table counts before
and after, with no intervening updateDB() call to mask a gap:
element=354->335 element_info=354->335 terminal=1087->1033 conductor=671->626 diagram=50->49
Every delta matches a direct SQL count for that diagram's own rows exactly
(19 elements, 54 terminals), and both "orphan rows still referencing the
removed diagram" checks read 0 afterward -- so the cascade is complete and,
just as importantly, scoped: nothing belonging to the other 49 diagrams
moved.
Separate finding, not fixed here: QETProject::removeDiagram(Diagram*) (the
synchronous, non-undoable variant, not the usual GUI
ProjectView::removeDiagram() path) segfaults if the enclosing QETProject is
destroyed before an event loop iteration lets its pending deleteLater() run
-- reproduces identically on unmodified master, so it predates and is
unrelated to this change. Worth its own report; a headless caller is the
only realistic way to hit it, which is how this surfaced.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
ElementQueryWidget::queryStr() reads FROM element_nomenclature_view, and that
view already excludes flagged elements in its own WHERE clause (see
createElementNomenclatureView() in projectdatabase.cpp). This widget then
added a second condition on top: "exclude_from_bom IS NULL OR
exclude_from_bom != '1'" -- but nothing anywhere ever writes the literal
string "1" to this key (the only writer stores "true"/"false"), so the
clause was true for every row that could possibly reach this point and did
nothing.
Confirmed dead three separate ways while reviewing qelectrotech#765: reading
the value only ever comes back "true" or "false" (never "1"), an
exclude_from_bom="1" element still appeared in --export-bom output on a test
fixture, and the surrounding filter_ construction shows this AND'd clause
cannot change the query's result set regardless of what filter_ already
holds. Confirmed it a fourth way once already, by initially misreading this
same clause as evidence the feature was broken -- it was reading the WHERE
without the FROM three lines above, which is exactly the trap being removed
here for the next reader.
ElementQueryWidget backs the BOM export dialog and the diagram table
properties widget; neither has a headless CLI equivalent, so this could not
be verified end-to-end through --export-bom the way the case-insensitivity
fix could. Verified instead: the file compiles clean, and a
load/resave/--export-bom smoke test on examples/tremie_vibrante.qet shows no
change in app behaviour (98 components, matching the pre-change baseline --
expected, since --export-bom does not go through this widget at all).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Saving an unmodified project produced a different byte stream on
every run: QGraphicsScene::items() returns items in stacking order,
and ties between same-Z items follow the scene's internal index --
not any content-derived order -- so it isn't reproducible across
process runs. The legacy terminal-id table inherits the same
instability, since ids are assigned sequentially in element order.
Sort list_elements and list_conductors into a deterministic order
before serializing, using a key built from data that's actually
stable across loads (position), not Element::uuid()/Conductor::uuid():
for an item with no persisted uuid attribute, fromXml() invents a
fresh random one on every load, so sorting by uuid would still be
non-deterministic across process runs for any legacy file -- which
this corpus has plenty of.
Also fixes a second, related source of byte-level non-determinism
found while verifying the above: Conductor::toXml() unconditionally
wrote m_uuid back out, including the synthetic value fromXml() just
invented for a conductor with no uuid attribute in the file. Every
conductor in every example project checked has no persisted uuid at
all, so this alone meant no project with conductors could ever
resave identically, regardless of ordering. Conductor gets a
m_persist_uuid flag, false only when the uuid it's holding was
synthesized rather than loaded, so toXml() stops writing a value
that was never meant to be permanent.
Deliberately NOT applying the same uuid-persistence fix to Element:
element uuids are cross-referenced by other elements' <links_uuids>
blocks for master/slave/report linking (element.cpp, tmp_uuids_link,
matched by elmt->uuid() == stored uuid on load). Making an element's
own uuid non-persistent would silently break that match for any
linked element without one already -- a real regression, not a
theoretical one. Left as a smaller, separate residual: 1-6 elements
per project across the corpus (a few tenths of a percent) still get
a fresh uuid on each load, same class of bug, needs the link-aware
version of this fix instead of this one.
Verified against 8 example projects (the ones with conductors, plus
the two zero-conductor control cases from FINDINGS.md F002), 5
resaves each in isolated HOME/XDG environments:
- Element and conductor ORDER: 0 churning sections across the whole
corpus (previously the majority of diagrams in industrial.qet,
m_000.qet and tremie_vibrante.qet churned on every run).
- Conductor uuid VALUES: 0 churn (previously every conductor in
every project, since none have a persisted uuid).
- 6 of 8 projects are now byte-for-byte identical (md5) across all 5
runs. The remaining 2 (industrial.qet, m_000.qet) differ only in
the handful of element uuids covered by the known Element residual
above -- confirmed by checking those uuids specifically, not
inferred.
- Element/conductor counts before and after resave match exactly on
every project (no data loss from the sort).
Fixes#754.
redo() has a direct-write path guarded by m_first_time: on the very
first call it writes the property immediately, and only animates on
calls after that (per setAnimated()'s documented contract). undo()
had no equivalent -- it always animated, so undo() both returned
before the property was restored (stale state visible to anything
sharing the call stack) and, with no running event loop, never
restored it at all.
The obvious fix -- reuse m_first_time in undo()'s guard too -- turns
out not to work, and I verified this with a standalone build before
picking an approach: QUndoStack::push() always calls redo() once
before any undo() can run, and redo()'s direct-write branch sets
m_first_time = true as it completes. So by the time undo() is ever
called, m_first_time has already flipped, and reusing it would make
undo() take the animate branch on every call, unconditionally --
syntactically symmetric with redo(), but behaviourally unchanged for
the exact scenario reported.
Instead, undo() gets its own m_undo_first_time flag, seeded from the
same first_time argument setAnimated() already takes, and set true by
undo()'s own direct-write branch the same way m_first_time is set by
redo()'s. That gives undo() a real, reachable direct-write path on its
own first call, independent of how many times redo() has already run.
Verified against a standalone build of just this class (as the issue's
own repro does): first redo and first undo are both now synchronous
with no event loop running; with an event loop present, both settle to
the correct value once "broken in"; behaviour for every other caller
of QPropertyUndoCommand -- everywhere that calls plain enableAnimation()
or the bare setAnimated() (first_time defaulting true) -- is provably
unchanged, since m_undo_first_time starts true either way and the
animate branch never modifies it.
Fixes#755.
- Remove dead #if QT_VERSION conditionals (both branches were identical)
- Add settings.remove() guard on restoreState() failure consistently
across all three editors (now safe since all run after show())
The Windows Qt5 build is going to be removed from CI/CD soon (Qt6/KF6
is becoming the sole supported track). Replace the 'experimental'
warning wording on the nightly download page and in the nightly
release body with a call to action inviting users to switch to Qt6
now and report issues, ahead of the Qt5 removal.
QPdfDocument::pagePointSize() (used for PDF page import) requires
Qt >= 6.4, and the QtPdf module itself is missing entirely on some
Qt6 distributions (e.g. the Flatpak org.kde.Platform runtime), since
it ships from the qtwebengine source tree rather than Qt6 core.
CMake: probe Pdf with find_package(... QUIET) instead of REQUIRED,
mirroring the existing GuiPrivate pattern. Define QET_HAS_QTPDF
only when the module is found AND Qt >= 6.4.
Replace the ad-hoc QT_VERSION_CHECK(6, 0, 0) / (6, 4, 0) guards in
qetdiagrameditor.cpp, diagrameventaddpdf.{h,cpp} and
pdfpagesdialog.{h,cpp} with #ifdef QET_HAS_QTPDF, so version and
module-availability checks live in one place.
Fixes the Flatpak build (missing Qt6Pdf) and the Windows/Debian CI
failures (QPdfDocument::pagePointSize undeclared on Qt < 6.4). The
PDF import toolbar action is now silently unavailable wherever
QtPdf isn't usable, instead of breaking the whole build.
Compiled into the binary but never instantiated -- searching the tree
for any reference outside its own three files finds nothing, and this
still holds on current master. Contains a latent bug that would be
user-visible if the widget were ever reachable
(on_tableDiagram_customContextMenuRequested compares QMenu::exec()'s
return value against one action but falls through to "select all" on
both the other action and on a plain dismiss, since exec() returns
nullptr on Escape/click-away and that's not equal to either QAction*),
which supports genuine disuse rather than temporary disconnection.
Removed the three files and their three explicit entries in
cmake/qet_compilation_vars.cmake (qelectrotech.pro globs sources/ui/*
so needs no change). Builds clean; no other file references
diagramselection.
Fixes#756.
checkConflicts() compared key sequences across the whole registry, but
QElectroTech deliberately registers one key per editor window: Undo,
Redo, New, Open, Save and Ctrl+Shift+S each exist three times, once for
the diagram, element and titleblock editors. Those are not collisions --
they act on different windows.
The result was that 60 of the 95 shipped default bindings displayed as
conflicts, so the indicator carried no information and the page looked
broken on first open.
Conflicts are now keyed on (category, sequence). The category is the
registry's existing per-window grouping, so no new concept and no
ShortcutManager API change is needed.
Fixes#757
m_jump_to_element was the only action in the tree that set its
QKeySequence directly instead of going through
ShortcutManager::registerAction() -- of 98 actions carrying a runtime
shortcut, 95 matched a registerAction() call, 2 were Qt built-ins, and
this was the sole exception (verified by dumping every QAction from a
running instance and cross-checking against a static scan of the
source; the only other setShortcut() call in the tree clears a
shortcut rather than setting one).
Bypassing the registry meant the binding didn't appear on the
Shortcuts preferences page (so it couldn't be discovered or rebound),
and checkConflicts() couldn't see it either, so assigning Ctrl+G to
another action there would silently collide at runtime instead of
being flagged.
Fixes#758.
Apply the same split readSettings()/readSettingsState() pattern from
QETDiagramEditor to the other two main windows:
- QETElementEditor: split in constructor, call readSettingsState() after show()
- QETTitleBlockTemplateEditor: split readSettings(), callers call
readSettingsState() after show() (newTemplate + 2x openTitleBlockTemplate)
- Remove destructive settings.remove() guards that would delete saved
state on every Qt6 launch when restoreState() fails before show()
Co-authored-by: ispyisail
- Add DPI selection (150/300/600) to the page selection dialog
- Add live page preview in the selection dialog
- Conditionally compile PDF import only for Qt6 (#if QT_VERSION)
- Add custom pdf-import icon (PDF document with + symbol)
- Register new icon in qelectrotech.qrc
- Qt5 builds: PDF import action is hidden, everything else works as before
setTabVisible(1, ...) only allowed Simple and Master, but the tree
(updateTree()) and the actual write path (ElementScene::toXml()) both
already support elementInformations for Terminal and Thumbnail too --
three independent "is this type allowed" checks that were never
reconciled, leaving already-working support unreachable through the
UI for those two types. Slave stays excluded here, consistent with
having no elementInformations support at either of the other two
points either (separate, larger gap, not addressed here).
"false" writes, delete key instead
Unchecking a checkbox previously wrote the key with value "false"
rather than omitting it -- behaviorally identical to every consumer
(all three do a case-sensitive == "true" comparison), but left dead
entries cluttering the .elmt file, inconsistent with how other
elementInformation fields (manufacturer, designation) are only present
when actually set. Now removes the key entirely when unchecked.
excludedConductorCount() counted conductors whose terminals had no uuid,
which was the right rule when that was the reason they were dropped. It no
longer is: Terminal::stableUuid() derives an identity from the terminal's
geometry, so those conductors are in the table.
Left unchanged, the dialog would have told the user "671 conductors excluded"
on industrial.qet while listing all 671 of them -- a worse failure than the
one the count exists to prevent, because it undermines a list that is now
correct.
The count and the dialog's explanation both now describe the case that
actually remains: an endpoint attached to no element at all, which has no
identity to key on under any scheme.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The summary line exists so that an empty wiring list is distinguishable
from one where every conductor was excluded, and it was reporting the wrong
number to do it. QSqlQueryModel fetches lazily, so rowCount() straight after
setQuery() returns the rows fetched so far -- 256 -- not the size of the
query. Measured with Qt's own QSQLITE driver: a 1000-row view reports 256
until the model is drained, then 1000. The test project quoted in slice 2
has 280 conductors, so this was already displaying 256 on our own data,
plausibly enough that nobody looked twice.
Drain the model before reading the count.
Also refresh the database before building the model. The dialog queries the
database rather than the diagrams, so anything not yet written through was
invisible here; with conductor text now updated on change that gap is
smaller, but a project loaded before this dialog was ever opened still
relies on the repopulate.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The element and element_info tables had two independent insert paths --
addElement() for an element added to a live diagram, and
populateElementTable()/populateElementInfoTable() for a full rebuild --
which bound the same row differently. The incremental path wrote
kindInformations()["type"] into element.sub_type; the bulk path wrote
elementData().masterTypeToString(). So the table held different values
depending on whether the project had been reloaded since the element was
placed, and element_nomenclature_view exposes that column as
element_sub_type, which ElementQueryWidget filters on for the Coil,
Protection, Commutator and PLC nomenclature options.
That divergence is the same shape as the type-filter one fixed in the
previous commit, and it is the reason this stack kept finding bugs that
were invisible while editing and only appeared after a reload. Rather
than correct a second instance of it, both paths now go through
bindElementValues() and bindElementInfoValues(), following the
bindDiagramInfoValues() helper this class already had. Live and reloaded
now agree by construction instead of by coincidence.
The bulk path's values are the ones kept, because they are what every
already saved project contains: nothing a reload produces changes, and
the previous commit's 19-project BOM regression stays valid. It is the
live path that moves, onto the values a reload would have given it
anyway.
Measured, placing one element into a new project and then saving and
reopening it:
live element table: slave/ x1
reloaded element table: slave/ x1
and for the same element, what the two paths would have stored:
bulk (now shared): "" incremental (before this commit): "simple"
Re-ran the BOM regression over the same 19 projects after this change:
content identical to the pre-change baseline on all 19, and identical
line-for-line on 18, the exception being the three byte-identical
photovoltaique rows already described in the previous commit.
Note for anyone reading masterTypeToString(): the const no-argument
overload returns an empty string for anything that is not a Master, so
the "coil" fallback in the static overload is only reached for real
master elements. Non-master elements get an empty sub_type, not a
spurious "coil".
Closes the gap left open by the previous commit, at the root rather than
around it.
populateElementTable()/populateElementInfoTable() only inserted elements
matching Simple|Terminal|Master|Thumbnail. That quietly made the element
table mean "the elements a nomenclature cares about" rather than "the
elements of the project": slave elements (relay contacts) and report
elements -- ordinary conductor endpoints -- had no row at all after a
project load, so the wiring list could not name either end of a wire
that terminated on one.
Both tables are now populated with every ElementData::Type, and the type
restriction moves into element_nomenclature_view, which is where a
"what belongs in a bill of materials" decision belongs. The mask in the
view is character-for-character the one the population used to apply, so
a relay contact is still not a BOM line item.
This is safe to do in one place because every consumer of the project
database goes through a view: element_nomenclature_view (the on-diagram
nomenclature table via ElementQueryWidget, the BOM dialog, and the
--export-bom CLI) or project_summary_view (which does not reference
element at all). Nothing queries the element or element_info tables
directly -- checked across the whole tree.
Regression evidence. --export-bom runs updateDB() and then queries
element_nomenclature_view, so it is an exact harness for what the GUI
BOM shows. Captured for 19 projects (all 17 usable examples/ plus two
slave-element fixtures) before and after:
- BOM content byte-identical on all 19, compared as a multiset.
- 18 of 19 are also identical line-for-line in order.
- photovoltaique differs only in the position of three byte-identical
rows among themselves. Its query is ORDER BY label and those rows
share an empty label, so their relative order was never defined;
they are indistinguishable in the output. The on-diagram
nomenclature orders by every displayed column, so a tie there means
the rows are identical on screen too.
Effect on the wiring list, same project and same reload path: element_info
rows 0 -> 2, and the two component columns go from blank to K2 -> K1.
Cost: the database phase of loading examples/industrial.qet (150 folios,
1794 terminals) moves from 0.210 s to 0.233 s.
Slice 4 of discussion #503, on top of slice 3 (#629): the smallest
surface that makes wiring_list_view visible, plus the diagnostic the
view needs to be honest about what it is missing.
Projet > "Liste de câblage (base de données)" opens a read-only table of
wiring_list_view, headed by a line stating how many conductors are
listed and, when non-zero, how many were excluded and why.
Deliberately not another exporter. QET already ships a wiring-list CSV
export (Projet > Exporter le plan de câblage, and --export-cables) which
walks the project XML; measured on the same projects it produces a row
per conductor and resolves labels correctly when the project has them.
Adding a second, competing CSV would be worse, not better -- the
database path's value is what it unlocks (terminal plans, BOM joins),
not replacing that export.
projectDataBase::excludedConductorCount() counts, from the live scene,
the conductors deliberately absent from the conductor table because a
terminal has no uuid. Counted from the scene precisely because the
database is where those conductors are not. Verified: 671 on
examples/industrial.qet (which has 1794 terminals and no terminal uuids
at all, so its list is empty and now says so), 0 on a project whose
elements do carry terminal uuids.
KNOWN GAP, not fixed here and the reason this is opened for discussion
rather than merge: after a save/reload the component columns are blank
for slave elements. populateElementTable()/populateElementInfoTable()
only insert Simple|Terminal|Master|Thumbnail, so slave elements -- relay
contacts, i.e. a large share of real wire endpoints -- have no row in
element_info for the view to read a label from. Measured on a two-slave-
contact project after reload: element rows 0, element_info rows 0,
terminal rows 2, conductor rows 1; the wire is listed (slice 3's LEFT
JOIN keeps it) but both component names are empty, where the existing
CSV export shows K1 -> K2 for the same file.
Closing that gap means widening a filter shared with the nomenclature
and summary views, which would change what those existing, shipped
features contain. That is a maintainer decision, not one to take
unilaterally inside an additive slice.
The wiring_list_view added by this slice was only reachable through the GUI,
which meant the one thing worth proving about it -- that it still describes
the project -- could not be checked without a person clicking. This is the
same shape as the existing --export-bom, which reads
element_nomenclature_view, and it makes the view verifiable in CI.
It also makes this slice useful on its own: a from-to wiring list is a thing
people want as a CSV, and it no longer waits on the dialog in the next slice.
There is deliberately an overlap with --export-cables, which produces the same
logical list from the document XML rather than the database. Keeping both is
the point: running them and diffing them is a direct check that the cache and
the document still agree, which nothing else in the codebase can do.
Measured on the example corpus, the two also differ in what they can actually
fill in. Rows carrying any endpoint data:
--export-cables --export-wiring
industrial.qet 0 / 671 541 / 671
m_000.qet 0 / 457 362 / 457
affuteuse_250h.qet 0 / 263 197 / 263
tremie_vibrante.qet 0 / 77 61 / 77
tableau_domestique.qet 58 / 130 104 / 130
Both return a row per conductor; the XML-derived one leaves the component and
terminal columns empty on the older projects, and emits an unresolved "%id"
in its folio column. That is not an argument for removing it -- it carries
columns the view does not, and it is the independent second opinion -- but it
does mean the database path is the one with the data on the projects people
actually have.
The terminal-name columns come back empty on most projects. That is absent
source data, not a loss in transit: tableau_domestique.qet has no terminal
name on 457 of 457 terminals, and industrial.qet stores the "_" placeholder
on 1421 of 1790.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The comment above this view promised that it "returns exactly as many rows
as the conductor table holds", and argued carefully for the two joins that
could have broken that -- no inner join to element, and element_info LEFT
joined. Then it ended with an inner join to diagram that it never mentioned,
which can drop rows just as easily.
Feeding the real schema a conductor whose diagram_uuid has no diagram row
returned 2 view rows for 3 conductors. With the join made LEFT it returns 3,
with a null folio instead of a missing wire.
In practice this should never fire: QETProject::diagramAdded is connected to
addDiagram(), so the folio exists before anything can be drawn on it. But an
inner join turns that into an assumption the view enforces silently, and of
all the things this view can get wrong, dropping a wire from a wiring list
is the one that matters most. The comment now says which joins are inner and
why those two are safe.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Slice 3 of discussion #503, on top of slice 2 (#628). One row per
conductor, each endpoint resolved to its element label and terminal
name -- the `F1:4 -> M200:U1` shape from the original prototype.
The view deviates from the SQL sketched in the discussion in two ways,
both because the sketched version silently loses wires:
- **No join to the `element` table.** A terminal row already carries its
`element_uuid`, so joining `element` back just to read the same uuid
adds nothing. Worse, it filters: `populateElementTable()` only inserts
elements matching `Simple|Terminal|Master|Thumbnail`, so `Slave`
elements (relay contacts and the like -- extremely common at the end
of a wire) and report elements are simply absent from that table after
a project load, and an inner join through it drops their conductors.
- **`element_info` is LEFT joined** for the same reason. A wire whose
endpoint element has no info row still belongs in a wiring list; it
comes back with an empty label rather than vanishing. Losing a wire
from a wiring list is a worse failure than showing one with a blank
end.
Note this only bites after a save/reload. The incremental `addElement()`
path does not apply the type filter, so a slave element placed live is
present in `element`/`element_info` and an inner join looks fine -- it
is the bulk repopulate on project load that drops it. Testing only the
live-editing path would have missed this entirely.
Measured, comparing this view against an inner-join-through-element
variant built from the same tables in the same session:
| project | conductors | wiring_list_view | inner-join variant |
|---|---|---|---|
| Polonez MR'89 wiring diagram | 280 | 280 | 280 |
| two slave contacts, after save+reload | 1 | **1** | **0** |
Polonez happens to have no slave elements at conductor ends, so both
agree there and the problem is invisible. The second case is the
minimal reproduction: place two "Simple contact" elements
(`link_type="slave"`) so autoconnect wires them, save, reload -- the
sketched view returns zero rows for a project that plainly has a wire
in it.
Acceptance criterion held throughout: `wiring_list_view` row count
equals `conductor` row count, i.e. the view itself drops nothing.
Conductors already excluded upstream (legacy terminals without uuids,
see #628) stay excluded; that remains the only thing missing from the
list, and is what slice 4 should surface a count for.
The conductor table keyed on Terminal::uuid(), which comes from the catalog
.elmt definition and is empty for every element authored before that field
existed. A conductor was dropped unless *both* its terminals had one, so the
tables this slice adds were empty on almost every project in existence:
examples corpus conductor rows in the database
industrial.qet 0 of 671
affuteuse_250h.qet 0 of 263
tremie_vibrante.qet 0 of 77
741.qet 0 of 67
Across the 23 example projects, 16 of the 20 that contain conductors have
zero terminal uuids -- 2366 of 3002 conductors -- and overall coverage is
7.3%. Meanwhile --export-cables, already on master, lists all 671 conductors
of industrial.qet from the document. A feature that only works on newly
authored elements is not one users can rely on.
Terminal::stableUuid() returns the terminal's own uuid when it has one and
otherwise derives one from its local position and orientation inside its
element. That is not an invented scheme: it is what the project format
already does. TerminalData::fromXml() says so where it parses the field --
"if the attribute not exists, means, the element is created with an older
version of qet. So use the legacy approach to identify terminals" -- and the
legacy approach is the terminal's position. m_pos is read from the definition
and is not touched by moving the element on a folio, so the identity survives
loads, saves and folio moves. Derived values are UUID v5 in a fixed namespace,
so they are reproducible without being stored, and cannot collide with the v4
uuids the element editor generates.
Every project in the corpus now has exactly as many conductor rows as the
document has conductors -- 20 of 20 measured, 0 mismatches. (schema_indus.qet
is excluded: it blocks on a modal dialog at zero CPU under any CLI flag, the
pre-existing hang PR #661 addresses.)
Two things this deliberately does not key on:
- The terminal name. It is not stable: QET rewrites a terminal named "_" as
unnamed, which would have silently changed the identity of 1421 of
industrial.qet's 1790 terminals on their first resave. Measured across the
corpus, dropping it costs nothing -- geometry alone yields exactly the same
three collisions -- and it means renaming a terminal no longer changes what
it is.
- Uniqueness in the face of a definition that declares two terminals at the
same point and orientation. Three cases exist in the whole corpus. They
merge to a single terminal row, which is harmless: two terminals identical
in position and orientation are indistinguishable in every observable
respect, and every conductor on either still resolves to the right element
and terminal name. Both affected projects (industrial, perceuse) return
their full conductor count.
The only conductor still skipped is one whose terminal has no parent element,
which has no identity to key on at all.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Three fixes to the tables added by this slice.
A conductor's text was written once at insert and never again. Renaming a
wire left the database holding the old number, so the wiring list showed a
stale value until the next full repopulate -- elements have
elementInfoChanged() for exactly this and conductors had nothing.
Conductor::setProperties() has around a dozen call sites (auto-numbering,
the properties dialog, element moves, the delete command's re-links), so
rather than adding a call to each and missing the ones added later, listen
to the propertiesChange() signal it already emits. Qt::UniqueConnection
means a repeated insert or a full repopulate cannot double-subscribe, and
the connection is established on both insert paths because conductors read
from a file never pass through addConductor().
addConductor() and populateConductorTable() each carried their own copy of
the same seven bindValue() lines. They had not drifted yet, but that is the
same duplication the element paths had before bindElementValues(), where
they had drifted -- one binding kindInformations()["type"] and the other
masterTypeToString(). One bindConductorValues() for both.
Finally, index the conductor columns that get looked up per element rather
than per conductor. element_nomenclature_view counts the wires touching each
element with a correlated subquery, so without an index every element row
full-scans the conductor table and the cost grows as elements x conductors.
Measured on a standalone SQLite harness at 2000 elements x 5000 conductors:
2134 ms unindexed, 10 ms indexed. diagram_uuid is indexed too, since the
wiring list view joins on it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Slice 2 of discussion #503 (from-to wiring list built on projectDataBase),
building on the conductor uuid from slice 1 (#625). Pure plumbing: two
new additive tables plus their populate/add/remove hooks. No view, no UI,
no visible behavior change yet -- the wiring-list view is slice 3.
Follows the existing shape of the class throughout: same table/column
naming, same prepared-statement idiom in prepareQuery(), same
bind/exec/qDebug-lastError error handling, same DELETE-then-loop
populate pattern.
- `terminal (uuid, element_uuid, name)` and
`conductor (uuid, diagram_uuid, terminal1_uuid, terminal1_element_uuid,
terminal2_uuid, terminal2_element_uuid, text)` created alongside the
existing tables in createDataBase().
- populateConductorTable() added as a fifth populate* call in updateDB().
Terminal population is folded into it, since a terminal only matters
here in the context of a conductor referencing it.
- addConductor()/removeConductor() hooked into the already-existing
Conductor::Type branch of Diagram::addItem()/removeItem(), mirroring
the Element::Type branch directly above.
Two things the original schema sketch in the discussion got wrong, found
by testing rather than inspection:
1. Terminal::uuid() is NOT unique per placed terminal. It is the
terminal-position id baked into the catalog .elmt definition ("the
top terminal"), so every placed instance of the same catalog element
shares it. A terminal instance is only uniquely identified by
(uuid, element_uuid) together, so that pair is the terminal table's
primary key and the conductor table carries both halves for each
endpoint. With uuid alone as PK, the second placed instance of any
element silently lost its terminals to the INSERT OR IGNORE.
2. Conductors whose terminals predate terminal uuids are omitted rather
than given a fabricated identity, as agreed in the discussion. This
turns out to matter far more than expected in practice -- see below.
Testing (all live, in the running app):
- Incremental add: fresh project, two vertically aligned contacts placed
so autoconnect creates a conductor -> 2 terminals, 1 conductor.
- Incremental remove: deleting that conductor -> conductor count 1 -> 0.
- Undo: ctrl+Z after the delete -> back to 1, no duplicate-primary-key
error (the same Conductor object keeps its uuid).
- Bulk populate: examples/weneedpolonez-Polonez_MR89_wiring_diagram.qet
(366 conductors) -> 478 terminals, 280 conductors; the 86 conductors
touching legacy terminals correctly omitted.
- Join correctness: conductor -> terminal (composite key) -> element_info
resolves real from-to rows with real element labels.
- Legacy-only project: examples/industrial.qet has 1794 terminals and
*zero* terminal uuids, so all 671 of its conductors are omitted. Loads
and renders fine, no crash, no spurious rows -- but worth stating
plainly that a from-to wiring list for that project would be empty
today. This is a property of the element catalog definitions, not of
the project file, and is the strongest argument for surfacing an
"N conductors excluded" count to the user when the view lands.
- No SQL errors logged in any of the above.
Known limitation, consistent with existing behavior: removeDiagram()
does not cascade-delete the conductor rows of that diagram, exactly as
it already does not cascade to element/element_info. A full updateDB()
rebuild clears them, and the future wiring-list view INNER JOINs from
conductor, so orphan terminal rows never surface.
ElementsPanelWidget::duplicateDiagram() round-trips the folio through XML
and then gives the copied *elements* fresh uuids, because element.uuid is
the primary key of the project database and a duplicate silently fails to
insert. Conductors now have the same problem and needed the same loop:
conductor.uuid is likewise a primary key, its insert is a plain INSERT
rather than INSERT OR IGNORE, and a failure only reaches qDebug(). Without
this, every wire on a duplicated folio is missing from the wiring list and
from the per-element wire count, with nothing shown to the user.
Verified against the real schema: inserting the same conductor uuid for a
second folio fails with "UNIQUE constraint failed: conductor.uuid", leaving
one row where two were expected.
Also harden the uuid read in Conductor::fromXml(). The default argument of
QDomElement::attribute() is evaluated whether or not the attribute exists,
so a uuid was minted for every conductor on every load and thrown away; and
the default only applies when the attribute is *absent*, so a present but
empty or malformed uuid="" parsed to a null QUuid rather than a fresh one --
and null uuids collide with each other exactly as duplicates do.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
checkboxes to the element editor
These elementInformation keys were previously only editable on an
already-placed instance (via ElementInfoWidget on the diagram side).
Since elementInformation values are seeded from the .elmt file's own
<elementInformations> block at placement time, a symbol author had no
proper way to set these as the *default* for every future placement --
only a workaround via the generic, unvalidated key/value tree.
Adds dedicated checkboxes to ElementPropertiesEditorWidget, mirroring
ElementInfoWidget's own labels/behavior: auto_num_locked and
potential_isolating inside the existing terminal-only group
(m_terminal_gb, shown only for ElementData::Terminal), exclude_from_bom
always visible regardless of type. Written after the generic tree loop
so they take precedence over any stale raw entry for the same key.
No new storage or file format change -- purely a missing editor UI for
an already-existing mechanism.
During an ESEvent, the mouse position was used without format with
`snapToGrid` to display the coordinates. However, since the `helpCross`
is positioned using `snapToGrid` during these events, the displayed
coordinates did not match the `helpCross` position.
The command for sending the coordinates has been moved to the
`ESEventInterface` to function 'updateHelpCross' and now transmits the
position of the intersection point of the helpCross lines.
Replace the flat QTableWidget with a QTreeWidget that groups actions under
one collapsible top-level node per category. Fix the search box so it also
matches the current key sequence (exactly), accepts multi-keyword queries
(AND, any word order) and is accent-insensitive, auto-expands matching
groups and shows an "N actions" count. Add a quick filter (all / bound /
unbound / conflicts) that combines with the text query. Conflict detection,
per-row reset, reset-all and persistence are preserved.
Co-Authored-By: Claude <noreply@anthropic.com>
switch runtime/sdk to org.kde.Platform/org.kde.Sdk 6.10
migrate qelectrotech module from qmake to cmake buildsystem
add config-opts: QT_VERSION_MAJOR=6, BUILD_WITH_KF=ON, BUILD_KF=OFF,
PACKAGE_TESTS=OFF, BUILD_PUGIXML=OFF, QET_EXPORT_PROJECT_DB=ON
drop fix-the-installation-paths.patch (qmake-only, obsolete under cmake)
re-attach fix-appdata.patch, previously unreferenced in sources
document open verification points for Qt6 private headers and the
SQLite driver, which have no Flatpak build-depends equivalent
The "Système de contacts modifié" warning in QETProject::addElement()'s
Erase branch called QMessageBox::warning directly, bypassing
QET::QetMessageBox and so the non-interactive guard. It is reachable
during a load, which is exactly the path this PR exists to unblock, so it
could still hang a headless run.
Behaviour is unchanged interactively, and unattended it now answers with
the Yes the call site already passes as its default -- the same "continue"
the previous code took.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
QET_MIME_PACKAGE_PATH was "../share/mime/packages/", a path relative
to CMAKE_INSTALL_PREFIX. This only worked by accident with the old
default prefix (/usr/local -> ../share resolves to /usr/share/mime,
the conventional system location regardless of app prefix).
With -DCMAKE_INSTALL_PREFIX=/usr (as used by Debian/Ubuntu packaging),
the same "../share" escapes /usr entirely, landing at /share/mime
instead of /usr/share/mime, which breaks dh_install (file not found
under usr/) and would silently install the mime package definition
outside any path desktop environments actually scan.
Drop the "../" so the mime package path stays under the install
prefix, matching standard practice (/usr/share/mime/packages or
/usr/local/share/mime/packages).
FetchContent_Declare unconditionally tries to clone SingleApplication
from GitHub, which breaks offline builds (e.g. Debian/Ubuntu pbuilder
with FETCHCONTENT_FULLY_DISCONNECTED=ON, Launchpad PPA builds).
If the SingleApplication submodule is already checked out in the
source tree, point FETCHCONTENT_SOURCE_DIR_SINGLEAPPLICATION at it so
FetchContent skips the network step entirely and reuses the local
copy. Falls back to the existing git clone behavior otherwise, so
this is a no-op for setups that don't vendor the submodule.
Follow-up to #740, which fixed the slave-side "(n-Xn)" cross-reference
label. The master-side item - the small table/cross drawn next to a
report or master element, listing where each of its slaves is used -
was still missing from DXF export. Measured against examples/
industrial.qet with the PDF export as an oracle (renders the whole
scene, so it shows what should be there):
before after PDF
slave xrefs "(n-Xn)" 41 41 41 (already fixed, #740)
folio/position strings 358 403 403
DXF now matches the PDF exactly.
## Why this needed a different approach than #740
The slave label is a plain QGraphicsTextItem - one string, trivial to
walk and re-emit as a single DXF TEXT entity, which is what #740 did.
The master-side item (CrossRefItem) is not: it paints itself with
~600 lines of hand-written QPainter calls across three modes
(drawAsCross/drawAsContacts/drawAsPlcTable), including a header
table, contact symbols, and rules. Hand-porting that logic to emit
DXF primitives directly would mean maintaining two divergent
implementations of the same drawing that have to be kept in sync by
hand forever.
## Approach: a QPaintEngine that intercepts CrossRefItem's own paint()
DxfPaintEngine/DxfPaintDevice (sources/dxfpaintdevice.{h,cpp}) is a
QPaintEngine/QPaintDevice pair - the same mechanism QPrinter and
QSvgGenerator use to redirect QPainter output elsewhere. Constructing
a QPainter on a DxfPaintDevice and calling item->paint() on it produces
DXF entities instead of pixels, using the exact same drawing code that
already renders correctly on screen. CrossRefItem::paint() is
unmodified.
Scope is deliberately narrow - only the QPainter calls CrossRefItem's
paint() is observed to make: drawLines -> LINE, drawRects/drawPath's
fill case -> outline-only LWPOLYLINE (no HATCH support in v1 - DXF's
fill primitive is a separate, more involved entity type; documented as
a known limitation rather than attempted here), drawEllipse -> CIRCLE
or a flattened polygon for rotated ellipses, drawPath's arc case (from
drawArc/drawPie) -> chord-flattened LINE segments, drawPolygon ->
LWPOLYLINE, drawTextItem -> TEXT. drawPixmap is intentionally
unimplemented (qWarning + skip) since CrossRefItem never calls it -
this is not a general-purpose DXF paint engine, and isn't meant to be
in this PR.
CrossRefItem::paint() is protected, per the normal QGraphicsItem
contract - added a small paintForExport() wrapper rather than making
paint() itself public, or reaching around access control.
## Explicitly out of scope
QetShapeItem::toDXF() and QetGraphicsTableItem::toDXF() (both already
implemented and working) are untouched. Rewriting working exporters
onto this engine to prove an architectural point would be a large,
unrelated diff with no user-visible benefit - if that consolidation is
wanted later, it's a separate proposal once this engine has shipped
and proven out on the one item that currently has no DXF export at
all.
## Testing
Built clean on Qt5/Linux. Verified via the GUI export dialog
(Fichier > Exporter > DXF) against examples/industrial.qet, 50 folios:
export completes without error or crash, all 50 .dxf files are
structurally well-formed (balanced SECTION/ENDSEC, single EOF each),
and grepping the folio-position pattern gives the before/after/PDF
numbers above. Spot-checked several real label strings (e.g. "18-B18",
"20-A2") present as TEXT entity values in the output, not just an
artifact of the count matching.
- build-windows-qt6: install kwidgetsaddons/kcoreaddons/extra-cmake-modules,
switch -DBUILD_WITH_KF=OFF to ON, add -DBUILD_KF=OFF to use precompiled
MSYS2 packages instead of building KF6 from source via FetchContent
- build-windows: swap unsuffixed kwidgetsaddons/kcoreaddons (actually KF6
packages after MSYS2's renaming) for the -qt5 suffixed ones, add
-DBUILD_KF=OFF so the installed packages are actually consumed instead
of being ignored by the default FetchContent-from-source build
Follow-up to #158 / PR #501. While investigating that position bug,
found a second, separate one in the same area: PartText::setFont()
never updated real_font_size_, so it stayed frozen at whatever size the
item was constructed with.
That field isn't cosmetic - it's live data two other operations depend
on:
- startUserTransformation()/handleUserTransformation() use it as the
base size when scaling the font as the user drags a resize handle.
With it stale, dragging a handle after changing the size via the
toolbar (or loading a file with a non-default size) scales from the
wrong starting point - the resulting size has nothing to do with
what's visibly on screen.
- flip() reads it directly to compute the repositioning offset, so a
stale value also mis-positions the item on flip.
Fix: update real_font_size_ inside setFont(), the same place PR #501
already re-runs adjustItemPosition() for the same reason (font changed,
keep everything that depends on it in sync). fromXml() already routes
both its "size" and "font" attribute branches through setFont(), so
loaded elements pick this up for free.
Verified with a temporary instrumented build: typed a size into the
element editor's font-size field three times (9 -> 4 -> 48). Each
setFont() call's "before" value exactly matched the previous call's
"after" value, confirming real_font_size_ now tracks every change
instead of freezing at its construction-time value (9). Instrumentation
removed before committing.
https://github.com/qelectrotech/qelectrotech-source-mirror/issues/413
## Bug
Copy-pasting an element pair joined by a conductor with no label
results in the pasted conductor having a literal "_" label, even
though the source conductor's label was empty. Repeating copy+paste on
the result keeps stacking the same "_" back on, since the pasted
conductor now legitimately has that text.
## Root cause
PasteDiagramCommand::redo() (sources/diagramcommands.cpp), when the
"erase label on copy" option is enabled (the default), resets each
pasted element's formula/label/comment/location to "" - a real erase.
Right next to it, the equivalent reset for conductors doesn't erase:
cp.text = c->diagram() ? c->diagram()->defaultConductorProperties.text : "_";
It unconditionally overwrites the conductor's text with the *project's
configured default text for newly drawn conductors* - a setting that
happens to default to a literal "_" character (visible in the project/
new-folio "Conductors" tab), and is otherwise unrelated to whether this
particular copy's label should be kept or cleared. The `: "_"` fallback
for the "no diagram" case doesn't help either, since these conductors
are already added to the scene before this code runs.
## Fix
Reset conductor text to "" too, matching every other field reset in
the same block. "Erase on copy" should erase, not "replace with
whatever the project's unrelated new-conductor default happens to be."
## Verification
Built clean. I was not able to get a reliable live GUI reproduction
under Xvfb + xdotool for this one - drawing conductors between
terminals via simulated drag kept mis-firing as element placement
instead in this environment, the same class of automation friction
noted on PR #743. Confidence rests on tracing the exact code path
(confirmed defaultConductorProperties.text is a project-level setting
for freshly-drawn conductors, unrelated to paste; confirmed the
sibling element-info reset four lines above uses "" specifically) plus
the fact this is a one-line change to match an already-correct pattern
right next to it, not new logic.
https://qelectrotech.org/bugtracker/view.php?id=335
## Bug
Element library icons (collection tree thumbnails, drag icon, preview
panels) render with a fully transparent background. Element definitions
almost always hardcode a black stroke color, on the assumption of the
white diagram sheet they are normally drawn on. Against a dark widget/
tree-view background (e.g. KDE Plasma dark theme), that black stroke
disappears entirely - reported as icons being "black and almost
invisible". scorpio810_mantis linked this to the same recurring family
as #231, #247, #267.
## Fix
ElementPictureFactory::pixmap() is the single shared point where every
consumer of these icons gets its QPixmap (collection tree via
ElementsCollectionCache -> Element::pixmap(), master/slave properties
tree, element properties preview, drag icon). Change its background
fill from fully transparent to opaque white - exactly what the element
already visually assumes in every context this pixmap is used, so it
is correct regardless of the surrounding widget's palette.
## Testing
Built both variants and compared under Xvfb using a simple, decisive
visual test: select the tree row (giving it a highlighted/colored
background) and compare what shows immediately around the icon's
glyph.
- Before: the icon's background matches the row's selection color -
confirms it is transparent, so on a dark unselected row the black
strokes would have the same problem.
- After: a solid white square is visible behind the glyph regardless
of the row's background color.
Note for the on-disk pixmap cache used by ElementsCollectionCache
(~/.local/share/QElectroTech/QElectroTech/elements_cache.sqlite):
existing cached PNGs predate this fix and will keep their transparent
background until regenerated. That cache already keys strictly on
path+uuid with no invalidation on QET version, so this is an existing
characteristic of that cache, not something introduced here.
Bugtracker #291: clicking Cancel on the open/save-element dialog before
the user collection finishes loading crashes the whole application with
an unhandled pointer exception.
ElementsCollectionModel::loadCollections() loads collections in the
background via QtConcurrent::map(m_items_list_to_setUp, setUpData) -
worker threads call setUpData() on each ElementCollectionItem
(a QStandardItem), which does setFlags()/setData() on it.
ElementDialog::execConfiguredDialog() deletes the dialog immediately
after exec() returns:
element_dialog->exec();
...
delete element_dialog;
That destroys the tree view and its ElementsCollectionModel, which as
a QStandardItemModel frees all its items in its destructor. Nothing
waited for the QtConcurrent::map() to finish first, so on Cancel before
loading completes, background threads were still calling setUpData()
on items the main thread had just freed - a use-after-free race.
Add an ElementsCollectionModel destructor that waits for the future
before QStandardItemModel's destructor runs. QFuture::waitForFinished()
on a default-constructed (never-started) future returns immediately, so
this is a no-op whenever loading already completed - the crash path is
the only one affected.
Fix print window clipping diagram when titleblock on right edge is hidden.
Fixes a frequently made mistake: confusing width and height when rotating something... 😉
Cross-references were missing from DXF exports, as reported on the
forum: https://qelectrotech.org/forum/viewtopic.php?id=2481
generateDxf() walks the scene and collects items by cast. A slave
element's cross-reference label ("(6-G15)", pointing back to its master)
is a plain QGraphicsTextItem hung off a DynamicElementTextItem as a
child, so it matches neither the IndependentTextItem nor the
DynamicElementTextItem branch and was dropped on the floor. Nothing was
wrong with the label itself; it was simply never collected.
Collect it through the existing DynamicElementTextItem::slaveXrefItem()
accessor and draw it with the same placement, rotation and multi-line
handling as the other text items, using defaultTextColor() since a bare
QGraphicsTextItem has no DiagramTextItem::color().
Measured on examples/industrial.qet, comparing against the PDF export
(which renders the whole scene and so shows everything):
before after PDF
slave xrefs "(n-Xn)" 0 41 41
folio/position strings 317 358 403
The slave cross-references now match the PDF exactly.
Still missing, and not addressed here: the master-side cross-reference
table drawn by CrossRefItem, which accounts for the remaining 45
strings. CrossRefItem is a QGraphicsObject that renders itself with
custom QPainter code in three different modes (drawAsCross,
drawAsContacts, drawAsPlcTable) including contact symbols and rules, so
giving it a DXF representation is a larger piece of work than this.
"exclude_from_bom" is listed in QETInformation::elementInfoKeys() so the
project database can build the element_info table column for it, but it
is not a free-text property: ElementInfoWidget already gives it its own
"Exclure de la nomenclature" check box.
Because buildInterface() creates one ElementInfoPartWidget per key in
that list, the key also got a second, generic edit row. And since
translatedInfoKey() has no case for it and falls through to
"return QString()", that row carries no label at all - an anonymous edit
line at the bottom of the panel. currentInfo() then writes
exclude_from_bom unconditionally, so as soon as the user edits anything
the nameless row fills with "true"/"false".
Drop the key from the list buildInterface() iterates. The check box
remains the only way to set it, currentInfo() still writes it exactly as
before, elementInfoKeys() is untouched so the database schema and
elementquerywidget are unaffected, and predefinedKeys() already excluded
it from the custom-property rows.
Reported by plc-user on #642.
Opening an element you cannot write -- anything from the QET collection,
for instance -- disabled Copy along with everything else, so there was no
way to reuse a primitive from it. The workaround was to save the whole
element into your own collection first, just to take one shape out of it.
Two actions stood in the way, and neither of them modifies anything:
- Select All and Invert Selection were in the list disabled outright when
read only, so nothing could be selected in the first place;
- Copy was enabled only when "!m_read_only && selectedItems().count()", so
even a mouse selection left it greyed out.
Both now work on a read-only element. Copy is safe there:
ElementScene::copy() serialises the current selection to the clipboard and
touches neither the element nor the file.
Cut, Paste, Paste-in-area, Delete, Rotate, Flip, Mirror, the depth actions
and the add-primitive tools stay disabled exactly as before, so the element
is still protected -- this only stops the editor from refusing to read out
what it is already displaying.
Verified with a chmod 444 element: Select All then Copy now work, the
clipboard receives the expected <definition> with all three primitives,
Cut/Paste/Delete remain greyed out, Save stays disabled, and the file is
untouched (same permissions, same checksum).
Terminal::paint() draws the red terminal stroke, the blue docking dot
and the terminal name whenever the diagram's drawTerminals() /
drawTerminalNames() flags are set, and both default to true. The GUI
export dialog clears them through Diagram::applyProperties(), but the
headless CLI export (--export-pdf/--export-png/--export-svg) never
did, so every terminal shipped as coloured editor UI in otherwise
finished drawings.
Toggle both flags off around the render in renderDiagram(), exactly
like the existing grid/guides handling, and restore them afterwards.
QVector<int>(Qt::DisplayRole) creates a vector of size 0 (since Qt::DisplayRole == 0), not a vector containing DisplayRole. Fixed
to {Qt::DisplayRole}.
The sam applies to QVector<int>(role) which gets changed to {role}.
<private/qpdf_p.h> (QPdfEngine::drawHyperlink) needs Qt's private GUI
module, previously flagged only by a #warning at compile time.
Qt >= 6.7 ships GuiPrivate as a proper find_package component, but some
distro packages (e.g. Ubuntu's qt6-base-private-dev, Qt 6.8.3) do not
install Qt6GuiPrivateConfig.cmake and only provide the implicit
Qt6::GuiPrivate target created alongside Qt6::Gui. Requesting the
component unconditionally would therefore break distro-Qt builds.
Instead: try the component quietly, then hard-verify the Qt6::GuiPrivate
target exists after the main find_package, failing at configure time
with an actionable message if the private headers are missing. The
compile-time #warning in pdf_links.cpp and projectprintwindow.cpp is
now redundant and removed.
Verified: cmake configure + compile of both translation units on
Ubuntu 25.04 / Qt 6.8.3 (system KF6), cmake configure on Qt 5.15.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
a) using a system provided KF6
b) downloading and compiling KF6
c) using the vendored-in re-creation of the functionality
The behaviour for both Qt5 and Qt6 is steered with the same two variables which were renamed to become version agnostic:
a) BUILD_WITH_KF=ON BUILD_KF=OFF
b) BUILD_WITH_KF=ON BUILD_KF=ON
c) BUILD_WITH_KF=OFF
The version is automatically derived from the chosen Qt major version.
Selecting more than one dynamic text field in the element editor silently
replaced every selected field's colour with the colour of the first one.
Nothing was clicked -- merely extending the selection destroyed the others'
colours, and the change went onto the undo stack as if the user had asked
for it.
Cause: updateForm() loads the current part's colour into the colour button
with m_color_kpb->setColor(). KColorButton::changed is emitted for a
programmatic setColor() just as it is for user interaction, and it is
connected to m_color_kpb_changed(), which applies the new colour to *every*
part in m_parts. So simply displaying the first part's colour wrote that
colour to all the others.
Every other widget in updateForm() is immune because it is wired to a
user-only signal -- on_m_x_sb_editingFinished(), on_m_frame_cb_clicked() --
which setValue() and setChecked() do not emit. The colour button is the one
control whose signal cannot distinguish the two, so block it while loading.
This also explains why the reporter saw it only when rubber-band selecting
bottom-to-top: the write happens only when the first part's colour differs
from what the button already shows, which depends on selection order.
Verified in the element editor with two dynamic texts, one red and one blue:
select the red one, then ctrl-click the blue one. Before: the blue text
turned red. After: both keep their colours. Changing the colour deliberately
with the button still applies to all selected texts, as intended.
Forum report (qelectrotech.org/forum, topic 3005, reporter oc67): a
project named e.g. "Mon_projet.avec_un_point.qet" exported to PDF as
"Mon_projet.pdf" - everything after the first "." in the filename was
silently dropped.
Root cause: ProjectPrintWindow::docName() used QFileInfo::baseName(),
which returns the filename up to the FIRST "." rather than stripping
only the final suffix. docName() feeds both the PDF print job's
setOutputFileName() and the QFileDialog::getSaveFileName default in
exportToPDF(), so the truncation showed up as the actual exported
file's name, not just a dialog suggestion.
sources/exportdialog.cpp's SVG/PNG/DXF export path already uses the
correct QFileInfo::completeBaseName() (strips only the last suffix) -
this fix brings the PDF/print path in line with that existing,
correct pattern rather than introducing a new approach.
Verified the exact before/after behavior with a standalone QFileInfo
test: baseName() on "Mon_projet.avec_un_point.qet" returns
"Mon_projet" (the bug); completeBaseName() returns
"Mon_projet.avec_un_point" (correct). Also did a clean incremental
build with no new warnings/errors.
Forum report (qelectrotech.org/forum, topic 3125): "Export the names
of list of wires" doubled every conductor's name in the output - a
single conductor named "16AWG" was exported as two "16AWG" lines.
Root cause: ConductorNumExport::fillHash() incremented the name's
tally once per terminal instead of once per conductor - a separate
if-block for terminal1 and another for terminal2, each bumping the
same m_hash entry. Since an ordinary conductor has two terminals and
neither is a folio-report terminal in the common case, both blocks
fired and every real conductor was counted twice. wiresNum() then
faithfully repeats each name m_hash.value(key) times, so the doubled
count became doubled output lines.
Fixed by incrementing once per conductor, only skipping it entirely
when *both* ends are folio-report terminals (neither represents a
real connection) rather than checking each terminal independently.
Verified with a minimal two-conductor project via the --export-wires
CLI verb: pre-fix build produced 4 lines for 2 named conductors
(exact doubling), post-fix build produces the correct 2.
Fix bugtracker #281: new-part wizard's element editor opens behind main window
Cannot reproduce on Debian/GNU Linux, but implementation is reasonable and clean!
Fix bugtracker #251: title block template with slash in name fails silently
There are some characters that are not allowed in filenames.
Absolutely correct to mark a filename containing (one of) them as invalid!
GitHub issue #663: the "Informations" tab in the element editor's
properties dialog was only made visible for Simple and Master basetypes
(setTabVisible gate in on_m_base_type_cb_currentIndexChanged), hiding it
entirely for Slave and Terminal Block elements.
This wasn't a data-model limitation: ElementData::m_informations is read
and written identically for every basetype (elementdata.cpp), and
updateTree() already special-cased Terminal as enabled and injected
PLC-specific info rows for PLC Slave elements - that logic was simply
unreachable because the tab itself was hidden for both types. Also
flipped updateTree()'s Slave case from setDisabled to setEnabled so the
tree is actually editable once visible, matching Terminal's existing
behavior.
This lets users attach manufacturer/part-number/reference metadata
directly to Terminal Block and Slave (e.g. multi-part contactor)
elements, as requested in the issue - useful when a Slave's part number
differs from its Master's (e.g. a contactor's auxiliary contact block
vs. its coil).
Not verified: interactive element-editor GUI testing wasn't performed
in this sandbox; verified via clean incremental build only.
TitleBlockTemplate::listOfVariables() -- which scans a title block
template's cells to auto-populate the "Custom" tab in Project
Properties (a feature recently added by another contributor, see
TitleBlockPropertiesWidget::addTemplateVariables()) -- only matched
the braced "%{name}" placeholder form. The bare "%name" form (also a
legitimate, fully-supported substitution syntax -- see
TitleBlockTemplate::interpreteVariables(), which already replaces both
forms) was never matched at all, not merely mishandled on edge cases:
a cell containing "%name2" alone, "%name2 " with a trailing space, or
"%name2 %name3" with two bare variables all produced zero detected
variables, exactly matching the report (manually adding the variable
in Project Properties works fine and renders correctly, since
rendering goes through interpreteVariables()'s simple string
replacement against already-known keys, not this regex).
Fix: extend the regex to also match a bare "%name" as the longest run
of identifier characters immediately after '%', via a second
alternative/capture group. This naturally stops at whitespace, so
"%name2 " and "%name2 %name3" are both now correctly detected -- no
change to the existing braced-form handling, and the existing
globalMatch() loop already correctly finds multiple matches per cell.
Verified: clean rebuild, only the intended object file recompiled and
linked successfully. Wrote a standalone test of the regex/extraction
logic covering exactly the reported repro cases -- "%name2", "%name2 "
(trailing space), "%name2 %name3" (two bare variables), "%{name2}"
(braced form, unaffected), a braced+bare mix, plain text with no
variables, and two built-in-style names -- all extracted correctly
with no regressions to the previously-working braced form.
Not verified: the actual Project Properties "Custom" tab UI
auto-populating live, since exercising the full Xvfb GUI flow (title
block template editor > add a bare-form custom variable to a cell >
save > open Project Properties > select that template > confirm the
Custom tab lists it) was out of scope for the time available given the
extraction logic itself was already precisely verified in isolation.
DynamicElementTextItem's slave cross-reference sub-item
(m_slave_Xref_item, the small "_(1-D3)_"-style text next to a slave
element pointing back to its master) hardcoded Qt::black in three
places: on creation, on hover-leave, and when restoring color after
text editing. The PARENT text item's color is a real, user-configurable
property (color()/setColor(), persisted in the diagram XML, exposed in
the text editor's color picker) -- but the slave-Xref sub-item never
used it, so a user applying a dark theme/stylesheet had no way to make
this specific text visible even by explicitly setting a text color,
unlike every other text item in the diagram.
Fix: use color() (the parent DynamicElementTextItem's own configured
color, inherited from DiagramTextItem) instead of the Qt::black
constant in all three places. This doesn't change the default
appearance (color() defaults to black, same as before) but makes the
slave-Xref text finally respect whatever color the user sets on the
parent text field, giving dark-theme users the same escape hatch
already available for all other diagram text.
Verified: clean rebuild, only the intended object file recompiled and
linked successfully.
Not verified: a live visual confirmation of the slave-Xref text
picking up a non-default color, since reproducing this requires
constructing a master/slave-linked element pair with composite text
containing %{label} in an actual multi-folio project, which was out of
scope for the time available. Confidence rests on this being a direct,
mechanical substitution of an existing, already-used accessor
(color()) for a hardcoded constant, applied identically to the exact
three call sites that previously hardcoded Qt::black for this item,
with no other logic changed.
Saving a new user title block template (right-click "Cartouches
utilisateur" > "Nouveau modèle" > "Enregistrer sous") with a name
containing a slash (or other filesystem-reserved character) silently
did nothing, with no error shown. The entered name is turned directly
into a filename (TitleBlockTemplatesFilesCollection::toFileName()), so
e.g. "foo/bar" becomes a path "foo/bar.titleblock" -- since "foo/"
essentially never exists as a directory, the underlying file write
fails, but that failure was never surfaced:
- TitleBlockTemplateLocation::isValid() only checked for an empty
name, so an invalid name still counted as "valid" and got passed
through to save.
- QETTitleBlockTemplateEditor::saveAs(const TitleBlockTemplateLocation&)
discarded the bool result of setTemplateXmlDescription() and
unconditionally returned true, marking the undo stack clean as if
the save had actually succeeded.
Fix:
- isValid() now also rejects names containing \ / : * ? " < > |,
matching the character set that's actually unsafe once the name
becomes a filename.
- saveAs() (the no-arg entry point that asks the user for a location)
now shows a clear error dialog when the entered name is rejected,
distinguishing "user cancelled" (location.name() empty) from
"name was invalid" (non-empty but rejected by isValid()).
- saveAs(location) now checks setTemplateXmlDescription()'s return
value and shows an error dialog instead of reporting false success
on any future/other write failure, not just this one.
Verified: clean rebuild, only the intended files recompiled and
linked successfully. Live-tested under Xvfb: creating a new template
and using "Enregistrer sous" with the name "foo/bar" now shows
"Le nom « foo/bar » n'est pas valide : il ne doit pas contenir les
caractères suivants : \ / : * ? " < > |" instead of silently doing
nothing; reopening the save-as dialog afterward showed the name field
correctly empty (nothing was partially written). Saving again with a
valid name ("mytemplate_valid") completed with no error dialog, and
the resulting mytemplate_valid.titleblock file was confirmed present
on disk in the user's title-block collection directory.
ProjectView::askUserForFilePath() only appended the .qet extension when
FLATPAK_ID/SNAP_NAME were NOT set, on the assumption that the
xdg-desktop-portal file dialog used by sandboxed Snap/Flatpak builds
always appends the selected filter's extension itself (avoiding a
double ".qet.qet"). In practice, on the reporter's Snap/Ubuntu 22.04
setup the portal dialog does not append it, so the environment-based
skip left Save As producing a file with no extension at all.
Portal behavior isn't something QET controls or can reliably detect via
environment variables -- it depends on the desktop's actual portal
implementation/version. Rather than guessing per-environment, normalize
unconditionally: strip any existing .qet suffix (case-insensitive) and
re-append exactly one. This produces the correct single extension
whether or not the dialog already added it, on every environment.
Verified: clean rebuild, only the intended object file recompiled and
linked successfully. Wrote a standalone test of the normalization logic
covering no-extension, already-has-extension, uppercase-extension, and
a literal dot in the base filename -- all four produced exactly one
correct ".qet" suffix with no double-extension and no missing extension.
Not verified: the actual Snap-sandboxed portal dialog behavior itself,
since building/running the Snap package and testing its file-save
dialog under a portal is outside what's practical to set up in this
sandbox. Confidence rests on the fix removing the environment-guessing
entirely in favor of unconditional, dialog-implementation-agnostic
normalization, which is correct regardless of what the underlying
dialog does.
Double-clicking a placed element (or right-click > "Éditer l'élément")
opens its properties via Element::editProperty(), which constructs a
PropertiesEditorDialog with a real parent (QApplication::activeWindow()).
On macOS, a QDialog that has both a parent and Qt::WindowModal set falls
back to Cocoa's automatic sheet presentation. Reports (and this
codebase's own existing workarounds) indicate this can render stuck
centered on screen, non-draggable, with symmetric resize -- rather than
a proper attached, movable window -- unlike Linux/X11 where the same
dialog behaves as a normal draggable QDialog.
Two other dialogs in this codebase already explicitly opt into the
correct macOS sheet presentation for this exact reason:
ElementDialog::setUpWidget() and DiagramPropertiesDialog's setup both do
setWindowModality(Qt::WindowModal);
#ifdef Q_OS_MACOS
setWindowFlags(Qt::Sheet);
#endif
PropertiesEditorDialog -- used for editing Element, QetShapeItem, and
DiagramImageItem properties, all reached via double-click on a diagram
item -- had neither this opt-in nor an opt-out, so it likely fell into
the same automatic-sheet behavior but without the explicit flag,
matching the reported "stuck centered, can't drag" symptom.
Fix: apply the same setWindowModality()/Q_OS_MACOS Qt::Sheet pattern
already used by the other two dialogs, in PropertiesEditorDialog's
constructor -- fixing all three call sites (element, shape, and image
property editing) at once, since they share this one dialog class.
Verified: clean rebuild, all three call sites (element.cpp,
qetshapeitem.cpp, diagramimageitem.cpp) recompiled and linked
successfully with no errors or warnings.
Not verified: the actual reported symptom is macOS/Cocoa-specific
window presentation behavior, which cannot be reproduced or confirmed
fixed in this Linux/Xvfb sandbox -- no macOS environment is available
here. Confidence rests on the exact same fix pattern already being
established and presumably working for two other dialogs in this
codebase for the identical class of problem.
NewElementWizard::createNewElement() creates and show()s a QETElementEditor
for the freshly-created part, but never calls raise()/activateWindow().
On the reporter's macOS setup, the wizard (a modal sheet/child of the main
window) closing right before the new editor is shown apparently leaves the
main window as the active/key window, so the new editor window is created
but stays behind it -- and, being neither key nor frontmost, it also never
surfaces in the Dock's window list or the app's own Windows menu. This
matched the report exactly: the reporter saw the wizard finish with
seemingly no result, when in fact a new part genuinely was created and its
editor genuinely was opened, just hidden from view.
Fix: explicitly raise() and activateWindow() the new editor after show(),
so it becomes the frontmost/key window regardless of what state the wizard
leaves the main window in.
Verified: clean rebuild, only the intended object file recompiled and
linked successfully. Ran the full wizard flow live under Xvfb on Linux
(right-click user collection > "Nouvel élément" > through all 3 steps >
Finish) and confirmed the element editor opens correctly with a blank new
part, with no regression in the flow.
Not verified: the actual reported symptom is macOS-specific window-manager
behavior (key/frontmost window handling, Dock window-list registration),
which cannot be reproduced or confirmed fixed in this Linux/Xvfb sandbox --
no macOS or Wine-with-Cocoa environment is available here. raise()/
activateWindow() are the standard cross-platform Qt calls for this exact
problem and match the pattern already used elsewhere in the codebase
(QETApp::openElementLocations()'s already-open-editor branch), so
confidence rests on that precedent rather than a macOS-side confirmation.
XRefProperties::fromSettings() read the "xrefpos" QSettings key with no
default value. On a fresh install/project, the key doesn't exist yet, so
settings.value(...).toString() returns an empty string. QMetaEnum::keyToValue("")
returns -1 (invalid), which was then cast directly into m_xref_pos as
Qt::AlignmentFlag(-1) -- garbage, despite the class's own default
constructor documenting the intended default as Qt::AlignBottom.
This explains the reported symptom: dynamically generated cross-reference
text for master/slave-linked elements (e.g. magneto-thermal breaker,
thermal relay NC) rendered at an undefined position and overlapped the
element's own label, making the reference unreadable. The reporter's
manual workaround -- explicitly setting alignment to "Bottom" in Project
Properties > New Folio/Cross Referencing -- side-steps the bug precisely
by writing a valid "AlignBottom" value into QSettings, which fromSettings()
then reads back correctly on subsequent loads.
Fix: supply "AlignBottom" as the fallback default for the QSettings read,
matching the constructor's documented default and the reporter's
functioning workaround.
Verified: clean rebuild, only the intended object file recompiled and
linked successfully. Confirmed via a small standalone QMetaEnum test that
keyToValue("") returns -1/invalid while keyToValue("AlignBottom") returns
64 (== Qt::AlignBottom), reproducing the exact mechanism before the fix and
confirming the corrected default resolves to the intended value.
Not verified: a live before/after visual comparison of the rendered
cross-reference text position on an actual magneto-thermal/thermal-relay
diagram (would require constructing a multi-folio project with linked
master/slave elements and comparing label geometry, which was out of
scope for the time available). Confidence rests on the QMetaEnum
mechanism being unambiguous and the fix being a one-line default-value
correction with no other code path affected.
QETDiagramEditor::openBackupFiles() deleted the just-constructed
QETProject when it failed to reach ProjectState::Ok, but had no
continue/else after the delete - so addProject(project) ran
unconditionally on the now-dangling pointer, and addProject()
immediately dereferences it (new ProjectView(project), etc.).
This matches the report exactly: clicking Cancel on the restore-files
dialog (which just deletes the stale markers directly, never calling
openBackupFiles()) works fine, while clicking OK crashes whenever any
listed backup fails to open cleanly. Because the crash happens mid-
loop, cleanup for that file (and any later ones in the same batch)
never completes, which also explains the reporter's second complaint
that the restore list kept growing across sessions.
Fix: add the missing `continue` so a failed project is skipped
instead of being passed use-after-free to addProject().
Verified: clean rebuild, only the intended object file recompiled
and linked successfully. I attempted a live repro by crafting a
malformed stale-file marker to force ProjectState != Ok and clicking
OK under Xvfb, but this local build links against real KDE Frameworks
(BUILD_WITH_KF5=ON, confirmed via CMakeCache.txt) rather than the
in-tree nokde/kautosavefile.cpp reimplementation I initially targeted,
which uses a different marker directory/naming scheme
(~/.local/share/stalefiles/<app>/ via real KF5::KAutoSaveFile) that
I wasn't able to reverse-engineer well enough in the time available
to produce a matching malformed marker. Confidence in the fix instead
rests on the code being an unambiguous, textbook use-after-free (this
exact object is deleted on the line immediately above the missing
continue) with a single-line, side-effect-free fix.
Fix crash changing dynamic text color and confirming with Enter (bugtracker #323)
Works like charm:
- color is updated immediately
- no additional errors or warnings
- no crash anymore!
RotateTextsCommand::undo()/redo() called cti->forceMovedByUser(...)
instead of cti->forceRotateByUser(...) for ConductorTextItem entries
- a copy-paste mix-up between the two parallel user-override flags
that track independently whether a conductor's text was manually
moved vs manually rotated.
Because rotate_by_user_ was never actually set to true, the rotation
attribute-writing gate in Conductor::toXml() (which checks
wasRotatedByUser()) never fired, so a manual rotation applied via
"Orienter les textes" (Edit > Orienter les textes / Ctrl+Space) was
silently dropped on save: the rotation displayed correctly until the
project was closed and reopened, at which point it reverted to
default orientation.
Fix swaps both calls to forceRotateByUser(...), matching what the
constructor reads via wasRotatedByUser() when building m_cond_texts.
Verified: clean rebuild (506/506, no new warnings). Live-verified
under Xvfb that RotateTextsCommand's rotation correctly animates and
applies to ConductorTextItem text (confirmed via the "Orienter les
textes" dialog). A full save/close/reopen round-trip on a from-scratch
two-element wire was attempted but not completed due to unreliable
terminal-to-terminal wire drawing via synthetic mouse events in the
window-manager-less Xvfb sandbox; confidence in the fix instead rests
on tracing the exact save-gate code path (Conductor::toXml() gates
solely on wasRotatedByUser(), which the constructor/undo/redo all
already correctly reference elsewhere for the parallel
moved-by-user flag).
Bugtracker #309: selecting a result from the Search/Replace hit list
highlights the matching element, but on a diagram too large to fit
the current view, the view itself never scrolls -- the highlighted
element can be entirely off-screen with no indication of where it
went. The reporter pinpointed the exact spot,
searchandreplacewidget.cpp:1022, and suggested repositioning the
view's scrollbars.
SearchAndReplaceWidget::on_m_tree_widget_currentItemChanged() already
calls setHighlighted()/setSelected() on the matched element, text, or
conductor when a hit is selected; it just never brings it into view.
Added a call to QGraphicsItem::ensureVisible() alongside each of the
three existing highlight/select calls, so the view scrolls the
minimum needed for the match to be visible.
Followed the same approach as JumpToElementDialog's
activateCurrentItem() (added this session for #676) rather than
computing scrollbar positions by hand as suggested: ensureVisible()
scrolls every view showing the diagram automatically, works correctly
if a folio is open in more than one window, and needed no lookup of
which QGraphicsView the widget is attached to -- this widget doesn't
currently hold one. It was the only existing precedent for this exact
"scroll to reveal a matched item" problem anywhere in the codebase.
Verified live: built and ran the app under Xvfb, zoomed into one
corner of an example diagram until it needed scrollbars, searched for
text appearing in two different elements ("Offset null", both
op-amp offset-null pins), and confirmed selecting each result
scrolled the view to a different part of the diagram, centering the
matched element's highlight circle in the visible area each time. No
new build warnings.
plc-user on PR #693: the crash is fixed, but the color/font field and
the on-diagram text no longer update until you leave the properties
list and click in the diagram -- previously it updated as soon as you
clicked OK.
That's a side effect of the crash fix itself. The old, crashing code
returned a *live* QColorDialog as the item view's editor; clicking its
OK button called accept()/hide() on it, and hiding the active editor
happens to trip the base delegate's own focus-lost commit path -- so
the value applied immediately, racily, as a side effect of the same
mechanism that crashed on Enter. The fix (commit 4bd9b6b21) replaced
that with running the dialog synchronously inside createEditor() and
returning an inert placeholder with the result stashed in a property.
Correct for the crash, but it also removed that accidental commit
trigger: the placeholder never had focus to lose, so nothing tells
the view to read the value back until some unrelated interaction
(clicking away) incidentally triggers it.
Fix: explicitly emit commitData()/closeEditor() for the resolved
editor, deferred via QTimer::singleShot(0, ...) since the view only
registers createEditor()'s return value as "the active editor" after
createEditor() itself returns -- emitting synchronously, before
returning, would target a widget the view doesn't know about yet.
Applied to both font and color, since both share the exact same
"resolve synchronously in createEditor(), return an inert
placeholder" shape and thus the exact same gap; font just hadn't been
reported.
Verified with the same standalone harness from the crash fix (real
QTreeView + DynamicTextItemDelegate + QAbstractItemView::edit()),
this time deliberately *not* sending the synthetic Enter keypress the
crash-fix verification needed: clicks the dialog's real OK button,
lets the event loop run, and confirms the picked color lands in the
model on its own. Also reconfirmed the crash fix itself still holds
(clean exit, no synthetic-Enter needed either way now) and did a full
Release build (504/504) with no new warnings.
Weekly cron replaced with a monthly run (1st of each month, 02:00 UTC)
to reduce unnecessary CI load.
retention-days raised from 14 to 40 across all six artifact uploads
(Qt5 + Qt6 tracks) to cover the new monthly interval with a safety
margin -- 14 days was shorter than the gap between two cron runs,
so the latest build's artifacts could expire before the next one
replaced them.
When multiple elements are pasted or moved in one batch, each call to
autoBreakConductors() now receives the shared state from the previous
call. This prevents two elements in the same batch from independently
claiming the same conductor, which would result in a double-delete on
redo().
Requested by ispyisail in PR review.
openTitleBlockTemplate needs a lambda: its matching overload has a default bool argument, so its pointer-to-member type
requires two parameters regardless of the default, while the signal provides only one -- no cast alone can both resolve the overload and
connect to a single-argument signal.
setAutoNum(QString)/setAutoNum(int,int) is a sender-side signal overload which needed a qOverload<QString> to match setFolioAutonum's
single-argument slot.
etc.), these three are ambiguous on the *slot* side:
activateProject(QETProject*)/activateProject(ProjectView*),
closeProject(ProjectView*)/closeProject(QETProject*), and
showError(const QETResult&)/showError(const QString&) each have two declarations on QETDiagramEditor. &QETDiagramEditor::activateProject
etc. alone won't compile with two candidates present; qOverload<T>() picks the one matching the actual signal's argument type, same as
the old SIGNAL()/SLOT() macro text did implicitly.
Default arguments aren't part of a function's pointer-to-member type, so &Class::slot has a type requiring the argument regardless of its
default value -- incompatible with a signal providing none, and &Class::slot alone won't compile against these signals at all.
When migrating to the modern member pointer connect, replaced with a lambda that calls the slot with no arguments, letting
the default apply exactly as before.
- SelectAutonumW::applyEnable(bool = true), connected to each NumPartEditorW's changed() signal in both setContext() and
on_add_button_clicked(). The corresponding disconnect() in on_remove_button_clicked() is removed rather than reimplemented: a
lambda-based connection can't be matched and removed by a separately-written disconnect() call, and the explicit disconnect
was already redundant -- the very next line deletes the part object, which Qt automatically disconnects on destruction (the same
guarantee setContext()'s own qDeleteAll() cleanup already relies on).
- PartText::adjustItemPosition(int = 0), connected to QTextDocument::contentsChanged().
- ExportDialog::slot_changeFilesExtension(bool = false), connected to ExportPropertiesWidget::formatChanged().
since QComboBox::activated(QString) still exists pre-Qt6 and makes &QComboBox::activated alone ambiguous:
- StyleEditor: outline_color/line_style/size_weight/filling_color,
both connect (activeConnections(true)) and disconnect
(activeConnections(false)) branches. antialiasing's stateChanged(int)
connect modernized alongside them (single signal, no disambiguation
needed).
- TitleBlockTemplateCellWidget: cell_type_input_ (two connects to
different slots), horiz_align_input_, vert_align_input_, logo_input_.
Also modernises QETApp's system tray connect.
In two cases stateChanged already replaced with version guarded checkStateChanged for future proofing.
setTransformOriginPoint() was only applied inside
parentElementRotationChanged(), so loading an already-rotated element,
or enabling keep_visual_rotation while rotation_point_center was
already true, left the origin at (0, 0) until the next parent rotation.
Apply the origin directly in both setters so it's always in sync.
Added .ts files (de and en) to the commit
QComboBox::currentIndexChanged(QString) still exists pre-Qt6.
TitleBlockTemplateLocationChooser: collections_ -> updateTemplates() (a virtual method; pointer-to-member dispatch still resolves to the
TitleBlockTemplateLocationSaver override at runtime as expected)
TitleBlockTemplateLocationSaver: templates_ -> updateNewName()
TitleBlockPropertiesWidget: m_tbt_cb -> changeCurrentTitleBlockTemplate(int)
XRefPropertiesWidget: m_type_cb -> typeChanged(), m_snap_to_cb ->enableOffsetSB(int), both connect (constructor) and disconnect(destructor)
Two QButtonGroup::buttonClicked overload-ambiguity fixes, plus cleanup of the connects sitting alongside them:
TitleBlockDimensionWidget: switched from the deprecated buttonClicked(int) id-based overload to buttonClicked(QAbstractButton*),
disambiguated via qOverload. The slot doesn't use the argument either way, so this is a pure modernization with no behavior change.
ExportPropertiesWidget: same buttonClicked fix for exported_content_choices, plus modernized the adjacent
currentIndexChanged(int) relay (disambiguated via qOverload, since QComboBox::currentIndexChanged(QString) still exists pre-Qt6) and
six QCheckBox::stateChanged(int) relays (single signal, no disambiguation needed).
QCheckBox::stateChanged(int) is deprecated as of Qt 6.7 in favor of checkStateChanged(Qt::CheckState), but this project has no Qt6 minor
version floor pinned in CMakeLists.txt, so stateChanged(int) remains the correct unconditional choice for now. QT_VERSION_CHECK(6, 7, 0) guarded
checkStateChanged was introduced to avoid future warnings.
Bug #331: "Il serait intéressant de pouvoir directement dans la fenêtre
'Sélection numérotation auto' modifier la valeur d'incrément et visualiser
la prochaine numérotation qui sera appliquée. Ceci sans être obligé
d'ouvrir la page de configuration."
The dock (AutoNumberingDockWidget) already let you see and edit a rule's
*current* value inline (added in 52c8ef6b4/031710b5f/ee4ba82d2). The
increment itself, and any preview of where the numbering is headed, was
reachable only through Configurer -> the full project-properties dialog.
Two new widgets per row (conductor/element/folio):
- An increment spin box, read from and written to the same NumerotationContext
field NumPartEditorW's increase_spinBox already edits in the full dialog --
same data, second place to reach it.
- A read-only next-value field, computed via
NumerotationContextCommands::next() -- the identical engine the "Suivant"
button in the full dialog already uses to step a whole context. Reusing it
rather than reimplementing the arithmetic means wrap-and-carry between parts
comes out identical to what actually happens when the number is next
consumed, and zero-padding matches real rendering
(NumerotationContext::formatValue(), mirroring
autonum::setSequentialToList()'s padding rule by hand since that function is
local to assignvariables.cpp).
NumerotationContext gains replaceIncrease(index, increase), a sibling to the
existing replaceValue() that touches only the increment field.
Every refresh call site in the file (13 of them) previously refreshed just the
value field; they now go through a new refreshRow(category), which refreshes
value + increment + next-value-preview together via a small per-row widget
bundle (rowFor()). This also let resetAutoNum()'s three-way switch collapse to
one line, and refreshValueFields()'s three near-identical blocks collapse to a
loop -- both existing before this change, not new here.
Verified live under Xvfb: created an element numbering rule "K" (Chiffre 1,
value 1, increment 1) via the full dialog, confirmed the dock showed
Valeur=1/Incrément=1/Suivant=2. Changed the dock's own Incrément to 3 --
Suivant updated live to 4, no dialog needed. Changed Valeur to 10 -- Suivant
became 13. Reopened the full configuration dialog and confirmed it read back
the same value_field=10/increase_spinBox=3, i.e. the round trip through
replaceIncrease()/storeContext() does not disturb type, initial value, modulus
or format.
Builds clean, CMake/Ninja Release, Qt 5.15, 820/820, no new warnings.
Fixes: https://qelectrotech.org/bugtracker/view.php?id=331
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Bugtracker #308: the "current date" preset for a project's default
title block doesn't persist. A later comment on the report pinpointed
it exactly: the setting falls back to "No date" unless the folio tab
remains active when saving settings, and the same happens in Project
Properties.
TitleBlockPropertiesWidget::properties() (and its near-duplicate
sibling propertiesAutoNum(), copy-pasted with the same bug) reads the
date radio buttons like this:
else if (ui->m_current_date_rb->isVisible() && ui->m_current_date_rb->isChecked()) {
prop.useDate = TitleBlockProperties::CurrentDate;
...
Both the New Project settings page and Project Properties embed this
widget as one page of a QTabWidget (NewDiagramPage, in
configpage/configpages.cpp). QWidget::isVisible() depends on the
whole ancestor chain being visible, not just the widget's own state --
switch to any other tab before clicking OK/Apply and this radio
button's isVisible() goes false even though it's still checked
underneath, silently falling through all three branches. The function
returns a default-constructed TitleBlockProperties for the date
fields (useDate = UseDateValue, date = QDate(), i.e. "no date"),
matching exactly what was reported.
Fix: use isHidden() instead, which reflects only this widget's own
explicit state and mirrors the read side's own check in
setProperties()/initDialog() just above it in the same file -- that
side already uses isHidden(), not isVisible(), for the identical
"is the current-date option even offered here" question.
Verified directly: a standalone Qt program constructing the real
NewDiagramPage, checking "current date", switching the tab widget
away from Folio to Conducteur (reproducing the report's exact
trigger), then calling applyConf() and reading back the QSettings
value. Against the original code this saves date="null"; with the
fix, date="now" -- the same scenario, same tab switch, only the one
line differs. Also confirmed a full Release build (504/504, CMake/
Ninja, Qt 5.15.18) with no new warnings.
columns summed to exactly 100% (e.g. the shipped A4_1.titleblock), this produced qRound(NaN), which fatally aborted under Qt6's stricter qCheckedFPConversionToInteger assertion -- reached via
double-clicking a title block template to edit it.
Introduce TitleBlockTemplate::classifyWidthConstraint(), shared by minimumWidth() and maximumWidth(), returning std::optional WidthConstraintCase> to distinguish three non-finite outcomes:
Unconstrained (RTT columns == 100%, no absolute columns -- an ordinary, valid template), RelativeWidthExceeds100Percent (RTT alone exceeds 100%), and AbsoluteColumnsExceedRemainingWidth (RTT == 100%
with at least one absolute column also present) -- the latter two meaning the template's columns cannot be laid out at any width.
maximumWidth() previously only checked "are all columns absolute", which incorrectly reported "no upper bound" for the two unsatisfiable cases above; it now shares the same classification, so both functions
agree.
Update TitleBlockTemplateView::updateDisplayedMinMaxWidth() to show distinct, accurate tooltip text for all four cases instead of printing the old std::numeric_limits<int>::max()
sentinel or a misleading "no constraint" message for an unsatisfiable template.
Manually verified all four cases: a normal template (finite width), A4_1.titleblock (Unconstrained), an over-100% RTT template
(RelativeWidthExceeds100Percent), and RTT==100% with an absolute column present (AbsoluteColumnsExceedRemainingWidth).
Translations still partially missing.
Bugtracker #335: element library icons are black and nearly invisible
under a dark desktop theme (reported on KDE Plasma / Fedora 43).
The main elements panel (ElementsCollectionWidget) already forces a
fixed light palette on its tree views via ElementsTreeView, added in
a8e2a7acf and completed in bb61dde81 -- element icons are rendered
with colors read from each .elmt file (almost always black linework,
matching printed-schematic convention) onto a transparent
background, so any view showing them needs to stay light regardless
of the OS theme. ElementsTreeView's own class doc already says
"This class must be used when the tree view have an
ElementsCollectionModel as model" -- but two other dialogs showing
the exact same model were still using a plain QTreeView and missed
that fix: the Open/Save Element/Category/Template dialog
(ElementDialog) and the New Element Wizard's parent-category picker
(NewElementWizard). Same underlying ElementsCollectionModel, same
black-on-transparent icons, same invisibility on a dark theme.
Fix: use ElementsTreeView in both, matching the main panel and the
class's own documented contract. No other behavior changes --
ElementsTreeView only additionally overrides startDrag() to use a
nicer drag pixmap, which is inert unless drag-out is enabled.
Verified with a full Release build (504/504, no new warnings) and a
standalone Qt program that shows the real ElementDialog under a
forced dark QPalette (simulating a dark OS theme, since neither this
build environment nor QET itself forces the palette one way or the
other): screenshots down through nested collection categories
(Electric > IEC 60617 > Conductors and connecting devices) confirm
the tree view keeps a white background against the dark dialog
chrome around it.
Now a new checkbox in the dynamictextfieldeditor is available (by default set to false for legacy) to make it possible to turn dynamic text fields around its own center.
This resolves an undesirable behaviour that occurs when the text alignment is retained
Including translation to english and german
Bugtracker #323: crash changing a label's color, but only when
confirmed via Enter -- clicking the dialog's own OK button with the
mouse doesn't crash. Reported on Windows 11 and Debian, with
"QObject::installEventFilter(): Cannot filter events for objects in
a different thread" immediately before the segfault.
Root cause: DynamicTextItemDelegate::createEditor()'s color case
constructed a QColorDialog and returned it directly as the item
view's editor widget for the color cell -- unlike every other case
in this same function, which returns a small inline widget
(QSpinBox, QComboBox, or, for the adjacent font case, a plain
placeholder). A QColorDialog is not designed to be used this way: it
is not one of the objectNames this delegate's own eventFilter()
special-cases, so Enter is handled by the base
QStyledItemDelegate::eventFilter() as an ordinary "commit and
destroy this small editor" trigger -- racing the dialog's own
internal OK-button accept/close path, which on Windows can hand off
to the native color picker. Clicking OK with the mouse doesn't go
through the same key-press path, which is why only Enter crashed.
Verified structurally: an embedded QColorDialog editor is a *child*
widget of the view's viewport rather than a proper top-level dialog
(confirmed with a standalone Qt program driving the real delegate
through QAbstractItemView::edit() -- searching QApplication's
top-level widgets never found it, only a search of the viewport's
children did), which is the same "used as something it isn't"
pattern, just observed a different way.
Fix: mirror the font case immediately above -- resolve the color via
the static, blocking QColorDialog::getColor() inside createEditor(),
and hand back a plain QWidget with the result stashed in two
properties (mirroring the font case's "ok" property) for
setModelData() to read. By the time the view processes any commit
trigger, the "editor" is an inert placeholder with no dialog state
left to race.
Verified end-to-end with the same standalone program: creates the
model item, triggers editing, finds the real (top-level, this time)
QColorDialog, clicks its actual OK button, confirms the color lands
on the placeholder's properties, sends the editor a synthetic Enter
keypress (the exact trigger from the bug report), and confirms the
final committed value in the model matches the picked color. Also
confirmed a full Release build (333/333) with no new warnings.
Raised by plc-user in discussion #618: the diagram editor allows moving
elements by as little as 1px, and asked that rotation not undershoot
that. Checking the actual constraint (Settings -> DiagramEditor_xGrid_sb
/ _yGrid_sb, both independently configurable, minimum 1, maximum 30)
turned up a real, verified gap this PR's existing fractional-pivot fix
doesn't cover: an ASYMMETRIC grid (xGrid != yGrid).
Swapping X/Y deltas for a 90-degree turn -- the exact-arithmetic path
already in this file -- only stays on the configured grid if
xGrid == yGrid. With an asymmetric grid, a delta that was a clean
multiple of xGrid lands on the Y axis after the swap, where the grid
unit is yGrid, and one is not generally a multiple of the other.
Verified on a real build (not just derived): two elements at (100,210)
and (150,420), both on-grid under xGrid=10/yGrid=7, selected and
group-rotated 90 degrees via a temporary local CLI harness.
before this change: (242,292) and (32,342) -- off-grid on both axes
after this change: (240,294) and ( 30,343) -- exactly on-grid
Confirmed the same drift is present without this change too (i.e. not
something introduced elsewhere) and that xGrid==yGrid, the common case,
is unaffected: snapping an already-on-grid point is a no-op.
Fix: re-snap the final computed position to Diagram::snapToGrid(), not
just the shared pivot, for the exact-90-degree path. Left the
arbitrary-angle trig fallback alone -- it has no caller today (the
diagram editor only ever passes multiples of 90) and "on-grid" doesn't
have a clean meaning for an arbitrary angle regardless of grid shape.
Does not attempt to fix a separate, pre-existing property surfaced
while testing this: four consecutive 90-degree turns do not reliably
return a selection to its exact starting position, even on a symmetric
grid, because each RotateSelectionCommand recomputes the pivot fresh
from the selection's current sceneBoundingRect(), and an item whose
bounding box isn't rotationally symmetric reports a different box (and
therefore a different centre) at 0 and 90 degrees. Verified this drift
is identical with and without this change, so it is not a regression --
just a different, harder guarantee this change does not attempt.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Removed "isVisible" check on max_slave_checkbox before saving because isVisible is maybe not true, when the ok button is pressed
Then the value -1 is written and so on not saved to the elements xml
NewDiagramPage::applyConf() writes every other default to QSettings —
border, title block, conductors, folio reports and the guides — but the
cross-reference branch only fetched the properties into a local hash and
then dropped it on the floor. hash_xrp was never used.
The result: changing the cross-reference defaults under Settings > New
project has no effect. Nothing is written, no defaultxref* key ever
appears in the configuration file, and XRefProperties::defaultProperties()
keeps handing out the hardcoded fallbacks for every new project.
Write each of the four types (coil, protection, commutator, plc) with the
"diagrameditor/defaultxref" + key prefix that defaultProperties() already
reads back.
Following up on the earlier division-by-zero fix: return -1 from the bad denominator branch of minimumWidth(), matching the "no
constraint" convention maximumWidth() already uses, instead of std::numeric_limits<int>::max() or 0. Update
TitleBlockTemplateView::updateDisplayedMinMaxWidth() to skip the "Longueur minimale" line when minimumWidth() reports -1, mirroring
its existing handling of maximumWidth() == -1.
Building QET is dominated by re-parsing Qt's headers. A 214-line source
file expands to roughly 198,000 preprocessed lines, and compiling one
translation unit costs ~4.1 s, of which only ~0.35 s is optimisation --
switching -O3 to -O0 saves just 8%, so the usual "build Debug for faster
compiles" advice does not help here. A precompiled header caches the
parsed header state, which is the part that actually costs.
Measured on a 24-thread Xeon E5-2650 v4 with Qt 5.15.18 and GCC 15.2,
same build tree, only the option differing:
compile one translation unit 4.12 s -> 1.21 s
edit one .cpp -> linked binary 5.22 s -> 1.65 s
Deliberately OFF by default. A PCH satisfies includes that a source file
neglected to make for itself, so code written with it enabled can fail to
compile for everyone else. Leaving the default off keeps CI and
contributors on the strict behaviour; only developers who opt in trade
that away for the speed.
Two details in the implementation are load-bearing:
- The generator expressions are not decoration. This target also compiles
the 18 C files of the bundled LZMA decoder, and an unguarded header list
applies to every language in the target, so the Qt headers would be fed
to the C compiler and fail with "unknown type name 'namespace'".
$<ANGLE-R> is needed because a literal '>' would end the generator
expression.
- target_precompile_headers() requires CMake 3.16 while the project still
declares a 3.5 minimum, so the block warns and skips rather than raising
the project-wide requirement for an opt-in developer feature.
Verified both ways: with the option off no PCH artefacts are generated and
the build is byte-for-byte the previous behaviour; with it on, all 18 C
files still compile, the generated PCH is C++-only (cmake_pch.hxx, with no
cmake_pch.h), the C compile commands carry no PCH, and the resulting
binary runs.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Both actions already exist and work; they were simply only reachable from
a toolbar, and those toolbars are user-hideable via Configuration >
Afficher, so hiding one made the feature unreachable entirely.
- "Afficher les guides" (m_draw_guides) goes into the Affichage menu next
to "Afficher la grille". The two are adjacent lines in the view toolbar
and do the same kind of thing, but only the grid had a menu entry.
- "Creation automatique de conducteur(s)" (m_auto_conductor) goes into the
Projet menu. It writes a project setting via
QETProject::setAutoConductor(), so the Projet menu is where a user would
look for it; it is placed with the project properties, above a separator
that keeps the folio operations grouped as before.
Also removes conductor_default and m_project_folio_list from the header.
Both are declared but never allocated and never referenced anywhere in the
tree -- that the build still links is the proof they were dead.
No new strings: both actions already carry translated text.
Found while auditing every QAction against every menu, discussion #677.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Rotating a selection around the raw bounding-box centre moved
grid-aligned elements off the grid permanently. sceneBoundingRect()
comes from font metrics and pen widths, so the centre is almost never
a round number: with a pivot of (132.67, 101.11), an element sitting
at x=100 landed at x=133.78, and no further rotation brought it back.
Positions are written with QString::number() (%.6g), which hides the
floating-point noise but keeps the offset, so the diagram ends up
subtly misaligned with no way to repair it from the UI.
Snap the pivot with Diagram::snapToGrid(), which also follows the
user's configured X/Y grid rather than assuming the 10 px default.
Also compute the rotated offset exactly for multiples of 90 degrees
instead of going through qCos()/qSin(). The rotate actions only ever
pass right angles, and qCos(90 deg) is 6.12e-17 rather than 0, so the
trig path added error for no benefit -- four 90 degree steps did not
return a point to where it started. A quadrant is an axis swap, which
is exact; trig is kept as the fallback for any other angle.
With both, four 90 degree rotations of a grid-aligned element return
it exactly to its original position and every intermediate step stays
on the grid.
Reported by plc-user, who hit the same problem rotating graphical
primitives in the Element Editor -- discussion #618.
QetLogger (discussion #644, steps 1-3) captures whatever an explicit
qDebug()/qInfo()/qWarning() call already decided to report. Most of a
session -- painting, dragging, a slow synchronous operation -- produces
no log output at all, so a silent multi-second gap in the log is
indistinguishable from the user simply not doing anything. That gap
came up directly: investigating a user-reported "the program lagged"
required inferring stalls from timestamp gaps between unrelated log
lines, which can't tell a real freeze apart from normal idle time.
EventLoopWatchdog closes that gap directly instead of inferring it. A
QTimer::PreciseTimer repeating tick (every 50ms) measures the *actual*
elapsed time since the previous tick via QElapsedTimer (monotonic,
unaffected by system clock/NTP adjustments). Qt does not queue up
missed fires for a normal repeating timer, so if the main thread is
blocked for 600ms, the timer fires once as soon as the loop frees up,
with ~600ms measured since the last tick -- that gap is the stall,
measured at its source. Only logs (via the existing qWarning() path,
so it reuses QetLogger's file/ring/rotation with no new plumbing) when
a tick is late by more than 200ms, so a healthy session produces zero
output from this class, in keeping with QetLogger's bounded-log design.
Same QET_WATCHDOG_DISABLE=1 escape-hatch convention as QetLogger's own
QET_LOG_DISABLE=1.
Deliberately not included: attributing a stall to what caused it. This
tells you a stall happened and how long -- pairing that timestamp with
gdb attached to a running session (as used for the CLI hang, PR #661)
is still how you get from "it stalled" to a root cause.
Stacked on #647 (feature-diagnostic-logging-crash) for QetLogger/
qWarning() plumbing this depends on -- diff includes its commits until
that merges.
Verified against the compiled binary, not just read: temporarily
injected a QThread::msleep(600) via a one-shot QTimer 2s after
startup, confirmed the exact expected warning
("EventLoopWatchdog: main thread stalled for 620 ms") at the right
severity through the real qWarning()/QetLogger path, then removed the
test hook and reconfirmed a normal run produces no output from this
class at all.
Stacked on the steps 1-3 branch (feature-diagnostic-logging, PR #646).
Kept as its own PR rather than folded into that one, matching the
discussion's own framing: step 4 is explicitly "the highest-risk piece
... lands last, behind its own switch."
## Step 4 -- crash-time ring flush (CrashHandler)
Installs a handler for SIGSEGV/SIGABRT/SIGBUS/SIGFPE/SIGILL (POSIX) /
SetUnhandledExceptionFilter (Windows) that flushes the in-memory ring to
a fixed crash_dump.log before the process dies.
This required reworking LogRing (step 3) to be genuinely lock-free, not
just mutex-protected: a signal handler that blocks on a lock the
crashing thread (or another thread) already holds turns a clean crash
into a hang -- no ring dump *and* no core dump, worse than doing
nothing. append() now claims a slot with a single atomic fetch-add;
dumpToFd() reads the preallocated entries directly and writes them with
write(2) only, looping on EINTR/short writes. Accepted tradeoff: at most
one entry can be read torn if a crash lands mid-append into that exact
slot -- documented in logring.h, and the alternative (a seqlock to
detect and retry) wasn't judged worth the complexity for that window.
Other invariants implemented per the discussion:
- sigaltstack with a static 64 KiB buffer, SA_ONSTACK -- a stack-
overflow SIGSEGV has no usable stack for a handler without one.
- Nothing under the actual handler touches Qt, QString or the
allocator: the dump path and a small header (version/git/OS/Qt) are
precomputed into fixed char buffers by install(), which runs once at
startup in normal context.
- Atomic test-and-set so only the first crash writes a dump; a second
concurrent/nested fault goes straight to restore-and-re-raise.
- After writing, the handler restores SIG_DFL and re-raises (POSIX) /
returns EXCEPTION_CONTINUE_SEARCH (Windows) so the OS's own crash
path -- core dump, Windows Error Reporting -- still runs. A handler
that "fixed" the crash by swallowing the signal would destroy exactly
the post-mortem evidence this whole design exists to preserve.
Tested in this environment: POSIX/Linux only, all five signals. Sent
each directly to a running process and confirmed (a) crash_dump.log is
written with the correct header and ring contents, mode 0600, and (b)
the process still terminates via the signal with the kernel's own
"core dumped" flag set (exit code 128+signal, confirmed for all five).
The Windows path is implemented per the discussion's guidance but is
untested -- no Windows build available in this sandbox.
## Step 5 -- getting the data back out
- QETApp::checkCrashDump(), called from checkBackupFiles() only when
there's no stale project file to recover this run (so the two
prompts never both show, per the discussion), offers an unretrieved
crash dump via DiagnosticsReportDialog and then deletes it regardless
of the user's choice -- offered exactly once.
- A new "Aide > Enregistrer un rapport de diagnostic..." action
(QETMainWindow) builds the same kind of report from the *current*
session (QetLogger::buildDiagnosticsReport(): header + this session's
log file) for a manual "attach this to a bug report" flow, not tied
to a crash.
- Both go through QetLogger::redact() before ever reaching the user:
the one redaction implemented is a literal replace of the home
directory with "~", since an absolute path under it leaks the
account name. The discussion's fancier "optionally redact project
filenames too" isn't attempted -- reliably telling a project path
apart from arbitrary log text is a much fuzzier problem than a
literal prefix match.
- DiagnosticsReportDialog shows the full (already-redacted) content
before saving, per the discussion: "the user is about to attach this
to a public tracker."
Verified in a real GUI session (Xvfb): triggered a SIGSEGV, relaunched,
confirmed the crash-report dialog appears with the right header/content,
confirmed it does not reappear on a second relaunch, and confirmed the
manual "Save report" action produces a correctly-formatted report and
saves it to a chosen path.
Built clean, no new warnings.
## Build systems
Registered in both: cmake/qet_compilation_vars.cmake, and
qelectrotech.pro. The .pro needed explicit globs for the new
sources/logging/ui/ subfolder -- sources/logging/*.{h,cpp} was already
globbed, but unlike the other ui/ subfolders that one had no entry of
its own, so diagnosticsreportdialog.{h,cpp} would not have been built
under qmake.
The job trigger was narrowed to push:tags a while back, but the
job-level 'if: github.ref == refs/heads/master' was left in place.
A tag push never has github.ref == refs/heads/master, so the two
conditions are mutually exclusive: the job trigger fires only on
tag pushes, while the guard only allows master-branch refs, meaning
the job has been silently skipped on every run since the trigger
was narrowed.
This is also the likely source of the recent Git LFS bandwidth/
storage overage: while the trigger was still push-to-master (pre-
narrowing), this job ran on nearly every commit and committed a
new QElectroTech.qch (LFS-tracked) each time, via the auto-generated
update-qch PR -- accumulating one LFS object version per run."
ProjectView::initWidgets() called insertSpacing(1, 10) on a QHBoxLayout
that was still empty, inserting past the end of the item list. The
corrupted layout crashed later in QWidget::setLayout() via
QLayoutPrivate::reparentChildWidgets() and QBoxLayout::itemAt().
Use addSpacing(10) instead, which is equivalent for an empty layout.
BorderTitleBlock::slot_setAutoPageNum was removed in 471f876 ("Remove unused signal", 2023-10-17) without noticing autonumberingdockwidget.cpp still referenced it via old-style
SIGNAL()/SLOT() macros, which fail silently at runtime instead of producing a compile error. This has remained broken on master ever since; a fix (57572a2, "Fix two broken signal
connections") exists on the unmerged qt6-cmake-elevatormind-merged branch but that one only commented the lines out without solving the underlying issue.
Removed the dead code entirely and call BorderTitleBlock::importTitleBlock() directly on the active diagram in on_m_folio_cb_activated() instead. The same mechanism is already
used elsewhere in the codebase (undo command, new-diagram creation, XML loading) to push TitleBlockProperties into a diagram and trigger a folio numbering recompute via needFolioData().
27dcd5e renamed BorderTitleBlock::diagramTitleChanged to informationChanged and updated diagram.cpp accordingly, but diagramview.cpp still used the old string-based SIGNAL()/SLOT()
macro referencing the removed signal name, which failed silently at runtime instead of at compile time. The diagram/window title never refreshed after title block changes.
Observed when going through the warnings.
Updated the connect to use informationChanged with modern pointer-to-member syntax, matching diagram.cpp's own connect to the same signal.
removed in Qt6, replaced by mappedInt/mappedWidget/mappedString.
What was broken:
* the logo-conflict rename dialog
* the system tray show/hide toggle
* the Window menu
* export dialog's per-diagram preview controls
Switched to the modern mappedInt/mappedWidget signals with pointer-to-member connect(), guarded for Qt < 5.15 until Qt5 can be dropped.
connect() used the string-based currentIndexChanged(QString) signal, which was removed from QComboBox in Qt6. Selecting a conductor/element/folio auto-numbering context in the
combo box in the project properties dialog never updated the other fields.
Switch to currentTextChanged with the modern pointer-to-member connect() syntax, which also catches signal/slot mismatches at compile time. This is still backward compatible with Qt5 (as long as this is needed).
Never leave a collection folder without a name (replaces #622)
Mark elements-folder with an exclamation-mark, when "qet_directory" is missing or faulty.
The unconditional early return was narrowed to non-directories only, so
that the just-added warning badge could be picked up once setUpData()
resolved m_qet_directory_unreadable asynchronously. But every directory
then called setIcon() on every single data(Qt::DecorationRole) query --
not just once -- and QStandardItem::setIcon() -> setData() emits
dataChanged() unconditionally (QIcon has no equality check to suppress
it). QTreeView handles dataChanged() by recomputing the row's size hint,
which re-enters data() for the same index, calling setIcon() again:
unbounded mutual recursion, confirmed by an isolated reproduction to
overflow the stack in a single frame (100k+ frames) well before the
first paint completes. Matches plc-user's report of a segfault right as
the elements tree begins drawing.
The race the guard was widened for doesn't actually occur:
ElementsCollectionModel only attaches itself to the tree view (the only
way data() becomes reachable) from loadingFinished(), which fires after
the QtConcurrent::map over every item -- this one included -- has
already finished. m_qet_directory_unreadable is therefore always final
before setUpIcon() can run for the first time, so the plain, always-only-
once guard is sufficient and the badge still works correctly.
`qelectrotech --resave examples/schema_indus.qet out.qet` never returns.
It is not slow -- ten minutes of wall clock consumed 0.16s of CPU, so it
is blocked, not working. The GUI opens the same project without
complaint, so the file is fine and the fault is in the headless path.
A backtrace of the stuck process:
main
CLIExport::run
QETProject::QETProject(QString const&, QObject*)
QETProject::openFile(QFile*)
QETProject::readProjectXml(QDomDocument&)
QET::QetMessageBox::warning(...)
QDialog::exec() <- waits forever
That project records version="0.3", so loading it raises the "partially
compatible with your version" warning. Interactively somebody presses
Open; with no display nobody can, and exec() spins its event loop
indefinitely. Any modal box reachable while loading does this -- the
version warning is just the one an example file happens to trigger.
Fixed at the wrapper all 52 call sites already go through rather than at
the one warning, so the whole class is closed: QetMessageBox gains a
non-interactive mode which writes the message to stderr and returns an
answer instead of constructing a dialog. main.cpp turns it on in the
CLI branch, beside the existing setBackupEnabled(false).
The answer is the caller's defaultButton when it gave one, otherwise the
first "carry on" button offered (Ok, Open, Yes, Save...), otherwise the
first button set. Both warnings in readProjectXml offer Open|Cancel and
abort on Cancel, so they resolve to Open and the project loads, which is
what a batch invocation wants. The text still reaches the user on
stderr, where previously it was lost inside an invisible dialog.
GUI behaviour is unchanged: the flag defaults to false and is set in
exactly one place, the command-line branch of main().
Verified: schema_indus.qet goes from hanging to resaving in 0.3s; all 23
example projects now complete a double-resave with element, conductor,
terminal and uuid sets intact; unit tests pass.
RotateSelectionCommand's existing "Pivoter" action (Space) only ever
bumps each selected item's own rotation property -- QGraphicsItem's
setRotation() spins an item around its own local origin and never
touches pos(). Select three elements arranged in a row and rotate:
each spins 90 degrees individually, but the row stays a row. That's
"rotate each item," not "rotate the group."
Add a rotate_as_group parameter to RotateSelectionCommand (default
false, so the existing action and its one call site are unchanged).
When set, it computes a shared pivot once -- the bounding-box center
of the whole selection -- and queues a second, parallel "pos"
QPropertyUndoCommand alongside the existing "rotation" one, rotating
each item's position around that pivot by the same angle.
Scoped the position change to Element/IndependentTextItem/
DiagramImageItem only: these are the only selectable types with
scene-space pos(). ConductorTextItem, DynamicElementTextItem and
ElementTextItemGroup are all parent-relative children (confirmed by
reading their constructors), so when their owning Element is also
selected and gets its own pos() rotated, they're carried along for
free by Qt's normal parent/child transform propagation -- exactly
what the existing "skip rotation if parent is also selected" guard
already assumes for those three cases.
Exposed as a new, separate action ("Pivoter le groupe", Shift+Space)
next to the existing one rather than changing Space's behavior, since
some workflows may rely on the current per-item rotation.
"Add folio" always appends to the end of the project, ignoring
whatever folio is currently selected in the left panel -- even though
the panel already tracks the selected diagram's position for its
existing move up/down/top actions, and QETProject::addNewDiagram(pos)
already accepts an arbitrary insertion index, pushed as an undoable
AddDiagramCommand (QetGraphicsTableFactory::create() already relies on
this exact mechanism to insert a folio right after a specific one).
Add two new context-menu actions that compute the target position from
the selected diagram's folioIndex() and pass it straight through the
existing machinery -- no changes needed to QETProject or
AddDiagramCommand. New requestForNewDiagramAt/addDiagramToProjectAt
signal/slot pair added alongside the existing
requestForNewDiagram/addDiagramToProject rather than changing it, so
the plain "Add folio" action's append-at-end behavior is untouched.
Drawing tools on the diagram canvas always started new shapes and free
text from a fixed hardcoded default (Qt's plain QPen()/QBrush(), and
the static Preferences font) -- changing a shape's color or a text's
font had zero effect on what the next new item of that type got, even
within the same editing session.
Add LastUsedStyle: a small in-memory, session-scoped static helper
(no QSettings, no persistence across restarts -- this is a live "what
did I just use" value, not a new app-wide default). Write side hooks
capture the value right where the properties editors already apply a
change (ShapeGraphicsItemPropertiesWidget::associatedUndo(), both the
live-edit dock path and the modal editProperty() dialog path; and
IndiTextPropertiesWidget::on_m_font_pb_clicked() right after the font
dialog returns). Read side hooks apply the stored value, if any, to a
newly created item: DiagramEventAddShape::mousePressEvent for shapes,
IndependentTextItem's constructor for free text (falling back to the
existing QETApp::indiTextsItemFont() Preferences default otherwise).
Doesn't touch the element/symbol editor's own drawing tools (a
separate subsystem) or add last-used text color (no color control
exists in the text properties UI to originate it from yet).
@plc-user asked (review on #633) for a way to see a broken folder
directly in the tree instead of only on tooltip hover, originally
suggesting a "FixMe: " text prefix on the displayed name. That name is
reused verbatim in dialog titles and status-bar messages elsewhere
(elementscollectionwidget.cpp), so baking a prefix into it would leak
into those too. An icon badge gets the same visibility without
touching the name value.
setUpIcon() overlays a small warning glyph on the folder icon when
m_qet_directory_unreadable is set. Also drop the "already has an icon,
skip" guard for directories specifically: that flag is only known once
the async setUpData()/localName() job completes (QtConcurrent::map), so
without this a directory painted before that finished would have its
plain folder icon cached forever and never pick up the badge.
Implements steps 1-3 of discussion #644 (deliberately not steps 4/5 --
no signal handler / crash flush, no diagnostics UI; see below).
## Step 1 -- fix the existing logger (bugs, no new behavior)
- One QFile handle held open for the whole session under a mutex,
instead of opening and closing the log file on every single message.
- The log directory and the session's date-stamped filename are
resolved exactly once, in the new QetLogger::init() called explicitly
from main() immediately before qInstallMessageHandler() -- not
recomputed per message, so a session that runs past midnight now
stays in one file instead of silently splitting.
- Age-based retention now uses lastModified() instead of lastRead():
opening a log to attach it to a bug report no longer resets its
retention clock.
- stderr and file output both encode UTF-8 explicitly (toUtf8()),
replacing stderr's toLocal8Bit() and the file stream's previously
Qt5/Qt6-inconsistent default encoding.
## Step 2 -- size-capped rotation + hardening
- The previously-unbounded daily file is now capped at 2 MiB and
rotated (kMaxFileBytes/kRotationKeep in QetLogger), keeping
<date>.log plus <date>.1.log .. <date>.4.log; oldest is dropped.
- Each message is truncated to 4 KB with a "...[truncated N bytes]"
marker before it reaches the ring or the file.
- Control characters (newlines, tabs, other non-printables) in message
content are escaped, since much of what QET logs is externally
controlled (file paths, element names, font strings out of a .qet
file) -- left unescaped, an embedded '\n' could forge log lines.
- The log file is refused if a symlink already exists at that path,
and is created/rotated owner-read/write only.
## Step 3 -- in-memory ring buffer
- LogRing (sources/logging/logring.h) is a fixed-capacity, always-on
ring of the last 4096 log lines, preallocated once at construction
(4096 * 512 B = 2 MiB) so append() never allocates. Entries are
stored as plain pre-formatted bytes in fixed-size slots -- the shape
discussion #644 specifies so a *future* crash handler could dump it
with nothing but write(2), even though no such handler exists yet.
Thread-safe via a plain QMutex (the lock-free requirement in the
discussion applies specifically to a signal-handler read path, which
this step doesn't add).
## Escape hatch
QET_LOG_DISABLE=1 in the environment at startup bypasses all of the
above -- no ring, no file, no rotation -- falling back to a minimal,
self-contained stderr passthrough that doesn't share any code with the
new formatting/sanitization path, so it stays usable even if that path
is what's misbehaving.
## Deliberately not included (per the discussion's own phasing)
- No signal handler / crash-time ring flush (step 4) -- the discussion
flags this as the highest-risk piece, explicitly meant to land last
and behind its own switch once the rest is proven.
- No diagnostics export UI (step 5).
- No log categories, session header, repeat collapsing or rate
limiting -- listed under "best practices worth building in", not
part of steps 1-3.
## Testing
Built clean, no new warnings.
Verified with real runs (QT_QPA_PLATFORM=offscreen, isolated HOME):
- Log file created at the expected dataDir()/YYYYMMDD.log path, mode
0600.
- A full startup's worth of real messages (translations, MachineInfo's
system dump, collection loading) written correctly; every one of the
231 lines in one run starts with a proper timestamp -- confirmed the
sanitizer correctly escapes the raw embedded newlines/tabs in
MachineInfo's multi-line CPU/GPU description fields into visible
\n/\t sequences rather than letting them fragment the log.
- QET_LOG_DISABLE=1: zero log files created, stderr still worked via
the independent legacy path.
- Rotation: pre-filled a log to just under the 2 MiB cap, ran a normal
session, confirmed it rotated to <date>.1.log (still 0600) with a
byte-clean split (no truncated/duplicated line at the boundary) and
a fresh <date>.log picked up from the next line.
Placing an auto-numbered element or conductor advances a shared
NumerotationContext counter (QETProject::addConductorAutoNum/
addElementAutoNum) as a side effect that sat entirely outside the undo
stack. Undoing the placement removed the visible number but left the
counter advanced, so every undo of an auto-numbered placement silently
burned a number, with no way to get it back short of a manual reset.
Adds SetAutoNumContextCommand, a small QUndoCommand storing the old/new
NumerotationContext and calling the matching add*AutoNum() setter on
undo()/redo() -- the same shape QPropertyUndoCommand already uses next
to it in ConductorAutoNumerotation::applyText().
Wires it into the two conductor call sites (the static newProperties(),
and numerateNewConductor(), both in ConductorAutoNumerotation) and the
element call site (Element::setUpFormula(), called from
DiagramEventAddElement::addElement() when a new element is dropped onto
a diagram). setUpFormula() now takes an optional parent QUndoCommand;
addElement() calls it before pushing its own undo_object so the counter
change lands in the same undo macro as the element's placement -- one
Ctrl+Z reverts both together, instead of leaving the counter adrift.
The project-properties config dialog's own add*AutoNum() calls (editing
the numbering rule itself, not a side effect of placing something) are
deliberately left untouched, as are the load-time folio-sequential
bookkeeping calls in Diagram::loadElmtFolioSeq()/loadCndFolioSeq() and
the bulk folio-renumbering passes in QETProject -- none of those run as
part of an undoable user gesture.
Implements the scope proposed in discussion #608.
ElementInfoWidget's fixed ~40 predefined ELMT_* keys had no way for a
user to add a genuinely new element-info key, even though DiagramContext
already stores/round-trips arbitrary keys generically via toXml()/fromXml().
Adds an "Ajouter une propriété personnalisée" button that appends a
CustomElementInfoPartWidget row (both key and value user-editable,
unlike the fixed ElementInfoPartWidget rows bound to one predefined
key). The typed key is validated live against the existing
DiagramContext::isKeyAcceptable() and flagged with a red border when
it doesn't match, instead of silently dropping it. Any key already
present on the element that isn't one of the predefined/special keys
is re-displayed as a custom row on next selection.
Implements the scope proposed in discussion #611.
Suggests the element's filename (without its .elmt extension) as the
default save name when exporting to SVG, instead of only defaulting to
the customElementsDir with no filename. Addresses plc-user's review
suggestion on PR #637.
Implements discussion #605. The diagram editor can already export a folio
to SVG; the element editor, where a single .elmt symbol is drawn, had no
export capability at all -- confirmed by grepping its header for "export"
before starting: nothing.
## Renders the live scene, not ElementPictureFactory's cache
The discussion proposed sourcing this from ElementPictureFactory's cached
per-element QPicture (m_pictures_H), the one used for the elements-panel
preview icons. Checked that cache's actual invalidation before building on
it: nothing in the editor ever tells it to drop an entry on edit, and it is
keyed by the element's on-disk uuid. So for any element already previewed
once in the panel, exporting from the cache would silently produce stale
content after any edit; for a brand-new, never-saved element, no entry
would exist at all. Neither is acceptable for a File > Export action a
user expects to reflect what's on screen right now.
Renders ElementScene directly instead, the same way
ExportDialog::generateSvg() already renders the live Diagram for the
diagram editor's own SVG export: no new drawing logic, only a new playback
target (QSvgGenerator instead of the screen), sized to the element's own
content bounds via the existing elementSceneGeometricRect() helper.
## Hotspot cross excluded from the export
ElementScene::drawForeground() draws the red origin/hotspot cross on every
render() call, unconditionally -- it's an editing aid, not part of the
element being drawn, and diagram editor's SVG export has no equivalent
problem since Diagram doesn't draw one. Added a settable
hotspotVisible flag, defaulting to true (the existing editing view is
completely unaffected) and turned off only for the duration of the export
render() call.
## Verified end-to-end via a real Xvfb session, not just a build
Opened a real shipped element (en_60617_05_06_04.elmt, "Phototransistor"),
exported it, and rendered the resulting SVG back to a bitmap with a small
QSvgRenderer-based harness -- pixel-identical in shape to the element as
shown in the editor. Confirmed the file is valid XML and contains no
red/#ff0000 stroke (the hotspot cross did not leak in).
Then the case the whole "render live, not cached" decision was about:
opened the same element, drew a new line with the line tool, and exported
again *without saving*. The new line is present in the exported SVG.
git status on the source .elmt file after both exports shows it completely
untouched -- the export is read-only and reflects live, unsaved editor
state, exactly the property a cache-based implementation would have gotten
wrong.
Built clean, no new warnings.
Reported by @scorpio810 on #626: "The field does not update automatically;
you need to list the other rules for it to update."
Two reasons, both mine:
The refresh was wired to the combo boxes' activated() signal, which Qt
emits only for user interaction. Nothing that changed a context
programmatically -- which is to say, numbering an element -- ever reached
it. Re-picking a rule from the combo was not a workaround so much as the
only code path that refreshed at all.
And there was no signal to hang it on for two of the three categories:
addElementAutoNum() emitted elementAutoNumAdded(), but addConductorAutoNum()
and addFolioAutoNum() emitted nothing, so even a listener would not have
heard a conductor counter advance.
Add QETProject::autoNumContextUpdated(), emitted by all three setters, and
have the dock re-read its three fields on it. Kept deliberately separate
from the existing *AutoNumAdded/*Removed signals: those make listeners
rebuild their rule lists, which is both heavier than needed here and would
disturb the user's current selection every time an element is numbered.
This one only says "re-read me".
The automatic refresh skips a field that has keyboard focus, so numbering
an element cannot overwrite a value half-typed under the cursor. Explicit
refreshes after a reset or an edit still write unconditionally, so the
field always ends up showing the canonical stored value.
Measured, advancing a counter the way numbering advances it and without
touching the combo box:
field before advance "5"
context after advance 6
field after advance "6" (was still "5")
A cyclic part could only ever be rendered at its natural width, which is
fine for one of @scorpio810's two real layouts and wrong for the other:
April 5000/2000, 32-point cards %IX0.0 .. %IX0.31, then %IX1.0
Schneider M340, 64-point cards I1.00 .. I1.63, then I2.00
The first wants no padding, the second wants two digits. Since the two
conflict, the width cannot be derived from the modulus or from the part
type -- it has to be the user's to set.
Add a format field holding a run of zeros, the same convention a
spreadsheet uses for integer padding: "00" renders 7 as 07, "000" as 007.
The field's length is the minimum number of digits. It applies to every
numeric part type, not only cyclic ones, so "Chiffre 01" can be widened
past two digits without inventing another type for it.
An empty mask means the part type's own natural width, so it reproduces
exactly what every existing context does today -- Chiffre 1 stays 7,
Chiffre 01 stays 07, Chiffre 001 stays 007. That is what makes this safe
for existing projects: absent is the default, and absent changes nothing.
Stored as a sixth field on the context part and as an XML attribute
written only when set, following how modulus was added: readers guard on
size() and treat a short item as "no format". All seven places that
rebuild a part while incrementing it now carry the format through --
missing one would have silently dropped the padding on the second element
numbered.
The editor field is restricted to zeros by a validator, and is enabled
only for types that render as a number.
Measured:
April, mask empty %IX0.29 %IX0.30 %IX0.31 %IX1.0 %IX1.1
M340, mask "00" I1.00 I1.01 ... I1.62 I1.63 I2.00 I2.01
no mask unit 7,8,9 ten 07,08,09 hundred 007,008,009
ten with mask "0000" 0007 0008 0009
Reported by @scorpio810 on #632 with a screenshot: a "Chiffre 1" followed by
a "Cyclique (modulo) 8" numbers elements 0..7 and then jumps straight to 9,
never showing 8, and never producing the 0-7 / 10-17 / 20-27 pattern the
feature exists for.
The cause is that the wrap-and-carry feature shipped without its rendering
half. Commit 68c2603 added the arithmetic and the editor UI across seven
files, none of them assignvariables.*, so there is no %seqw_ variable, no
wrap list in sequentialNumbers, no branch in setSequential(), and no branch
in numerotationContextToFormula(). A cyclic part therefore contributes
nothing to the generated formula and cannot be referenced from one -- it is
invisible.
Invisible but not inert: it still advances and still carries. So the digit
in front of it receives +1 from the carry on top of its own increment, and
the only digit the label does show jumps by two. That is the missing 8.
Add the missing half:
- sequentialNumbers gains a wrap list, handled in the copy constructor,
assignment, comparison, clear(), toXml() and fromXml();
- setSequential() collects wrap parts when the label uses %seqw_;
- assignSequence() substitutes %seqw_N and counts wrap in its bound, so a
context whose only counter is cyclic still resolves;
- numerotationContextToFormula() emits %seqw_N, so adding a Cyclique part
in the editor now puts a token in the formula instead of nothing.
Old projects are unaffected: <wrap> is simply absent from files written
before this, which fromXml() reads as an empty list, and such files have no
cyclic parts to reference in the first place. An older QET reading a newer
file ignores the unknown child.
Measured on the exact configuration from the report, unit + wrap(mod 8):
formula generated %sequ_1%seqw_1 (was %sequ_1 -- wrap contributed none)
carry digit increment 1 00 11 22 33 44 55 66 77 90 101 112 ...
carry digit increment 0 00 01 02 03 04 05 06 07 10 11 ... 17 20 21
The second line is the requested pattern. The first shows what is left once
the rendering is fixed but the carry digit still increments itself as well
as receiving the carry -- worth a UI decision, noted on the PR.
Follows @scorpio810's review on PR #626 and three defects found by finally
running the thing rather than only building it.
Replace the "?" button with an editable value field, as asked for. It shows
the current value of the context's counter -- the last part that actually
progresses, i.e. the least significant digit -- and typing a new value and
committing it writes that value back. This is strictly more useful than the
button it replaces: "?" is still reachable by typing it, and any other value
is now reachable too, which was the point of the request.
It also removes a destructive edge the button had: "reset to ?" rewrote
*every* part, so a scheme built as "K" + counter became "?????" and the
configured prefix was gone for good. There is no undo command for
numbering contexts.
Two bugs fixed in the reset path itself:
- The project was never marked modified. addConductorAutoNum() and friends
are a plain insert into a QMap; they emit nothing and set no dirty flag,
and the properties dialog that this code was modelled on calls
setModified(true) separately afterwards. Without it the user resets a
counter, closes the project, is not asked to save, and the reset is lost.
Verified before the fix: projectWasModified() stayed false across a click.
- A wrap part was reset to "1". A modulo part cycles over [0, modulus) --
the PLC addressing that motivated the feature runs %IX0.0..%IX0.31 -- so
its starting value is 0, not 1.
An empty value field is treated as "no change" rather than as an empty
value, so clearing the box by accident cannot wipe a counter, and the field
is refreshed from the context after every write and whenever the selected
context changes.
Fixes https://qelectrotech.org/bugtracker/view.php?id=332
localName() set a non-root folder's label only inside the success path of
loading its qet_directory file. If that load failed -- file missing,
malformed, or unopenable because of the Windows path-encoding problem with
accented characters that plc-user diagnosed on the tracker -- nothing was
set at all, and since a fresh item's text() is null the folder rendered
with a completely blank label. That is the reported symptom.
Resolve the name into a local and always fall back to the folder's own
directory name, so the label is never empty whatever went wrong.
The fallback is applied *after* NamesList::name() rather than passed into
it. This matters: name() returns a caller-supplied fallback before it
reaches its "first available translation" step, so passing m_path in would
replace a perfectly good name in some other language with the raw
directory name. A folder named only in French, viewed under an English
locale, previously showed "Accentué" and must keep doing so.
Falling back on its own would then hide the broken file -- the user sees a
plausible name and never learns there is anything to repair. So a folder
whose qet_directory could not be read now says so in its tooltip, naming
the file, above the collection path that tooltip already carried.
Suggested by plc-user on PR #622. The flag is recorded in localName() and
consumed in setUpData(), because setUpData() assigns the tooltip after
localName() runs and would otherwise discard it.
Only a file-level failure is flagged. A readable qet-directory with no
entry for the current language is not an error; NamesList::name() resolves
that itself and no warning is shown.
Verified on a fixture collection of four folders -- valid, malformed,
missing, and one named only in French:
master this patch
fr-only Accentué Accentué (no warning)
malformed <blank> malformed (warning)
no qet_directory <blank> no_file (warning)
valid Valid Folder Valid Folder (no warning)
Turning the default "Chiffre 1" part into a "Cyclique (modulo)" one left
the modulus spin box at 0, and a modulus of 0 means "no cycle" -- so the
part counted upward forever instead of wrapping, which is the whole point
of the type. Reported on #593 against a modulus-7 test and, more usefully,
against a real April 5000 PLC layout addressed %IX0.0..%IX0.31 per card.
setType() defaulted the modulus to 8 inside the block that installs numeric
behaviour, and that block runs only when the *previous* type was
non-numeric. Switching from one numeric type to another skips it. Since a
fresh part starts out as "Chiffre 1", the ordinary way to reach this
feature -- change the type of the part in front of you -- was exactly the
path that skipped the default. Going the long way round, via "Texte", set
the modulus to 8 and worked, which is why the feature tests fine when you
build the context some other way.
Moved the default out of that block so it applies whatever the part was
before, and made it fire only when the current modulus is unusable, so a
value the user picked on purpose survives switching type away and back.
The wrap/carry arithmetic itself was already correct: with a carry target
in front of it, a modulus-32 part yields %IX0.0..%IX0.31, %IX1.0 as asked.
Saved configurations are untouched -- a stored modulus, including a 0 left
behind by this bug, still loads and round-trips exactly as it was.
Resetting an active numbering counter back to a starting value, or
marking it as needing manual numbering, currently requires the full
round trip through the project properties dialog: open it from the
dock's Configure button, locate the right numbering context, select
the specific part row, clear and retype the value, confirm.
Add two small buttons next to each of the three combo boxes
(Conductor/Element/Folio) on AutoNumberingDockWidget itself:
- Reset to start: calls NumerotationContext::replaceValue() on every
part that represents a progressing counter, using a sensible
per-type value -- the part's own stored initialvalue for
folio-anchored types (unitfolio/tenfolio/hundredfolio), "1" for
plain numeric types and wrap, "a" for alpha. Non-incrementing types
(string, plant, locmach, idfolio, folio, elementline,
elementcolumn, elementprefix) are left untouched, since there's no
meaningful "start" distinct from whatever the user configured for a
fixed/contextual value.
- Reset to "?": sets every part's value to the literal placeholder
"?" unconditionally, for marking a context as needing manual
numbering.
Both write the updated context back via the same
addConductorAutoNum/addElementAutoNum/addFolioAutoNum calls the
project properties dialog itself already uses, so the dock's existing
refresh signals fire exactly as they do today.
Verified with a full build (Qt6) after the change -- clean compile
and link, including the .ui-generated Ui class correctly picking up
the six new button object names. Wasn't able to get a reliable live
GUI run in this environment to click-test the buttons themselves (ran
into unrelated session/display instability before any interaction
with the new buttons occurred), so this is verified by code review
and successful build rather than a runtime screenshot.
Implements https://github.com/qelectrotech/qelectrotech-source-mirror/discussions/597
Slice 1 of discussion #503 (from-to wiring list built on projectDataBase).
Conductor is the one item type on a diagram without a stable identity
of its own -- Element and Diagram both have a uuid, Conductor didn't.
This is the prerequisite the wiring-list tables need: a conductor
table keyed by uuid, the same way the existing element table is keyed
by Element::uuid().
- Conductor gets a QUuid m_uuid, generated in the constructor, with
uuid()/newUuid() accessors mirroring Element's exact pattern.
- toXml()/fromXml() read/write a "uuid" attribute the same way
Element already does, including the same generate-on-missing
fallback (QUuid(e.attribute("uuid", QUuid::createUuid().toString())))
for projects saved before this change.
- PasteDiagramCommand::redo() calls newUuid() on every pasted
conductor (content.conductors(), all three categories), mirroring
the existing per-element newUuid() call right above it -- otherwise
copy-paste would duplicate a conductor's uuid.
Backward compatibility: Conductor::valideXml() doesn't require the
"uuid" attribute, so old files parse unchanged. Verified by opening a
genuinely pre-uuid project (examples/industrial.qet, 150 folios, 671
conductors, legacy integer terminal1/terminal2 references with no
uuid attribute at all) -- loads and renders correctly, gets uuids
assigned on load, and those uuids are stable across a second
load/save cycle (byte-identical uuid values). Verified paste
separately: copying a selection with conductors and pasting produces
distinct new uuids for every pasted conductor, none colliding with
the originals or each other.
On macOS in particular there's currently no way to tell from the window
chrome alone whether the active project has unsaved changes. The main
window's title is set once in the constructor to a static string and
never updated afterward, and QET never sets Qt's windowModified
property anywhere -- so the native "document modified" indicator
(the dot in the close button on macOS; an asterisk in the title on
platforms that render it as text) never appears.
Add QETDiagramEditor::updateWindowModifiedState(), which sets the
window title to "<project>[*] - QElectroTech" (the "[*]" is Qt's own
placeholder convention for this) and calls setWindowModified() with
the active project's own modified flag. Call it from two places:
- subWindowActivated(), the single existing choke point already used
whenever the visible MDI tab changes, so switching projects
immediately reflects the newly active one's own state.
- A new per-project connection to QETProject::projectModified, added
in addProject() alongside the existing undo-stack registration,
filtered to only act when the modified project is the currently
active one.
With no project open, the title and modified flag both revert to the
original static, unmodified state.
Implements https://github.com/qelectrotech/qelectrotech-source-mirror/discussions/596
ElementsPanel and ElementsTreeView already force a fixed light palette
(white base, black text) on themselves, specifically because element
icons are rendered with colors read directly from each .elmt file --
almost always black linework, matching printed-schematic convention --
onto a transparent background. That only stays legible if the row
background is reliably light, regardless of the OS/desktop theme.
But QAbstractItemView paints row backgrounds using its viewport's
palette, not the view widget's own palette. setPalette() on the view
itself doesn't propagate to viewport() in the general case, so under
styles that actually respect the viewport's (unset, therefore
theme-inherited) palette -- e.g. KDE Plasma's Breeze Dark -- the row
background falls through to the app's dark palette while the element
linework is still literal black, making library icons and terminal
symbols invisible.
Apply the same QPalette to viewport() right after setPalette() in both
constructors, so the fix these two classes already clearly intended
actually takes effect under every style.
Fixes https://qelectrotech.org/bugtracker/view.php?id=335
Adds a real base-26 incrementing part type to the autonumbering engine,
alongside the 14 existing NumStrategy leaves. Unlike StringNum (a fixed,
non-incrementing text segment), AlphaNum::next()/previous() carry/borrow
entirely within the part's own value -- the composition loop in
NumerotationContextCommands doesn't need to change, since (unlike #578's
wrap-and-carry) nothing here needs to signal an adjacent part.
- incrementAlpha()/decrementAlpha() implement the spreadsheet-column-name
algorithm: increment carries right-to-left on 'z'/'Z' overflow,
prepending a new leading letter if the whole value overflows (z -> aa,
az -> ba). decrement is the exact inverse, including the symmetric
shrink case (aa -> z) once every position has borrowed. A single letter
already at "a"/"A" has no representable predecessor and is clamped
rather than turned into "z" -- caught via manual testing, since the
initial implementation mutated the string in the borrow loop before
checking whether to clamp, silently discarding the original value.
- Registered in NumerotationContext::validRegExpNum() but deliberately
not in validRegExpNumber(), so addValue() doesn't force alphabetic
values through int conversion.
- New "Cyclique"-adjacent "Alphabétique" entry in numparteditorw's type
dropdown, with its own letters-only QRegularExpressionValidator; the
increase spinbox is disabled since the step is always exactly one
letter, not a configurable amount.
Also wires the new part type through to actual element/conductor labels,
which turned out to be required for the feature to do anything visible
beyond folio numbering (which applies a NumerotationContext's
represented string directly). Element and conductor numbering instead
go through a separate formula-substitution layer
(autonum::sequentialNumbers + %sequ_/%seqt_/%seqh_-style placeholders in
AssignVariables::assignSequence()) that numerotationContextToFormula()
auto-populates. Without a matching placeholder, an "alpha" part would
silently vanish from the generated formula and never reach the label,
even though the underlying counter was advancing correctly:
- sequentialNumbers gained an `alpha` QStringList member (copy ctor,
operator=, operator==, toXml/fromXml, clear()).
- numerotationContextToFormula() emits a new %seqa_N placeholder for
alpha parts, the same way %sequ_N is emitted for unit parts.
- setSequential()/setSequentialToList() populate seqStruct.alpha,
passing the raw string through as-is rather than the .toInt()-based
formatting used for the numeric part types.
- AssignVariables::assignSequence() substitutes %seqa_N from
seqStruct.alpha, mirroring the existing %sequ_N/%seqt_N/%seqh_N
substitutions.
No "alphafolio" variant was added, matching the discussion's scope (only
unit/ten/hundred have folio-anchored variants).
Verified against production code via the numbering config dialog's own
Suivant/Précédent buttons: from "a", 25 clicks reached "z"; one more
produced "aa"; 25 more reached "az"; one more produced "ba" (carry).
Reversed: "ba"->"az"->(25 clicks)->"aa"->"z" (shrink)->(25 clicks)->"a".
One more "previous" at "a" correctly stayed at "a" after the clamp fix.
Also confirmed the Formule field auto-updates to "%seqa_1" the instant
the type is switched to "Alphabétique", confirming the formula-generation
wiring works live in the UI, not just at the engine level.
DialogWaiting pumps the event loop while the folios of a project are
built, so a second openAndAddProject() can run to completion nested
inside the first one (drop on another editor window, queued open) and
the plain reset/read counters would then report the wrong numbers.
Replace them with a RAII counting window (FontRestorationScope): the
constructor keeps the enclosing counts aside, the destructor restores
them. The nesting is strictly LIFO - the nested load completes inside
the pump of the outer one - so each load reports exactly its own
numbers, and the early-return paths of openAndAddProject() restore the
outer window automatically.
Suggested by ispyisail in the review of the reporting change.
Adds a configurable wrap-at-N counter type to the autonumbering engine
(NumerotationContext + NumerotationContextCommands), covering PLC/rack-style
addressing conventions like "e0.0...e0.7, e1.0...e1.7" (8 channels per
card) generally, rather than hardcoding octal specifically.
- New "wrap" part type (WrapNum, alongside the existing UnitNum/TenNum/
HundredNum strategies) stores a modulus in addition to the existing
value/increase/initialvalue fields. Its own next()/previous() only wraps
its own value modulo the configured modulus -- carrying into (or
borrowing from) the adjacent part requires visibility across parts,
which only the composition loop has.
- NumerotationContextCommands::next()/previous() gained carry()/borrow()
helpers: when a wrap part's own next() would reach/exceed its modulus
(or go below 0 on previous()), the nearest preceding numeric part is
bumped by exactly one unit, skipping non-numeric parts (e.g. a "."
string separator). Wrap parts chain correctly if adjacent (e.g. seconds
wrapping into minutes wrapping into hours).
- For the leading part of a wrap-and-carry pair to stay fixed except when
carried into (i.e. actually produce "e0.0...e0.7, e1.0..." rather than
advancing on every step under its own strategy), its own increase must
be 0. The increase spinbox's minimum was 1, which made this
configuration impossible through the UI -- lowered to 0 and documented
with a tooltip, since this wasn't obvious from the UI alone.
- NumerotationContext gained a 5th pipe-separated field (modulus) in its
serialized string form, defaulting to 0 (non-wrapping) for every
existing part type; toXml()/fromXml() persist it as a "modulus" XML
attribute the same way "initialvalue" is already persisted for
unitfolio/tenfolio/hundredfolio.
- New "Cyclique (modulo)" entry in the part-type dropdown (numparteditorw),
available for element, conductor, and folio autonumbering alike, since
all three already go through NumerotationContextCommands.
Verified in the running app via the numbering config dialog's own
Suivant/Précédent buttons (which call the production
NumerotationContextCommands::next()/previous() directly): a two-part
context (unit, increase=0 + wrap mod 8) produced exactly
e0.0→...→e0.7→e1.0→...→e1.7 on repeated "next", and the exact reverse
(with correct borrowing) on repeated "previous".
Until now a font description that could not be parsed only produced
console warnings most users never see, so nobody learned that their
texts silently lost their formatting (see the reports in issue #553).
Count in QETUtils::fontFromString() how many descriptions were salvaged
from a foreign or corrupt format and how many stayed unreadable, and
show a message box after opening a project when either happened:
salvaged descriptions are rewritten in the stable format on the next
save, unreadable ones fall back to the default font. Projects without
font issues open exactly as before, and non-interactive opens only log
the counters.
Verified with a Qt 5.15 build on a project carrying 52 19-field and
one 21-field description: the dialog reports 53 restored descriptions;
the same file on a Qt 6.11 build (which parses those formats natively)
shows no dialog.
See issue #553.
Three new QUndoCommand subclasses (AddDiagramCommand, RemoveDiagramCommand,
MoveDiagramCommand) pushed onto the project's existing (already
project-scoped) undo stack, so folio structure edits are undoable
alongside every item-level edit already on that stack.
- QETProject::addDiagram()/detachDiagram() are the shared attach/detach
primitives: they mutate the diagram list, connect/disconnect the two
per-diagram signals set up at add time, and emit diagramAdded/
diagramRemoved. AddDiagramCommand and RemoveDiagramCommand call these
(via friend access) for both redo and undo, so a removed diagram is
parked rather than destroyed -- it's only actually deleted if the
command itself falls out of undo history while still detached.
- ProjectView reacts to diagramRemoved the same way it already reacted to
diagramAdded (tearing down/rebuilding the tab), so both directions of
both commands go through the same reactive path every other diagram
listener (project database, cross-references, generic panel) already
relies on.
- MoveDiagramCommand wraps a new ProjectView::setDiagramPosition(), which
performs the tab move and the project's diagramOrderChanged() list
reorder synchronously in one step, instead of relying on the queued
tabMoved connection (needed for interactive drag-and-drop) to catch up
later -- avoiding a second, redundant reorder from that queued call.
- Multi-folio delete and multi-folio move (QETDiagramEditor::removeDiagrams()
and the moveDiagram*(QList<Diagram*>) batch slots) wrap their per-diagram
loop in QUndoStack::beginMacro()/endMacro(), so a multi-select action is
one undo step, matching current UX.
- Softened the delete confirmation's "this change is irreversible" wording
now that it no longer is.
Verified headlessly (Xvfb + xdotool + scrot): add/undo/redo, delete/undo/
redo (single and multi-select, single undo step for the batch), and
move/undo/redo all behave correctly against a 7-folio project.
Displays the cursor's scene position (same grid units as the parts'
X/Y property spinboxes) in a permanent status bar label, updated on
every mouse move. Addresses the overlapping-node mis-click case from
the originating forum report: with a live readout, precise pointing
no longer requires guessing against nearby z-ordered points.
ElementScene::mouseMoveEvent already computed the (optionally
grid-snapped) scene position on every move; it now also emits it via
a new mouseMoved(QPointF) signal, which QETElementEditor's status bar
label subscribes to.
Implements the first pillar of #574: a "Shortcuts" preferences page letting
users rebind, search and reset every keyboard shortcut in the app.
What it does
- New ShortcutManager singleton: every one of the ~95 setShortcut()/
setShortcuts() call sites across qet.cpp, qetmainwindow.cpp,
elementspanelwidget.cpp, autonumberingdockwidget.cpp, richtexteditor.cpp,
qetdiagrameditor.cpp, qettemplateeditor.cpp and qetelementeditor.cpp now
calls registerAction(target, id, category, default_sequence) instead,
which applies the user's saved override (or the default) and remembers
the target for later editing.
- New ShortcutsConfigPage, added to the existing "Configurer QElectroTech"
dialog: a filterable table of every registered shortcut, grouped by
category, each with a QKeySequenceEdit and a per-row reset button, plus a
"reset all" button. Bindings are only persisted (via
ShortcutManager::setSequence()) when the dialog is accepted.
- Conflict detection: rows whose currently-edited sequence collides with
another row are highlighted with a tooltip naming the conflicting action.
- Overrides are stored under a "shortcuts/" QSettings group, one key per
id, keyed to match the id (not persisted at all when equal to the
hardcoded default), so a future QET version can safely raise a default
for anyone who never customized it.
Design notes
- Targets are handled generically via QObject rather than QAction, since one
call site (autonumberingdockwidget's "Configurer" button) is a
QPushButton, not a QAction. Both declare an identical "shortcut"
QKeySequence Q_PROPERTY, so registerAction() reads/writes it through the
property system instead of needing a separate code path.
- Several live targets can share one id at once -- QET allows multiple
windows of the same kind (diagram editor, element editor...) open
simultaneously, each constructing its own QAction with the same id.
setSequence() updates every live target for that id in one call, so a
rebind takes effect in all open windows immediately, without restart.
- A shortcut's description is captured from its target's text() the first
time that id is registered, then cached -- so the config page stays
correct even after the owning window is closed. One consequence: a
shortcut belonging to an on-demand window (element editor, title block
editor, rich text editor) only appears in the list once that window has
been opened at least once in the current session, since nothing has
registered its id yet otherwise.
Testing
Full CMake build (qmake CONFIG+=no_kf5, Qt 5.15) compiles clean with zero
errors and zero new warnings. Verified end-to-end in a real running session
(Xvfb + xdotool):
- The Shortcuts page appears in Configure QElectroTech with the right icon,
lists every always-registered shortcut with correct category/action name/
current binding.
- The filter box correctly narrows the list, and correctly returns nothing
for an action whose owning window hasn't been constructed yet this
session (confirming the on-demand-registration behavior above is working
as designed, not silently broken).
- Conflict detection correctly flagged a real pre-existing same-key overlap
between "Supprimer" (delete selection, Del) and "Supprimer ce folio"
(delete diagram from panel, Del) -- both highlighted with explanatory
tooltips.
- Rebound "Manuel en ligne" to Ctrl+Shift+M, clicked OK: persisted under
[shortcuts] in QElectroTech.conf, and the Aide menu's entry showed the new
binding immediately, no restart needed.
- Reopened the dialog: the rebind was still shown. Clicked its per-row
reset button, then OK: the settings key was removed entirely (not stored
as "F1"), correctly falling back to the hardcoded default.
Retrofitting the Tab/Shift+Tab, select-all (#585) and Ctrl+G jump-to-element
(#586) shortcuts through this registry is left for a follow-up once those
PRs land, to avoid re-merging still-open branches into this one.
Developed with assistance from Claude (Anthropic).
Implements the third pillar of #574: a lightweight quick-open popup
for jumping straight to an element on the current diagram, rather
than scrolling/scanning visually.
New JumpToElementDialog (sources/ui/): a small QDialog with a filter
QLineEdit and a live-filtered QListWidget beneath it. Built from
every Element on the diagram, searchable against its label
(elementInformations().value("label")), type name (Element::name()),
and every other element information value, joined into one
lowercased search string per candidate. Up/Down move through the
filtered list, Enter selects the highlighted element on the diagram
(clearing the rest of the selection) and scrolls it into view via
ensureVisible(), Escape cancels without changing the current
selection. All three are handled via an event filter on the line
edit, so the user never has to leave the text field to navigate or
confirm.
Triggered by a new Ctrl+G action in QETDiagramEditor, added next to
the existing Ctrl+F "search and replace" action and to the Edit
menu. Confirmed free: not used anywhere in qetdiagrameditor.cpp or
qetmainwindow.cpp today.
Explicitly not a duplicate of the existing SearchAndReplace module
(also on this menu, via Ctrl+F): that's a bulk property search/replace
tool across whole diagrams; this is a single-item navigational
popup with no editing capability.
Verified end-to-end in a real running session (Xvfb + xdotool)
against a multi-transistor schematic: Ctrl+G opens the popup listing
every element; typing "Q16" live-filters down to the one match;
arrow keys move the highlighted row through the filtered list;
Enter selects the highlighted element (confirmed via the properties
panel showing its label) and closes the popup; Escape closes it
without changing the selection.
See discussion #574.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
PotentialSelectorDialog::chosenProperties() built an OK-only dialog
and discarded exec()'s return value entirely:
dialog.exec();
for (QRadioButton *b : H.keys()) {
if (b->isChecked()) return H.value(b);
}
return ConductorProperties();
Escape and the window close button already trigger QDialog::reject()
on a plain QDialog, but since the result was never checked, dismissing
the dialog without picking anything just silently returned blank
ConductorProperties() -- the same value returned when a real potential
was chosen but happened to produce empty properties. There was no way
to distinguish "the user cancelled" from "the user chose an empty
potential", so the caller always proceeded as if a choice had been
made.
Add a real Cancel button, check dialog.exec() == QDialog::Accepted,
and report cancellation through a new optional `bool *cancelled`
out-parameter. Also pre-select the first entry, closing a related gap
where clicking OK without ever touching a radio button hit the exact
same "silently returns blank properties" failure mode.
Thread the result through ConductorCreator::setUpPropertieToUse()
(now returning bool) so the calling constructor aborts and creates no
conductors at all when the user cancels, instead of proceeding with
blank properties.
The sibling constructor-based PotentialSelectorDialog (used for
conductor/report potential linking, a separate flow) already gates its
side effects behind on_buttonBox_accepted(), so cancelling it was
already safe -- gave it a visible Cancel button too for consistency
while touching this file, no behavior change there.
Verified with real Qt event simulation (QTest::mouseClick/keyClick)
against the exact new dialog-building logic: clicking Cancel and
pressing Escape both correctly report cancellation with empty
properties; clicking OK untouched returns the pre-selected first
entry; selecting the second option then OK returns that selection.
See discussion #581.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
QFont::fromString() of Qt 5.x and Qt <= 6.10 rejects the >= 19 field
descriptions QFont::toString() emits since Qt 6.11, silently leaving a
broken font at every read site. Add QETUtils::fontFromString(): try the
native parser first, and on failure re-compose the legacy 10/11 field
form from the known Qt 6.11 field layout (OpenType weight mapped back
to the legacy scale) so no font information stored in existing files is
lost. Also salvage the 21 field double-serialized descriptions left
behind by some historical builds (a complete legacy description
embedded as the family name of a second one) by taking the embedded
leading description, matching what the lenient parser of Qt 6.11+
resolves them to. All font read sites now go through the helper; on
failure the default font of the caller is left untouched instead of a
cleared family.
Verified end to end on a Qt 5.15 build: a project whose 53 font
attributes were rewritten into the 19 field Qt 6.11 format loads and
autosaves byte-identical to the original legacy file (family, sizes,
bold/italic/underline, style name all preserved), and a mixed file
containing the exact 21 field string from the issue comes back
normalized as "Caladea,9,-1,5,75,1,0,0,0,0,Bold Italic".
See issue #553.
Adds a ProjectUsageTracker (sources/project/) that accumulates how
long a project has been the active tab, using QElapsedTimer so the
value is computed on demand rather than via polling. It's hosted on
ProjectPropertiesHandler per that class's own stated design intent
("all new properties should be managed by this class").
The accumulated time is persisted as a new <usage time_spent="N"
enabled="true|false"/> element, a sibling of <properties> in the
project XML, written/read by new QETProject::writeUsageXml()/
readUsageXml(). It rides along on the existing autosave path for
free, since writeBackup() already serializes the full project via
toXml().
QETDiagramEditor::subWindowActivated() now pauses every open
project's tracker except the one whose tab just became current, so
switching between several open projects keeps each project's tracked
time isolated.
Surfaced in the existing Project Properties "Général" page: a
"Temps passé sur ce projet" display, a "Réinitialiser" button, and
an opt-out checkbox ("uniquement enregistré localement dans ce
fichier" - this is local-only, never transmitted anywhere).
Verified beyond compiling: full CMake build, then an actual runtime
session confirming the saved XML's time_spent value, that closing
and reopening the project round-trips and resumes timing, that the
reset button works, and - the key correctness check - that with two
projects open, the inactive one's time_spent stays frozen while the
active one accumulates real elapsed time, over the same interval.
See discussion #576.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
QFont::toString() is not stable across Qt versions: Qt 6.11 switched to
a 19-field format carrying OpenType weights, which QFont::fromString()
of Qt 5.x and Qt <= 6.10 rejects, leaving a broken font. Projects saved
by a Qt 6.11+ build were therefore unreadable by older builds.
Add QETUtils::fontToString() composing the legacy 10/11-field
description (weight mapped back to the legacy scale with the same
closest-match table Qt uses when parsing) and use it at every site that
stores a font description in a project, element, table config or
settings file. Every Qt version from 5.15 through 6.12-beta parses this
form correctly, so files stay readable by every QET build in
circulation.
See issue #553.
updateForm() called on_m_text_from_cb_activated() directly, intending
only to enable the sibling widget matching the combo box's current
index ("For enable the good widget"). But that slot also loops over
every currently selected part and pushes an undo command overwriting
textFrom on any part that doesn't match, since it's normally only
reached via the combo box's own activated(int) signal (real user
interaction, never fired by programmatic setCurrentIndex()).
updateForm() runs on every selection change, so during a rubber-band
drag over dynamic text fields with different sources, each time a new
field enters the selection, the representative part's textFrom gets
force-applied to every other selected part - converting e.g. a
UserText field to ElementInfo mid-drag, before the user has released
the mouse or interacted with the combo box at all.
Split the cosmetic widget-enable logic into updateTextFromWidgetsEnabled(),
called from updateForm(). on_m_text_from_cb_activated() keeps the
part-mutating loop, now only reached from real user activation.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
BorderTitleBlock::updateDiagramContextForTitleBlock() merged the page's
"additional fields" over the project-level context unconditionally,
even when the page-level value was empty. Since #495 auto-adds every
template custom variable to the folio's Custom tab with an empty
value (so the user only has to fill in what's missing), simply
opening/confirming the Folio Properties dialog now permanently blanks
out any project-level custom variable of the same name — and it's
self-perpetuating, since the dialog re-adds the empty entry every time
it's reopened.
Skip page-level values that are empty when merging, so a real
project-level value shows through. An explicit non-empty page-level
override still takes precedence as before.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The element tooltip showed only the collection path - the least useful
string exactly when a long descriptive name is truncated in the tree
(qelectrotech#552). Show instead: localized name, description,
manufacturer and manufacturer reference (each only when set), with the
collection path kept as the last line. Directories and .qetmak entries
keep the plain path tooltip.
Reuses the location/context already parsed right above for the search
index, so no additional file access or parsing.
GUI-verified on a library where every element carries these fields:
hovering an element now shows e.g. name, "Hutschienennetzteil
85-264VAC auf 24VDC, 92W, Schutzklasse II", manufacturer, order number
and path on five lines.
The child lookup iterated parent_element.childNodes() via item(i), and
QDomNodeList::item() walks the sibling chain from the start on every
call - making the loop quadratic in the number of children, with an
extra QList allocation and a second pass on top. This lookup runs
several times per element instance while loading a project, against the
"import" category that holds every embedded definition, so the cost
scales with (instances x embedded definitions).
Replace it with a firstChildElement()/nextSiblingElement() walk with an
early return. Same semantics (first tag+name match in document order).
Measured on the Kaefer_1303 reference project (3.9 MB, 23 folios,
432 instances, media of 6 runs, Windows/MinGW, same GCC for both):
before after
Qt5 5.116 s 5.068 s
Qt6 6.683 s 4.640 s (-31 %)
This removes the entire Qt6 load-time regression discussed in #553 -
Qt6 goes from +31 % slower to 8 % faster than Qt5 on the very project
that exposed it (Qt6''s QDom makes the quadratic pattern much more
expensive than Qt5''s did). Smaller projects gain too (3.4 MB example:
-9 % on Qt6).
(cherry picked from commit 0d4ef8eca27601c37ba2b75d7c058e9d8e2beea4)
Static texts (PartText) gain an optional alignment, exposed via the
existing AlignmentTextDialog behind a new "Alignement" button in the
static text editor:
- The horizontal part aligns the lines of a multi-line text relative
to each other (centered block labels no longer need one hand-placed
text per line).
- The full alignment defines the anchor: when the content or font
changes later, the selected corner/center of the bounding rect keeps
its place instead of always growing right/down from the top-left
(same prepareAlignment/finishAlignment logic as DiagramTextItem).
Format: the <text> node takes the same optional Halignment/Valignment
attributes as dynamic_text, written only when they differ from the
historical top-left behaviour - existing .elmt files are untouched and
round-trip byte-identical. The saved x/y stay the baseline-left of the
text block in all cases; ElementPictureFactory only needs the line
alignment (the anchor is editor-side behaviour), so rendered elements
match the editor exactly.
German translations for the three new strings included (qet_de stays
complete, 2686/2686).
Verified headless: a project embedding a two-line text once with
Halignment=AlignHCenter and once without exports to SVG with the short
line centered under the long one (x 102.5 vs 126.5) in the aligned
block, and identical x for both lines in the legacy block. Editor-side
anchor behaviour follows the proven DiagramTextItem implementation but
was not manually exercised in the GUI yet.
Set QDomImplementation::setInvalidDataPolicy(ReturnNullNode) at startup.
Qt before 6.12 defaults to accepting invalid data when building QDom
nodes, so untrusted text inserted into comments, CDATA sections or
processing instructions could break out of its node on serialization
(XML injection, low severity). Qt 6.12 flips the default to
ReturnNullNode; opting in explicitly gives the same behavior on any
Qt 5/6 version, so no version guard is needed.
Verified: --resave of a 5-folio project produces valid XML with all
folios intact, and --export-pdf still works on the result.
(cherry picked from commit 7804ef3864a0b8643cfe13b68b8e0e6235508ab6)
createElement() ran a full pugixml parse of the element definition for
every instance, only to read the link_type attribute for the subclass
dispatch - on a big example project (191 instances) 49 ms of the load,
measured with temporary instrumentation. The QDom definition is already
cached and the ctor uses it anyway; reading the attribute there costs
~17 ms in total, so the net win is ~30 ms - within run-to-run noise
end-to-end, but it removes an entire redundant parser pass per element.
Behavior unchanged: an absent and an empty link_type both fell through
to SimpleElement before and still do.
(cherry picked from commit d63275971f558c8ac59f35bf4d13d7e424682342)
QHash/QMap::keys() allocates a list of every key on each call, then
contains() searches it linearly - an accidental O(n) plus allocation
where a direct O(1) lookup was meant. 35 occurrences across 7 files,
found while profiling project load times (context: #553/#560).
The hot one is ElementPictureFactory::getPictures(), which runs once
per element instance on project load: on the 3399 KiB example project
(191 instances, 129 cache hits) the keys() detour cost 45 ms of the
1.34 s total - measured, not estimated; the fix reproducibly shaves
~35-45 ms off that load. The remaining call sites are UI paths
(search&replace, dynamic text model, undo commands) where the waste
scales with selection/model size.
No behavior change: for QHash/QMap, keys().contains(k) and
contains(k) are equivalent by definition.
(cherry picked from commit 0a7f8f072fa68de7c01a9fc134a4bc8e16d62062)
Two further empty Qt6 guard branches found by ispyisail in
qelectrotech#553:
- Element editor parts list: the QGraphicsItem* was only stored into
the list item on Qt5, so on Qt6 selecting a part in the list silently
stopped selecting it on the canvas. QVariant::fromValue() works on
both (Qt itself declares the metatype), guard removed.
- Print dialog: setEnabledOptions() is a Qt4-era API removed in Qt6;
setOptions() is the modern spelling with the same replace-the-set
semantics and exists on both, guard removed.
Both builds (Qt 5.15.2 and Qt 6.11.1) compile clean.
(cherry picked from commit 759d1c078e23664482850bad2e91d668b93aadcf)
QETProject::writeBackup() was Qt5-only: the Qt6 branch of the guard was
an empty placeholder, so on Qt6 no backup was ever written - a silent
data-loss risk (a crash loses everything since the last manual save),
found by ispyisail in qelectrotech#553.
The Qt5-style QtConcurrent::run(function, reference-args) call did not
survive the Qt6 API change; a lambda capturing the (implicitly shared)
document copy behaves identically on both, so the version guard goes
away entirely.
Verified at runtime on the Qt6/Windows build: opening a project creates
the autosave triple (.qetautosave + .lock + .path) with valid XML
content, and a clean exit removes it again. The CLI keeps backups
disabled via setBackupEnabled(false), unchanged.
(cherry picked from commit 0f65ae8c4b2782fbfe97111bc8b369cc105ec592)
qInstallMessageHandler() ran inside the startup worker thread, which is
scheduled after QETApp construction - but QETApp's constructor performs
the entire startup (collections, editor, opening projects passed on the
command line). Everything logged during that window went to the default
handler, i.e. stderr, which is invisible in a Windows GUI session: the
daily log file ended right after the machine-info block, and exactly
the interesting lines - the elements-collection timer and the project
load timer from #560 - never reached it.
Install the handler synchronously before SingleApplication instead;
the worker keeps the old-log cleanup and machine-info dump. The CLI
path returns earlier and intentionally keeps plain stderr logging.
Verified: a GUI session now logs the full timeline, e.g.
12:37:03.623 Elements collection reload
12:37:03.776 ... finished to be loaded in 0.151 seconds
12:37:04.744 Project "..." (726 KiB) opened in 1.583 seconds
(cherry picked from commit 72b1a1d9ec2e3fd3787224759797978d710880bd)
Requested in #553 to compare Qt5 and Qt6 builds. QET already reports how
long the elements collection takes to load (ElementsCollectionWidget::
reload); this adds the equivalent for opening a project.
The phases are reported separately rather than as a single total. Reading
the XML and building the objects is mostly independent of the Qt version,
whereas refreshing the diagrams is graphics-scene work -- a single number
would mix the two and could suggest a Qt version makes no difference when
the part that changed is simply not where the time goes. Measured on the
example projects, XML parsing is 3-7% of the total and diagram
construction 77-83%, so the distinction matters in practice.
QETProject::openFile() reports the total with the parse/build split, and
readProjectXml() reports the build phases:
Project content built in 1.391 seconds (elements collection 0.009,
diagrams 1.153, terminal strips 0, refresh 0.196, database 0.033)
Project "example.qet" (3399 KiB) opened in 1.505 seconds
(xml parsing 0.11, content 1.395)
Logged with qInfo(), matching the existing collection timer, so it lands
in the normal log without a debug build.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
QET_LANG_PATH was "l10n/" for WIN32, a value that appears nowhere else in
the tree: the MSI shortcuts pass --lang-dir="[INSTALLDIR]lang/", and the
windows-build workflow copies the .qm files into files/lang/. So the
compiled-in default pointed at a directory no packaging creates, leaving
the command-line argument to do all the work.
Align it with what is actually shipped, so the binary-relative lookup
added in the previous commit can find the translations on its own.
commonElementsDir(), commonTitleBlockTemplatesDir() and languagesPath()
return the compile-time path verbatim when it is not marked
*_RELATIVE_TO_BINARY_PATH. On Windows those paths are relative
("./elements/", "./titleblocks/", "./lang/"), so they resolve against the
process working directory.
That only holds when QET is started from its own installation folder.
Opening a document from a file manager sets the working directory to the
document's folder, and the data is then looked for next to the user's
file. The shortcuts hide this by passing --common-elements-dir,
--common-tbt-dir and --lang-dir explicitly; anything that launches the
binary without them does not (see #554).
Add resolveConfiguredDataPath(): absolute paths are returned unchanged,
and a relative one is tried against the working directory first (so any
setup relying on the old behaviour keeps working), then next to the
executable, then in its parent -- the layout used by the Windows
packaging, where the binary sits in bin/ with the data beside it. This is
the same fallback the no-compile-option branch already performs for
issue #86, which was unreachable whenever the compile option is set.
The *_RELATIVE_TO_BINARY_PATH defines are left alone; they are only set
for macOS in qelectrotech.pro, and the CMake guard that would set them
tests a variable that is never defined.
The MSI registers both shortcuts with the arguments QET needs to find its
data ("Point directly to qelectrotech.exe with all required arguments"),
but the QElectroTech.Document\shell\open\command registry value was
written without them:
"[INSTALLDIR]bin\qelectrotech.exe" "%1"
Launching from the Start Menu therefore works, while double-clicking a
.qet file does not: Explorer sets the working directory to the document's
folder, and the compiled-in data paths are relative, so nothing is found
there. The most visible symptom is the interface always coming up in
French, because no translation loads and the source strings are French.
Give the file association the same arguments as the shortcuts.
Reported by mr-rfh in #554, who diagnosed it and arrived at exactly this
registry value by hand.
QETApp::useSystemPalette(true) installed a one-rule application stylesheet
whose only declaration was invalid CSS:
QAbstractScrollArea#mdiarea {
background-color -> setPalette(initial_palette_);
}
That is not a CSS declaration but a note-to-self, committed in e6c32bc0
("Background set to use System Palette", 2014) when a hardcoded
background-color:#D5D2D1;
was replaced with a reminder to derive the color from the palette instead.
Qt's CSS parser silently skips invalid declarations, and at the time the
same rule still carried valid background-image/-repeat/-position
properties, so the block kept working and nothing looked wrong. Those
properties were dropped later, leaving a rule with no valid declarations
at all.
The rule has therefore styled nothing for some time. It is not harmless
though: a non-empty application stylesheet wraps every widget in
QStyleSheetStyle, which overrides per-widget QWidget::setStyle(). QET
does not currently call QWidget::setStyle() anywhere, so nothing is
visibly broken today, but it blocks that API for future work — it was
found while prototyping a palette-based dark mode (see #553).
Replace it with an explicit setStyleSheet(QString()). The behavior of the
"use system colors" branch is unchanged: it already dropped whatever
style.css had loaded (by overwriting it with the inert rule), and the
qApp->setPalette(initial_palette_) call on the line above is what actually
supplies the system colors — which is what the 2014 note was asking for.
The style.css path (use == false) is untouched.
Reported by DieterMayerOSS in #553.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The CMake build has supported building without KF5 since the Qt-only
replacements landed in sources/ui/nokde (BUILD_WITH_KF5=OFF). The qmake
build had no equivalent: qelectrotech.pro hard-coded
QT += ... KWidgetsAddons KCoreAddons ...
so a machine without KF5 fails at configure time with
Project ERROR: Unknown module(s) in QT: KWidgetsAddons KCoreAddons
This is the error reported in discussion #393, where a contributor gave up
trying to build on Windows with Qt 5.15.2 / MinGW. Deleting the two modules
by hand (the obvious workaround) then fails at link time with undefined
references to KAutoSaveFile, because the nokde sources are never compiled.
Mirror the four things CMake does when BUILD_WITH_KF5=OFF:
- define BUILD_WITHOUT_KF5 (the sources already guard on it)
- add sources/ui/nokde to INCLUDEPATH
- compile the three nokde replacements (KAutoSaveFile, KColorButton,
KColorCombo)
- drop KWidgetsAddons/KCoreAddons from QT
The default build is unchanged: without CONFIG+=no_kf5 the KF5 modules are
still required and sources/ui/nokde is not on the include path.
Usage:
qmake CONFIG+=no_kf5 qelectrotech.pro
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The six user-facing error strings in EdzArchive::extract() were hard-coded
QStringLiteral, so they could not be translated (reported by plc-user in
PR #513).
Wrap them in tr() via Q_DECLARE_TR_FUNCTIONS — EdzArchive is not a QObject,
so this gives it its own translation context without pulling in a moc
dependency. The *.part.xml glob stays a QStringLiteral: it is a filename
pattern, not user-facing text.
Adds German and French translations for all six. German wording for
"Cannot read %1" is plc-user's ("Kann %1 nicht lesen.").
Note for review: the rest of QET uses French source strings translated to
en/de in the .ts files, whereas these strings are English in the source
(as merged in PR #513). This commit keeps them English rather than
rewriting strings already reviewed; happy to flip them to French sources
for consistency if preferred.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Shows the licensing/liability warning text agreed on in PR #513
(scorpio810) before the file picker opens. Import stays disabled
until the "I have read and accept these terms" checkbox is ticked.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
CMake's bundled FindSQLite3 module only creates the SQLite3::SQLite3
target since CMake 4.3; earlier versions (still used by most current
Linux distros) only provide SQLite::SQLite3, which CMake >= 4.3 now
flags as deprecated.
Add the missing alias ourselves right after find_package(SQLite3)
when it isn't already provided, so the project can link against the
modern SQLite3::SQLite3 name on every supported CMake version without
triggering the deprecation warning on newer ones.
Use QT_VERSION_CHECK to detect Qt6 at compile time and report
version 0.200.1 instead of 0.100.1 in that case, so Qt6 builds
are clearly distinguishable from Qt5 builds.
Clears the last five spots that stop master from compiling against Qt6
(all mirrored from the proven qt6-build line):
- qgimanager.h/.cpp: in Qt6 QVector is an alias for QList, so the
deprecated QList overloads of manage()/release() collide with the
QVector ones (same signature). Keep them on Qt5 only.
- diagramview.cpp: one unguarded QTextStream::setCodec() call (removed
in Qt6, which defaults to UTF-8).
- print/projectprintwindow.cpp: QApplication::desktop() was removed in
Qt6; use QWidget::screen() there, keep the old path on Qt5.
- titleblocktemplate.cpp: QDomDocument::setContent() returns a
ParseResult in Qt6 whose operator bool is explicit; static_cast keeps
the bool initialization working on both.
With these, master configures and builds to a running binary with
Qt 6.11 (mingw, BUILD_WITH_KF5=OFF); every change is guarded or
dual-safe, the Qt5 build is unaffected.
Listing GuiPrivate unconditionally in QET_COMPONENTS breaks the whole
Qt5 configure: find_package(Qt5 COMPONENTS GuiPrivate) looks for a
Qt5GuiPrivateConfig.cmake that has never existed - Qt5 creates the
Qt5::GuiPrivate target implicitly together with Gui. Only Qt6 requires
(and provides) the explicit component.
Move the request into a QT_VERSION_MAJOR-guarded find_package after the
main one, both for the application and for tests/catch (whose targets
link Qt::GuiPrivate via QET_PRIVATE_LIBRARIES). Fixes the msys2/Qt5
Windows CI configure failure:
"Could not find a package configuration file provided by Qt5GuiPrivate".
Verified: Qt 6.11 configure passes and the Qt6::GuiPrivate target is
created (the private-module warning now fires from the guarded call).
The Qt5 path simply no longer requests the component, restoring the
pre-existing implicit behaviour.
The name of the elements and folders of the collection are not displayed
until we hover the item with the mouse.
This due that QtConcurent::run was disabled at loading of collection in
the goal of use QtConcurrent::run with Qt6.
Run is made to run a function once.
Map is made to run a fonction for each item of a sequence (what we need
in this case).
Remove code of run and re-enable code for map.
- Add missing <QHash> include: QHash<QUuid, QVector<QPointF>> was
only forward-declared transitively under Qt5's heavier headers;
Qt6's leaner <QPainter> etc. no longer pull it in.
- Replace QPolygonF{points_} with QPolygonF(points_): under Qt6,
QPolygonF inherits QList<QPointF>'s constructors via 'using
QList<QPointF>::QList;', including the std::initializer_list<T>
one. Brace-init-list construction with a single argument first
considers only initializer-list constructors before falling
back to regular ones, which trips up overload resolution here
even though points_ is exactly a QList<QPointF> (QVector is a
plain alias for QList under Qt6). Plain parenthesised
construction sidesteps that resolution phase entirely and binds
directly to QPolygonF(const QList<QPointF>&).
QVector::size() (== QList::size() under Qt6) returns qsizetype
(64-bit), while 'level' is a plain int. std::min(level,
m_real_terminal.size()-1) therefore tries to deduce a single T
from two different argument types, which fails - GCC reports it
against the unrelated std::min(initializer_list<T>) overload,
but the real issue is the type mismatch between the two-argument
candidates. Under Qt5, QVector::size() returned int, so this
compiled fine.
Force T=int explicitly via std::min<int>(...) and cast size()
down to int (physical terminal counts are always tiny), matching
the pattern already used safely elsewhere in the codebase (e.g.
qetgraphicstableitem.cpp).
Since Qt 6.5, QDomDocument::setContent() returns a ParseResult
struct with an *explicit* operator bool(), so 'bool x =
doc.setContent(...)' (copy-initialization) no longer compiles -
explicit conversions aren't considered there.
This exact issue was already fixed in titleblocktemplate.cpp by
dropping the intermediate bool and testing the call directly in
the if condition (contextual bool conversion in an if() is fine
even for an explicit operator bool), but this second occurrence
in templatescollection.cpp used the same pattern and was missed.
Applying the same fix here for consistency.
templateview.h only included <QGraphicsView> but uses
QGraphicsGridLayout (tbgrid_ member) and QGraphicsLayoutItem
(indexOf/removeItem signatures) directly. Some Qt5 header
apparently pulled these in transitively; Qt6's leaner headers
don't, so the class fields/methods silently failed to resolve
and the compiler picked bogus 'int*' overloads instead.
Other files in the same directory already get these symbols
either via the <QtWidgets> umbrella header or a direct include,
so this was an isolated gap.
The Qt6 branch of the #if QT_VERSION guard swapped QRegExp for
QRegularExpression but kept calling QRegExp-only methods
(exactMatch()/cap()), which QRegularExpression doesn't have.
Use the correct QRegularExpression API instead: match() returns
a QRegularExpressionMatch, tested with hasMatch() and read with
captured(n).
- qetxml.h: add missing <QUuid> include (used in propertyUuid/
createXmlProperty signatures but never included directly).
- machine_info.cpp: fix ambiguous QString/int operator> in
send_info_to_debug() for it1/it2/it3; just count every
matching file found instead of the meaningless comparison.
The project panel's "copy and paste" action duplicates a folio through
an XML round-trip (toXml/fromXml), and Element::fromXml adopts the uuid
stored in the XML - so every element on the duplicated folio kept the
uuid of its source element. On-diagram copy/paste already handles this
(PasteDiagramCommand::redo() calls newUuid()), but the folio-duplicate
path bypasses that command.
Since element.uuid is the PRIMARY KEY of the project database, the
duplicated elements failed to insert ("UNIQUE constraint failed:
element.uuid" spam in the log) and silently disappeared from
nomenclature/summary tables, even though they are valid on the folio.
Renew the uuid of every element on the freshly duplicated folio, exactly
as the paste command does. In-memory links established during fromXml
are pointer-based and unaffected; the new uuids are written on save.
On Debian/Ubuntu qt6-base-dev ships the Qt6::GuiPrivate CMake config but
the actual private headers live in the separate qt6-base-private-dev
package, so find_package succeeds and CMake only fails later at generate
time with a non-obvious "non-existent path" error. QET genuinely needs
the private QtGui API (QPdfEngine) for clickable hyperlinks in the PDF
export, so document the package instead of degrading the feature.
Observed on Ubuntu 26.04 LTS (Qt 6.10.2); Debian sid and the Qt online
installer ship the headers together.
The default build ran both lupdate (qt5_create_translation, which
rewrites the tracked .ts files in the source tree) and lrelease
(qt5_add_translation, which reads the same .ts files). Under high
parallelism lrelease could read a .ts while lupdate was rewriting it,
failing the build with "Premature end of document"; every build also
modified tracked files as a side effect, and each .qm was generated
twice (once into the build dir, once into lang/).
Keep only lrelease in the default build and move lupdate behind an
explicit developer target (cmake --build . --target update_translations).
The target scans sources/ instead of the whole source tree, which also
stops lupdate from parsing unrelated third-party .js files.
Clears the 9 non-deprecation warnings from the Qt6 build:
- qHash(QColor): hash rgba() (unambiguous QRgb) instead of name(), and
use the size_t seed signature on Qt6 (guarded for Qt5). Fixes the
ambiguous-overload warning in terminalstripmodel.h.
- Two qsizetype->int narrowings in brace-init: explicit static_cast<int>
(elementscene.cpp, terminalstrip.cpp).
- main.cpp: keep the QtConcurrent::run QFuture in a [[maybe_unused]]
variable (nodiscard).
- qetapp.cpp: guard the stylesheet load on QFile::open() succeeding
(nodiscard) instead of ignoring the result.
QVariant::canConvert(int) is deprecated in Qt6. Use the non-deprecated
canConvert<T>() template (canConvert<QString>() / canConvert<int>()),
which is available on Qt5 too. Clears the last 2 -Wdeprecated-
declarations warnings.
Three deprecated APIs have replacements that only exist in newer Qt6:
- QLocale::nativeCountryName() -> nativeTerritoryName() (Qt 6.2)
- QDomDocument::setContent() overload -> ParseResult (Qt 6.5)
- qt_ntfs_permission_lookup -> QNtfsPermissionCheckGuard RAII (Qt 6.6)
Each is wrapped in QT_VERSION_CHECK so Qt5 keeps the old path. Clears
4 -Wdeprecated-declarations warnings.
QString::count() (no-arg) is deprecated -> size(); QColor::setNamedColor()
is deprecated -> the QColor(QString) constructor. Both replacements are
non-deprecated on Qt5 too. Clears 2 -Wdeprecated-declarations warnings.
QSqlDatabase::exec(const QString&) is deprecated in Qt6. Route the
PRAGMA/CREATE TABLE statements through QSqlQuery(db).exec() instead.
Clears 11 -Wdeprecated-declarations warnings; same statements, same
database connection, no behavioural change.
QVariant::type() and the QVariant::Type enum are deprecated in Qt6.
Switch on userType() (non-deprecated, returns the QMetaType id and
works on Qt5 too) with QMetaType enum cases. Clears 6 -Wdeprecated-
declarations warnings; the numeric type ids are unchanged.
qAsConst was deprecated in Qt 6.6; std::as_const (C++17, already the
project standard) is the drop-in replacement. Clears 46 -Wdeprecated-
declarations warnings across 18 files. No behavioural change.
Regenerate lang/qet_de.qm from lang/qet_de.ts with lrelease so the
committed binary matches the strings completed in #538
(2621 finished, 0 unfinished for de_DE).
qet_de.ts had 20 unfinished entries in the PartTerminal and
TerminalEditor contexts: 12 empty ones (shown in French at runtime,
since French is the source language of the tr() literals) and 8 that
already carried German text but were still flagged unfinished.
Translate the 12 empty strings, matching the terminology already
established in these contexts (borne/terminal -> "Anschluss",
label -> "Beschriftung", cadre -> "Rahmen", police -> "Schriftart"),
and mark the 8 existing drafts as finished. lrelease now reports
2621 finished and 0 unfinished translations for de_DE.
NamesList::name() looked up the display name using the full locale from
langFromSetting() (e.g. "de_DE") and jumped straight to English if it was
absent. Element and folder names in the collection are keyed by 2-letter
codes (<name lang="de">), so a "de_DE" UI showed the whole collection in
English/French even though German names exist.
Try the base language ("de") before the English fallback, mirroring what
setLanguage() already does for the UI translations.
MOC on macOS does not resolve QGraphicsLayoutItem through the bulk
QtWidgets include, causing an 'Undefined interface' error at build time.
Adding an explicit include resolves this. Linux builds are unaffected. Thanks hairykiwi 8ef4e04
Check the QLockFile in staleFiles() before returning a no-KF5 recovery candidate, matching the KAutoSaveFile contract that actively owned autosave files are not stale.
Extend the no-KF5 Catch test so a child process keeps the autosave lock alive while allStaleFiles() runs, then verify recovery after the child is killed.
Assisted-by: pi coding agent / Mika (OpenAI GPT-5.5)
Add a no-KF5 Catch regression test that leaves a KAutoSaveFile-compatible backup behind from a child process, then verifies stale-file discovery, stale-lock recovery, reading, and cleanup.
Assisted-by: pi coding agent / Mika (OpenAI GPT-5.5)
Provide a small KAutoSaveFile-compatible implementation for the no-KF5 build path and use it to keep the existing crash-recovery code active when BUILD_WITH_KF5=OFF.
The normal KF5 build still uses the KDE KAutoSaveFile implementation.
Assisted-by: pi coding agent / Mika (OpenAI GPT-5.5)
The BUILD_WITH_KF5 option was checked with DEFINED, so passing -DBUILD_WITH_KF5=OFF still entered the KF5 setup path.
Skip the KF5 setup when disabled and provide small Qt-only replacements for the KDE color widgets used by .ui files in that build mode.
Assisted-by: pi coding agent / Mika (OpenAI GPT-5.5)
Add a hand-written "Version 0.101 (Unreleased)" section covering the
headless CLI export mode, PDF hyperlink cross-references, diagram
duplication, the Windows MSI versioning fix, the macOS file-open
regression fix, and expanded Korean translation support.
Add git-cliff config for changelog generation
Add cliff.toml, configured to group commits by keyword (fix/feat/
refactor/etc. in FR+EN) since the project history doesn't follow
Conventional Commits. Handles QET's tag format (X.Y / X.Y.Z, no v
prefix), excludes the floating "nightly" tag, dedupes repeated commit
messages per release, and truncates commit bodies to their summary
line to keep the generated changelog valid Markdown.
Usage:
export GITHUB_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxx
git-cliff --config cliff.toml <last_tag>..HEAD --prepend ChangeLog.md.
Version was static (X.Y.Z.0) across nightlies, so MajorUpgrade never triggered the automatic uninstall; the Windows Installer only compares Major.Minor.Build, ignoring the 4th field.
Fix 9 critical meaning errors, remove anglicisms, standardize
terminology and fill 81 previously untranslated strings.
Details:
- Nombre de phase: Nome da fase -> Numero de fases
- Ajouter un tableau: Ajustes da tabela -> Adicionar uma tabela
- Parcourir: Personalizado -> Navegar
- Desactive: Invalido -> Desativado
- Longueur: Largura -> Comprimento
- Variables de cartouche: Variaveis de armazenamento -> Variaveis do carimbo
- Aller a la correspondance: Ir para a aba -> Ir para a ocorrencia
- Creer de nouveaux folios: Cria um novo projeto -> Criar novas paginas
- Ponter/Deponter les bornes: verb form and meaning corrected
- Removed anglicism resetar -> Restaurar/Redefinir
- conducteur standardized to condutor (was mixed with fio)
- nomenclature standardized to nomenclatura (was lista de nomes)
- WiringListExport: entire feature translated
- TerminalNumberingDialog: entire dialog translated
- QETElementEditor: Mirror, Flip, Fine-Rotation translated
- TerminalEditor: NO/NC contacts -> NA/NF (Brazilian standard)
- Include compiled .qm file
m_first_move was initialized before _linestyle in the constructor
initializer list, but _linestyle is declared first in the class. Reorder
to match declaration order.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When an item type is selected for the first time the properties dock
expands, causing the QGraphicsView viewport to shrink. Qt recalculates
scene coordinates and fires one or more synthetic mouseMoveEvents before
the user has actually moved the mouse.
The original code used a single-shot m_first_move flag in
CustomElementGraphicPart, which absorbed exactly one spurious event.
PartText and PartDynamicTextField had no protection at all.
Fix: compare screen-coordinate displacement against
QApplication::startDragDistance() (~4 px). Screen coordinates are
stable across viewport resizes, so the check correctly rejects
synthetic dock-expansion events while allowing genuine drags.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Same root cause as ProjectPropertiesDialog: Qt::WindowModal only blocks the
direct parent window, leaving the rest of the MDI area live. If new_project
or close_project fires while the app settings dialog is open, any raw pointers
derived from the project list become stale. Switch to ApplicationModal to
block all windows for the duration of the dialog.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ProjectPropertiesDialog::exec() was using Qt::WindowModal, which only
blocks the parent ProjectView window. The MDI workspace and its other
subwindows remained interactive, so actions like new_project or
close_project could fire while the dialog's config pages still held raw
QETProject* pointers — leading to a SIGSEGV when Qt's event loop later
dispatched a signal through one of those stale pointers.
Detected by the 8-hour GUI fuzzer: action sequence add_diagram_page →
flood_wires ×18 → new_project while Project Properties was open
produced exit code -11 (SIGSEGV) on the first of 12,717 actions.
Switch to Qt::ApplicationModal so no window can receive input while the
dialog is open. Project Properties is a short-lived dialog; blocking
the whole application for its duration matches user expectation and
removes the lifetime hazard without requiring QPointer surgery across
four config-page classes.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Follow-up to the eventFilter fix: testing showed double-click works
when QET is already running, but a cold launch (app not running yet)
still opens an empty window. Finder/Launch Services can deliver the
QFileOpenEvent to the QApplication's native event loop before main()
reaches the point where QETApp is constructed and its real eventFilter
is installed -- there's a window between 'SingleApplication app(...)'
and 'QETApp qetapp;' during which the event can arrive and be lost.
Add a minimal EarlyFileOpenCatcher installed on app immediately after
it's constructed (before anything else can run an event loop). It only
buffers the file path. Once QETApp exists, main() swaps it out for the
real QETApp::eventFilter and drains anything that was buffered via
qetapp.openFiles(), so no cold-launch QFileOpenEvent is silently
dropped.
Confirmed by manual testing:
- 'open app --args file' on .qet/.elmt/.titleblock: OK (already worked)
- double-click while app already running: OK (already worked)
- double-click cold launch: previously opened an empty window, this
buffers and replays the event so it now opens the right editor.
Root cause (see issue #218 discussion):
- QETApp::eventFiltrer (Q_OS_DARWIN) was correct in intent but never
actually installed as an event filter anywhere, and its name didn't
match the QObject::eventFilter virtual signature, so even if it had
been installed it would never have been invoked as an override.
Confirmed dead code.
- main.cpp instead routed Finder's QFileOpenEvent through
MacOSXOpenEvent -> SingleApplication::sendMessage(), which is the
secondary-to-primary IPC channel. Called from within the primary
instance itself, sendMessage() fails silently and the file path is
dropped, which is exactly what double-click does (Finder doesn't spawn
a secondary process, the running instance receives the FileOpen event
directly).
- openFiles() takes a QETArguments, not a QStringList. The dead code's
openFiles(QStringList() << filename) only worked via an untested
implicit QStringList -> QList<QString> -> QETArguments conversion
chain.
Fix:
- Rename eventFiltrer -> eventFilter (qetapp.h/.cpp) so it's a proper
override of QObject::eventFilter, and make it public so main.cpp can
install it on QApplication.
- Build the QETArguments explicitly instead of relying on implicit
conversion.
- main.cpp: drop MacOSXOpenEvent entirely (include + instantiation),
install qetapp as the Q_OS_MACOS event filter on app right after
QETApp qetapp; is constructed and before app.exec(). No race window:
the event loop hasn't started, so no QFileOpenEvent can be delivered
before the filter is installed.
QETArguments::handleFileArgument() already sorts files by extension
(.elmt, titleblock, else project) and openFiles() already fans out to
openProjectFiles()/openElementFiles()/openTitleBlockTemplateFiles()
accordingly, so this single fix covers .qet, .elmt and .titleblock
double-click/drag-to-dock on macOS, not just .qet.
SingleApplication's sendMessage/receivedMessage flow (used for CLI args
on all platforms) is untouched; this only touches the Q_OS_MACOS block,
so there is no behavior change on Windows/Linux.
Follow-up (not included here): the macOS Info.plist (misc/Info.plist)
has an empty CFBundleShortVersionString, which may affect macOS's
willingness to retain file associations across app updates.
pugi::xml_document::load_file(const char*) calls fopen/fopen_s on Windows,
which uses the ANSI codepage — not UTF-8. This silently fails when the
collection path contains accented characters (é, ü, ñ, …) or is longer
than the narrow-API MAX_PATH limit, leaving the collection panel with no
element names or illustrations.
Switch both call sites to toStdWString().c_str() which invokes the
load_file(const wchar_t*) overload. On Windows pugixml calls _wfopen,
the wide Unicode API that handles all valid Unicode paths. On Linux/macOS
the same overload converts wchar_t to UTF-8 internally and calls fopen,
so behaviour is unchanged on those platforms.
Affected files:
sources/ElementsCollection/fileelementcollectionitem.cpp (qet_directory load)
sources/ElementsCollection/elementslocation.cpp (element .elmt load, both branches)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Resolve cmake/qet_compilation_vars.cmake conflict: keep both upstream's
cli_export.cpp/h and pdf_links.cpp/h and the EDZ source additions.
- 10-position grid alignment: pin_y values are multiples of 10 so terminals
snap cleanly to QET's default grid. group_gap raised to 10 (one full slot).
- Named connector groups get a header label (group name) placed in the gap
above the first pin, so the electrician sees block names (XDI, XPOW, …)
without reading individual terminal designations.
- Device-tag dynamic_text now uses 9pt LABEL_FONT and y = min_y - 9 so it
clears the element body and is legible at normal zoom.
- Add EPLAN Data Portal Terms of Use disclaimer to sources/import/edz/README.md.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
saveConfig() serialises Qt::AlignHCenter as the string "AlignHCenter"
via QMetaEnum::valueToKey(), but loadConfig() matched against
Qt::AlignCenter (0x0084 = AlignHCenter|AlignVCenter) instead of
Qt::AlignHCenter (0x0004). The two values differ, so the switch fell
through to the default (Right) every time center was saved and reloaded.
Add Qt::AlignHCenter as the primary case and keep Qt::AlignCenter as a
fallthrough for any config files that were hand-edited by users following
the workaround documented in issue #283.
Verified with a standalone Qt test: QMetaEnum::keyToValue("AlignHCenter")
returns 4 (AlignHCenter), which now correctly resolves to combobox index 1
(Center) instead of 2 (Right).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The default user-collection path ends in "elements" and the default
company-collection path ends in "elements-company". Both
FileElementCollectionItem::isCustomCollection() and
ElementsLocation::isCustomCollection() used startsWith(customDir),
so "…/elements-company/…" matched "…/elements" and returned true.
This caused ElementsCollectionModel::addLocation() to insert a
newly-saved user-collection element as a child of the company-
collection branch in the tree, making it appear in the wrong panel.
Fix: require the path to equal the directory root exactly, or to
start with the directory root followed by '/'.
path == dir || path.startsWith(dir + QLatin1Char('/'))
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previous logic resolved duplicate connectionDesignation values by
appending sanitised description text or numeric suffixes, which was
fragile and produced names an electrician could not easily map back to
the physical wiring.
New scheme:
• terminalNr present → "XDI.2", "XRO1.3", "XPOW.1" …
• terminalNr absent → designation as-is ("L1/U1", "UDC+", "PE") —
these are busbar / power connections and are already globally unique
• collision (malformed data) → numeric suffix as safety net
The description (connectiondescription) remains as the human-readable
label beside the terminal symbol, exactly as suggested by plc-user.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
EdzPin gained a third field (group) but the fallback initializer at
line 70 still listed only two fields, triggering -Wmissing-field-initializers.
Added the explicit QString() for group.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
EPLAN 2022-style part.xml files (e.g. IFM AL1122) use a numeric
functiondefgroup attribute and do not carry the text functiondefinition
block name that the previous grouping logic relied on. Those parts
fell back to grouping by pin designation, producing symbols with all
pin "1"s stacked together, then all "2"s, etc. — the bug reported in
PR #513.
Fix: read terminalNr first (the physical M12/connector socket identifier,
e.g. "X01", "X31") as the primary group key; fall back to functiondefinition
text for older EPLAN formats that omit terminalNr. Pins within each
connector group are still sorted by designation using natural sort.
Also remove the dashed inter-group separator lines; the existing 5 px
gap between groups provides sufficient visual separation.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The previous grouping compared `connectionDesignation` values (e.g. "1",
"2", "3") to detect group boundaries. Those values are pin position
numbers within a terminal block, not functional group identifiers, so
devices like the ABB ACS880 produced 11+ tiny single-pin "groups" instead
of the ~8 functional blocks (AC-IN, Motor-OUT, DC-Bus, Brake-Resistor,
Analog-I/O, Digital-I/O, ...) the reviewer identified.
Fix:
- Add `group` field to EdzPin, populated from the `functiondefinition`
attribute on <functiontemplate> (newer EPLAN) or its parent <function>
element (older EPLAN).
- Sort pins by group first (preserving XML appearance order per group),
then by designation within each group using natural sort.
- Use `groupKey()` — group when present, designation as fallback — for
the group-break detection that drives separator lines and Y-gaps.
Parts without any functiondefinition data retain the previous
designation-based behaviour unchanged.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- StyleEditor: QGridLayout(this) pre-empted the widget's layout slot,
causing setLayout(main_layout) to silently fail and orphan main_layout.
Fix: use QGridLayout() without a parent so setLayout() succeeds.
- ExportDialog: ~ExportDialog() was empty, leaving ExportDiagramLine
heap objects in diagram_lines_ unfreed. Fix: qDeleteAll(diagram_lines_).
- GenericPanel::getItemForDiagram: when called without the bool* created
arg, it created a parentless QTreeWidgetItem that callers immediately
discarded. Fix: return nullptr when created==nullptr and item not found
(all callers already guard with if (item)).
- ElementScene: m_paste_area (created in initPasteArea) was temporarily
added/removed from the scene during XML loading but never freed in the
destructor. Fix: delete it if not currently in the scene.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Terminal stores its TerminalData* as member d but never deletes it.
Every Element creation (placing on diagram, loading icon for the
element browser, drag previews) leaks one TerminalData per terminal.
ASan confirmed 112 leaked objects (9856 bytes) in a short session
across four call sites all rooted in Element::parseTerminal.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Qt 5.15.x added libxcb-cursor0 as a hard runtime dependency of the xcb
platform plugin (libqxcb.so). The kf5-5-110-qt-5-15-11-core22 content
snap does not bundle this library, so when the snap runs on an Ubuntu 24.04
host the dlopen() of the plugin fails with:
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in ""
even though it was found.
Staging libxcb-cursor0 from the Ubuntu 22.04 archive satisfies the
dependency without changing the snap base, Qt version, or any other
dependency. No ABI mismatch: the plugin and the staged library are
both built against the core22 (22.04) ABI.
Fixes issue #373.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Pins are already sorted by designation (see EdzPart::parse natural sort).
This change makes same-designation groups visually obvious in the element
symbol by:
- Inserting a 5 px gap between consecutive terminals whose designation
differs, so each group reads as a distinct block.
- Drawing a thin dashed horizontal line through each gap, mirroring
the grouped-I/O style shown in typical manufacturer datasheets.
The body rectangle and bounding box grow automatically to accommodate the
extra gaps, so no fixed sizes change. Unique terminal names (added in the
previous commit) are unaffected.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Two issues raised in PR review:
1. Copyright year: new files carried "2006" (the project's founding year).
Updated to "2006-2026" to reflect the actual authorship period.
2. Duplicate terminal names: EPLAN parts can have multiple connection
templates sharing the same connectionDesignation (e.g. a drive where
both wire entries of terminal "1" are labelled "1"). QET requires
unique terminal names for wiring and terminal-diagram generation.
Resolution order in EdzElementBuilder::build():
- Unique designation → used as-is.
- Duplicated designation with distinct sanitised description →
"designation_description" (e.g. "1_L_P").
- Otherwise → numeric suffix: "1", "1_2", "1_3", …
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1. machine_info.h: zero-initialise Screen struct members
Max_width, Max_height, count, width[] and height[] were bare
int32_t with no initialiser. The comparisons in
init_get_Screen_info() read them before any write, producing
undefined behaviour flagged by Valgrind as 'Conditional jump
or move depends on uninitialised value(s)'.
2. main.cpp: pre-initialise MachineInfo on the main thread
MachineInfo::instance() was first called inside QtConcurrent::run(),
causing its constructor (which calls qApp->screens()) to run on a
background thread. QScreen methods are not thread-safe in Qt5.
Calling instance() once on the main thread before the worker
launches guarantees the singleton is fully built first; subsequent
calls from the worker just return the cached pointer.
3. qetdiagrameditor.h: move m_first_show before the QActionGroup members
C++ initialises members in declaration order. m_first_show was
declared after the QActionGroup members (line 256 vs 168). During
construction of m_row_column_actions_group(this), Qt dispatches a
QObject parent-change event that reaches QETDiagramEditor::event(),
which reads m_first_show before it has been initialised.
Moving the declaration to the top of the first private: block
ensures it is initialised before any member that can trigger events.
All three found via Valgrind --tool=memcheck on Ubuntu 22.04 / Qt 5.15.3.
Relates-to: PR #514 (same QtConcurrent thread-safety pattern).
Reviewer requested configdir/datadir instead of cached for consistency
with the surrounding code style.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
QStandardPaths::writableLocation() is not thread-safe in Qt5.
ElementsCollectionModel::reload() launches:
QtConcurrent::map(m_items_list_to_setUp, setUpData)
Each worker calls FileElementCollectionItem::setUpData()
→ collectionPath() → isCollectionRoot()
→ QETApp::userMacrosDir() → QETApp::dataDir()
→ QStandardPaths::writableLocation() ← SIGSEGV (null deref)
The crash was confirmed by Valgrind (address 0x0, inside
libQt5Core's writableLocation internals).
Fix: replace the bare QStandardPaths calls in dataDir() and
configDir() with a C++11 static-local lambda. The compiler
guarantees the lambda body runs exactly once across all threads
(magic statics, ISO C++11 §6.7). After the first (main-thread)
call the result is returned lock-free.
Relates-to: #492 (same QtConcurrent lifetime pattern fixed in
QETProject::writeBackup by PR #512).
- EdzArchive checks the archive magic up front: gives a clear message for
zip-format .edz (not yet supported) and unrecognised data, instead of an
opaque 7z decode error.
- Trim the vendored LZMA SDK headers to the decode closure actually used
(removes 21 unused encoder/multithread/Xz/Aes headers; 18 .c + 18 .h remain).
- Add sources/import/edz/README.md documenting the feature, the data mapping
and the bundled SDK.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The new import action and dialogs used French source strings (QET convention)
but had no English translation, so they showed French in the English UI. Add
the five strings to qet_en.ts (menu action, dialog title, file filter, error
box title and message).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replaces the QProcess->7z shim with the public-domain LZMA SDK (23.01) 7-Zip
reader, vendored under sources/import/edz/lzma/ (decode-only subset). New
edzsevenzip.cpp wraps SzArEx_Open/SzArEx_Extract and writes entries via Qt, so
EdzArchive no longer needs an external 7-Zip at runtime. Enables the C language
in CMake for the vendored sources.
Verified: the bundled decoder extracts all three ifm sample .edz and the
generated elements still match the Python oracle exactly (byte-correct decode),
with no 7z on the path.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Wires EPLAN .edz import into the elements panel. EdzImporter orchestrates
EdzArchive -> EdzPart -> EdzElementBuilder and writes the generated .elmt into a
destination collection folder (named by order number). A right-click
"Importer une piece EPLAN (.edz)..." action on a writable collection directory
opens a file picker, runs the importer into that folder's fileSystemPath() and
reloads the panel; errors surface via QetMessageBox. Modeled on newElement().
EdzImporter verified headless against the Python oracle for KG6000/MFH200/
R1D200; the panel wiring is built/tested via the WSL Qt5+KF5 build.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Port of the edz2qet.py prototype's mapping to C++. EdzPart parses an EPLAN
part.xml into a portable model (identity/metadata, localized names, connection
list); EdzElementBuilder turns that into a QET element (generic symbol: body
rectangle + one west-facing terminal per pin, per-pin labels, localized <name>s,
and elementInformations for the BOM).
Pins are natural-sorted by designation so they stack 1,2,3,4 regardless of the
order EPLAN lists them (MFH200 lists 1,3,4,2). Output verified structurally
identical (uuids aside) to the Python oracle for three ifm samples — KG6000
(4-pin), MFH200 (4-pin, reordered) and R1D200 (5-pin, incl. Dutch name) — and
the generated element loads in the QET editor with correct UTF-8.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
First piece of native EPLAN Data Portal (.edz) import. A .edz is a 7-Zip
archive; QET previously had no archive handling. EdzArchive unpacks one to a
temporary directory and locates the contained part.xml.
The extraction backend is isolated behind extractWithSevenZipCli() so it can be
replaced with a bundled decompressor later without touching callers; this M0
step shells out to a 7-Zip CLI via QProcess. Verified on three ifm sample
parts (KG6000, MFH200, R1D200 — all 7z), plus the corrupt/missing-file paths.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Although I haven’t encountered the problems described myself (nor do I need to!), the changes and additions look plausible and compile without errors or warnings, so I’m approving this PR!
But as a remark:
I'm not particularly familiar with the Qt functions used here. But when I see that there is a version-specific implementation for Qt5 and only a debug-message mentioned for Qt6, it makes me wonder:
Is it implemented differently there, or is it not even needed there — which I don't think is the case...
If possible, "we" should also include something for Qt6 and later versions in another PR.
Do you know what’s needed for Qt6, @ispyisail ?
writeBackup() fires QtConcurrent::run(QET::writeToFile, ..., &m_backup_file)
fire-and-forget: the QFuture was discarded and nothing kept m_backup_file
alive until the worker finished. If the QETProject was destroyed first, the
worker wrote through the freed member -> use-after-free crash in
QET::writeToFile (intermittent; ~1/6 on short-lived CLI runs).
Store the QFuture and waitForFinished() in ~QETProject (and before
setFilePath() re-points the managed backup file). Also skip launching a new
backup while one is still running, so two threads never write m_backup_file
at once.
The Qt6 path is still a TODO stub and the QtConcurrent block is KF5-only, so
this affects only the Qt5/KF5 build that actually has the backup code.
Per review (plc-user): scope the reset to items currently painted with the
red Dense4Pattern instead of clearing every item's background. This avoids
clobbering other backgrounds (e.g. the amber "show this dir" highlight)
and skips needless item updates on large collections.
ElementsCollectionModel::highlightUnusedElement() only ever painted the
currently-unused elements red; it never cleared the background of items
that were no longer unused. So when an element was re-added to a project
and saved, its red 'unused' highlight persisted until the model was
rebuilt from scratch.
Reset every item's background before re-applying the highlight to the
current unused set.
The Windows search list for the qet_tb_generator plugin included
`~/Application Data/qet/qet_tb_generator.exe` as a fallback. That legacy
junction path is the same inaccessible location the standard-directories
change moved QET away from, and it never matched a pip install anyway:
`pip install qet_tb_generator` puts the executable in the Python Scripts
directory (`...\PythonXX\Scripts` on PATH, or
`%APPDATA%\Python\PythonXX\Scripts` for --user installs), not in
`QETApp::dataDir()`.
Pip installs are already found via QStandardPaths::findExecutable (PATH),
and manual binary drops via dataDir()/binary and the working directory.
The legacy entry only matched old manual drops into the inaccessible
folder, so remove it.
Refs qelectrotech-source-mirror#199
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Without a source-tag or source-commit, snapcraft pulls the latest
HEAD of qet_tb_generator-plugin on every build. This makes builds
non-reproducible and risks breakage whenever the upstream repo changes.
Pin to the only published release tag (v1.31, commit d6ee3cf) so
the snap always builds against a known-good version of the plugin.
Closes#202
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The .desktop, MIME package, and appdata install rules are
freedesktop.org conventions and only apply on Linux. Wrapping
them in if(UNIX AND NOT APPLE) prevents a configure failure on
macOS and Windows where QET_APPDATA_PATH and QET_MIME_PACKAGE_PATH
are not defined.
Also replace the hardcoded share/mime/packages path with
${QET_MIME_PACKAGE_PATH} for consistency with
paths_compilation_installation.cmake.
No change to Linux build behaviour.
QETApp::languagesPath() defaulted to applicationDirPath() + "/lang/".
The Windows installer puts the executable in a bin/ subfolder while the
lang/ folder sits next to it (../lang), so that default points at a
non-existent bin/lang/ — qetTranslator.load() fails and setLanguage()
silently falls back to the French source language. This is the root
cause behind the long-standing 'language won't change / resets to
French' reports, and why launching via 'Lancer QET.bat' (which passes
--lang-dir=lang/) works around it.
When the folder next to the binary doesn't exist, fall back to the
sibling ../lang folder if present. Behaviour is unchanged for builds
that already ship lang/ next to the binary, and for the QET_LANG_PATH
and --lang-dir paths.
Fixes#86.
Saving a read-only project to a writable location (e.g. Save As to /tmp)
left it marked read-only, so it stayed uneditable until closed and
reopened. Two issues in QETProject::write():
- The guard refused to write whenever QFileInfo(path).isWritable() was
false. For a Save As to a *new* file that test is always false (the file
doesn't exist yet), so it could wrongly block saving a read-only project
elsewhere. Now it checks the directory's writability for a new file.
- After a successful write the read-only flag was never cleared. Since the
file was just written, it is writable, so clear it (setReadOnly(false)
emits readOnlyChanged, re-enabling editing live).
Fixes#217.
langFromSetting() truncated the system locale to two letters
(QLocale::system().name().left(2)), so a user on the default 'Système'
language whose locale is regional got the base-language translation
instead of their regional one. QET ships qet_pt_BR, qet_nl_BE and
qet_nl_NL, so e.g. a Brazilian user saw European Portuguese (and
untranslated strings fell back to the French source).
Keep the full locale name and, in setLanguage(), try the exact
translation, then the base language, then English (French stays the
native source). Brazilian/Belgian/Dutch users on 'system' now get their
regional translation; everyone else is unaffected.
Refs #421.
When a title block template uses custom variables (e.g. %{department},
%{owner}), the user previously had to declare each one by hand in the
folio properties 'Custom' tab before a value could be entered. Now the
template's undefined custom variables are added automatically, so the
user only fills in the values.
- listOfVariables() now extracts %{name} placeholders with a regex
(deduplicated) instead of a crude '%' strip that returned '{name}'.
- The folio properties widget merges the template's custom variables into
the Custom tab both on open (setProperties) and when the template is
changed, preserving any values already entered and skipping the
standard fields (title, author, date, ...) which have their own inputs.
Fixes#271 (variable auto-population; the revision-history request in the
thread is a separate feature).
The Save As 'location' dialog used a QFileNameEdit (accepts only
[0-9a-z_-.]) but labelled it 'New element name', which is confusing —
QET also has a separate, translatable display name shown in the
collection. Users reasonably tried to type a display name (spaces,
capitals) and it was rejected.
Rename the placeholder to 'Element file name' and add a tooltip noting
the accepted characters and that the display name is edited separately
in the element properties. Updates the English translation; other
languages fall back until re-translated.
Fixes#469.
QETProject schedules an asynchronous crash-recovery backup on construction
(writeBackup() -> QtConcurrent::run(QET::writeToFile, ..., &m_backup_file)).
In one-shot CLI mode the QETProject is destroyed as soon as the command
returns, while that background write still references its m_backup_file
member — an intermittent use-after-free segfault during teardown (~1 in 6
runs; observed on --resave and --set-titleblock).
A crash-recovery backup is meaningless for a short-lived headless command,
so add QETProject::setBackupEnabled(false), called from the CLI entry in
main(). writeBackup() then early-returns, so no background write is ever
launched. Fixes the crash for all CLI commands. See #492.
The first write-to-project CLI command, aimed at CI / revision workflows:
stamp title-block metadata onto every folio (and the project default),
then save. Each argument is key=value:
qelectrotech --set-titleblock in.qet out.qet revision=B date=today
Standard keys map to the documented title-block fields (title, author,
date, plant, location, revision, version, filename); date=today uses the
current date and an explicit date forces UseDateValue mode; any other key
is stored as a custom title-block field. Assignments are parsed up front
so a malformed one fails before writing.
Addresses the 'saving' side of the CLI-for-scripts request (#162).
Wire the shared PdfLinks helper into the headless --export-pdf path so
CLI-exported PDFs get the same internal cross-reference / folio-report
navigation as the GUI print export.
For each page, after rendering, the scene-to-page geometry is rebuilt
from the QPdfWriter (96 dpi, zero margins, page sized to the diagram so
the scale is ~1 with no centering) — deliberately NOT reusing the
QPrinter-based mapping — and passed to PdfLinks::injectCrossRefLinks().
After the painter closes, PdfLinks::convertUriToGoTo() rewrites the URI
annotations into native GoTo/FitR actions.
Builds on the helper extracted in the previous commit; no change to the
other CLI tools.
Move the PDF cross-reference hyperlink logic out of ProjectPrintWindow
into a standalone translation unit so it can be reused (the CLI PDF
export will call it next):
- injectCrossRefLinks(): emits the URI link annotations for a diagram's
cross-references and folio reports. The scene-to-page mapping is passed
in as a PageGeometry (transform + devToPdf + source-rect lookup) so each
caller supplies its own correct geometry, rather than the helper assuming
a QPrinter.
- convertUriToGoTo(): the PDF post-processor, moved verbatim.
ProjectPrintWindow stays a pure caller: it builds its PageGeometry from the
printer page layout exactly as before and calls the helper. No behavioural
change to GUI PDF export; no class-structure changes.
Per review guidance on #483.
Three more read-only command-line tools for verifying connectivity and
cross-reference intelligence (useful for import / migration pipelines):
qelectrotech --export-nets <project.qet> <output.json>
qelectrotech --export-links <project.qet> <output.csv>
qelectrotech --resave <project.qet> <output.qet>
- --export-nets walks Conductor::relatedPotentialConductors() to group
every electrically-connected terminal into a net (potential), following
folio reports and terminal blocks across all folios. Output is JSON:
per net, the wire number and the list of {element, terminal, folio}.
This is the connectivity ground truth.
- --export-links reports each linkable element (master/slave/report/
terminal), its link type and the elements it links to, flagging
masters/slaves with no link as UNRESOLVED. Verifies coil<->contact
cross-references. Verified on examples/industrial.qet: 436 linkable
(76 master, 41 slave, ...), 37 unresolved.
- --resave loads the project and writes its XML back out, so an external
diff can reveal markup QET silently normalises on load
(tolerated-but-invalid XML). Round-trip verified: the re-saved project
reloads with identical diagram/element/conductor counts.
Extends the headless command-line interface with three read-only tools
aimed at validating projects and element libraries (useful for batch
import / migration pipelines):
qelectrotech --info <project.qet> [output.json]
qelectrotech --export-bom <project.qet> <output.csv>
qelectrotech --check-elements <element.elmt | directory>
- --info dumps a structural summary as JSON straight from QET's loaded
model: per-diagram element / conductor counts, page size, and the
number of unconnected ("free") terminals, plus project totals. Because
it uses the real loader it reports what the editor actually sees.
- --export-bom writes a bill of materials (one row per element) as CSV,
querying the project's own element_nomenclature_view (the same source
as the GUI BOM export). updateDB() is called first so the database is
populated in a headless run.
- --check-elements validates one .elmt file, or every .elmt under a
directory (recursively), against the element schema: XML well-formed,
root <definition type="element">, a usable bounding box, and terminal
count. Reports OK / WARN / FAIL per file and a summary; exit code is
non-zero if any file fails. Verified against the full bundled
collection (8483 elements): 0 false failures, agreeing with QET's own
loader (e.g. a negative-height element it tolerates is a WARN, not a
FAIL).
run() is restructured to handle the differing argument arity (info takes
an optional output, check-elements takes a path rather than a project).
renderDiagram() had a no-op stub: was_drawing_grid was set to false and
Q_UNUSED'd, so the editor grid still leaked into exported PDF/PNG/SVG.
Toggle Diagram::setDisplayGrid(false) around the render and restore the
previous state afterwards. Fixes all three export formats (they share
renderDiagram).
Reported by scorpio810 on #483.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Extends the headless command-line export with two CSV outputs:
qelectrotech --export-cables <project.qet> <output.csv> wiring list
qelectrotech --export-wires <project.qet> <output.csv> wire numbers
- --export-cables reuses WiringListExport (one row per conductor).
- --export-wires reuses ConductorNumExport::wiresNum() (distinct wire numbers).
WiringListExport::toCsv() mixed CSV generation with the file dialog and
writing. Extracted the generation into a new const method toCsvString()
that returns the CSV; toCsv() now calls it and writes the result. This
makes the wiring list usable headlessly with no behavioural change to the
GUI export.
Addresses part of the CLI export requests (#162, #309): @pkess specifically
asked to "export all connections as a list".
Implements the long-requested batch/headless export
(bugtracker #171, GitHub #309): render a project's diagrams to files
without opening the GUI.
qelectrotech --export-pdf <project.qet> <output.pdf> one multi-page PDF
qelectrotech --export-png <project.qet> <output_dir> one PNG per diagram
qelectrotech --export-svg <project.qet> <output_dir> one SVG per diagram
main.cpp detects an export request before SingleApplication is created (so the
arguments are not forwarded to a running instance), spins up a plain
QApplication for rendering, and exits with the export's status code.
Rendering reuses Diagram::render() over
BorderTitleBlock::borderAndTitleBlockRect(), the same geometry the GUI
print/export path uses, so output matches the editor. Image files are named
NN_Title.<ext>.
New files: sources/cli_export.{h,cpp}, registered in
cmake/qet_compilation_vars.cmake.
The comments describing the terminal_names layout were inherited from a
previous version and no longer matched the actual assignment order:
terminal_names << nc_name << no_name << common_name;
i.e. [0]=NC, [1]=NO, [2]=Common
Update all affected comments to reflect the current storage order.
On macOS arm64 (Apple Silicon, Sequoia), exporting a PDF via
QPrintPreviewWidget leaves a black screen with only the mouse cursor
visible. Cmd+Tab restores the display; the exported PDF itself is
correct and clickable cross-reference links work fine.
Root cause
----------
requestPaint() is a slot connected to QPrintPreviewWidget::paintRequested.
Inside this slot the code was calling painter.end() manually, then
pdfConvertUriToGoTo(). On macOS arm64 the Qt5 paint cycle backed by
Metal/CALayer is asynchronous: closing the QPainter from *within* the
paintRequested slot interrupts the compositor before it has flushed the
backing store. The window goes black and never repaints because the
close() that follows immediately destroys it.
On x86_64 / older macOS (raster/CoreGraphics backend) the paint cycle is
synchronous, so the same code happened to work.
Fix
---
1. Remove the manual painter.end() and pdfConvertUriToGoTo() call from
requestPaint(). The QPainter is stack-allocated; it destructs normally
when the slot returns, which is the correct moment to flush the PDF.
2. In print(), capture the output file name before m_preview->print(),
then defer both pdfConvertUriToGoTo() and this->close() to the next
event-loop iteration via QTimer::singleShot(0, ...). This gives the
Metal compositor one full event-loop turn to finish compositing the
backing store before the window is torn down.
The fix is a no-op on all other platforms: QTimer::singleShot(0) posts
an event that fires in the very next iteration, so there is no perceptible
delay.
Tested
------
- macOS Sequoia 15.x, Apple M-series, Qt 5.15.x (arm64): black screen gone
- macOS 10.15 x86_64 VM, Qt 5.15.x: no regression
- Linux/Debian Qt 5.15.x: no regression
- PDF cross-reference links and GoTo/FitR destinations: unaffected
Fixes: black screen after PDF export on macOS arm64
directly to the related component on its folio, framing the target element.
When a project is exported to PDF, every cross-reference becomes an internal
link. Four kinds are covered:
- **Master → contact**: the contact list on a coil/relay (`CrossRefItem`)
- **Folio report → report**: report element labels (`DynamicElementTextItem`)
- **Slave → master**: the `(folio-position)` reference shown on a slave
(both standalone `DynamicElementTextItem` and grouped `ElementTextItemGroup`)
Clicking a link navigates **inside** the open document (no new viewer
instance) and zooms to frame the target element.
1. **Injection** (`printDiagram`, only when the paint engine is a `QPdfEngine`):
link rectangles are added with `QPdfEngine::drawHyperlink()`. The scene→page
mapping is rebuilt to match exactly what `QGraphicsScene::render()` does
(top-left anchored, `KeepAspectRatio`, **no centering**), and rectangles are
passed in device pixels — `pageMatrix()` already applies the 72/resolution
scale and Y-flip internally.
2. Each link URL encodes the target page and the target element's rectangle, in
PDF points on its own page: `#page=N&fitr=L_B_R_T`.
3. **Post-processing** (`pdfConvertUriToGoTo`, run after the painter is closed):
the `/S /URI` annotations are rewritten to native `/S /GoTo` actions with a
`/D [pageObj 0 R /FitR L B R T]` destination, and the xref table is rebuilt.
Pages are enumerated from the `/Pages /Kids` tree (reliable), not by scanning
for `/Type /Page` in raw bytes.
- `sources/print/projectprintwindow.{cpp,h}` — injection + post-processing
- `sources/qetgraphicsitem/crossrefitem.{cpp,h}` — `hoveredContactsMap()` accessor; store text rect for hit area
- `sources/qetgraphicsitem/dynamicelementtextitem.h` — `slaveXrefItem()` / `masterElement()` accessors
- `sources/qetgraphicsitem/elementtextitemgroup.h` — `slaveXrefItem()` accessor
- `qelectrotech.pro`, `cmake/qet_compilation_vars.cmake` — enable Qt gui-private headers (`<private/qpdf_p.h>`)
- **Fit-to-page mode only.** Links are not injected in tiled mode (multiple
pages per folio), which would require a per-tile transform.
- Uses Qt private API (`QPdfEngine::drawHyperlink`), stable since Qt 4 but not
part of the public API; the build links against `gui-private`.
- Page-tree enumeration assumes the flat `/Kids` array Qt produces (no nested
page trees).
- The frame zoom is controlled by two constants in `destRectPdf` (`pad`,
`minSide`) and can be tuned.
- Tested on Qt5; the `/Kids` parsing and `pageMatrix` behaviour are identical on
Qt6.
Fix a use-after-free crash (SIGSEGV in QRegion::begin, Qt5Gui+0x49af60)
confirmed by analysis of 19 coredumps. The crash was triggered when the
scene viewport clip region was freed during zoom/resize events while
QPicture::play() replayed drawPolyline commands through the scene painter.
Qt's raster engine then dereferenced a stale QRegionData pointer.
Root cause: CrossRefItem used three nested QPicture objects (m_drawing,
m_hdr_no_ctc, m_hdr_nc_ctc). The nested drawPicture() calls amplified
the use-after-free risk on any repaint event.
Fix: remove all QPicture from CrossRefItem entirely.
- updateLabel() now uses a QImage-backed dummy painter to compute
m_bounding_rect, m_shape_path and m_hovered_contacts_map geometry.
A bool m_update_map flag prevents the map from being overwritten
during paint().
- paint() calls drawAsCross()/drawAsContacts() directly on the scene
painter — no QPicture::play() anywhere in the class.
- buildHeaderContact() now draws NO/NC symbols directly onto the painter
instead of recording them into QPicture members.
Also fix mouseDoubleClickEvent: the element under the click is now found
directly from m_hovered_contacts_map using the event position, rather
than relying on m_hovered_contact which could be reset by hoverMoveEvent
between the two clicks of a double-click.
Also remove setBold(true) on terminal name labels: the Qt PDF/SVG/print
engine rendered bold at 4pt as extremely thick glyphs, making exports
unreadable. Normal weight at 4pt is correct and legible on all backends.
Fixes: SIGSEGV in CrossRefItem::paint() on zoom/resize
Fixes: double-click navigation unreliable on Xref contact symbols
Fixes: terminal name labels unreadable in PDF/SVG/print export
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
The previous sort used QString::toInt() to order terminal names,
which returns 0 for any string containing a non-numeric prefix
(e.g. "R1", "R2", "L1", "L2"...). This caused undefined sort order
and incorrect pole pairing in the Xref contact mirror.
Example: a 4-pole NC power contact with terminals R1..R8 was
displaying R1/R3, R5/R7, R2/R4, R6/R8 instead of the correct
R1/R2, R3/R4, R5/R6, R7/R8.
Fix: extract the trailing numeric part of each terminal name and
compare prefixes separately. If both names share the same prefix
and both have a trailing number, sort numerically on that number;
otherwise fall back to full string comparison.
This covers all naming conventions: "1"/"2"/"3", "R1"/"R2"/"R3",
"L1"/"L2"/"L3", etc.
Applied in both drawContact() and setUpCrossBoundingRect().
Three bugs were causing a crash (SIGSEGV in QRegion::begin) when
a power NC slave element was placed on a folio, even before linking
it to a master element.
1. m_drawing (QPicture) was never reset between updateLabel() calls.
QPicture accumulates paint commands — calling qp.begin() on an
existing QPicture appends to it rather than replacing its content.
After several updates (load, move, hover...) the picture became
corrupted and crashed on play().
Fix: reset m_drawing = QPicture() at the start of updateLabel().
2. m_drawed_contacts was only initialized to 0 in drawAsContacts(),
but not in drawAsCross(). When drawing in Cross mode, fillCrossRef()
called drawContact() with an uninitialized m_drawed_contacts value,
producing a garbage offset. The NC contact symbol uses drawPolyline()
with a sub-pixel Y coordinate (offset+2.5); with a random offset Qt
generated an invalid QRegion and crashed.
This explains why NC contacts crashed but NO contacts did not: the
NO symbol only uses drawLine() which is more tolerant of bad coords.
Fix: add m_drawed_contacts = 0 at the start of drawAsCross().
3. setUpCrossBoundingRect() used QRectF() (null rect) as the reference
rect for painter.boundingRect(), which can return invalid dimensions.
Additionally, height was accumulated incorrectly: united() + setHeight()
doubled the height at each iteration, causing an exponentially growing
bounding rect with multiple contacts.
Fix: use QRectF(0, 0, 500, 20) as reference rect and accumulate
height and width independently.
Extend TerminalData::Type enum with three new semantic values:
- No : Normally Open terminal of a switch (SW) contact
- Nc : Normally Closed terminal of a switch (SW) contact
- Common : Common terminal of a switch (SW) contact
Update typeToString() and typeFromString() accordingly.
Fully backward compatible: existing Generic/Inner/Outer types
are unchanged. Elements without typed terminals fall back
to the previous behavior (first 2 named terminals).
terminal: expose terminalType() as public accessor
Add Terminal::terminalType() returning the TerminalData::Type
of this terminal. This allows crossrefitem and other consumers
to filter terminals by semantic role (No, Nc, Common) without
accessing TerminalData internals directly.
terminaleditor: add No, Nc, Common entries to type combobox
Expose the three new TerminalData types (No, Nc, Common) in
the element editor UI so users can assign a semantic role to
each terminal of a SW contact element.
Also fix a pre-existing bug in updateForm() where m_type_cb
was incorrectly using m_orientation_cb->findData() instead
of m_type_cb->findData(), preventing the type from being
restored correctly when selecting a terminal.
terminaleditor: add No, Nc, Common entries to type combobox
Expose the three new TerminalData types (No, Nc, Common) in
the element editor UI so users can assign a semantic role to
each terminal of a SW contact element.
Also fix a pre-existing bug in updateForm() where m_type_cb
was incorrectly using m_orientation_cb->findData() instead
of m_type_cb->findData(), preventing the type from being
restored correctly when selecting a terminal.
When a slave element has named terminals in its element definition
(.elmt), the terminal names (e.g. 13/14 for NO, 11/12 for NC,
12/13/14 for SW) are now displayed on each side of the contact
symbol in the cross-reference view.
- NO/NC contacts: name[0] on the left, name[1] on the right
- SW contacts: name[0] (NO) top-left, name[1] (common) top-right,
name[2] (NC) bottom-left
Terminal names are read from Terminal::name() which is populated
from TerminalData::m_name during element parsing. If terminals are
not named, nothing is displayed (fully backward compatible).
Users are expected to name their own terminals in the element
editor to avoid duplicating elements in the official collection.
+ AllowSameVersionUpgrades="yes" to <MajorUpgrade>
windows-msi.yml — in the ‘Extract version’ step, calculate a unique GUID
based on the commit’s SHA, then pass -d ‘ProductCode=$productGuid’ to the WIX build
This ensures that each build will have a different ProductCode → MajorUpgrade will always be triggered
- Use SetProperty + WixQuietExec two-step pattern to pass runtime
INSTALLDIR to a deferred CustomAction (fixes WIX1077 and WIX0400)
- Add WixToolset.Util.wixext/7.0.0 extension (required for WixQuietExec)
- Fix condition syntax: collapse multi-line conditions to single line
- Add -ext WixToolset.Util.wixext to wix build command in windows-msi.yml
**`build-aux/windows/QElectroTech.wxs`**
- Desktop and Start Menu shortcuts now point directly to `bin\qelectrotech.exe` with all required arguments (`--common-elements-dir`, `--common-tbt-dir`, `--lang-dir`, `-style windowsvista`) — no `.bat` wrapper needed
- Added a deferred `CustomAction` that runs after `InstallFiles` and recursively sets all files in `elements\` to read-only using an inline PowerShell command
**`.github/workflows/windows-msi.yml`**
- Replaced the step that created `Lancer QET.bat` with a step that removes it from the artifact before the WiX build, so it is not embedded in the MSI
- The `.bat` file remains untouched in the ZIP portable build (managed by `windows-build.yml`)
- No console window flashing when launching QElectroTech from the MSI shortcuts
- The `elements\` directory is properly set to read-only after installation, as required
- Cleaner MSI package — no `.bat` file shipped to end users installing via MSI
↓
windows-build.yml
├── build-windows → generates an exe file + zip + portable artefact
└── deploy-pages → clears old files, uploads the exe file + zip to the ‘release nightly’ repository
↓ (workflow_run: completed + successful)
windows-msi.yml
├── uploads the portable artefact
├── builds the MSI with WiX v7
├── deletes the old .msi, uploads the MSI to the nightly version
└── generates and deploys GitHub Pages ← the 3 URLs are known here
The GitHub Pages page is no longer generated by windows-build.yml but by windows-msi.yml once the MSI is in the release
Removal of all envs: WIX_ACCEPT_EULA: true (does not work)
Addition of a dedicated ‘Accept WiX EULA’ step with wix eula accept wix7 before any other WiX command — this is the official CI/CD method, which writes a sentinel file to the user profile, thereby authorising all subsequent WiX commands in the same job.
Use 7-Zip is already installed on all GitHub Windows computers (C:\Program Files\7-Zip\7z.exe), and it is much faster than Compress-Archive when dealing with 9,931 files.
Due to the changes made in the commit "Add highlight current page in
ProjectView", there is a problem when moving diagrams in the ProjectView
using the keyboard. The diagrams lose focus after being moved.
The cause is: The DiagramItem loses its selection before the move
function is executed.
The code has been adjusted.
Disable the QTabWidget internal scroll buttons and add own buttons for
scroll 'one page left' and scroll 'one page right'. The scrolled
diagrams will be activated.
corresponding to operation of project and diagram tabs
- click on the item activates the corresponding diagram or project.
- double click opens the corresponding properties editor.
- selecting with the up and down arrow keys has the same effect.
This pull request adds a Korean translation for QElectroTech.
- Language: Korean (ko)
- Files added: qet_ko.ts, qet_ko.qm
- Translator: jkh
- Date: 2026-02-02
Korean users can now use QElectroTech in their native language.
* added deb build CI/CD + setup gitignore on local build/ dir
* added exception for test on branch
* fix image selection
* added XML option to Doxyfile + artifact output
* updated doxygen version
* added ci for doxygen
* added diff + fix action directory
* remove working dir option
* switch to atest doxygen version
* added aterfact upload
* added deployment step in ci + doxygen theme
* separated setup and doxygen step
* added correct path for dox build
* switch to docker action
* return to binary package
* dummy commit for pages
* swithced to upload-pages-artifact
* fixed typo not fetching submodules + pointing to correct doxygen theme as changes to it are in repo
* separate deb build to ci/cd branch for future MR
* remove debug log
* changed location of generation of .qch file
* adding sync
* collapse sync in one file
* added auto MR CI
* using checkout to push
* added test to downloaded dir
* fix add path
* check if file is marked as modified
* added path info
* drop artifact method
* fix path
* removed checkout clearing the repo
* force to pass gitignore filter
* setting up git lfs
* Push updated QCH file
* removed branch testing
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
fixed action error due to rebasing
Installing build-snaps
Failed to install or refresh snap 'kde-qt5-core22-sdk'.
'kde-qt5-core22-sdk' does not exist or is not available on channel 'latest/stable'.
Use `snap info kde-qt5-core22-sdk` to get a list of channels the snap is available on.
Full execution log: '/root/.local/state/snapcraft/log/snapcraft-20251214-140707.644603.log'
Build failed
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/lpbuildd/target/build_snap.py", line 322, in run
self.pull()
File "/usr/lib/python3/dist-packages/lpbuildd/target/build_snap.py", line 249, in pull
self.run_build_command(
File "/usr/lib/python3/dist-packages/lpbuildd/target/operation.py", line 70, in run_build_command
return self.backend.run(args, cwd=cwd, env=full_env, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/lpbuildd/target/lxd.py", line 736, in run
subprocess.check_call(cmd, **kwargs)
File "/usr/lib/python3.12/subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
Qet crash when double click on an element/text/conductor in the tree
widget of the search and replace widget and the item is deleted from
diagram. (Call of Diagram::showme to a nullptr).
Add a message box to advise user that use a hdpi round factor can cause
strange render according to :
1 - the selected value
2 - the dpi of the screen
3 - Edit the project on another computer and/or screen who don't have
the same parameters as point 1 and 2.
When user hover the Xref string of a terminal, the string color change
to blue to advise user the xref is clickable. Double click on the blue
Xref go the folio of the terminal and zoom the view to the terminal.
After the commit 'Correcting dynamicElementTextItem alignment on
copying', not all composite text was displayed correctly. As soon as the
composite text contained multiple variables in a line or user text, the
alignment was no longer correct. Furthermore, the text value was not
correctly written to the clipboard, so it was no longer present when
pasting. I have corrected these errors here.
Modification of the int BACKUP_INTERVAL from 2 min to 20 min used by
KautoSaveFile.
On a large project with a 256 MB folio printed in A0 format, the
graphical interface freezes for 30 seconds when KautoSaveFile writes
this large amount of data to the disk every two minutes.
Even if the programme crashes, you only lose 20 minutes of your work,
which is not a big deal.
Thanks to Enzo for reporting it and finding the problem.
For conductors, the setPos() function can result in negative
coordinates.
For unknown reasons, this can lead to an offset in the scene coordinate
system, resulting in a free space above and to the left of the drawing
frame. This free space could not be removed.
It is better to set the conductors using the conductor::updatePath()
function. If the conductor text has been moved by the user, the new
position of the text must be calculated.
It is important to position the elements first and then 'connect' the
conductors.
Setting the conductor position via setPos() was done in elemntsmover.cpp
(corrected here) and in Diagram::fromXML (corrected in the commit
'Better handling of conductors when creating from XML').
The position of a conductor is determined by the two terminals the
conductor connects. Therefore, it makes no sense to set the position
with 'setPos()'.
It is better to first load all elements (but not the conductors),
position them if necessary, and only then load the conductors and assign
them to the elements (terminals).
When copying and pasting selected areas, right-aligned dynamic text in
report and slave elements was not displayed correctly. The text
insertion point was always shifted to the left by the text width.
To correct this, the insertion point of dynamicElementTextItems is reset
to its origin insertion point before writing to clipboard.
When using composite text in report elements, the name of the variable
was displayed when inserting the reportElement into the drawing (e.g.
%{function}). This is corrected here.
Add missing variables to assignvariables.cpp
In case of user try to delete a terminal element who is bridged
or belong to a physical terminal with more than one level, the deletion
is aborted to avoid mistake in the terminal strip parent of the terminal
element. A dialog is opened when the deletion can't be to explain to
user what to do for enable the deletion.
iIn the element editor, every rotation is made around the center of the
scene, this is usefull when rotate several part but less when only one
need to be rotated, especially when it is the terminal part and we only
want to change the orientation.
This commit solve it. Now when only a terminal part is selected, the
terminal don't rotate around the center of the scene but change the
orientation.
The rotation, flip and mirror of parts are good features but always
rotate around the center of the scene and if the parts are far from the
center of the scene the behavior look inappropriate from the POV of user
(because parts move far from original position and can out of the view).
A good new features should be to solve it (rotate around the center of
the bounding rect of the selection) and probably extract the function
rotate/flip/mirror from the parts class and create a new class with for
only goal to calculate and apply these modifiaction trough an undo
command.
During the development, we saved some terminal strip with "phantom"
terminal (terminal added to the strip and after the terminal was removed
from the project but keep in the terminal strip data) and this mistake
was saved in the xml. When we open this project the phantom terminal
don't appear in the layout but the empty physical terminal is still here
in the terminal strip data because the position of the terminals in the
strip is wrong (sometime bigger than the size of the strip, sometime
with a gap, sometime don't start at 0). This commit fix this mistake
when we open a project.
Before this this commit the terminal strip editor couldn't only work on
the first project opened into this editor, all other project opened
after couldn't be edited.
This is now past, terminal strip editor can now edit every project open
in QElectroTech.
Fix crash when :
1°-Open a project with terminal strip and open the terminal strip editor
2°-Close the terminal strip editor and the project (keep qelectrotech
open).
3°-redo step 1 and click on an item in the tree at left of the window,
qet crash.
Qet don't crash anymore but the terminal strip editor continue to work
with the terminal strip of the first opening (exactly the pointer of the
terminal strip) who don't exist anymore. Need more work.
Add a new class TerminalStripLayoutPatternXml used to
save / load a TerminalStripLayoutPattern class into a xml.
Also create the namespace QETSVG used to read/write some
svg element / attribute to xml. This class is used by the
class TerminalStripLayoutPatternXml.
- include Liberation-Fonts and osifont
(thanks elevatormind!)
- use "Liberation Sans" as default-font
- adjust License-Tab in About-Form
- Bugfix: When selecting a font, the current
font is highlighted in dialog
- adjust some whitespace and English comments
- include Liberation-Fonts and osifont
(thanks elevatormind!)
- use "Liberation Sans" as default-font
- adjust License-Tab in About-Form
- Bugfix: When selecting a font, the current
font is highlighted in dialog
- adjust some whitespace and English comments
Initially it was planned to have separate text configuration for every
terminal level. It's not useful, use same properties for every level is
sufficient and visually more consistent.
By consequent every QVector related to these properties was replaced by
a single value.
The bounding rectangle used to define the position of the terminal text
can be edited. The y position and height can now be edited. The width is
not editable because is always the width of the rectangle of the of the
terminal.
Add a little function used to convert if needed the size of a font set
in dpi to pixel. Because the conversion from pdi to pixel can't
be exactly identical, the text size in the diagram can be a little
different, in the other side the switch between screens with different
dpi is no more a problem.
Introduced additional spinboxes in config-page for
setting min- and max-size of grid-dots separately for
diagram- and element-editor.
That assures maximal flexibility for setting the grids.
Don't want the grid-dots to change over zooming-levels?
Set min- and max-values to the same number.
Preset-values for all min-/max-values is "1".
If the adjustable range of 1 to 5 is not sufficient, it
can be easily adjusted. Only need feedback for this.
When reading and comparing Qt5-docs and Qt6-docs, I read,
that there are no differences in the functions!
So it is not necessary to have the differentiation
between the Qt-Versions.
Code compiles without errors or warnings for Qt5 and Qt6.
Maybe not (yet) perfect, but it looks pretty good to me!
Why am I doing this to myself?
All this crap with fonts and stuff!
It's been crap for as long as I can remember.
Now that the problem with the translations of keyboard shortcuts has been resolved and rotation using the space bar works reliably in principle, I took a closer look at the rotation function itself in the element editor.
I noticed, for example, that arcs can be rotated at an angle of 15°. This doesn't really make sense, as the “arc” part doesn't have the “rotation” property. There is only width and height.
And somehow rotating arcs didn't work well: start- and span-angles weren't adjusted.
Lines and polygons can be rotated in 15° increments, which doesn't make much sense, if other parts that can only be rotated in 90° increments are selected at the same time.
To make a long story short:
I reworked the rotation functions of the graphical parts so that now all parts are rotated in 90° steps around the origin! This means that it is now possible to mark several parts and rotate them around the same point at the same time!
In addition, the functions for mirroring graphic parts at y-axis (shortcut "M") and flipping at x-axis (shortcut "F") have been implemented.
I have saved the text elements for later!
(or someone else)
If the version number of QElectroTech is requested in the forum in case of error messages or anomalies, the Qt version used is very often stated because the entry “About QElectroTech” does not appear very prominently in the help menu: The entry “About Qt” is used much more frequently because it appears eye-catchingly as the lowest entry. However, specifying the Qt version is often not helpful for troubleshooting: We need the QET version!
That's why I'm moving the “About QElectroTech” entry to the bottom, so that it is easier to see and find!
clazy is a compiler plugin which allows clang to understand Qt
semantics. You get more than 50 Qt related compiler warnings, ranging
from unneeded memory allocations to misusage of API, including fix-its
for automatic refactoring.
https://invent.kde.org/sdk/clazy
When saving an element it is checked, if the origin (0/0)
is inside the graphical parts. If outside, the element is
moved by integer values for x- and y-offset before saving.
Old calculation for offset could lead to "strange" new
values for positions.
Additionally: fix typos and English comments
- for some time now and for whatever reason, element-editor
sometimes adds element-information without content –> do not
save info-lines without any content
- sort element-information alphabetically by name in element-file
- use trimmed strings for element-information to remove leading
and trailing whitestpace
We use QETApp::configDir() to save configuration-files (*.json)
for creating BOM, nomenclature, etc. during runtime.
So it's interesting for win-users, too, which configDir is used.
Now it's better readable and maintainable up to the moment
we have our own internal Terminal-Manager for productive use.
Additionally added the storage location “dataDir()/binary”,
so that the new structure for the separation of
configuration and data can be properly kept
Fix traceback when selecting "Project" menu "Launch the terminal block
creation plugin" item:
Traceback (most recent call last):
File "/snap/qelectrotech/1973/bin/qet_tb_generator", line 33, in <module>
sys.exit(load_entry_point('qet-tb-generator==1.3.1', 'console_scripts', 'qet_tb_generator')())
File "/snap/qelectrotech/1973/bin/qet_tb_generator", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/snap/qelectrotech/1973/lib/python3.10/site-packages/src/main.py", line 98, in <module>
import src.PySimpleGUI as sg
File "/snap/qelectrotech/1973/lib/python3.10/site-packages/src/PySimpleGUI.py", line 95, in <module>
import tkinter as tk
ModuleNotFoundError: No module named 'tkinter'
All export files that are derived from the project (BOM,
nomenclature, etc.) are saved in the same directory by default.
In this context, the standard directories have been grouped
together in qetapp.cpp / qetapp.h so that only one place needs
to be searched for in case of any adjustments.
In the part list widget, the terminal name is empty if terminal haven't
got name.
Now "terminal" is always displayed and if the terminal have a name the
name is appended to "terminal".
Example :
if the terminal name is 24 then the the part list widget show "terminal
: 24"
For a new conductor with the text set from the default conductor text
defined in the folio properties, and this text contain variables, in
this case the variables are not replaced.
This commit fix it.
Remove setter function : void BorderTitleBlock::setTitle(const QString
&title)
Remove singal diagramTitleChanged from BorderTitleBlock and use instead
the signal informationChanged.
When two shapes item have line and filling color and the dock widget
used for edit the current selection is visible, switching selection
between the two shapes, the last selected shape filling color change
and become the filling color of the previous shape.
TerminalStripLayoutPattern class is now a shared pointer between all
terminal strip item.
QETProject have now a new class : ProjectPropertiesHandler
the goal of this class is to manage every kind of properties used in the
project, this class will be strongly used in future.
* terminal_strip:
Terminal strip item can saved / loaded to .qet file
See previous commit...
Move terminal strip drawer class in is own file
Fix wrong use of QStringLiteral and QLatin1String
Double click a TerminalStripItem open the editor
Minor change about checkable QAction of QetDiagramEditor
Minor : corrects a minor aesthetic defect when unbridge terminals
Revamp code
Add and move terminal strip item are now managed by undo command
TerminalStripItem : Draw terminal bridge
Terminal strip item can be added to diagram
Minor : add QGIUtility namespace
-Move MoveElementsCommand class from diagramcommands file to
movegraphicsitemcommand file.
-Rename the to class MoveGraphicsItemCommand.
-Minor code change to make it more modern.
Those desktop MIME types were needed only with KDE up to 3.x, as it
used to have its own desktop-based MIME type system. KDE 3 is EOL for
many years now, and there are already XDG MIME types.
These files are the bare XML definitions, and they are automatically
generated by update-mime-database (part of shared-mime-info) on update
(e.g. by distro hooks) or manually. Keeping them in the sources, and
installing them, is definitely not correct, as qelectrotech.xml is
their canonical definition.
Hence, drop them from the sources, together with references to them.
* terminal_strip:
Improve execution time of some actions.
Minor : fix little gui defect
Improve opening time of terminal strip editor window
Display conductor number
This option alows for displaying XRef without contact drawing.
This is useful for spliting one physical part into multiple
logical elements when the slave element is not a switch.
In the diagram editor, when we edit the element information in the side
panel, each time we tip something in the text field the cursor always go
to the end if the "label" information is empty.
Because strange behaviour with Qt::key_space if used for keyPressEvent
and also in shortcut.
Now the shortcut for the rotate action is ctrl + R and key_space to
rotate terminal on the fly before placing it in the drawing.
The rotate action shortcut was 'space' before this commit and so the
keyPressEvent with space key was never propagated because always grabbed
by the rotate action.
Now the shortcut for the rotate action is ctrl + space.
Note that even if rotate exist in element editor, this doesn't work well
because the rotation is not well managed by the save/load from elmt
file.
Since this commit, the terminals can't be moved from the tree widget,
instead we need to use the "move in" widget to move one or several
selected terminals in the table view.
* terminal_strip:
Several real terminal can be added to terminal strip in one shot
Minor : avoid unnecessary multiple function call
The free terminal properties can be edited by batch.
Change made inside the free terminal table can be applied
Hide/show apply/reset buttons according to current displayed widget
Edited data of terminal strip can be applied
Change terminal strip editor class
Add free terminal editor widget
Add toolbar and buttons
Start to move terminal strip editor from QDialog to QMainWindow
Add table widget and item model for free terminal
Revamp code
Improve undo command when add/move/remove terminal in/from/to terminal strip
Revamp code.
Revamp code, make it more simple
Remove the real terminal uuid, and use instead the uuid of the terminal element itself
RealTerminal is created by the TerminalElement itself
Change relationship betwen classes RealTerminal PhysicalTerminald and TerminalElement
QTreeWidget "terminal explorer" : improve item text
minor : remove unused code
TerminalStripTreeDockWidget::on_m_tree_view_currentItemChanged
call setCurrentStrip only when current strip changed, and not every time
when user click in another item on the tree view.
In the QTreeWidget "terminal explorer", when the physical terminal is
composed by several real terminal, the text of the QTreeWidgetItem
display the label of each real terminal.
* terminal_strip:
Fix fail to build from sources
Minor improvement about undo/redo for bridge creation
Minor Fix : undo command for unbridge strip don't work
Minor : add undo text
When a new bridge is created, an undo command is created for that.
When undo the action and redo it, all terminals are bridged to a new
bridge instead of the first one, who continue to exist but is now
empty and 'lost' because he will never be reused.
In addition of that, if a more recent undo command (we call it undo2)
use this bridge,
there is a unknown behavior, because the status of the bridge is not the
same as when the undo2 was created.
* terminal_strip:
TerminalStripBridge color can be edited.
Use QSharedPointer instead of QWeakPointer + remove unused include
Change struct TerminalStripBridge to class
Revamp terminalStrip feature code
Revamp PhysicalTerminal class
Revamp RealTerminal class...... again
Improve bridge edition
Improve code readability
Fix copy constructo warning
Make code less spaghetti
Draw bridge pixmap in the tableview (wip)
REmove unused method : levelCellCount
Remove isXrefCell method...
Add terminal bridge feature
It was removed in b121dad for all platforms.
Only disable appending the suffix for the flatpak platform
by testing for the FLATPAK_ID environment variable.
* master:
BugFix : default element collection path is wrong
snap: Remove framework snap prompt
Update translation and add cn chinese ts files
Danish translation updated
Danish translation
Danish translation
Add new thumbnail element
Flatpak add --share=network
Flatpak : add --socket=cups see :
https://github.com/flathub/org.libreoffice.LibreOffice/issues/90
Graphics item handler is bigger when overred
Add toolbar widget for edit size of handler in diagram editor.
Fix Multiple translation in elements
Fix Multiple translation in elements
Fix segfault.
new Analog-In - Module
cleanup and upgraded elements
modified: lang/qet_nl.qm modified: lang/qet_nl.ts
Add Russian translation, thanks "А.Разживин"
little modification in hungarian language
Fixed typo
Now that https://github.com/snapcore/snapcraft/pull/3596 has been
released in snapcraft 6.0.1, drop the prompt that tells users to
disconnect the old framework snap.
Also drop --enable-experimental-extensions from CI because kde-neon
has been declared stable for core20.
Add a combo box in the tool bar of diagram editor
to quickly change the size of the graphics handler item.
The sarto commit :D
NOTE
only available for diagram editor, element editor will
come later.
Move RealTerminal class in a new file
Move PhysicalTerminal class in a new file.
Remove the use of QWeakPointer and use instead QSharedPointer
in a big part of the revamp.
I don't know what I want, I'm crazy :D.
Next commit will also revamp PhysicalTerminal
and TerminalStripBridge class, code will be more clear and
easy to understand.
* master: (21 commits)
Minor: remove spaces in filenames
minor: remove capital letters
Add new symbols Fibaro, thanks Bertus
Update Hungarian translation, thanks Gubányi
modified: lang/qet_nl.qm modified: lang/qet_nl.ts
Add preprocessor to check Qt version
Update *TS files
Add possibility to user to choose hdpi round policy
Minor improvement for function QETApp::customElementsDir() and QETApp::commonElementsDir()
Add new GCE symbol
Flatpak: update qet_tb_generator to version 1.3.1
Add new symbol nodemcu_v3, thanks Bertus
Add new symbols
ci: Build edge snaps on GitHub & release to store
snap: Port to core20
Flatpak update qet_tb_generator to 1.3.0 version
Fix typo in URL
SNAP change Github source to https://github.com/raulroda/qet_tb_generator-plugin
modified: lang/qet_nl.qm modified: lang/qet_nl.ts
upgraded elements and renamed company
...
the path is set the first time the function is called.
Each other call will immediately return the previously setted path
instead of check again what path to return.
* master: (55 commits)
modified: lang/qet_nl.qm modified: lang/qet_nl.ts
Update *TS files
Fix some misprint
new and upgraded elements
fix typo
add terminals to thermo-couples
upgraded elements and descriptions
upgraded / added elements and descriptions
updated descriptions
more elements and descriptions
fix typos
update element-descriptions
update elements / more element-descriptions
fix designations / update descriptions
fix designations / update descriptions
update element-descriptions
fix typo
update element-descriptions
update / add elements
update element-descriptions
...
When print on printer with low resolution, some lines are not printed
because to thin.
Thin line of elements : set width to 0.5 instead of 0 and set cosmetic
option to false.
Folio border and titleblock : set width to 1 and set cosmetic option to
false.
std::variant/std::visit was only introduced with C++17. Remove its usage.
We don't even need it in these cases since QColor has an implicit constructor accepting Qt::GlobalColor.
Follow-up for b69c7b1027
Compilation using MSVC fails with a C1061 error since MSVC has a hard limit on block nesting.
Refactor the code in question to use map lookups instead.
* Some types of elements need to specialize the setRotation method in order to behave correctly :
- PartTerminal needs to call setOrientation
- PartLine, PartRectangle and PartPolygon need a different rotation center.
* terminal_strip:
User can edit the label of terminal inside the terminal strip editor
Code refactoring
Double click on Xref cell show the terminal in the diagram
terminal function can be edited, edted value is applied to element
Table widget : led and type is editable
Minor gui change
Remove position section of terminalStripModel
If an element are overwrite by a modified element and the terminals of
the modified element are moved, the old element is not loaded because
some terminal are not found.
This commit remove the checking of not found terminal because it's
useless now.
When the model of a qetgraphicstableitem is reseted (for exemple when
the sql query is modified) we check if there is useless tables (table
with 0 row displayed) and remove it.
When a qetgraphicstable is deleted, the next and previous table is not
aware about the deletion and keep a dangled pointer of the deleted table
who cause a segfault.
Like previous commit, in the method loadDiadrams() we call the method
diagramAdded(), in this method we call rebuildDiagramsMap()
updateAllTabsTitle() and these methods operate a loop for each existing
DiagramView.
Now loadDiagrams don't call diagramAdded (which must be used only when
user add a diagram during the use of QElectroTech) but make operations
itself and when all DiagramView are added, call rebuildDiagramsMap()
updateAllTabsTitle() only once.
In the methods readDiagramsXml we call addDiagram for each diagrams
loaded from xml, inside the addDiagram method we call the method
updateDiagramsFolioData() and to finish this method operate a loop for
each existing diagram.
Then when we load a project from xml of
10 folios, loop inside updateDiagramsFolioData() is called 55 time.
50 folios, loop inside updateDiagramsFolioData() is called 1275 time.
100 folios, loop inside updateDiagramsFolioData() is called 5050 time.
Now instead of call addDiagram, we add diagram directly inside the
methods readDiagramsXml and call the method updateDiagramsFolioData()
only once when all diagrams are loaded.
According to Qt creator flame graph, call QSettings take lot of time.
When loading the element collection, each items of the collection get
the current language by calling the function QString
QETApp::langFromSetting().
This function instantiate a QSettings object each time and take a lot of
time.
Now the QSettings is instantiate only at the first call, and the value
is stored in memory, then all other call of the function don't
instantiate a QSettings, but just return the value in memory.
Filter "is empty" don't work for any case :
We must to filter for NULL and empty string then replace the sql
sentence "value IS NULL" by "(value IS NULL OR value = '')"
the filter "is not empty" in nomenclature don't work for every case.
Replace SQL sentence "IS NULL" by "!= ''" because an empty string is not
a NULL value string, but a NULL value string is like an empty string
Fix an unwanted behavior when the properties dock widget is displayed :
1 there is no selection
2 the dock widget width is set to minimum
3 select a part, the dock widget gain new widgets used to edit the
current selected part and the width of the dock grow so the width of the
QGraphicsView is reduced and cause a mouse move event.
When this case occur the part is moved but they should not.
Because on windows MachineInfo take a little time to init, we make it to
a singleton.
MachineInfo is build the first time in main.cpp.
Now all other places where we use MachineInfo (aboutqetdialog and
configdialog) gui don't hang anymore in waiting to MachineInfo finish to
build.
Instead of build machine_info class which take time, only to get the max
width and height of screens, call of methods
Machine_info::i_max_screen_width() and
Machine_info::i_max_screen_height() are now static and compute only
this.
The project properties dialog is now faster because don't wait the end
build of machine_info.
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.
Fixed a typo that prevented existing PDF files from being displayed in SaveFileDialog for PDFs.
The way the file name for the PDF is generated has changed. If the project has already been saved, the PDF has the same file name (with .pdf of course); If not, the file name is generated from the project title (= same behavior as Save as - dialog for a .qet project file).
> ⚠️ This is a development version; it introduces new features you want, but may cause bugs that have not yet been identified yet.
> For stable releases, see the [Releases page](https://github.com/${{ github.repository }}/releases).
> 🗄️ Files without `-qt6-` in the name are the last Qt5 build ever published (frozen, unmaintained). Files tagged `-qt6-` are the actively maintained build.
prerelease:true
make_latest:false
files:|
downloaded/installer/*.exe
downloaded/portable/*.zip
token:${{ secrets.GITHUB_TOKEN }}
# GitHub Pages is generated and deployed by windows-msi.yml
# after the MSI upload, so that all URLs (exe/zip/msi) are known.
Since 0.100, development has centered on a new headless command-line workflow, terminal-strip and cross-reference improvements, a wave of crash and stability fixes, and continued packaging/CI modernization (Windows MSI, macOS, Snap). Translation coverage was extended again, notably with new Korean support.
## Highlights / Key Features
- **Headless CLI export**
- New command-line export mode for PDF, PNG and SVG, letting QET projects be rendered without opening the GUI.
- Added `--export-bom`, `--export-nets`, `--export-links`, `--check-elements`, `--info`, `--set-titleblock` and `--resave` CLI options for scripted/batch workflows.
- The editor grid is now disabled in CLI-rendered output, and async crash-recovery backups are disabled in headless mode to avoid a segfault.
- **PDF export improvements**
- Cross-references are now clickable hyperlinks in exported PDFs, jumping directly to the linked element or terminal.
- Wiring list and wire-number list can now be exported to CSV, both from the GUI and the CLI.
- **Diagram duplication**
- Diagrams/folios can now be duplicated along with all their metadata and embedded elements.
- **BOM / Nomenclature**
- Specific elements can now be excluded from the Bill of Materials (Nomenclature).
- **Terminal & cross-reference (Xref) work**
- Continued iteration on a `max_slaves` limit for Master elements (added, tuned, briefly reverted, then re-implemented with proper save/load handling).
- New "potential isolation" option for terminals, and new No/Nc/Common contact types for switch (SW) terminals.
- Cross-reference items gained an option to hide terminal names, fixed terminal-name sorting for power contacts, and fixed a couple of SIGSEGV crashes (including one when dropping a power NC contact on the diagram).
- **Windows installer**
- MSI nightlies now inject the Git revision count into the MSI version's Build field, fixing the long-standing regression where `MajorUpgrade` never triggered because the version string never changed — nightlies had to be uninstalled by hand before.
- The old `Lancer QET.bat` wrapper was removed in favor of handling launch natively in `QElectroTech.wxs`.
- NSIS installer updated to the 3.x line, with a bundled Fonts directory and corrected language tables.
## Detailed Changes
### Editor & UX
- Element panel and context-menu/link-button logic refactored for clarity; `MasterElement::isFull` and related conditional checks simplified.
- Font-size spin boxes in the text editor now enforce a 4pt minimum, fixing a SIGSEGV that occurred when the value reached 0.
- Text position (`PartText`) now stays stable across save/reopen when the font changes.
- Element editor: no more spurious warning on save for front-view elements without terminals; "Save As" field is now correctly labelled as a file name rather than an element name.
### Bug Fixes
- Fixed a Unicode-path bug in pugixml on Windows: collection or element paths containing accented characters (é, ü, ñ, …) silently failed to load because the narrow-char API was used instead of the wide-char one.
- Fixed center-alignment not being restored when reloading a saved table configuration (config serialised `AlignHCenter`, but the loader compared against `AlignCenter`).
- Fixed a `TerminalData` memory leak in the `Terminal` destructor (confirmed via ASan across several call sites).
- Fixed several uninitialised-value bugs found with Valgrind, and a couple of thread-unsafe `QStandardPaths` calls in the data/config directory lookup.
- Fixed a crash when destroying a `QETProject` before its asynchronous backup had finished.
- Fixed regional system locale sometimes loading the wrong translation.
- Fixed dynamic element text shifting/jumping when duplicating diagrams, and a wiring-list filter/timing issue.
- Various smaller fixes: a first-click spurious element move right after selecting a tool, an -Wreorder compiler warning, and several translation corrections (German, French, Chinese).
### macOS
- Fixed the long-standing bug (open since 2022) where double-clicking a `.qet`, `.elmt` or `.titleblock` file launched the app without opening the file — the file-open event is now buffered during a cold launch, before `QETApp` exists, and routed correctly once the app is already running.
- Continued work on the black-screen-after-PDF-export regression on Apple Silicon, tied to the Metal compositor's async timing.
### Build, Packaging & CI
- Windows nightly build pipeline continued its migration to GitHub Actions; test builds for the VS2026 toolchain were run against the same pipeline.
- Snap package now stages `libxcb-cursor0`, fixing an xcb plugin load failure on Ubuntu 24.04.
- CMake install rules for Linux-only targets are now correctly guarded against macOS.
- `qet-tb-generator` in the Snap build is now pinned to a fixed upstream tag instead of floating.
### Internationalization & Translations
- Expanded Korean (ko) support: UI strings, comments, generic names, installer language strings, translator credits and a new Korean man page.
- Additional updates to German, French, Chinese (zh), and other translation files, including strings related to the new duplicate-diagram and macro features.
## Developer & Contributor Notes
- Terminal strip and element data model continued to evolve incrementally (multiple passes on `max_slaves` handling, access modifiers, and storage), reflecting ongoing refinement of the terminal editor introduced in 0.100.
- PDF link handling was factored out into a shared `pdf_links.{cpp,h}` helper, reused by both the interactive export and the new CLI export path.
## Upgrade / Migration Notes
- No project file format changes are expected to break compatibility with 0.100 projects.
- Users relying on Windows nightlies should note that upgrades will now uninstall the previous nightly automatically, instead of requiring a manual uninstall first.
## How to get help / report bugs
- Use the project issue tracker to report regressions or new bugs, with detailed reproduction steps and example `.qet` files where possible.
- Include the output of Help → About (application version and Git revision) when reporting build/packaging issues.
## Version 0.100
_Compiled from provided commit logs and contributor notes._
## Overview
This release (v0.100) collects a large set of new features, UI and editor improvements, element and symbol updates, build and packaging fixes, dependency upgrades, translations, and a broad set of bug fixes and stability improvements. It is intended as a stable, feature-rich stepping stone toward the next major workflows for symbol editing, terminal/strip handling and export improvements.
## Highlights / Key Features
- **Terminal Strip / Terminal Strip Editor**
- New TerminalStripItem type and related editor workflow added.
- Support for drawing and displaying terminal bridges and links in the editor.
- Full editor support (layout preview, save/load into .qet files) and undo support for terminal strip operations.
- **New Example Projects**
- Several new example projects included, notably photovoltaic (PV) examples to help users getting started with PV designs.
- **Improved Export / Print Handling**
- Export limits adjusted and better handling of QPainter/printing boundaries to avoid export artefacts and out-of-range errors.
- Export dialog updated to allow larger pixel limits where appropriate.
- **Element & Symbol Additions**
- New elements and symbols added (including vendor-specific elements and additional sensors/Arduino components).
- Improvements to element import & metadata handling.
- **Packaging & Multi-arch Support**
- Updated packaging scripts for AppImage, Flatpak, Snap and macOS deployment. Improved aarch64/arm64 support.
## Detailed Changes
### Editor & UX
- Better handling for **rotation, flip and mirror** operations in the element editor:
- Primitives and text rotation behavior improved.
- Finer rotation increments and predictable text orientation after flips/rotations.
- **Wiring and conductor behavior**:
- More robust creation and movement of wires and conductor bundles.
- Improved text attachment and positioning for wires and improved stability while editing complex conductor networks.
- **TerminalStrip editor**: see Highlights - includes drawing, preview, layout editing, persistent storage in the project file and undo support.
- **Element Editor & Symbol Trim/Sort**:
- Improved trimming/normalization of element metadata.
- Better sorting and error handling for element imports (DXF and other formats).
- Small UI improvements: About dialog updates, autosave spinbox ranges, improved tooltips and mouse-hover help for dynamic texts.
### New & Updated Elements
- New elements added for industrial and automation workflows (including Siemens-related elements, logic elements, sensors and Arduino components).
- Symbol library additions and cleanup; improved defaults for newly added symbols.
- Element meta-data cleanup: article numbers, descriptions, and manufacturer fields were normalized and trimmed on import.
### Export / Printing / PDF
- Adjusted internal export limits to avoid hitting QPainter size restrictions; users can now export larger, high-resolution images/prints in more cases.
- Better handling of page sizes and printer-related geometry using QRectF improvements.
- PDF export improvements to increase reliability of exported vector content.
### Build, Dependencies, Packaging
- Upgrades of core test and build dependencies:
- Catch2 upgraded to v2.13.10.
- googletest upgraded to v1.17.0.
- CMake fixes and i18n handling corrected for nl_BE and other locales.
- Packaging scripts updated across platforms (AppImage/Flatpak/Snap/macOS deploy) including fixes for aarch64/arm64.
- Submodule updates (e.g., qelectrotech-elements, pugixml, SingleApplication) synchronized where needed.
### Internationalization & Translations
- Large translation updates across many languages: German (DE), French (FR), Dutch (NL, including nl_BE), Swedish (SV), Italian (IT), Polish (PL), Portuguese-BR (PT-BR), Serbian (SR), Chinese (Simplified) and others.
- Fixes and corrections for many UI strings and localized resources.
### Tests, QA & Logging
- Improved logging and machine/config-path reporting; Git revision display refined to only show a revision when available.
- Unit test updates and fixes to align with updated testing frameworks.
## Bug Fixes (selected)
- Fixed crashes and various null pointer access issues discovered by static and dynamic testing.
- Resolved multiple reported bugs that caused build failures on some platforms (FTBFS fixes for macOS and others).
- Fixed issues with automatic conductor/strand numbering in several edge cases (referenced Bug 293 in the commit logs).
- Resolved text/summary headline issues in the German-language summary generator.
- Fixes for a number of visually incorrect renderings and layout corner-cases during element transformation (rotate/flip/mirror).
- Fixed issues that affected export sizes and caused export artifacts (referenced fixes for bug IDs around #329/#330 in commit notes).
## Developer & Contributor Notes
- Reworked parts of the codebase to use QRectF consistently for better compatibility with QPrinter and export pipelines.
- Code-style cleanups and comment improvements applied throughout the project.
- Expanded test coverage and dependency refresh to keep CI builds stable.
## Contributors (selected)
Thanks to the many contributors who made this release possible. Selected contributors mentioned in the commit logs include:
- Laurent Trinques
- joshua
- plc-user
- Achim
- Pascal Sander
- Andre Rummler
- Magnus Hellströmer
- Martin Marmsoler
- Remi Collet
(See the full commit history for the complete contributor list.)
## Upgrade / Migration Notes
- No database or project file format breaking changes were reported in the provided logs. As always, back up projects before opening them with a new version.
- If you rely on custom element libraries or third-party submodules, verify submodule synchronization after upgrading.
- If you are using custom packaging pipelines, review the updated packaging scripts for any changes required by new dependency versions, especially on aarch64/arm64.
## Known Issues & Limitations
- Some very large exports may still be limited by platform-specific rendering restrictions; the export dialog now allows larger pixel limits but extreme sizes may still hit system-level limits.
- If you use niche element-import workflows (DXF → element import), occasionally metadata normalization may alter whitespace/trim rules - verify newly imported elements in the element editor.
## How to get help / report bugs
- Use the project issue tracker (see repository) to report regressions or new bugs with detailed reproduction steps and example .qet files where possible.
- Include the output of Help → About (application version and Git revision) when reporting build/packaging issues.
====== ChangeLog from 0.8 to 0.9 ======
*Diagram editor :
Improved QElectroTech speed (launch qet, open project, function)
A drop-down list has been added to the toolbar to change the size of the resize handles.
*Element Editor:
The "keep visual rotation" property of element texts is editable from the element editor.
Thanks to the work of antonioaja it is now possible to import a dxf directly from the element editor in a completely transparent way for the user.
In the background QElectroTech uses the dxf2elmt software. https://qelectrotech.org/forum/viewtopic.php?id=2265 https://github.com/antonioaja/dxf2elmt
Improved responsiveness when multiple shapes are selected or deleted, especially when working on a large converted DXF element.
* The export of the nomenclature to csv file has been completely rewritten :
It is now possible to choose which information to export as well as the order in which it should be displayed.
An option allows filtering by type of element: all, terminal block, button / switch.
Another option allows to display or not the column headers in the csv file.
With these options, it is possible to create a nomenclature, an order list, but also for printing labels: list of terminals and list of buttons / switches.
It is possible to save / load a configuration easily.
Finally, the work being done by an SQLite database, a text field allows the user to create his own SQL query.
* Add Conductors numbering to csv file.
* Add new summary table.
* add BOM creation dialog :
nomenclature is now integrated into the project (accompanied by several parameters in order to be customizable).
Tables can have a name.
Tables an be added to any folio.
Font margin and alignment (right center left) separately adjustable for headers and table cells.
Position size and number of lines is adjustable.
Possibility of linking several tables together, especially when the entire nomenclature cannot be contained in a folio.
Automatic adjustment of the size of the table in relation to the folio.
Option to apply the geometry of an array to all the array linked to it, so that everything is homogeneous.
Save / load table configuration and content to make creation faster.
Option to automatically adjust the table to the folio.
Option to automatically add new tables in new folios if the nomenclature cannot be contained in 1 to N folios / tables.
* Table content:
Fully customizable, you display what you want or want (info to display in the desired order, filter on type of element, filter on content of the info "contains, not contains, not empty etc ..." ).
The content being generated from a sqlite database, you can write your own request.
* Loading of element collections is now faster (thanks to the pugixml parser)
* The loading of collections of elements no longer freezes QElectroTech.
* The appearance and disappearance of the search / replace menu is animated.
* Fix wrong position of slave xref after open a saved project
* Add font color of the conductors (Simon).
* Add section and color properties for wires.
* config dialog :
* Add QScrollArea to configdialog and resize to max_screen (Simon).
* Add gui resize depending on screen size (Simon).
* Add Screen info user (Simon).
* Mod ScrollArea on demand (Simon).
* Element editor:
* Polygon editing widget, when you click on a point in the list, the corresponding point changes color in order to better visualize what you are doing.
On this same list, a right click opens a contextual menu allowing to delete the selected point or inserted a point after the selected one.
When holding the ctrl + directional arrow key, the selected parts move by 0.1 instead of 1 point.
* with Ctrl key you can moving by keyboard primitives selected by 0.1 point instead by 1 points, added the same feature for moving the selected aera.
* Added 140 web standard colors In Element editor (Arnaud).
* Add multiedit feature (martin).
* Add terminals uuid for next features (martin).
* Windows :
* Fix bad fonts rendering if Qt version >= 5.13.1.
See : https://bugreports.qt.io/browse/QTBUG-83161
* Fix backup file on windows
For unknown reason KautoSaveFile don't write the file on Windows if file
is open in another part of the code.
No error is returned and use the method :
qint64 QIODevice::write(const QByteArray &byteArray) return the good
number of bytes written but the real file stay empty.
Probably the problem don't come from KautoSaveFile but QFileDevice or
QIODevice on windows.
The fix consist to open the file just before write on it and close it
just after.
* writeToFile on a other Thread to improve this for windows performance (Simon).
* macOS :
* Add Fusion style and fix tilesets tab bar size
* Enable mouse wheel on tilesets tab bar with command keyboard, thanks Giovanni.
(removed by Qt upstream) https://codereview.qt-project.org/gitweb?p=qt/qtbase.git;a=commitdiff;h=ea47d152b35158ba07a55d009f57df0e4c2a048f;hp=08cc9b9991ae9ab51bed5b857b6257401401ff6f
* Element informations (manufacturer, reference etc...) can be created directly from the element editor. For that go to the widget "Element Property"
* It is no longer required to have a text field, for save the edited element.
* Improve the behavior with the arrow keys (depending to the current selection (nothing / one / several).
* Context menu display only enabled actions.
* Added new feature -> alignment.
* Alignment of text field can be edited.
* Added two new actions in context menu for insert or remove point of a selected polygon.
* Rectangle can have rounded corner.
* Polyline: finish the creation of polyline with the last point at the same position of the first point, close the polyline.
* Diagram editor :
* Conductors can now be drawn with two colors.
* Improve High-DPI support on Windows and Linux plateform.
* The code for the resize handles has been almost completely redesigned.
* Dissociate fonts policy and size for independent text item and for summarry pages (foliolist), added a 2 button in config page for open Qfontdialog widget and choose policy for independent text item.
* Add in config page a Qfontdialog widget for change dynamic text size, font family, orientation angle and text length, by default.
* Basic shape add new CustomDashLine style with Dash Pattern (<< 10 << 10 );
* It is now possible to add a text field to an element directly from the diagram.
* Element text item with are now converted to dynamic element text item.
* Element editor, part text can't be edited directly.
* User can export / import the configuration of the texts and texts group of an element.
* Context menu display only enabled actions.
* Added new action in the context menu, multiple paste, check box for autonum the pasted element.
* Multipaste -> improve the conductor autonum, conductors are numerated from top to bottom, and left to right.
* Text of conductor can be placed at top/bottom/left/right of conductor, and text never overlaps the conductor.
* Function for search conductor at the same potential.
When the search function is searching in a terminal element, they search only for the first terminal found, no matter if the terminal element have more than two terminals.
So the list of conductors at the same potential is missing some conductors.
This commit fix it, now the search function search for every terminals of a terminal element.
* When remove an element with several conductors connected to the same terminal, the electrical potential is partially or totally destroyed.
This commit fix it : When element is removed one or several conductors are created (if needed) to conserve the electrical potential.
* Added new feature -> alignment.
* Alignment of text field can be edited.
* Added new context menu action "group the selected texts".
* Widget used to edit text item group can edit the pos of the group.
* Element text item group can now be framed.
* Added two new actions in context menu for insert or remove point of a selected polygon.
* QETshapeItem rectangle can have rounded corner.
* Add in config the possibility to start the numbering of the columns of titleblocks at 0.
* Add new function Search and replace widget Crtl +F
* Diagram properties, Element properties, Independent text item can be changed (and mass changed) through the search and replace widget.
* Added 4 tools for edit the depth (Z value) of items.
* Element panel : elements can be searched by their name but also with by all their informations.
* New free selection style.
* Diagram editor : dock used to edit the shape item, can now edit several items in the same time.
* Dynamic element text item : The font of the dynamic texts can be individually be setted.
* Adding or revoming diagram set project to modified
* When user cleanning an project, set project to modified
* Add a shortcut "Ctrl+Shift+P" to quickly open the dialog used for create the auto numbering rules.
* Add missing StatusTip of some QAction
* When user add a polygon, a message in statusBar show how to finish this shape
* Polyline: finish the creation of polyline with the last point at the same position of the first point, close the polyline.
* Plug-in : Add StatusTip instruction for install and launching DXF plugin depending on the operating system
* when plugin qet-tb-generator"generate terminal blocks and connectors" isn't installed show an QMessageBox instruction now depending on the operating system for install it
Add in QMessageBox url encoding/decoding for easy download packages
* Elementspanelwidget: adds keyboard shortcuts to quickly move up, down,or move the targeted folio to the beginning of the project
F3 MoveUp
F4 MoveDown
F5 MoveUpTop
* Title block editor :
Added new title block variables %projectpath, %projectfilename, %projecttitle, previous-folio-num and next-folio-num
"%saveddate, %savedtime, %savedfilename and %savedfilepath" they variables should be updated after file save or save as dialog is confirmed,
before file is saved.
* NameList widget : add a combo box for easily paste texts, like the variables for title block.
* The font of the dynamic text field can be edited.
* The font of the static text field can be edited.
* The color of the static text field can be edited.
* Improve for new qet_tb_generator plug-in : added the full path of the current project as
an argument when calling the plug-in from QET if a project is open.
If not a file dialog is showed to select the QET project.
* QET create a backup file, use to restore the project when a crash occur.
* Use KAutoSaveFile for the backup system, instead of home made function.
* Use of QSAveFile instead a QFile.
* User can enable and edit autosave timer.
* let user define the file system path of the common,custom elements collections, and custom title blocks template.
* QetGraphicsItem, remove the function applyRotation and rotateBy, and use instead the native function of QGraphicsItem : setRotation
* Conductor is an herited class of QGraphicsObject, instead of QObject and QGraphicsPathItem
* Clean (and reduce the size) the class QETDiagramEditor, mostly by replacing the connection syntax "signal -> slot" by "signal -> lambda".
* Replace deprecated QMatrix by QTransform.
* DXF export : fix some double items in dxf file.
* DXF export : add some colors for basic shapes inside dxf.
* Bug fix :
* Fix compilation warning (clang and gcc).
* Fix element text item alignment work well when text rotation != 0.
* Fix crash when the properties of a element text item group
* Fix crash occurred by the conductor and shape "ghost".
* Fix element text alignment work also when font size change.
* fix :
1- When open a .qet by double click on it, QET ask user for open the backup file, of this .qet.
2- On windows, if user open a project from the recent files menu, when close QET the file is deleted  user lose her work.
clear the element texts when paste an element with the option "Do not store the labels of items in the copy paste" enabled.
* elements can't be moved up and left, when there rotation are different than 0.
* minor fix : slave link dialog doesn't display the good label, when the label of master element is build from formula.
* Fix : in some condition, dynamic text are not at the same position when open a project.
* On windows when user drag and drop an element from the common elements collection to the custom elements collection,
the element file stay in read only mode, and so user can't save the element
* Improvement : minimize the unwanted gap of the top right folio of the view (see https://qelectrotech.org/forum/viewtopic.php?pid=9379#p9379)
* Fix: bug 168
* Fix : when create multiple conductors with the free hand selection, the checking of existing potentiel don't search trought a folio report.
* Fix: DXF export.
* Minor fix : remove from the element information the html hexadecimal and decimal characters of line feed and carriage return.
* fix : in the diagram editor, when we select several shapes at the same time, the properties widget only apply the change to one shape.
* Bug fix : when user load a project which contains summary pages, project was marked modified (summary was created on the fly and moved from the end on second
position), now the project is no longer marked as amended when user have one or multiples summary pages when loading this project.
* Static text of element are now exported to dxf
* Fix Static text size of element exported to dxf
* Improvement : minimize the unwanted gap of the top right folio of the view
* Fix : when create multiple conductors with the free hand selection, the checking of existing potentiel don't search trought a folio report.
* Don't display gui when qet is launched with specific argument
====== ChangeLog from 0.5 to 0.6 ======
In the official collection, there are now 4106 elements, and 539 categoris for a total of 4645 files
* Improved performance, added multithreading to speed up the loading of items when launching QET.
* RAM consumption has been considerably reduced.
* New "collections" panel.
* Automatic numberings (autonum), Variables and prefix.
* Folio generator
* Management Policy
* New thickness properties for conductors.
* The thickness of the lines of all basic shapes (lines, rectangles, ellipses, polygons) can be changed from 0,2px to 50,0px.
* The color of lines and fillings of basic shapes can be choosed from a color palette or set with a html color code.
* Added Copy/paste from another project.
* Online documentation and links to download the latest packages of the version under development for Windows and MacOS are available directly from the software.
* Resetting the layout of the summary pages.
* In the panel left split the view into a several docks.
* High-DPI support (Qt 5.6.0)
* new python plugin to generate terminal block.
* Windows packages are now created on a Debian operating system using cross-compilation and targeted to make executable binary files for these operating systems.
This technical evolution allows a significant time saving during the creation of the packages. And we can provide also in the same time Windows XP and Vista packages by cross-compil with Qt 5.7.1 environment
* The Mac OS X executable binary files are created on a virtual environment, moved compiler to latest LLVM clan version, improved dmg packages with added Info.plist.
* An annoying memory leak has been found and solved. Afters hours of use, some users noticed that the RAM consumption growed steadily, up to 10GB or more. This problem is now solved.
====== ChangeLog from 0.4 to 0.5 ======
In the official collection, there are now 2625 elements, and 418 catégoris for a total of 3043 files.
* Port to Qt 5 framework
* New QSettings native format for config files.
* In the diagram editor, the grid is not displayed by default outside the diagram, the minimum zoom is blocked. A button allows you to un-validate this operation.
* It is now possible to put the tittle block on the right vertical mode.
* The default tittle block can be defined for the next folios of the project.
* The summary now takes the font set in the QElectroTech.conf
* The floating dock is now operational, variables, actions are taken into account on the fly.
* A transformation tool transforms quickly and finely each primitive by handles.
* Add UUID tag for element XML.
* The database enables faster loading a large number of managing symbols in tables changes pixmaps collections, it no longer compares the modification date of the files but their use UUID attributes to update the cache .
* In terms of basic shapes, the transform tool works directly on vectors, it replaces the reduction tool / enlargement that has just been deleted as unnecessary.
* Improve Undo command by QPropertyUndoCommand class.
====== ChangeLog from 0.3 to 0.4 ======
In the official collection, there are now 2298 elements, and 376 catégoris for a total of 2674 files.
* We have removed the flag '-fno-ipa-sra "This settled the compilation problems on Mac OS X and FreeBSD clang.
* The official collection has been redesigned, through the work of Nuri a new structure is in place.
* A menu has been added, allowing you to change the application language.
* we added a summary creation tool.
* Added button "export the nomenclature" transforms data from diagrams to CSV file for spreadsheet.
Arun wrote a detailed manual in English.
* New tools have been added, they can create mechanical connections and draw cabinets, desks, junction boxes, or areas on the schematic (line tool, rectangle, ellipse, polygon type: respect for style dashes).
* An aid in positioning cross, drawing, was added.
* The locked state images and basic forms (basic shapes) is now stored in the project.
* The "control" during the movement of an element, text field disables snapping to the grid, for free positioning.
It is now possible to choose the background folios in white or gray.
* Add supports trackpad gestures (multitouch).
The dates of the cartridges are now using the short system date and date format according to the language detected setting in the OS.
We take advantage of the transition to standard C ++ 11, and a big cleanup in the code was done.
* The undo action or redo the undo stack are now animated graphically.
When the action save, save as, the status bar displays the name and path of the backup job.
Qet is now able to come to load a style sheet (stylesheet) directly from the conf directory.
* A DXF export has been added, the entire project folios can be exported in this format.
* Added reports folio, Cross references.
* Added a variable font size for text of conductors.
* Added new properties to all conductors at the same potential, even through referrals.
* When several conductors have the same value potential equalization, it is not useful to display on all conductors.
* Added button to activates the automatic connection of the conductors of the element when moving it.
* Numbering rules are now available for the entire project.
Qet detects the Windows version and applies the appropriate graphic style, depending on the version of Windows.
====== ChangeLog from 0.3 rc to 0.3 ======
First, the collection of symbols has made a big step forward, with about 1560 new elements.
There are now symbols for pneumatics, hydraulics, process, solar, cold, etc. Considerable effort has been done to organize the collection in a better way.
We hope that the new organisation is clearer for all. We would like to thank all the contributors who send us symbols.
=====-Element Editor: =====
Considerable work has be done to replace the manual defining zone of the symbol, aka hotspot.And fix bugs, It is now automatic. You do not have to care about it anymore.
Primary colors have been added for the drawing shapes.
A contextual menu (right click) has been added. So, you can now work more quickly with symbols. It is also more user-friendly.
====== ChangeLog from v0.3 rc ======
=====-Element Editor: =====
* Replacing checkboxes with lists of colors.
* Removed the manual hotspot, it is now automatic and you do not have to worry.
Officially Collection: a large classification work on the structure was realized. It should be clear to everyone.
The collection is enriched with 1711 items in 286 categories (ie 1997 files)
=====-Schema Editor:=====
* Added import image, image rotation, image resizing and saving the file in the project.
(Double click on the image called a widget and cursor that reduce or enlarge the selected image.)
NB: Following the "edit image" entry will also be added in the right click menu.
* F5 keyboard shortcut can recharge symbol collections.
Some bugs have been resolved, and the translation status continues to grow.
======ChangeLog from v0.3 beta ======
Two more items for the changelog:
* In the official collection, there are now 1672 elements and 256 categoris for a total of 1928 files. In version 0.3 alpha, there were 1465 elements and 233 categories, while version 0.22 had153 elements and 51 categories.
*Progress in the translation (see http://qelectrotech.org/wiki/doc/translation/stats for current state)
* Functions (edit element and find in panel) have been moved to the context
Here is the changelog, for version 0.3 beta:
* Functions (edit element and find in panel) have been moved to the context menu, that can be accessed with right click. This is more user friendly.
* Refresh of categories when an element is moved.
* DateNow button added in the "Diagram property" dialog.
* Dotted lines can now been added between conductors.
* Rich text can be added to the diagram text fields.
[screenshot]
* HTML WYSIWYG editor for rich text: bold, italic, underlined, font size from 6 to 72 pixels, font colour, etc.
* You can change between the two modes(Selection mode <-> View mode) with the scroll button.
* Symbol editor: focus on the new value for language, languages sorted in alphabetical order.
* Added a widget that reflects the loading of a big project.
* Automated numbering of conductors according to your rules. See note from Joshua http://qelectrotech.org/wiki/doc/autonum
* Added a dialog to automatically rotate the text if the associated conductor is vertical or horizontal. Parameters are saved in qelectrotech.conf
* Added basic colours on the tools for lines and for the filling of the primitives, and also for the style line and point in the element editor.
* Added several protection to prevent from saving an element if one of its primitive is beyond the hotspot.
====== ChangeLog from 0.22 to 0.3a ======
===== Application =====
Elements collection: QElectroTech now provides 1465 elements within 233 categories (0.22 provided 153 elements within 51 categories). Most elements are related to electricity though some relate to chillers, solar, hydraulic and pneumatic engineering.
A new kind of collections appeared to store title block templates; as for elements, there is a distinction between common (system-wide) templates and custom (user-wide) templates.
Translations:
English, Spanish, French, Portuguese and Czech translations have been maintained.
Russian translations have been removed because they are not maintained anymore.
Polish, German, Italian, Arabic and Croatian translations have been added.
Following translation to Arabic, some work was done to improve Right-To-Left languages support.
Elements names are fully translated to English, French, Czech and Polish.
Main windows: added a “What's this?” action.
QElectroTech now handles *.titleblock files.
===== Diagram editor =====
It is now possible to move and rotate all texts on a diagram : element texts, conductor texts and independent texts.
When moving a text related to an electrical element, this element is highlighted.
Texts related to a conductor cannot be moved too far away from it.
It is now possible to create diagrams with more than 100 rows/columns.
Elements panel:
During a drag and drop operation, the hovered item is now expanded after a short time not moving the mouse.
Items are now expanded/collapsed by a double click.
Common, custom and embedded collections of title block templates are displayed within the elements panel.
Elements previews and names are now cached into a SQLite database stored in the user configuration directory, thus speeding up the elements panel (re)loading
The elements panel now displays the folio index before each diagram title.
UI consistency: renamed “Import element” to “Open an element file”, separated this action from those related to the current selection, and ensured elements-related actions are disabled when selecting a project/diagram/title block template.
Freshly integrated elements are now highlighted in the elements panel – this behaviour can be disabled though.
When clearing the search field, the panel state is restored to its previous state.
Title blocks are now rendered using templates:
For each diagram, users can choose the template to be used in the diagram properties.
They may also drag and drop it from the elements panel to the diagram.
Title block templates are always integrated within the parent project.
Fixed a bug in the print preview dialog.
Added a F2 shortcut for the widget “Edit the color of the given conductor”.
As elements, diagrams now have a “version” attribute for compatibility purposes.
Better handling of file opening for documents saved with newer versions of QElectroTech.
Diagram loading: removed an optimization that could lead to conductors not being loaded when several terminals share the same coordinates.
Users may now enter visualisation mode by pressing Ctrl and Shift.
Printing: when printing diagrams with no title block, use the space left by the title block.
Added a few status and “What's this?” tips.
Got rid of the green icon used for projects, changed a few other icons.
===== Element editor =====
Both static and dynamic texts can now be rotated
Added “dotted” line style
Added white color for texts
Newly added parts are placed above existing ones.
===== Title block template editor =====
A third kind of editor was implemented so users can create their own title block templates:
It allows users to customize the layout and content of cells that constitute the title block.
Cells can be merged and splitted.
Their width can be fixed, relative to the total width or relative to the remaining widths.
Their height is a simple fixed length.
They contain either a logo (be it in SVG or a usual bitmap format) or some text.
The text value is optionally preceded by a label.
As other texts within QElectroTech, labels and texts can be translated to other languages.
Texts and labels may contain variables (e.g. %company-name); these variables are replaced by real world values once the template is applied to a diagram.
Those real-world values can be set among the diagram properties.
====== Changelog 0.11 -> 0.2 ======
À partir de la version 0.2, QElectroTech est disponible en français, anglais, mais aussi :
* en espagnol, grâce aux traductions de Youssef ;
* en russe, grâce aux traductions de Yuriy ;
* en portugais, grâce aux traductions de José.
L'application utilise désormais le thème d'icônes Oxygen, réalisé par Nuno Pinheiro pour le projet KDE.
===== Notion de fichier projet =====
Un fichier .qet peut désormais contenir zéro, un ou plusieurs schémas électriques. Les éléments composant ces schémas sont embarqués dans le fichier projet au moment où ils sont posés sur un schéma. Le panel d'éléments affiche donc désormais :
* les projets ouverts, avec, sous chaque projet :
* les schémas de ce projet,
* la collection embarquée du projet (catégories et éléments utilisés dans les schémas)
* la collection commune fournie par QET,
* et la collection personnelle de l'utilisateur.
===== Éditeur de schémas =====
* Il est désormais possible de déplacer et copier les catégories et éléments par simple glisser-déposer (drag'n drop) dans le panel d'éléments.
* La collection embarquée est manipulable au même titre que la collection utilisateur. Les éléments inutilisés dans le projet apparaissent sur fond rouge et un dialogue permet de les purger rapidement.
* Chaque projet embarque également (au niveau de ses propriétés) les paramétrages par défaut pour les nouveaux schémas, cartouches et conducteurs.
* Il est possible de changer l'ordre des schémas dans le projet en déplaçant les onglets qui les représente. Dans le champ "Folio" des cartouches, on peut se référer à la position du schéma courant ou au nombre total de schémas dans le projet en écrivant respectivement %id et %total.
* Lors du chargement d'un fichier .qet, si des éléments ne sont pas trouvés, ils sont remplacés par un élément "fantôme", ce qui évite de perdre certaines informations lors de l'enregistrement du fichier.
* Le rendu avec un zoom réduit a été amélioré.
* Enfin, le logiciel gère l'ouverture en lecture seule d'un fichier projet.
==== Impression et export ====
À partir de la version 0.2, QElectroTech :
* propose d'utiliser une imprimante réelle ou bien de générer un document PDF ou PostScript, et ce sous Windows comme sous X11.
* génère un aperçu avant l'impression d'un projet. Cet aperçu permet de choisir les options d'impression mais également les schémas à imprimer ou non.
À noter toutefois une limitation pour les impressions PDF/PS sous Windows : le dialogue de mise en page, permettant de spécifier le format du papier ainsi que ses marges, n'est pas disponible.
Le dialogue "Exporter" (pour générer un fichier image d'un schéma) a également été refait dans l'optique d'un export simultané de tous les schémas du projet.
===== Éditeur d'éléments =====
* Lorsque l'on dessine une ligne dans l'éditeur d'éléments, il est possible de choisir un embout différent pour chaque extrémité, comme par exemple une flèche, un cercle, un carré ou, tout simplement, un bout de ligne normal.
* La forme "Rectangle" a été ajoutée.
* On peut enregistrer un élément en désignant un fichier (= comportement en 0.11) ou bien en choisissant un élément cible dans une liste reprenant l'arborescence du panel d'éléments.
* Si l'on maintient la touche Shift lorsque l'on ajoute une partie (droite, cercle, texte, ...), l'outil en cours est conservé après le dessin. Sinon l'éditeur repasse sur l'outil de sélection.
* La grille a été améliorée : sa densité varie en fonction du zoom ; les points correspondant à ceux de la grille de l'éditeur de schémas sont mis en valeur.
* L'accrochage à la grille (aka "snap to grid", également connu sous le nom de grille magnétique ou encore grille aimantée) a été ajouté. Le dessin s'y accroche désormais avec une précision de 1px. On peut travailler en coordonnées libres en maintenant la touche Ctrl enfoncée durant le dessin.
* Le copier-coller a été implémenté : il est possible de coller :
* avec le bouton du milieu de la souris
* en choisissant une "zone de collage" sur l'élément (Ctrl+Shift+V)
* directement (Ctrl+V) : les parties collées sont placées à côté des parties copiées ; si on recolle les parties, elles sont collées encore un cran à côté, et ce de manière incrémentale.
* Des contrôles sont désormais effectués à l'enregistrement : présence de bornes, respect du cadre, etc.
* Uniformisation des menus par rapport à l'éditeur de schémas
====== Changelog 0.1 -> 0.11 ======
===== Fonctionnalités et interface =====
* L'application est désormais capable d'ouvrir un fichier élément passe en paramètre
* L'application se lance désormais une seule fois par utilisateur
* Lors de l'ouverture d'un fichier en dehors de l'application alors que QET est déjà démarré celui-ci essaye de s'afficher ou d'attirer l'attention de l'utilisateur.
* L'application vérifie que ce fichier n'est pas déjà ouvert dans tous les éditeurs de schémas / éléments.
* Ajout de fichiers permettant d'automatiser les associations de fichiers sous Windows (.bat et .reg) et X11 (.desktop et .xml)
* Ajout de menus "Récemment ouverts" pour accéder aux fichiers récents dans les éditeurs de schémas et éléments.
* Ajout d'un splash screen
* La hauteur du schéma est désormais gérée via un système de lignes, dont le nombre et la hauteur sont ajustables.
* Il est également possible d'afficher ou non les en-têtes des lignes et/ou des colonnes.
* Ajout d'une option --lang-dir
* Ajout d'une description dans le dialogue des options d'impression
* Ajout de pages de manuel Unix (`man') en anglais et en français
===== Corrections de bugs =====
* Bug #12 : QET provoquait une erreur de segmentation dès son démarrage dans un environnement sans systray
* Bug #14 : il manquait un / dans le chemin proposé lors de l'impression vers un PDF
* Bug #15 : Mauvais positionnement des champs de texte sur le schéma
* Bug #16 : Mauvaise gestion des modifications du texte d'un conducteur
* La classe DiagramView écrivait sur la sortie d'erreur sans fin de ligne
* L'option --config-dir était mal prise en compte
* Après fermeture d'un schema, le menu Fenêtres n'était pas correctement mis à jour
* Les textes des éléments, des conducteurs, du cartouche ainsi que les textes indépendants utilisent désormais tous la même police.
* Remise à niveau de l'impression suite au passage à Qt 4.4
===== Code et détails techniques =====
* Corrections pour que QET compile avec gcc-4.3
* Les classes Conductor et Element héritent désormais de QObject (dépendance sur Qt 4.4)
* Affinage du constructeur de la classe QETApp
* Moins d'avertissements à la compilation (testé avec gcc 4.3)
* Moins d'inclusions non pertinentes
## Version 0.100
_Compiled from provided commit logs and contributor notes._
## Overview
This release (v0.100) collects a large set of new features, UI and editor improvements, element and symbol updates, build and packaging fixes, dependency upgrades, translations, and a broad set of bug fixes and stability improvements. It is intended as a stable, feature-rich stepping stone toward the next major workflows for symbol editing, terminal/strip handling and export improvements.
## Highlights / Key Features
- **Terminal Strip / Terminal Strip Editor**
- New TerminalStripItem type and related editor workflow added.
- Support for drawing and displaying terminal bridges and links in the editor.
- Full editor support (layout preview, save/load into .qet files) and undo support for terminal strip operations.
- **New Example Projects**
- Several new example projects included, notably photovoltaic (PV) examples to help users getting started with PV designs.
- **Improved Export / Print Handling**
- Export limits adjusted and better handling of QPainter/printing boundaries to avoid export artefacts and out-of-range errors.
- Export dialog updated to allow larger pixel limits where appropriate.
- **Element & Symbol Additions**
- New elements and symbols added (including vendor-specific elements and additional sensors/Arduino components).
- Improvements to element import & metadata handling.
- **Packaging & Multi-arch Support**
- Updated packaging scripts for AppImage, Flatpak, Snap and macOS deployment. Improved aarch64/arm64 support.
## Detailed Changes
### Editor & UX
- Better handling for **rotation, flip and mirror** operations in the element editor:
- Primitives and text rotation behavior improved.
- Finer rotation increments and predictable text orientation after flips/rotations.
- **Wiring and conductor behavior**:
- More robust creation and movement of wires and conductor bundles.
- Improved text attachment and positioning for wires and improved stability while editing complex conductor networks.
- **TerminalStrip editor**: see Highlights - includes drawing, preview, layout editing, persistent storage in the project file and undo support.
- **Element Editor & Symbol Trim/Sort**:
- Improved trimming/normalization of element metadata.
- Better sorting and error handling for element imports (DXF and other formats).
- Small UI improvements: About dialog updates, autosave spinbox ranges, improved tooltips and mouse-hover help for dynamic texts.
### New & Updated Elements
- New elements added for industrial and automation workflows (including Siemens-related elements, logic elements, sensors and Arduino components).
- Symbol library additions and cleanup; improved defaults for newly added symbols.
- Element meta-data cleanup: article numbers, descriptions, and manufacturer fields were normalized and trimmed on import.
### Export / Printing / PDF
- Adjusted internal export limits to avoid hitting QPainter size restrictions; users can now export larger, high-resolution images/prints in more cases.
- Better handling of page sizes and printer-related geometry using QRectF improvements.
- PDF export improvements to increase reliability of exported vector content.
### Build, Dependencies, Packaging
- Upgrades of core test and build dependencies:
- Catch2 upgraded to v2.13.10.
- googletest upgraded to v1.17.0.
- CMake fixes and i18n handling corrected for nl_BE and other locales.
- Packaging scripts updated across platforms (AppImage/Flatpak/Snap/macOS deploy) including fixes for aarch64/arm64.
- Submodule updates (e.g., qelectrotech-elements, pugixml, SingleApplication) synchronized where needed.
### Internationalization & Translations
- Large translation updates across many languages: German (DE), French (FR), Dutch (NL, including nl_BE), Swedish (SV), Italian (IT), Polish (PL), Portuguese-BR (PT-BR), Serbian (SR), Chinese (Simplified) and others.
- Fixes and corrections for many UI strings and localized resources.
### Tests, QA & Logging
- Improved logging and machine/config-path reporting; Git revision display refined to only show a revision when available.
- Unit test updates and fixes to align with updated testing frameworks.
## Bug Fixes (selected)
- Fixed crashes and various null pointer access issues discovered by static and dynamic testing.
- Resolved multiple reported bugs that caused build failures on some platforms (FTBFS fixes for macOS and others).
- Fixed issues with automatic conductor/strand numbering in several edge cases (referenced Bug 293 in the commit logs).
- Resolved text/summary headline issues in the German-language summary generator.
- Fixes for a number of visually incorrect renderings and layout corner-cases during element transformation (rotate/flip/mirror).
- Fixed issues that affected export sizes and caused export artifacts (referenced fixes for bug IDs around #329/#330 in commit notes).
## Developer & Contributor Notes
- Reworked parts of the codebase to use QRectF consistently for better compatibility with QPrinter and export pipelines.
- Code-style cleanups and comment improvements applied throughout the project.
- Expanded test coverage and dependency refresh to keep CI builds stable.
## Contributors (selected)
Thanks to the many contributors who made this release possible. Selected contributors mentioned in the commit logs include:
- Laurent Trinques
- joshua
- plc-user
- Achim
- Pascal Sander
- Andre Rummler
- Magnus Hellströmer
- Martin Marmsoler
- Remi Collet
(See the full commit history for the complete contributor list.)
## Upgrade / Migration Notes
- No database or project file format breaking changes were reported in the provided logs. As always, back up projects before opening them with a new version.
- If you rely on custom element libraries or third-party submodules, verify submodule synchronization after upgrading.
- If you are using custom packaging pipelines, review the updated packaging scripts for any changes required by new dependency versions, especially on aarch64/arm64.
## Known Issues & Limitations
- Some very large exports may still be limited by platform-specific rendering restrictions; the export dialog now allows larger pixel limits but extreme sizes may still hit system-level limits.
- If you use niche element-import workflows (DXF → element import), occasionally metadata normalization may alter whitespace/trim rules - verify newly imported elements in the element editor.
## How to get help / report bugs
- Use the project issue tracker (see repository) to report regressions or new bugs with detailed reproduction steps and example .qet files where possible.
- Include the output of Help → About (application version and Git revision) when reporting build/packaging issues.
====== ChangeLog from 0.8 to 0.9 ======
*Diagram editor :
Improved QElectroTech speed (launch qet, open project, function)
A drop-down list has been added to the toolbar to change the size of the resize handles.
*Element Editor:
The "keep visual rotation" property of element texts is editable from the element editor.
Thanks to the work of antonioaja it is now possible to import a dxf directly from the element editor in a completely transparent way for the user.
In the background QElectroTech uses the dxf2elmt software. https://qelectrotech.org/forum/viewtopic.php?id=2265 https://github.com/antonioaja/dxf2elmt
Improved responsiveness when multiple shapes are selected or deleted, especially when working on a large converted DXF element.
- “Exclude from auto-numbering” and “Potential isolation” tick boxes fault [\#482](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/482)
- Add ability to change appearance of multiple lines at once [\#476](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/476)
- Save As dialog asks for "element name" but actually requires a file name [\#469](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/469)
- Some icons are illegible with dark theme [\#466](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/466)
- \[BUG\] Properties to all conductors [\#460](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/460)
- Internal links in PDF export [\#417](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/417)
- Apple silicon download is not working [\#400](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/400)
- Add missing title block variables to 'folio properties' window [\#271](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/271)
- Bug: Saving a read-only project doesn't clear the read-only state [\#217](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/217)
**Merged pull requests:**
- PartText: keep text position stable across save/reopen on font-size change \(\#158\) [\#501](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/501) ([ispyisail](https://github.com/ispyisail))
- Clear read-only state when a project is saved to a writable file [\#497](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/497) ([ispyisail](https://github.com/ispyisail))
- Fix regional system locale loading the wrong translation \(pt\_BR/nl\_BE/nl\_NL\) [\#496](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/496) ([ispyisail](https://github.com/ispyisail))
- Folio properties: auto-add a title block's custom variables [\#495](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/495) ([ispyisail](https://github.com/ispyisail))
- Element editor Save As: label the field as a file name, not 'element name' [\#494](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/494) ([ispyisail](https://github.com/ispyisail))
- CLI: clickable cross-reference hyperlinks in PDF export [\#490](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/490) ([ispyisail](https://github.com/ispyisail))
- fix possible crashes in crossrefitem [\#479](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/479) ([ChuckNr11](https://github.com/ChuckNr11))
- Fix: Dynamic element text shifting/jumping when duplicating diagrams [\#477](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/477) ([Kellermorph](https://github.com/Kellermorph))
- Update German translations for duplicate diagram feature [\#475](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/475) ([Kellermorph](https://github.com/Kellermorph))
- Feat: Add ability to duplicate diagrams/folios with all metadata and … [\#473](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/473) ([Kellermorph](https://github.com/Kellermorph))
- Feature: Allow excluding specific elements from BOM \(Nomenclature\) [\#472](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/472) ([Kellermorph](https://github.com/Kellermorph))
- Potential Isolation option for terminals [\#471](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/471) ([Kellermorph](https://github.com/Kellermorph))
- Fix: Wiring list filter and dynamic text timing [\#470](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/470) ([Kellermorph](https://github.com/Kellermorph))
- New element: Line definition [\#464](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/464) ([Kellermorph](https://github.com/Kellermorph))
- Turkish Lang Update [\#463](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/463) ([scorpio810](https://github.com/scorpio810))
- follow up: wiring list [\#462](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/462) ([Kellermorph](https://github.com/Kellermorph))
- Fix and Improve Multi-selection for Diagram Operations [\#459](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/459) ([Kellermorph](https://github.com/Kellermorph))
- Move Flemish man pages from man/be/ to man/nl\_BE/ [\#439](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/439)
- you could share an PR to fix it? [\#438](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/438)
- Diacritics in some filenames can possibly lead to the problems during packaging [\#437](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/437)
- שרטוט חשמל [\#435](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/435)
- No usable sources archive for version 0.100 [\#418](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/418)
- New release ? [\#411](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/411)
- options moving when opening "file", "edition" menus [\#299](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/299)
**Merged pull requests:**
- Try to add Windows build CI workflow [\#457](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/457) ([scorpio810](https://github.com/scorpio810))
- Fixed: Prevented the selection in the project tree from jumping to the last page when saving. [\#456](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/456) ([Kellermorph](https://github.com/Kellermorph))
- Fix Thumbnail in Makrotree [\#455](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/455) ([Kellermorph](https://github.com/Kellermorph))
- Update German translation for macro feature [\#454](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/454) ([Kellermorph](https://github.com/Kellermorph))
- Fix losing Focus on moving diagram position with keyboard [\#452](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/452) ([ChuckNr11](https://github.com/ChuckNr11))
- Draft: Feature - Introduce User Templates Collection and Dedicated UI Tab [\#451](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/451) ([Kellermorph](https://github.com/Kellermorph))
- Supplement to pull request \#444 by Kellermorph [\#448](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/448) ([ChuckNr11](https://github.com/ChuckNr11))
- Add RAM-based wiring list export [\#447](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/447) ([Kellermorph](https://github.com/Kellermorph))
- Feature: Auto-select active diagram in the elements panel tree [\#443](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/443) ([Kellermorph](https://github.com/Kellermorph))
- Feature: Implement max\_slaves limit for Master elements [\#441](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/441) ([Kellermorph](https://github.com/Kellermorph))
- Update QCH Help file [\#433](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/433) ([Int-Circuit](https://github.com/Int-Circuit))
- Create Korean man page for QElectroTech [\#431](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/431) ([Kyle-Code-CA](https://github.com/Kyle-Code-CA))
- Add Korean comments to QElectroTech XML file [\#428](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/428) ([Kyle-Code-CA](https://github.com/Kyle-Code-CA))
- Add Spanish and Korean summaries to appdata [\#427](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/427) ([Kyle-Code-CA](https://github.com/Kyle-Code-CA))
- Add Korean translations for comments and generic names [\#426](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/426) ([Kyle-Code-CA](https://github.com/Kyle-Code-CA))
- Restore copyright and license information in QET64.nsi [\#425](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/425) ([Kyle-Code-CA](https://github.com/Kyle-Code-CA))
- Add Korean language strings to lang\_extra.nsh [\#424](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/424) ([Kyle-Code-CA](https://github.com/Kyle-Code-CA))
- Add Korean translation author to aboutqetdialog [\#423](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/423) ([Kyle-Code-CA](https://github.com/Kyle-Code-CA))
- Add Korean language support in xml element collection [\#422](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/422) ([Kyle-Code-CA](https://github.com/Kyle-Code-CA))
- Add Korean translation \(ko\) – translated by jkh [\#419](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/419) ([Kyle-Code-CA](https://github.com/Kyle-Code-CA))
- error in doxygen action code [\#414](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/414)
- "NoName" is automatically inserted into empty text cells in title block [\#407](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/407)
- Apple silicon download is not working [\#394](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/394)
- Differenciating connector for proper labeling [\#390](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/390)
- using the wrong Application Data folder on Windows [\#325](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/325)
- Unclear which PPA to use [\#321](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/321)
- missing group functionality [\#318](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/318)
- segfault due to calling method of uninitialized object [\#311](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/311)
- Cannot open qelectrotech.app on macOS Sequoia 15.0 [\#307](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/307)
- Dark Mode [\#301](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/301)
- README 404 Not Found URL: qelectrotech.org/download.html needs to be qelectrotech.org/download.php [\#298](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/298)
- Malware warning when trying to install dev version 0.100 [\#290](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/290)
- The page sorting of folio [\#279](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/279)
- Bad file name for translations [\#278](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/278)
- Error using Portuguese Language [\#274](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/274)
- New Maintainer [\#263](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/263)
- crash on export project db \(sqlite\) [\#262](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/262)
- https://qelectrotech.org/ is down for several days now ! [\#261](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/261)
- right click on text crashes app [\#260](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/260)
- broken link on github [\#259](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/259)
- Build on Bullseye 11.5 fails [\#254](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/254)
- Question about ARM target in future release [\#238](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/238)
- Component library disappears completely after reset of program [\#87](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/87)
- Can't change language in portable version [\#75](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/75)
- Transformation Matrix for Element Editor [\#56](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/56)
**Merged pull requests:**
- Update QCH Help file [\#416](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/416) ([Int-Circuit](https://github.com/Int-Circuit))
- no random hashes to have more constant order of XML-tags [\#415](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/415) ([plc-user](https://github.com/plc-user))
- Fixing translation file list in CMake [\#404](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/404) ([arummler](https://github.com/arummler))
- Update dependencies to fix compilation errors [\#403](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/403) ([arummler](https://github.com/arummler))
- Minor corrections to prevent crashes [\#401](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/401) ([Evilscrack](https://github.com/Evilscrack))
- Correct compositeText alignment on copying [\#399](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/399) ([ChuckNr11](https://github.com/ChuckNr11))
- Better handling of conductors when moving [\#398](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/398) ([ChuckNr11](https://github.com/ChuckNr11))
- A few small improvements [\#395](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/395) ([ChuckNr11](https://github.com/ChuckNr11))
- Added updated automatic doxygen build on push + theme to make it fit with docs page [\#389](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/389) ([Int-Circuit](https://github.com/Int-Circuit))
- only calculate grid-point-size, when min != max [\#387](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/387) ([plc-user](https://github.com/plc-user))
- Mouse hover text for dynamic text items [\#386](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/386) ([elevatormind](https://github.com/elevatormind))
- improvement: adjust size of grid-dots with zoom-factor [\#384](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/384) ([plc-user](https://github.com/plc-user))
- adjust zoom-factor to use cosmetic-line and fixed comments [\#383](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/383) ([plc-user](https://github.com/plc-user))
- element-editor: fix jumping positions when rotate, mirror or flip [\#382](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/382) ([plc-user](https://github.com/plc-user))
- unify some more code for Qt5 & Qt6 \(and more\) [\#379](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/379) ([plc-user](https://github.com/plc-user))
- same simplifications as in \#376 "use the same code for Qt5 & Qt6" [\#377](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/377) ([plc-user](https://github.com/plc-user))
- simplify and use the same code for Qt5 & Qt6 [\#376](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/376) ([plc-user](https://github.com/plc-user))
- bordertitleblock: use same code for Qt5 & Qt6 for "numbering" rows [\#375](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/375) ([plc-user](https://github.com/plc-user))
- some minor changes [\#374](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/374) ([plc-user](https://github.com/plc-user))
- implement setting of point-size of grids [\#372](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/372) ([plc-user](https://github.com/plc-user))
- some small changes for selective move [\#370](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/370) ([plc-user](https://github.com/plc-user))
- Added slovak translation to org.qelectrotech.qelectrotech.desktop [\#369](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/369) ([prescott66](https://github.com/prescott66))
- unify calls to "setRotation" for element-primitives again [\#367](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/367) ([plc-user](https://github.com/plc-user))
- Added option to only move dynamic texts [\#365](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/365) ([scorpio810](https://github.com/scorpio810))
- New variables for conductor text formulas [\#364](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/364) ([scorpio810](https://github.com/scorpio810))
- Fix typo widht to width [\#362](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/362) ([pkess](https://github.com/pkess))
- element-editor: add mirror and flip for "text" [\#361](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/361) ([plc-user](https://github.com/plc-user))
- Add Swedish translation [\#360](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/360) ([scorpio810](https://github.com/scorpio810))
- German text for launcher and debian package code style [\#359](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/359) ([pkess](https://github.com/pkess))
- some more rotation, mirror and flip [\#358](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/358) ([plc-user](https://github.com/plc-user))
- BugFix: Flip and Mirror of terminals [\#357](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/357) ([plc-user](https://github.com/plc-user))
- element-editor: fix rotation and more [\#356](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/356) ([plc-user](https://github.com/plc-user))
- a few translated shortcuts were still there ... fixed! [\#354](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/354) ([plc-user](https://github.com/plc-user))
- FIX: some shortcuts do not work with language set to local [\#353](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/353) ([plc-user](https://github.com/plc-user))
- fix movement of element, when origin is outside of graphics [\#352](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/352) ([plc-user](https://github.com/plc-user))
- FIX copy-and-paste in element-editor: set paste-position to meaningful values [\#351](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/351) ([plc-user](https://github.com/plc-user))
- some cleaning for element-file [\#350](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/350) ([plc-user](https://github.com/plc-user))
- fix: properties in project-file [\#348](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/348) ([plc-user](https://github.com/plc-user))
- translation: update German and English [\#347](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/347) ([plc-user](https://github.com/plc-user))
- export: set maximum width / height according limitations in QPainter [\#346](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/346) ([plc-user](https://github.com/plc-user))
- export: set maximum width / height according specifications of export-type [\#345](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/345) ([plc-user](https://github.com/plc-user))
- some clean-up for element-file and in code [\#344](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/344) ([plc-user](https://github.com/plc-user))
- Sort names in element-file by language-code [\#342](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/342) ([plc-user](https://github.com/plc-user))
- more precise Log-Text for search of "qet\_tb\_generator" [\#341](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/341) ([plc-user](https://github.com/plc-user))
- machine\_info: add entry for QETApp::configDir\(\) also for win [\#340](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/340) ([plc-user](https://github.com/plc-user))
- remove dead code \(local variables that were never used\) [\#339](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/339) ([plc-user](https://github.com/plc-user))
- minor changes [\#338](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/338) ([plc-user](https://github.com/plc-user))
- Update of qet\_de [\#337](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/337) ([Bisku](https://github.com/Bisku))
- rewrite code for executing “qet\_tb\_generator” plugin [\#335](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/335) ([plc-user](https://github.com/plc-user))
- corrected a few places where QETApp::documentDir\(\) should also be used [\#333](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/333) ([plc-user](https://github.com/plc-user))
- machine\_info: fix element-count and make static text a bit shorter [\#331](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/331) ([plc-user](https://github.com/plc-user))
- Set default-location for projects to documents-dir. [\#329](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/329) ([plc-user](https://github.com/plc-user))
- machine\_info.cpp: add explaining text for directory-list [\#328](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/328) ([plc-user](https://github.com/plc-user))
- set config- and data-dir to system-specific paths [\#327](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/327) ([plc-user](https://github.com/plc-user))
- PT-BR language update [\#322](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/322) ([gleissonjoaquim3](https://github.com/gleissonjoaquim3))
- Fix: Only scroll diagram-view, when moved text leaves visible area [\#320](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/320) ([plc-user](https://github.com/plc-user))
- Change Sorting of ElementInfo ComboBox [\#319](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/319) ([ChuckNr11](https://github.com/ChuckNr11))
- fix typos and whitespace [\#313](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/313) ([plc-user](https://github.com/plc-user))
- Force light mode in collections like projects [\#312](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/312) ([Arusekk](https://github.com/Arusekk))
- About QET: improvements in usability [\#310](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/310) ([plc-user](https://github.com/plc-user))
- use MessageBox to inform user about additional info when importing scaled element [\#308](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/308) ([plc-user](https://github.com/plc-user))
- make text for missing software "dxf2elmt" translatable [\#304](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/304) ([plc-user](https://github.com/plc-user))
- QET\_ElementScaler: fix error for Qt 5.9 and added mirroring [\#303](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/303) ([plc-user](https://github.com/plc-user))
- integrate "QET\_ElementScaler" as external software [\#302](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/302) ([plc-user](https://github.com/plc-user))
- move code into else-clause to avoid possible crashes [\#300](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/300) ([plc-user](https://github.com/plc-user))
- add terminal-names to connection in qet-file [\#297](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/297) ([plc-user](https://github.com/plc-user))
- fix: editing SpinBoxes with keyboard lose focus [\#296](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/296) ([plc-user](https://github.com/plc-user))
- Spanish lang update [\#295](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/295) ([joseyspain](https://github.com/joseyspain))
- More spanish translations.Josey [\#294](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/294) ([joseyspain](https://github.com/joseyspain))
- update German and English translations [\#293](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/293) ([plc-user](https://github.com/plc-user))
- hide SVG background checkbox in print preferences [\#292](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/292) ([plc-user](https://github.com/plc-user))
- fixed indentations of the remaining \*.cpp/\*.h files [\#291](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/291) ([plc-user](https://github.com/plc-user))
- correct more indentations / whitespace [\#289](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/289) ([plc-user](https://github.com/plc-user))
- update German and English translations [\#288](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/288) ([plc-user](https://github.com/plc-user))
- some minor changes [\#286](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/286) ([plc-user](https://github.com/plc-user))
- FIX SegFault: Disable menu-entry for DB-export when no project loaded [\#284](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/284) ([plc-user](https://github.com/plc-user))
- changed some remaining "pt\_br" to "pt\_BR" [\#282](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/282) ([plc-user](https://github.com/plc-user))
- add option "transparent background" in SVG-export [\#281](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/281) ([plc-user](https://github.com/plc-user))
- added "company-collection" as second user-collection [\#272](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/272) ([plc-user](https://github.com/plc-user))
- corrected german texts for "line-style" [\#269](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/269) ([plc-user](https://github.com/plc-user))
- Too many parts [\#268](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/268) ([scorpio810](https://github.com/scorpio810))
- Merge Terminal strip to master [\#267](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/267) ([scorpio810](https://github.com/scorpio810))
- Rewrite how Properties are stored in the Project file [\#144](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/144) ([Murmele](https://github.com/Murmele))
- Xml properties rebase2 [\#80](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/80) ([Murmele](https://github.com/Murmele))
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
QElectroTech és una aplicació Qt5 per crear esquemes elèctrics.
QET utilitza el format XML per als seus elements i esquemes i inclou un editor d'esquemes, un editor d'elements i un editor de caixetins.
[en]
QElectroTech is a Qt5 application to design electric diagrams.
It uses XML files for elements and diagrams, and includes both a diagram editor, a element editor, and an titleblock editor.
@@ -8,7 +12,7 @@ QET utilise le format XML pour ses éléments et ses schémas et inclut un édit
[de]
QElectroTech ist eine Qt5 Software, um Schaltpläne zu erstellen.
QET benutzt das XML Format für seine Bauteile und seine Projekte, und beinhaltet einen Schaltplaneditor, einen Bauteileditor sowie einen Zeichnungskopfeditor.
QET benutzt das XML Format für seine Bauteile und seine Projekte, und beinhaltet einen Schaltplaneditor, einen Bauteileditor sowie einen Schriftfeldeditor.
@@ -15,24 +15,27 @@ The main goal of the developers is to provide a libre, easy to use and effective
### Version
The current stable version is 0.70 and was released on 2019.07.13.
Once it has been officialy released, the stable version is always frozen and is no longer developed.
The current stable version is 0.100 and was released on 2026.01.25.
Once it has been officially released, the stable version is always frozen and is no longer developed.
New functionalities, bug and issue fixings are further made in the development version (currently 0.8), which can also be [downloaded](https://qelectrotech.org/download.html).
New functionalities, bug and issue fixings are further made in the development version (currently 0.100.1 or 0.200.0 if based on new Qt6 port), which can also be [downloaded](https://qelectrotech.org/download.php).
Users who want to test and take benefits from the last software implementations should use the development version. But... use it at your own risk, since things are sometimes broken or only partialy implemented until they are done!
Users who want to test and take benefits from the last software implementations should use the development version. But... use it at your own risk, since things are sometimes broken or only partially implemented until they are done!
### License
The software is licensed under [GNU/GPL](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html).
You are free to use, copy, modify and redistribute it under the terms of the license.
Like many other open source softwares, QElectroTech is provided as it is, without any warranty.
Like many other open source software, QElectroTech is provided as is, without any warranty.
### Development / technical choices
The development follows the classical way of free and open source software: the source code, written by a community of users, is freely accessible.
Your whole documentation or only selected parts of it can be printed to a real printer or to a pdf file.
@@ -153,6 +158,52 @@ Alternatively, you can export to vector (svg) or pixel (png, jpg, bmp) format im
* conductors num can be exported to csv file.
****
Nomenclature
A new nomenclature tool appears in the menu: project -> Add a nomenclature.
The nomenclature is presented in the form of a configurable table separated into two parts: the display (the form) and the content (the background).
- Display: the size and position of the table, the margins between text and the table cell, the alignment of the text in the cells and the font. The configuration of the table headers and the table itself are separate.
- Content: the information to display in the table and the order in which it should be displayed.
In order to speed up the establishment of a nomenclature, it is possible to export / import the display and content configurations separately. This is the "Configuration" part that can be seen in the photos above.
Behind the scenes, an SQLite database does the work, so setting up the content is nothing more or less than an SQL query created using a dialog (screenshot by right).
The SQL query is configured as follows (from top to bottom in the screenshot):
- “Available information”: the information to display;
- "Filter": filter the information (is not empty, is empty, contains, does not contain, is equal to, is not equal to) only one filter can be applied per information, it is not possible combine several;
- "Type of elements": allows you to filter on what type of element you want to obtain information.
At the bottom, a checkmark "SQL query" allows you to edit a personalized query, if the basic options are not sufficient.
When a nomenclature is too large to be contained in a single folio, it is possible to separate it on several folios, the tables of each folio are then linked together. When creating a nomenclature, this option is activated by default, which has the effect of adding the necessary number of folios, adding a table in each of them and linking them together.
Finally two buttons are available in the property panel:
- "Fit the table to the folio": positions and adjusts the size and determines the number of rows in the table in relation to the folio;
- "Apply geometry to all tables linked to this one": applies the three properties mentioned above to all linked tables in order to save time and maintain aesthetic consistency.
The old summary has been completely removed from the code in order to make room for the new one which is exactly the same as the nomenclature (a large amount of the code is common), with the exception of the SQL query (and its dialog to configure it) which offers specific information for editing a summary.
Export of the internal database
The database used by the nomenclature and the summary can be exported in a “.sqlite” file.
Currently this is irrelevant, as the function was created during development for debugging purposes, we left it.
Note that the database will become increasingly important in the future of Qet.
Export of the wiring list
In order to be able to use the wiring number printers more easily, the names of conductors can be exported in CSV format, the export respects the quantity of conductors in order to print the right quantity of numbers, for example a potential numbered 240 composed of 3 wires will give 6 × 240 (2 numbers per wire × 3 wires) in the CSV.
### Story
The QElectroTech project was founded in 2007 by two french students, Xavier and Benoit.
@@ -172,7 +223,7 @@ Nowadays, QET is not only used by many individuals, teachers and students but al
If you love QElectroTech, you can help developers to buy new hardware to test
and implement new features. Thanks in advance for your generous donations.
For more information, look at [Paypal](https://www.paypal.com/donate/?token=rqf80cP0Ck1F2jn4Y46G7tIPv9bq7x0crXkwt3GZ6OZYG6ihJYi8lZxmmQ8itsFwMUdd1G&country.x=GB&locale.x=GB)
or at [leetchi.com](https://www.leetchi.com/c/qelectroteck)
For more information, look at [Paypal](https://www.paypal.com/donate/?cmd=_s-xclick&hosted_button_id=ZZHC9D7C3MDPC&ssrt=1694606609672)
# Translation by Ronny Desmedt (any credits should go here)
# ^Branding
Nullsoft Install System %s
# ^SetupCaption
$(^Name) Installatie
# ^UninstallCaption
$(^Name) Deïnstallatie
# ^LicenseSubCaption
: Licentie overeenkomst
# ^ComponentsSubCaption
: Installatie Opties
# ^DirSubCaption
: Installatie Map
# ^InstallingSubCaption
: Installeren
# ^CompletedSubCaption
: Voltooid
# ^UnComponentsSubCaption
: Deïnstallatie Opties
# ^UnDirSubCaption
: Deïnstallatie Map
# ^ConfirmSubCaption
: Bevestigen
# ^UninstallingSubCaption
: Deïnstalleren
# ^UnCompletedSubCaption
: Voltooid
# ^BackBtn
< &Terug
# ^NextBtn
&Volgende >
# ^AgreeBtn
Ik ben &Akkoord
# ^AcceptBtn
Ik &Accepteer de licentie overeenkomst
# ^DontAcceptBtn
Ik &Accepteer de licentie overeenkomst niet
# ^InstallBtn
&Installeer
# ^UninstallBtn
&Deïnstalleer
# ^CancelBtn
Afbreken
# ^CloseBtn
&Sluiten
# ^BrowseBtn
B&laderen...
# ^ShowDetailsBtn
Toon &details
# ^ClickNext
Klik op volgende om verder te gaan.
# ^ClickInstall
Klik op installeren om de installatie te starten.
# ^ClickUninstall
Klik op deïnstalleren om de installatie te verwijderen.
# ^Name
Naam
# ^Completed
Voltooid
# ^LicenseText
Gelieve de licentie overeenkomst te lezen alvorens $(^NameDA) te installeren. Als u akkord bent met de licentie overeenkomst, klik op akkoord.
# ^LicenseTextCB
Gelieve de licentie overeenkomst te lezen alvorens $(^NameDA) te installeren. Als u akkord bent met de licentie overeenkomst, klik op onderstaande selectievakje. $_CLICK
# ^LicenseTextRB
Gelieve de licentie overeenkomst te lezen alvorens $(^NameDA) te installeren. Als u akkord bent met de licentie overeenkomst, selecteer de eerste onderstaande optie. $_CLICK
# ^UnLicenseText
Gelieve de licentie overeenkomst te lezen alvorens $(^NameDA) te deïnstalleren. Als u akkord bent met de licentie overeenkomst, klik op akkoord.
# ^UnLicenseTextCB
Gelieve de licentie overeenkomst te lezen alvorens $(^NameDA) te deïnstalleren. Als u akkord bent met de licentie overeenkomst, klik op onderstaande selectievakje. $_CLICK
# ^UnLicenseTextRB
Gelieve de licentie overeenkomst te lezen alvorens $(^NameDA) te deïnstalleren. Als u akkord bent met de licentie overeenkomst, selecteer de eerste onderstaande optie. $_CLICK
# ^Custom
Aangepast
# ^ComponentsText
Selecteer de onderdelen die u wilt installeren en deselecteer de onderdelen die u niet wilt installeren. $_CLICK
# ^ComponentsSubText1
Selecteer een installatie type:
# ^ComponentsSubText2_NoInstTypes
Selecteer de onderdelen om te installeren:
# ^ComponentsSubText2
Of, selecteer optionelen onderdelen die u wilt installeren:
# ^UnComponentsText
Selecteer de onderdelen die u wilt deïnstalleren en deselecteer de onderdelen die u niet wilt deïinstalleren. $_CLICK
# ^UnComponentsSubText1
Selecteer een deïnstallatie type:
# ^UnComponentsSubText2_NoInstTypes
Selecteer de onderdelen om te deïnstalleren:
# ^UnComponentsSubText2
Of, selecteer optionelen onderdelen die u wilt deïnstalleren:
# ^DirText
De installatie van $(^NameDA) wordt in volgende map uitgevoerd. Om in een andere map te installeren, klik op bladeren om een andere map te selecteren. $_CLICK
# ^DirSubText
Installatie map
# ^DirBrowseText
Selecteerd de map om $(^NameDA) in te installeren:
# ^UnDirText
De deïnstallatie van $(^NameDA) in de volgende map. Om een andere map te deïnstalleren, klik op bladren om een andere map te selecteren. $_CLICK
# ^UnDirSubText
""
# ^UnDirBrowseText
Selecteer en map om $(^NameDA) van te deînstalleren:
# ^SpaceAvailable
"Beschikbare ruimte: "
# ^SpaceRequired
"Benodigde ruimte: "
# ^UninstallingText
$(^NameDA) wordt gedeïnstalleerd uit volgende map. $_CLICK
# ^UninstallingSubText
Deïnstalleren van:
# ^FileError
Fout bij openen van bestand om te schrijven: \r\n\r\n$0\r\n\r\nKlik op afbreken om de installatie te stoppen,\r\nOpnieuw om te proberen, of\r\nNegeren om dit bestand over te slaan.
# ^FileError_NoIgnore
Fout bij openen van bestand om te schrijven: \r\n\r\n$0\r\n\r\nOpnieuw om te proberen, of\r\nAfbreken om de installatie te stoppen.
${LangFileString}MUI_TEXT_WELCOME_INFO_TITLE"Welkom bij $(^NameDA) installatie Wizard"
${LangFileString}MUI_TEXT_WELCOME_INFO_TEXT"Deze wizard zal u begeleiden bij de installatie van $(^NameDA).$\r$\n$\r$\nHet is aanbevol dat u alle andere programmas afsluit voordat u deze installatie uitvoerd. Dit geeft de mogelijkheid om relevante systeem bestanden bij te werken zonder dat uw systeem terug moet opstarten.$\r$\n$\r$\n$_CLICK"
!endif
!ifdefMUI_UNWELCOMEPAGE
${LangFileString}MUI_UNTEXT_WELCOME_INFO_TITLE"Welkom bij de $(^NameDA) deïnstallatie wizard"
${LangFileString}MUI_UNTEXT_WELCOME_INFO_TEXT"Deze wizard zal u begeleiden bij de deïnstallatie van $(^NameDA).$\r$\n$\r$\nControleer of $(^NameDA) is afgesloten alvorens de deïnstallatie te starten.$\r$\n$\r$\n$_CLICK"
${LangFileString}MUI_TEXT_LICENSE_SUBTITLE"Gelieve de licentie te lezen alvorens U $(^NameDA) installeert."
${LangFileString}MUI_INNERTEXT_LICENSE_BOTTOM"Klik op akkoord om de overeenkomst te aanvaarden. U moet de overeenkomst aanvaarden om $(^NameDA) te installeren."
${LangFileString}MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX"Als u de voorwaarden van de overeenkomst aanvaard, Klik op onderstaande selectievakje. U moet de overeenkomst aanvaarden om $(^NameDA) te installeren. $_CLICK"
${LangFileString}MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS"Als u de voorwaarden van de overeenkomst aanvaard, selecteer de eerste onderstaande optie. U moet de overeenkomst aanvaarden om $(^NameDA) te installeren. $_CLICK"
${LangFileString}MUI_UNTEXT_LICENSE_SUBTITLE"Gelieve de licentie overeenkomst te herlezen alvorens met de deïnstallatie van $(^NameDA) verder te doen."
${LangFileString}MUI_UNINNERTEXT_LICENSE_BOTTOM"Klik op akkoord om de overeenkomst te aanvaarden. U moet de overeenkomst aanvaarden om $(^NameDA) te deïnstalleren."
${LangFileString}MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX"Als u de voorwaarden van de overeenkomst aanvaard, Klik op onderstaande selectievakje. U moet de overeenkomst aanvaarden om $(^NameDA) te deïnstalleren. $_CLICK"
${LangFileString}MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS"Als u de voorwaarden van de overeenkomst aanvaard, selecteer de eerste onderstaande optie. U moet de overeenkomst aanvaarden om $(^NameDA) te deïnstalleren. $_CLICK"
!endif
!ifdefMUI_LICENSEPAGE|MUI_UNLICENSEPAGE
${LangFileString}MUI_INNERTEXT_LICENSE_TOP"Gebruik pagina neer om de rest van de overeenkomst te lezen."
${LangFileString}MUI_UNTEXT_ABORT_SUBTITLE"Deïnstallatie is niet voltooid."
!endif
!ifdefMUI_FINISHPAGE
${LangFileString}MUI_TEXT_FINISH_INFO_TITLE"Voltooien van de $(^NameDA) installatie Wizard"
${LangFileString}MUI_TEXT_FINISH_INFO_TEXT"$(^NameDA) is geinstalleerd op uw computer.$\r$\n$\r$\nKlik op einde om de installatie wizard af te sluiten."
${LangFileString}MUI_TEXT_FINISH_INFO_REBOOT"Uw computer moet herstarten op de installatie van $(^NameDA) te voltooien. Wilt u nu opnieuw opstarten?"
!endif
!ifdefMUI_UNFINISHPAGE
${LangFileString}MUI_UNTEXT_FINISH_INFO_TITLE"Voltooien van de $(^NameDA) deïnstallatie wizard"
${LangFileString}MUI_UNTEXT_FINISH_INFO_TEXT"$(^NameDA) is gedeïnstalleerd op uw computer.$\r$\n$\r$\nKlik op einde om de installatie wizard af te sluiten."
${LangFileString}MUI_UNTEXT_FINISH_INFO_REBOOT"Uw computer moet herstarten op de deïnstallatie van $(^NameDA)te voltooien. Wilt u nu opnieuw opstarten?"
${LangFileString}MUI_TEXT_STARTMENU_TITLE"Kies start menu map"
${LangFileString}MUI_TEXT_STARTMENU_SUBTITLE"Kies een map in start menu voor de snelkoppeling van $(^NameDA)."
${LangFileString}MUI_INNERTEXT_STARTMENU_TOP"Kies een map in start menu waar u de programma snelkoppelingen wilt aanmaken. U kan ook de naam van een nieuwe map opgeven."
${LangFileString}MUI_INNERTEXT_STARTMENU_CHECKBOX"Maak geen snelkoppelingen"
${LangFileString}MULTIUSER_TEXT_INSTALLMODE_SUBTITLE"Kies voor welke gebruikers U $(^NameDA) wilt installeren."
${LangFileString}MULTIUSER_INNERTEXT_INSTALLMODE_TOP"Kies of U $(^NameDA) alleen voor u zelf of voor alle gebruikers op deze computer wilt installeren. $(^ClickNext)"
${LangFileString}MULTIUSER_INNERTEXT_INSTALLMODE_ALLUSERS"Installeer voor iedereen die deze computer gebruikt"
${LangFileString}MULTIUSER_INNERTEXT_INSTALLMODE_CURRENTUSER"Installeer alleen voor mij"
; NSIS 3: MUI_LANGDLL_ALLLANGUAGES is still supported and works as before.
!defineMUI_LANGDLL_ALLLANGUAGES
!insertmacroMUI_LANGUAGE"English"; first = default
!insertmacroMUI_LANGUAGE"Korean"
!insertmacroMUI_LANGUAGE"French"
!insertmacroMUI_LANGUAGE"Spanish"
!insertmacroMUI_LANGUAGE"Russian"
!insertmacroMUI_LANGUAGE"Portuguese"
!insertmacroMUI_LANGUAGE"Czech"
!insertmacroMUI_LANGUAGE"Polish"
!insertmacroMUI_LANGUAGE"Greek"
!insertmacroMUI_LANGUAGE"Arabic"
!insertmacroMUI_LANGUAGE"German"
!insertmacroMUI_LANGUAGE"Italian"
!insertmacroMUI_LANGUAGE"Romanian"
!insertmacroMUI_LANGUAGE"Catalan"
!insertmacroMUI_LANGUAGE"Croatian"
!insertmacroMUI_LANGUAGE"Dutch"
!insertmacroMUI_LANGUAGE"Danish"
!insertmacroMUI_LANGUAGE"Hungarian"
!insertmacroMUI_LANGUAGE"Japanese"
!insertmacroMUI_LANGUAGE"Mongolian"
!insertmacroMUI_LANGUAGE"Norwegian"
!insertmacroMUI_LANGUAGE"PortugueseBR"
!insertmacroMUI_LANGUAGE"Serbian"
!insertmacroMUI_LANGUAGE"Slovak"
!insertmacroMUI_LANGUAGE"Slovenian"
!insertmacroMUI_LANGUAGE"Swedish"
!insertmacroMUI_LANGUAGE"Turkish"
!insertmacroMUI_LANGUAGE"Ukrainian"
!insertmacroMUI_LANGUAGE"SimpChinese"
!insertmacroMUI_RESERVEFILE_LANGDLL
; Language strings for all supported locales
!includelang_extra.nsh
!includelang_extra_fr.nsh
!includelang_extra_missing.nsh
; NOTE: The string "uninstFailed" must be defined in lang_extra.nsh and
; lang_extra_fr.nsh (and any other lang_extra_*.nsh) like so:
; LangString uninstFailed ${LANG_ENGLISH} "Uninstallation of the previous version failed.$\nPlease uninstall QElectroTech manually before continuing."
; LangString uninstFailed ${LANG_FRENCH} "La desinstallation de la version precedente a echoue.$\nVeuillez desinstaller QElectroTech manuellement avant de continuer."
LangStringCheck${LANG_ENGLISH}"Check to start ${SOFT_NAME}"
@@ -17,8 +18,34 @@
LangStringvar2${LANG_ENGLISH}"languagues files"
LangStringvar3${LANG_ENGLISH}"Examples of cartridges"
LangStringvar4${LANG_ENGLISH}"Examples of diagrams"
LangStringvar5${LANG_ENGLISH}"Fonts"
LangStringuninstFailed${LANG_ENGLISH}"Uninstallation of the previous version failed.$\nPlease uninstall ${SOFT_NAME} manually before continuing."
LangStringinstalled${LANG_KOREAN}"${SOFT_NAME}이(가) 이미 설치되어 있습니다. $\n$\n이전 버전을 제거하려면 `OK`를, 업그레이드를 취소하려면 `Cancel`을 클릭하세요."
LangStringwrongArch${LANG_KOREAN}"이 배포판은 64비트 컴퓨터에서만 사용할 수 있습니다."
LangStringElements${LANG_KOREAN}"요소"
LangStringElectric${LANG_KOREAN}"전기"
LangStringLogic${LANG_KOREAN}"로직"
LangStringHydraulic${LANG_KOREAN}"유압"
LangStringPneumatic${LANG_KOREAN}"공압"
LangStringEnergy${LANG_KOREAN}"에너지"
LangStringwater${LANG_KOREAN}"물"
LangStringRefrigeration${LANG_KOREAN}"냉동"
LangStringSolar_thermal${LANG_KOREAN}"태양열"
LangStringLang${LANG_KOREAN}"언어"
LangStringFonts${LANG_KOREAN}"글꼴"
LangStringTitleblocks${LANG_KOREAN}"표제란"
LangStringExamples${LANG_KOREAN}"예제"
LangStringCheck${LANG_KOREAN}"${SOFT_NAME} 실행"
LangStringvar1${LANG_KOREAN}"공식 컬렉션 요소"
LangStringvar2${LANG_KOREAN}"언어 파일"
LangStringvar3${LANG_KOREAN}"표제란 예제"
LangStringvar4${LANG_KOREAN}"도면 예제"
LangStringvar5${LANG_KOREAN}"글꼴"
LangStringuninstFailed${LANG_KOREAN}"이전 버전을 제거하지 못했습니다.$\n계속하기 전에 ${SOFT_NAME}을(를) 수동으로 제거해 주세요."
LangStringinstalled${LANG_POLISH}"${SOFT_NAME} jest już zainstalowany. $\n$\nKliknij `OK` aby odinstalować poprzednią wersję lub `Anuluj` aby przerwać aktualizację."
LangStringwrongArch${LANG_POLISH}"To oprogramowanie jest przeznaczone wyłącznie dla komputerów 64 bitowych."
LangStringuninstFailed${LANG_POLISH}"Odinstalowanie poprzedniej wersji nie powiodło się.$\nPrzed kontynuowaniem odinstaluj ręcznie program ${SOFT_NAME}."
LangStringinstalled${LANG_GREEK}"${SOFT_NAME} είναι ήδη εγκατεστημένο. $\n$\nΠάτησε `OK` για αφαίρεση της προηγούμενης έκδοσης ή `Cancel` για ακύρωση της αναβάθμισης."
@@ -52,59 +82,68 @@
LangStringRefrigeration${LANG_GREEK}"Ψύξη"
LangStringSolar_thermal${LANG_GREEK}"Ηλιοθερμία"
LangStringLang${LANG_GREEK}"Γλώσσα"
LangStringFonts${LANG_GREEK}"Γραμματοσειρές"
LangStringTitleblocks${LANG_GREEK}"Πινακίδες"
LangStringExamples${LANG_GREEK}"Παραδείγματα"
LangStringCheck${LANG_GREEK}"Επιλέξτε για εκκίνηση ${SOFT_NAME}"
LangStringvar1${LANG_GREEK}"Στοιχεία της επίσημης συλλογής"
LangStringvar2${LANG_GREEK}"Αρχεία γλωσσών"
LangStringvar3${LANG_GREEK}"Examples of cartridges"
LangStringuninstFailed${LANG_GREEK}"Η απεγκατάσταση της προηγούμενης έκδοσης απέτυχε.$\nΠαρακαλώ απεγκαταστήστε χειροκίνητα το ${SOFT_NAME} πριν συνεχίσετε."
LangStringinstalled${LANG_CZECH}"${SOFT_NAME} is already installed. $\n$\nClick `OK` to remove the previous version or `Cancel` to cancel this upgrade."
LangStringwrongArch${LANG_CZECH}"This distribution is for 64bits computers only."
LangStringCheck${LANG_CZECH}"Check to start ${SOFT_NAME}"
LangStringvar1${LANG_CZECH}"Elements of the official collection"
LangStringvar2${LANG_CZECH}"languagues files"
LangStringvar3${LANG_CZECH}"Examples of cartridges"
LangStringvar4${LANG_CZECH}"Examples of diagrams"
LangStringinstalled${LANG_CZECH}"${SOFT_NAME} je již nainstalován. $\n$\nKlikněte na `OK` pro odebrání předchozí verze nebo na `Zrušit` pro zrušení tohoto upgradu."
LangStringwrongArch${LANG_CZECH}"Tato distribuce je určena pouze pro 64bitové počítače."
LangStringuninstFailed${LANG_CZECH}"Odinstalování předchozí verze se nezdařilo.$\nPřed pokračováním prosím odinstalujte ${SOFT_NAME} ručně."
LangStringinstalled${LANG_SPANISH}"${SOFT_NAME} is already installed. $\n$\nClick `OK` to remove the previous version or `Cancel` to cancel this upgrade."
LangStringwrongArch${LANG_SPANISH}"This distribution is for 64 bits computers only."
LangStringCheck${LANG_SPANISH}"Check to start ${SOFT_NAME}"
LangStringvar1${LANG_SPANISH}"Elements of the official collection"
LangStringvar2${LANG_SPANISH}"languagues files"
LangStringvar3${LANG_SPANISH}"Examples of cartridges"
LangStringvar4${LANG_SPANISH}"Examples of diagrams"
LangStringinstalled${LANG_SPANISH}"${SOFT_NAME} ya está instalado. $\n$\nHaga clic en `Aceptar` para eliminar la versión anterior o en `Cancelar` para cancelar esta actualización."
LangStringwrongArch${LANG_SPANISH}"Esta distribución es solo para ordenadores de 64 bits."
LangStringCheck${LANG_SPANISH}"Marcar para iniciar ${SOFT_NAME}"
LangStringvar1${LANG_SPANISH}"Elementos de la colección oficial"
LangStringvar2${LANG_SPANISH}"Archivos de idioma"
LangStringvar3${LANG_SPANISH}"Ejemplos de cartelas"
LangStringvar4${LANG_SPANISH}"Ejemplos de esquemas"
LangStringvar5${LANG_SPANISH}"Fuentes"
LangStringuninstFailed${LANG_SPANISH}"La desinstalación de la versión anterior ha fallado.$\nPor favor, desinstale ${SOFT_NAME} manualmente antes de continuar."
LangStringinstalled${LANG_GERMAN}"${SOFT_NAME} ist bereits installiert. $\n$\nKlicken Sie auf `OK`, um die alte Version zu deinstallieren, oder auf `Abbrechen`, um das Upgrade abzubrechen."
LangStringwrongArch${LANG_GERMAN}"Dieses Programm läuft ausschließlich unter Windows 64 Bits."
LangStringwrongArch${LANG_GERMAN}"Dieses Programm läuft ausschließlich unter Windows 64 Bit."
LangStringuninstFailed${LANG_GERMAN}"Die Deinstallation der vorherigen Version ist fehlgeschlagen.$\nBitte deinstallieren Sie ${SOFT_NAME} manuell, bevor Sie fortfahren."
LangStringinstalled${LANG_RUSSIAN}"${SOFT_NAME} уже установлен. $\n$\nДля удаления предыдущей версии нажмите `OK` или `Cancel` для отмены обновления."
LangStringCheck${LANG_RUSSIAN}"Нажмите для запуска ${SOFT_NAME}"
@@ -143,48 +186,56 @@
LangStringvar2${LANG_RUSSIAN}"языковые файлы"
LangStringvar3${LANG_RUSSIAN}"Примеры штампов"
LangStringvar4${LANG_RUSSIAN}"Примеры схем"
LangStringvar5${LANG_RUSSIAN}"Шрифты"
LangStringuninstFailed${LANG_RUSSIAN}"Удаление предыдущей версии завершилось с ошибкой.$\nПожалуйста, удалите ${SOFT_NAME} вручную перед продолжением."
LangStringinstalled${LANG_ARABIC}"${SOFT_NAME} is already installed. $\n$\nClick `OK` to remove the previous version or `Cancel` to cancel this upgrade."
LangStringwrongArch${LANG_ARABIC}"This distribution is for 64 bits computers only."
LangStringinstalled${LANG_CATALAN}"${SOFT_NAME} is already installed. $\n$\nClick `OK` to remove the previous version or `Cancel` to cancel this upgrade."
LangStringwrongArch${LANG_CATALAN}"This distribution is for 64 bits computers only."
LangStringinstalled${LANG_CATALAN}"${SOFT_NAME} ja està instal·lat. $\n$\nFeu clic a `D'acord` per eliminar la versió anterior o a `Cancel·la` per cancel·lar aquesta actualització."
LangStringwrongArch${LANG_CATALAN}"Aquesta distribució és només per a ordinadors de 64 bits."
LangStringuninstFailed${LANG_CATALAN}"La desinstal·lació de la versió anterior ha fallat.$\nSi us plau, desinstal·leu ${SOFT_NAME} manualment abans de continuar."
LangStringinstalled${LANG_ITALIAN}"${SOFT_NAME} è già installato. $\n$\nFare click su `OK` per rimuovere la versione precedente o su `Annulla` per annullare questo aggiornamento."
LangStringvar3${LANG_ITALIAN}"Cartigli di esempio"
LangStringvar4${LANG_ITALIAN}"Schemi di esempio"
LangStringvar5${LANG_ITALIAN}"Caratteri"
LangStringuninstFailed${LANG_ITALIAN}"La disinstallazione della versione precedente non è riuscita.$\nSi prega di disinstallare ${SOFT_NAME} manualmente prima di continuare."
LangStringinstalled${LANG_PORTUGUESE}"${SOFT_NAME} is already installed. $\n$\nClick `OK` to remove the previous version or `Cancel` to cancel this upgrade."
LangStringwrongArch${LANG_PORTUGUESE}"This distribution is for 64 bits computers only."
LangStringvar3${LANG_PORTUGUESE}"Examples of cartridges"
LangStringvar4${LANG_PORTUGUESE}"Examples of diagrams"
LangStringinstalled${LANG_PORTUGUESE}"${SOFT_NAME} já está instalado. $\n$\nClique em `OK` para remover a versão anterior ou em `Cancelar` para cancelar esta atualização."
LangStringwrongArch${LANG_PORTUGUESE}"Esta distribuição é apenas para computadores de 64 bits."
LangStringCheck${LANG_PORTUGUESE}"Marcar para iniciar ${SOFT_NAME}"
LangStringvar1${LANG_PORTUGUESE}"Elementos da coleção oficial"
LangStringvar2${LANG_PORTUGUESE}"Arquivos de idioma"
LangStringvar3${LANG_PORTUGUESE}"Exemplos de legendas"
LangStringvar4${LANG_PORTUGUESE}"Exemplos de esquemas"
LangStringvar5${LANG_PORTUGUESE}"Fontes"
LangStringuninstFailed${LANG_PORTUGUESE}"A desinstalação da versão anterior falhou.$\nPor favor, desinstale ${SOFT_NAME} manualmente antes de continuar."
LangStringinstalled${LANG_ROMANIAN}"${SOFT_NAME} is already installed. $\n$\nClick `OK` to remove the previous version or `Cancel` to cancel this upgrade."
LangStringwrongArch${LANG_ROMANIAN}"This distribution is for 64 bits computers only."
LangStringElements${LANG_ROMANIAN}"Elements"
LangStringinstalled${LANG_ROMANIAN}"${SOFT_NAME} este deja instalat. $\n$\nFaceți clic pe `OK` pentru a elimina versiunea anterioară sau pe `Anulare` pentru a anula această actualizare."
LangStringwrongArch${LANG_ROMANIAN}"Această distribuție este destinată numai computerelor pe 64 de biți."
LangStringCheck${LANG_ROMANIAN}"Bifați pentru a porni ${SOFT_NAME}"
LangStringvar1${LANG_ROMANIAN}"Elemente din colecția oficială"
LangStringvar2${LANG_ROMANIAN}"Fișiere de limbă"
LangStringvar3${LANG_ROMANIAN}"Exemple de cartușe"
LangStringvar4${LANG_ROMANIAN}"Exemple de scheme"
LangStringvar5${LANG_ROMANIAN}"Fonturi"
LangStringuninstFailed${LANG_ROMANIAN}"Dezinstalarea versiunii anterioare a eșuat.$\nVă rugăm să dezinstalați ${SOFT_NAME} manual înainte de a continua."
LangStringinstalled${LANG_CROATIAN}"${SOFT_NAME} is already installed. $\n$\nClick `OK` to remove the previous version or `Cancel` to cancel this upgrade."
LangStringwrongArch${LANG_CROATIAN}"This distribution is for 64bits computers only."
LangStringCheck${LANG_CROATIAN}"Check to start ${SOFT_NAME}"
LangStringvar1${LANG_CROATIAN}"Elements of the official collection"
LangStringvar2${LANG_CROATIAN}"languagues files"
LangStringvar3${LANG_CROATIAN}"Examples of cartridges"
LangStringvar4${LANG_CROATIAN}"Examples of diagrams"
LangStringinstalled${LANG_CROATIAN}"${SOFT_NAME} je već instaliran. $\n$\nKliknite `U redu` za uklanjanje prethodne verzije ili `Odustani` za odustajanje od nadogradnje."
LangStringwrongArch${LANG_CROATIAN}"Ova distribucija namijenjena je samo za 64-bitna računala."
LangStringuninstFailed${LANG_CROATIAN}"Deinstalacija prethodne verzije nije uspjela.$\nMolimo deinstalirajte ${SOFT_NAME} ručno prije nastavka."
LangStringinstalled${LANG_DUTCH}"${SOFT_NAME} is al geinstalleerd. $\n$\nklik `OK` om vorige versie te verwijderen of `annuleer` om deze upgrade te annuleren."
LangStringCheck${LANG_DUTCH}"Check to start ${SOFT_NAME}"
LangStringCheck${LANG_DUTCH}"Check to start ${SOFT_NAME}"
LangStringvar1${LANG_DUTCH}"Elements of the official collection"
LangStringvar2${LANG_DUTCH}"languagues files"
LangStringvar3${LANG_DUTCH}"Examples of cartridges"
LangStringvar4${LANG_DUTCH}"Examples of diagrams"
LangStringinstalled${LANG_DUTCH_BELGIUM}"${SOFT_NAME} is reeds geinstallerd. $\n$\nKlik`OK` om vorige versie te verwijderen of `Afbreken` om de upgrade niet uit te voeren."
LangStringwrongArch${LANG_DUTCH_BELGIUM}"Deze distributie werkt enkel op 64 bits computers."
LangStringCheck${LANG_DUTCH}"Aanvinken om ${SOFT_NAME} te starten"
LangStringvar1${LANG_DUTCH}"Elementen van de officiële verzameling"
LangStringvar2${LANG_DUTCH}"Taalbestanden"
LangStringvar3${LANG_DUTCH}"Voorbeelden van titelblokken"
LangStringvar4${LANG_DUTCH}"Voorbeelden van schema's"
LangStringvar5${LANG_DUTCH}"Lettertypen"
LangStringuninstFailed${LANG_DUTCH}"Het verwijderen van de vorige versie is mislukt.$\nVerwijder ${SOFT_NAME} handmatig voordat u verdergaat."
LangStringinstalled${LANG_DANISH}"${SOFT_NAME} er allerede installeret. $\n$\nKlik `Ok` for at fjerne foregående version eller `Annuller` for at annullere opgraderingen."
LangStringuninstFailed${LANG_DANISH}"Afinstallation af den tidligere version mislykkedes.$\nAfinstaller venligst ${SOFT_NAME} manuelt, inden du fortsætter."
LangStringwrongArch${LANG_FRENCH}"Ce programme est pour Windows 64 bits seulement."
LangStringinstalled${LANG_FRENCH}"${SOFT_NAME} est déja installé. $\n$\nCliquer sur `OK` pour désinstaller l'ancienne version `Annuler` pour annuler cet upgrade."
LangStringElements${LANG_FRENCH}"Eléments"
LangStringinstalled${LANG_FRENCH}"${SOFT_NAME} est déja installé. $\n$\nCliquer sur `OK` pour désinstaller l'ancienne version `Annuler` pour annuler cet upgrade."
LangStringCheck${LANG_FRENCH}"Cocher pour lancer ${SOFT_NAME}"
LangStringvar1${LANG_FRENCH}"Eléments de la collection officielle"
LangStringvar1${LANG_FRENCH}"Eléments de la collection officielle"
LangStringvar2${LANG_FRENCH}"Fichiers de langues"
LangStringvar3${LANG_FRENCH}"Exemples de cartouches"
LangStringvar4${LANG_FRENCH}"Exemples de schémas"
LangStringvar4${LANG_FRENCH}"Exemples de schémas"
LangStringvar5${LANG_FRENCH}"Polices"
LangStringuninstFailed${LANG_FRENCH}"La désinstallation de la version précédente a échoué.$\nVeuillez désinstaller ${SOFT_NAME} manuellement avant de continuer."
LangStringinstalled${LANG_HUNGARIAN}"${SOFT_NAME} már telepítve van. $\n$\nKattintson az `OK` gombra az előző verzió eltávolításához, vagy a `Mégse` gombra a frissítés megszakításához."
LangStringwrongArch${LANG_HUNGARIAN}"Ez a terjesztés csak 64 bites számítógépekre való."
LangStringuninstFailed${LANG_HUNGARIAN}"Az előző verzió eltávolítása nem sikerült.$\nKérjük, távolítsa el manuálisan a ${SOFT_NAME} programot, mielőtt folytatná."
LangStringinstalled${LANG_NORWEGIAN}"${SOFT_NAME} er allerede installert. $\n$\nKlikk `OK` for å fjerne forrige versjon, eller `Avbryt` for å avbryte denne oppgraderingen."
LangStringwrongArch${LANG_NORWEGIAN}"Denne distribusjonen er kun for 64-biters datamaskiner."
LangStringinstalled${LANG_PORTUGUESEBR}"${SOFT_NAME} já está instalado. $\n$\nClique em `OK` para remover a versão anterior ou em `Cancelar` para cancelar esta atualização."
LangStringwrongArch${LANG_PORTUGUESEBR}"Esta distribuição é apenas para computadores de 64 bits."
LangStringCheck${LANG_PORTUGUESEBR}"Marcar para iniciar ${SOFT_NAME}"
LangStringvar1${LANG_PORTUGUESEBR}"Elementos da coleção oficial"
LangStringvar2${LANG_PORTUGUESEBR}"Arquivos de idioma"
LangStringvar3${LANG_PORTUGUESEBR}"Exemplos de legendas"
LangStringvar4${LANG_PORTUGUESEBR}"Exemplos de esquemas"
LangStringvar5${LANG_PORTUGUESEBR}"Fontes"
LangStringuninstFailed${LANG_PORTUGUESEBR}"A desinstalação da versão anterior falhou.$\nPor favor, desinstale ${SOFT_NAME} manualmente antes de continuar."
LangStringinstalled${LANG_SERBIAN}"${SOFT_NAME} је већ инсталиран. $\n$\nКликните `OK` да уклоните претходну верзију или `Откажи` да откажете надоградњу."
LangStringwrongArch${LANG_SERBIAN}"Ова дистрибуција је намењена само за 64-битна рачунала."
LangStringinstalled${LANG_SLOVAK}"${SOFT_NAME} je už nainštalovaný. $\n$\nKliknutím na `OK` odstráňte predchádzajúcu verziu alebo kliknite na `Zrušiť` pre zrušenie tohto upgradu."
LangStringwrongArch${LANG_SLOVAK}"Táto distribúcia je určená len pre 64-bitové počítače."
LangStringinstalled${LANG_SLOVENIAN}"${SOFT_NAME} je že nameščen. $\n$\nKliknite `OK` za odstranitev prejšnje različice ali `Prekliči` za preklic te nadgradnje."
LangStringwrongArch${LANG_SLOVENIAN}"Ta distribucija je namenjena samo za 64-bitne računalnike."
LangStringinstalled${LANG_SWEDISH}"${SOFT_NAME} är redan installerat. $\n$\nKlicka på `OK` för att ta bort den tidigare versionen eller `Avbryt` för att avbryta uppgraderingen."
LangStringwrongArch${LANG_SWEDISH}"Den här distributionen är endast för 64-bitars datorer."
LangStringCheck${LANG_SWEDISH}"Markera för att starta ${SOFT_NAME}"
LangStringvar1${LANG_SWEDISH}"Element från den officiella samlingen"
LangStringvar2${LANG_SWEDISH}"Språkfiler"
LangStringvar3${LANG_SWEDISH}"Exempel på ritningshuvuden"
LangStringvar4${LANG_SWEDISH}"Exempel på scheman"
LangStringvar5${LANG_SWEDISH}"Teckensnitt"
LangStringuninstFailed${LANG_SWEDISH}"Avinstallationen av den föregående versionen misslyckades.$\nAvinstallera ${SOFT_NAME} manuellt innan du fortsätter."
LangStringinstalled${LANG_TURKISH}"${SOFT_NAME} zaten yüklü. $\n$\nÖnceki sürümü kaldırmak için `Tamam`'a, bu yükseltmeyi iptal etmek için `İptal`'e tıklayın."
LangStringwrongArch${LANG_TURKISH}"Bu dağıtım yalnızca 64 bit bilgisayarlar içindir."
LangStringinstalled${LANG_UKRAINIAN}"${SOFT_NAME} вже встановлено. $\n$\nНатисніть `OK` для видалення попередньої версії або `Скасувати` для скасування оновлення."
LangStringwrongArch${LANG_UKRAINIAN}"Цей дистрибутив призначений лише для 64-розрядних комп'ютерів."
In the official collection, there are now 2625 elements, and 418 catégoris for a total of 3043 files.
* Port to Qt 5 framework
* New QSettings native format for config files.
* In the diagram editor, the grid is not displayed by default outside the diagram, the minimum zoom is blocked. A button allows you to un-validate this operation.
* It is now possible to put the tittle block on the right vertical mode.
* The default tittle block can be defined for the next folios of the project.
* The summary now takes the font set in the QElectroTech.conf
* The floating dock is now operational, variables, actions are taken into account on the fly.
* A transformation tool transforms quickly and finely each primitive by handles.
* Add UUID tag for element XML.
* The database enables faster loading a large number of managing symbols in tables changes pixmaps collections, it no longer compares the modification date of the files but their use UUID attributes to update the cache .
* In terms of basic shapes, the transform tool works directly on vectors, it replaces the reduction tool / enlargement that has just been deleted as unnecessary.
* Improve Undo command by QPropertyUndoCommand class.
====== ChangeLog from 0.3 to 0.4 ======
In the official collection, there are now 2298 elements, and 376 catégoris for a total of 2674 files.
* We have removed the flag '-fno-ipa-sra "This settled the compilation problems on Mac OS X and FreeBSD clang.
* The official collection has been redesigned, through the work of Nuri a new structure is in place.
* A menu has been added, allowing you to change the application language.
* we added a summary creation tool.
* Added button "export the nomenclature" transforms data from diagrams to CSV file for spreadsheet.
Arun wrote a detailed manual in English.
* New tools have been added, they can create mechanical connections and draw cabinets, desks, junction boxes, or areas on the schematic (line tool, rectangle, ellipse, polygon type: respect for style dashes).
* An aid in positioning cross, drawing, was added.
* The locked state images and basic forms (basic shapes) is now stored in the project.
* The "control" during the movement of an element, text field disables snapping to the grid, for free positioning.
It is now possible to choose the background folios in white or gray.
* Add supports trackpad gestures (multitouch).
The dates of the cartridges are now using the short system date and date format according to the language detected setting in the OS.
We take advantage of the transition to standard C ++ 11, and a big cleanup in the code was done.
* The undo action or redo the undo stack are now animated graphically.
When the action save, save as, the status bar displays the name and path of the backup job.
Qet is now able to come to load a style sheet (stylesheet) directly from the conf directory.
* A DXF export has been added, the entire project folios can be exported in this format.
* Added reports folio, Cross references.
* Added a variable font size for text of conductors.
* Added new properties to all conductors at the same potential, even through referrals.
* When several conductors have the same value potential equalization, it is not useful to display on all conductors.
* Added button to activates the automatic connection of the conductors of the element when moving it.
* Numbering rules are now available for the entire project.
Qet detects the Windows version and applies the appropriate graphic style, depending on the version of Windows.
====== ChangeLog from 0.3 rc to 0.3 ======
First, the collection of symbols has made a big step forward, with about 1560 new elements.
There are now symbols for pneumatics, hydraulics, process, solar, cold, etc. Considerable effort has been done to organize the collection in a better way.
We hope that the new organisation is clearer for all. We would like to thank all the contributors who send us symbols.
=====-Element Editor: =====
Considerable work has be done to replace the manual defining zone of the symbol, aka hotspot.And fix bugs, It is now automatic. You do not have to care about it anymore.
Primary colors have been added for the drawing shapes.
A contextual menu (right click) has been added. So, you can now work more quickly with symbols. It is also more user-friendly.
====== ChangeLog from v0.3 rc ======
=====-Element Editor: =====
* Replacing checkboxes with lists of colors.
* Removed the manual hotspot, it is now automatic and you do not have to worry.
Officially Collection: a large classification work on the structure was realized. It should be clear to everyone.
The collection is enriched with 1711 items in 286 categories (ie 1997 files)
=====-Schema Editor:=====
* Added import image, image rotation, image resizing and saving the file in the project.
(Double click on the image called a widget and cursor that reduce or enlarge the selected image.)
NB: Following the "edit image" entry will also be added in the right click menu.
* F5 keyboard shortcut can recharge symbol collections.
Some bugs have been resolved, and the translation status continues to grow.
======ChangeLog from v0.3 beta ======
Two more items for the changelog:
* In the official collection, there are now 1672 elements and 256 categoris for a total of 1928 files. In version 0.3 alpha, there were 1465 elements and 233 categories, while version 0.22 had153 elements and 51 categories.
*Progress in the translation (see http://qelectrotech.org/wiki/doc/translation/stats for current state)
* Functions (edit element and find in panel) have been moved to the context
Here is the changelog, for version 0.3 beta:
* Functions (edit element and find in panel) have been moved to the context menu, that can be accessed with right click. This is more user friendly.
* Refresh of categories when an element is moved.
* DateNow button added in the "Diagram property" dialog.
* Dotted lines can now been added between conductors.
* Rich text can be added to the diagram text fields.
[screenshot]
* HTML WYSIWYG editor for rich text: bold, italic, underlined, font size from 6 to 72 pixels, font colour, etc.
* You can change between the two modes(Selection mode <-> View mode) with the scroll button.
* Symbol editor: focus on the new value for language, languages sorted in alphabetical order.
* Added a widget that reflects the loading of a big project.
* Automated numbering of conductors according to your rules. See note from Joshua http://qelectrotech.org/wiki/doc/autonum
* Added a dialog to automatically rotate the text if the associated conductor is vertical or horizontal. Parameters are saved in qelectrotech.conf
* Added basic colours on the tools for lines and for the filling of the primitives, and also for the style line and point in the element editor.
* Added several protection to prevent from saving an element if one of its primitive is beyond the hotspot.
====== ChangeLog from 0.22 to 0.3a ======
===== Application =====
Elements collection: QElectroTech now provides 1465 elements within 233 categories (0.22 provided 153 elements within 51 categories). Most elements are related to electricity though some relate to chillers, solar, hydraulic and pneumatic engineering.
A new kind of collections appeared to store title block templates; as for elements, there is a distinction between common (system-wide) templates and custom (user-wide) templates.
Translations:
English, Spanish, French, Portuguese and Czech translations have been maintained.
Russian translations have been removed because they are not maintained anymore.
Polish, German, Italian, Arabic and Croatian translations have been added.
Following translation to Arabic, some work was done to improve Right-To-Left languages support.
Elements names are fully translated to English, French, Czech and Polish.
Main windows: added a “What's this?” action.
QElectroTech now handles *.titleblock files.
===== Diagram editor =====
It is now possible to move and rotate all texts on a diagram : element texts, conductor texts and independent texts.
When moving a text related to an electrical element, this element is highlighted.
Texts related to a conductor cannot be moved too far away from it.
It is now possible to create diagrams with more than 100 rows/columns.
Elements panel:
During a drag and drop operation, the hovered item is now expanded after a short time not moving the mouse.
Items are now expanded/collapsed by a double click.
Common, custom and embedded collections of title block templates are displayed within the elements panel.
Elements previews and names are now cached into a SQLite database stored in the user configuration directory, thus speeding up the elements panel (re)loading
The elements panel now displays the folio index before each diagram title.
UI consistency: renamed “Import element” to “Open an element file”, separated this action from those related to the current selection, and ensured elements-related actions are disabled when selecting a project/diagram/title block template.
Freshly integrated elements are now highlighted in the elements panel – this behaviour can be disabled though.
When clearing the search field, the panel state is restored to its previous state.
Title blocks are now rendered using templates:
For each diagram, users can choose the template to be used in the diagram properties.
They may also drag and drop it from the elements panel to the diagram.
Title block templates are always integrated within the parent project.
Fixed a bug in the print preview dialog.
Added a F2 shortcut for the widget “Edit the color of the given conductor”.
As elements, diagrams now have a “version” attribute for compatibility purposes.
Better handling of file opening for documents saved with newer versions of QElectroTech.
Diagram loading: removed an optimization that could lead to conductors not being loaded when several terminals share the same coordinates.
Users may now enter visualisation mode by pressing Ctrl and Shift.
Printing: when printing diagrams with no title block, use the space left by the title block.
Added a few status and “What's this?” tips.
Got rid of the green icon used for projects, changed a few other icons.
===== Element editor =====
Both static and dynamic texts can now be rotated
Added “dotted” line style
Added white color for texts
Newly added parts are placed above existing ones.
===== Title block template editor =====
A third kind of editor was implemented so users can create their own title block templates:
It allows users to customize the layout and content of cells that constitute the title block.
Cells can be merged and splitted.
Their width can be fixed, relative to the total width or relative to the remaining widths.
Their height is a simple fixed length.
They contain either a logo (be it in SVG or a usual bitmap format) or some text.
The text value is optionally preceded by a label.
As other texts within QElectroTech, labels and texts can be translated to other languages.
Texts and labels may contain variables (e.g. %company-name); these variables are replaced by real world values once the template is applied to a diagram.
Those real-world values can be set among the diagram properties.
====== Changelog 0.11 -> 0.2 ======
À partir de la version 0.2, QElectroTech est disponible en français, anglais, mais aussi :
* en espagnol, grâce aux traductions de Youssef ;
* en russe, grâce aux traductions de Yuriy ;
* en portugais, grâce aux traductions de José.
L'application utilise désormais le thème d'icônes Oxygen, réalisé par Nuno Pinheiro pour le projet KDE.
===== Notion de fichier projet =====
Un fichier .qet peut désormais contenir zéro, un ou plusieurs schémas électriques. Les éléments composant ces schémas sont embarqués dans le fichier projet au moment où ils sont posés sur un schéma. Le panel d'éléments affiche donc désormais :
* les projets ouverts, avec, sous chaque projet :
* les schémas de ce projet,
* la collection embarquée du projet (catégories et éléments utilisés dans les schémas)
* la collection commune fournie par QET,
* et la collection personnelle de l'utilisateur.
===== Éditeur de schémas =====
* Il est désormais possible de déplacer et copier les catégories et éléments par simple glisser-déposer (drag'n drop) dans le panel d'éléments.
* La collection embarquée est manipulable au même titre que la collection utilisateur. Les éléments inutilisés dans le projet apparaissent sur fond rouge et un dialogue permet de les purger rapidement.
* Chaque projet embarque également (au niveau de ses propriétés) les paramétrages par défaut pour les nouveaux schémas, cartouches et conducteurs.
* Il est possible de changer l'ordre des schémas dans le projet en déplaçant les onglets qui les représente. Dans le champ "Folio" des cartouches, on peut se référer à la position du schéma courant ou au nombre total de schémas dans le projet en écrivant respectivement %id et %total.
* Lors du chargement d'un fichier .qet, si des éléments ne sont pas trouvés, ils sont remplacés par un élément "fantôme", ce qui évite de perdre certaines informations lors de l'enregistrement du fichier.
* Le rendu avec un zoom réduit a été amélioré.
* Enfin, le logiciel gère l'ouverture en lecture seule d'un fichier projet.
==== Impression et export ====
À partir de la version 0.2, QElectroTech :
* propose d'utiliser une imprimante réelle ou bien de générer un document PDF ou PostScript, et ce sous Windows comme sous X11.
* génère un aperçu avant l'impression d'un projet. Cet aperçu permet de choisir les options d'impression mais également les schémas à imprimer ou non.
À noter toutefois une limitation pour les impressions PDF/PS sous Windows : le dialogue de mise en page, permettant de spécifier le format du papier ainsi que ses marges, n'est pas disponible.
Le dialogue "Exporter" (pour générer un fichier image d'un schéma) a également été refait dans l'optique d'un export simultané de tous les schémas du projet.
===== Éditeur d'éléments =====
* Lorsque l'on dessine une ligne dans l'éditeur d'éléments, il est possible de choisir un embout différent pour chaque extrémité, comme par exemple une flèche, un cercle, un carré ou, tout simplement, un bout de ligne normal.
* La forme "Rectangle" a été ajoutée.
* On peut enregistrer un élément en désignant un fichier (= comportement en 0.11) ou bien en choisissant un élément cible dans une liste reprenant l'arborescence du panel d'éléments.
* Si l'on maintient la touche Shift lorsque l'on ajoute une partie (droite, cercle, texte, ...), l'outil en cours est conservé après le dessin. Sinon l'éditeur repasse sur l'outil de sélection.
* La grille a été améliorée : sa densité varie en fonction du zoom ; les points correspondant à ceux de la grille de l'éditeur de schémas sont mis en valeur.
* L'accrochage à la grille (aka "snap to grid", également connu sous le nom de grille magnétique ou encore grille aimantée) a été ajouté. Le dessin s'y accroche désormais avec une précision de 1px. On peut travailler en coordonnées libres en maintenant la touche Ctrl enfoncée durant le dessin.
* Le copier-coller a été implémenté : il est possible de coller :
* avec le bouton du milieu de la souris
* en choisissant une "zone de collage" sur l'élément (Ctrl+Shift+V)
* directement (Ctrl+V) : les parties collées sont placées à côté des parties copiées ; si on recolle les parties, elles sont collées encore un cran à côté, et ce de manière incrémentale.
* Des contrôles sont désormais effectués à l'enregistrement : présence de bornes, respect du cadre, etc.
* Uniformisation des menus par rapport à l'éditeur de schémas
====== Changelog 0.1 -> 0.11 ======
===== Fonctionnalités et interface =====
* L'application est désormais capable d'ouvrir un fichier élément passe en paramètre
* L'application se lance désormais une seule fois par utilisateur
* Lors de l'ouverture d'un fichier en dehors de l'application alors que QET est déjà démarré celui-ci essaye de s'afficher ou d'attirer l'attention de l'utilisateur.
* L'application vérifie que ce fichier n'est pas déjà ouvert dans tous les éditeurs de schémas / éléments.
* Ajout de fichiers permettant d'automatiser les associations de fichiers sous Windows (.bat et .reg) et X11 (.desktop et .xml)
* Ajout de menus "Récemment ouverts" pour accéder aux fichiers récents dans les éditeurs de schémas et éléments.
* Ajout d'un splash screen
* La hauteur du schéma est désormais gérée via un système de lignes, dont le nombre et la hauteur sont ajustables.
* Il est également possible d'afficher ou non les en-têtes des lignes et/ou des colonnes.
* Ajout d'une option --lang-dir
* Ajout d'une description dans le dialogue des options d'impression
* Ajout de pages de manuel Unix (`man') en anglais et en français
===== Corrections de bugs =====
* Bug #12 : QET provoquait une erreur de segmentation dès son démarrage dans un environnement sans systray
* Bug #14 : il manquait un / dans le chemin proposé lors de l'impression vers un PDF
* Bug #15 : Mauvais positionnement des champs de texte sur le schéma
* Bug #16 : Mauvaise gestion des modifications du texte d'un conducteur
* La classe DiagramView écrivait sur la sortie d'erreur sans fin de ligne
* L'option --config-dir était mal prise en compte
* Après fermeture d'un schema, le menu Fenêtres n'était pas correctement mis à jour
* Les textes des éléments, des conducteurs, du cartouche ainsi que les textes indépendants utilisent désormais tous la même police.
* Remise à niveau de l'impression suite au passage à Qt 4.4
===== Code et détails techniques =====
* Corrections pour que QET compile avec gcc-4.3
* Les classes Conductor et Element héritent désormais de QObject (dépendance sur Qt 4.4)
* Affinage du constructeur de la classe QETApp
* Moins d'avertissements à la compilation (testé avec gcc 4.3)
* Moins d'inclusions non pertinentes
* Nettoyage du trunk : déplacement des sources dans un sous-répertoire
- error in doxygen action code [\#414](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/414)
- "NoName" is automatically inserted into empty text cells in title block [\#407](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/407)
- Apple silicon download is not working [\#400](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/400)
- Apple silicon download is not working [\#394](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/394)
- Differenciating connector for proper labeling [\#390](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/390)
- using the wrong Application Data folder on Windows [\#325](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/325)
- Unclear which PPA to use [\#321](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/321)
- missing group functionality [\#318](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/318)
- segfault due to calling method of uninitialized object [\#311](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/311)
- Cannot open qelectrotech.app on macOS Sequoia 15.0 [\#307](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/307)
- Dark Mode [\#301](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/301)
- README 404 Not Found URL: qelectrotech.org/download.html needs to be qelectrotech.org/download.php [\#298](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/298)
- Malware warning when trying to install dev version 0.100 [\#290](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/290)
- The page sorting of folio [\#279](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/279)
- Bad file name for translations [\#278](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/278)
- Error using Portuguese Language [\#274](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/274)
- New Maintainer [\#263](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/263)
- crash on export project db \(sqlite\) [\#262](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/262)
- https://qelectrotech.org/ is down for several days now ! [\#261](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/261)
- right click on text crashes app [\#260](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/260)
- broken link on github [\#259](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/259)
- Build on Bullseye 11.5 fails [\#254](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/254)
- Question about ARM target in future release [\#238](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/238)
- Component library disappears completely after reset of program [\#87](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/87)
- Can't change language in portable version [\#75](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/75)
- Transformation Matrix for Element Editor [\#56](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/56)
**Merged pull requests:**
- Update QCH Help file [\#416](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/416) ([Int-Circuit](https://github.com/Int-Circuit))
- no random hashes to have more constant order of XML-tags [\#415](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/415) ([plc-user](https://github.com/plc-user))
- Fixing translation file list in CMake [\#404](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/404) ([arummler](https://github.com/arummler))
- Update dependencies to fix compilation errors [\#403](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/403) ([arummler](https://github.com/arummler))
- Minor corrections to prevent crashes [\#401](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/401) ([Evilscrack](https://github.com/Evilscrack))
- Correct compositeText alignment on copying [\#399](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/399) ([ChuckNr11](https://github.com/ChuckNr11))
- Better handling of conductors when moving [\#398](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/398) ([ChuckNr11](https://github.com/ChuckNr11))
- A few small improvements [\#395](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/395) ([ChuckNr11](https://github.com/ChuckNr11))
- Added updated automatic doxygen build on push + theme to make it fit with docs page [\#389](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/389) ([Int-Circuit](https://github.com/Int-Circuit))
- only calculate grid-point-size, when min != max [\#387](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/387) ([plc-user](https://github.com/plc-user))
- Mouse hover text for dynamic text items [\#386](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/386) ([elevatormind](https://github.com/elevatormind))
- improvement: adjust size of grid-dots with zoom-factor [\#384](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/384) ([plc-user](https://github.com/plc-user))
- adjust zoom-factor to use cosmetic-line and fixed comments [\#383](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/383) ([plc-user](https://github.com/plc-user))
- element-editor: fix jumping positions when rotate, mirror or flip [\#382](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/382) ([plc-user](https://github.com/plc-user))
- unify some more code for Qt5 & Qt6 \(and more\) [\#379](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/379) ([plc-user](https://github.com/plc-user))
- same simplifications as in \#376 "use the same code for Qt5 & Qt6" [\#377](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/377) ([plc-user](https://github.com/plc-user))
- simplify and use the same code for Qt5 & Qt6 [\#376](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/376) ([plc-user](https://github.com/plc-user))
- bordertitleblock: use same code for Qt5 & Qt6 for "numbering" rows [\#375](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/375) ([plc-user](https://github.com/plc-user))
- some minor changes [\#374](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/374) ([plc-user](https://github.com/plc-user))
- implement setting of point-size of grids [\#372](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/372) ([plc-user](https://github.com/plc-user))
- some small changes for selective move [\#370](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/370) ([plc-user](https://github.com/plc-user))
- Added slovak translation to org.qelectrotech.qelectrotech.desktop [\#369](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/369) ([prescott66](https://github.com/prescott66))
- unify calls to "setRotation" for element-primitives again [\#367](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/367) ([plc-user](https://github.com/plc-user))
- Added option to only move dynamic texts [\#365](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/365) ([scorpio810](https://github.com/scorpio810))
- New variables for conductor text formulas [\#364](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/364) ([scorpio810](https://github.com/scorpio810))
- Fix typo widht to width [\#362](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/362) ([pkess](https://github.com/pkess))
- element-editor: add mirror and flip for "text" [\#361](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/361) ([plc-user](https://github.com/plc-user))
- Add Swedish translation [\#360](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/360) ([scorpio810](https://github.com/scorpio810))
- German text for launcher and debian package code style [\#359](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/359) ([pkess](https://github.com/pkess))
- some more rotation, mirror and flip [\#358](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/358) ([plc-user](https://github.com/plc-user))
- BugFix: Flip and Mirror of terminals [\#357](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/357) ([plc-user](https://github.com/plc-user))
- element-editor: fix rotation and more [\#356](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/356) ([plc-user](https://github.com/plc-user))
- a few translated shortcuts were still there ... fixed! [\#354](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/354) ([plc-user](https://github.com/plc-user))
- FIX: some shortcuts do not work with language set to local [\#353](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/353) ([plc-user](https://github.com/plc-user))
- fix movement of element, when origin is outside of graphics [\#352](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/352) ([plc-user](https://github.com/plc-user))
- FIX copy-and-paste in element-editor: set paste-position to meaningful values [\#351](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/351) ([plc-user](https://github.com/plc-user))
- some cleaning for element-file [\#350](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/350) ([plc-user](https://github.com/plc-user))
- fix: properties in project-file [\#348](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/348) ([plc-user](https://github.com/plc-user))
- translation: update German and English [\#347](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/347) ([plc-user](https://github.com/plc-user))
- export: set maximum width / height according limitations in QPainter [\#346](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/346) ([plc-user](https://github.com/plc-user))
- export: set maximum width / height according specifications of export-type [\#345](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/345) ([plc-user](https://github.com/plc-user))
- some clean-up for element-file and in code [\#344](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/344) ([plc-user](https://github.com/plc-user))
- Sort names in element-file by language-code [\#342](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/342) ([plc-user](https://github.com/plc-user))
- more precise Log-Text for search of "qet\_tb\_generator" [\#341](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/341) ([plc-user](https://github.com/plc-user))
- machine\_info: add entry for QETApp::configDir\(\) also for win [\#340](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/340) ([plc-user](https://github.com/plc-user))
- remove dead code \(local variables that were never used\) [\#339](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/339) ([plc-user](https://github.com/plc-user))
- minor changes [\#338](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/338) ([plc-user](https://github.com/plc-user))
- Update of qet\_de [\#337](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/337) ([Bisku](https://github.com/Bisku))
- rewrite code for executing “qet\_tb\_generator” plugin [\#335](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/335) ([plc-user](https://github.com/plc-user))
- corrected a few places where QETApp::documentDir\(\) should also be used [\#333](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/333) ([plc-user](https://github.com/plc-user))
- machine\_info: fix element-count and make static text a bit shorter [\#331](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/331) ([plc-user](https://github.com/plc-user))
- Set default-location for projects to documents-dir. [\#329](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/329) ([plc-user](https://github.com/plc-user))
- machine\_info.cpp: add explaining text for directory-list [\#328](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/328) ([plc-user](https://github.com/plc-user))
- set config- and data-dir to system-specific paths [\#327](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/327) ([plc-user](https://github.com/plc-user))
- PT-BR language update [\#322](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/322) ([gleissonjoaquim3](https://github.com/gleissonjoaquim3))
- Fix: Only scroll diagram-view, when moved text leaves visible area [\#320](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/320) ([plc-user](https://github.com/plc-user))
- Change Sorting of ElementInfo ComboBox [\#319](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/319) ([ChuckNr11](https://github.com/ChuckNr11))
- fix typos and whitespace [\#313](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/313) ([plc-user](https://github.com/plc-user))
- Force light mode in collections like projects [\#312](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/312) ([Arusekk](https://github.com/Arusekk))
- About QET: improvements in usability [\#310](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/310) ([plc-user](https://github.com/plc-user))
- use MessageBox to inform user about additional info when importing scaled element [\#308](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/308) ([plc-user](https://github.com/plc-user))
- make text for missing software "dxf2elmt" translatable [\#304](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/304) ([plc-user](https://github.com/plc-user))
- QET\_ElementScaler: fix error for Qt 5.9 and added mirroring [\#303](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/303) ([plc-user](https://github.com/plc-user))
- integrate "QET\_ElementScaler" as external software [\#302](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/302) ([plc-user](https://github.com/plc-user))
- move code into else-clause to avoid possible crashes [\#300](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/300) ([plc-user](https://github.com/plc-user))
- add terminal-names to connection in qet-file [\#297](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/297) ([plc-user](https://github.com/plc-user))
- fix: editing SpinBoxes with keyboard lose focus [\#296](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/296) ([plc-user](https://github.com/plc-user))
- Spanish lang update [\#295](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/295) ([joseyspain](https://github.com/joseyspain))
- More spanish translations.Josey [\#294](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/294) ([joseyspain](https://github.com/joseyspain))
- update German and English translations [\#293](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/293) ([plc-user](https://github.com/plc-user))
- hide SVG background checkbox in print preferences [\#292](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/292) ([plc-user](https://github.com/plc-user))
- fixed indentations of the remaining \*.cpp/\*.h files [\#291](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/291) ([plc-user](https://github.com/plc-user))
- correct more indentations / whitespace [\#289](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/289) ([plc-user](https://github.com/plc-user))
- update German and English translations [\#288](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/288) ([plc-user](https://github.com/plc-user))
- some minor changes [\#286](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/286) ([plc-user](https://github.com/plc-user))
- FIX SegFault: Disable menu-entry for DB-export when no project loaded [\#284](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/284) ([plc-user](https://github.com/plc-user))
- changed some remaining "pt\_br" to "pt\_BR" [\#282](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/282) ([plc-user](https://github.com/plc-user))
- add option "transparent background" in SVG-export [\#281](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/281) ([plc-user](https://github.com/plc-user))
- added "company-collection" as second user-collection [\#272](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/272) ([plc-user](https://github.com/plc-user))
- corrected german texts for "line-style" [\#269](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/269) ([plc-user](https://github.com/plc-user))
- Too many parts [\#268](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/268) ([scorpio810](https://github.com/scorpio810))
- Merge Terminal strip to master [\#267](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/267) ([scorpio810](https://github.com/scorpio810))
- Rewrite how Properties are stored in the Project file [\#144](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/144) ([Murmele](https://github.com/Murmele))
- Xml properties rebase2 [\#80](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/80) ([Murmele](https://github.com/Murmele))
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
The elements collection provided along with QElectroTech is provided as is and
without any warranty of fitness for your purpose or working.
The usage, the modification and the integration of the elements into electric
diagrams is allowed without any condition, whatever the final license of the
diagrams is.
Permission is not granted to use this software or any of the associated files
as sample data for the purposes of building machine learning models.
If you redistribute all or a part of the QElectroTech collection, with or
without any modification, out of an electric diagram, you must respect the
conditions of the CC-BY license:
This work is licensed under the Creative Commons Attribution 3.0 License.
To view a copy of this license, visit
http://creativecommons.org/licenses/by/3.0/ or send a letter to Creative
Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
[fr]
La collection d'éléments fournie avec QElectroTech est fournie telle quelle et
sans la moindre garantie qu'elle convienne à votre utilisation ou qu'elle
fonctionne.
L'utilisation, la modification et l'intégration des éléments dans des schémas
électriques est autorisée sans condition, quelle que soit la licence finale des
schémas.
L'autorisation n'est pas accordée pour utiliser ce logiciel ou l'un des fichiers associés
comme exemples de données aux fins de création de modèles d’apprentissage automatique.
Si vous redistribuez tout ou partie de la collection QElectroTech, avec ou sans
modification, en dehors d'un schéma électrique, vous devrez respecter les
conditions de la licence CC-BY :
Cette création est mise à disposition selon le Contrat Paternité 3.0
disponible en ligne http://creativecommons.org/licenses/by/3.0/ ou par
courrier postal à Creative Commons, 171 Second Street, Suite 300, San Francisco,
California 94105, USA.
[de]
Die mit QElectroTech zur Verfügung gestellte Sammlung von Elementen wird ohne
Gewährleistung der Eignung für einen bestimmten Zweck oder der Funktions-
fähigkeit zur Verfügung gestellt.
Die Verwendung, Modifikation und Integration der Elemente in elektrische
Schaltpläne ist uneingeschränkt erlaubt, unabhängig von der endgültigen Lizenz
der Schaltpläne.
Es ist nicht gestattet, diese Software oder eine der zugehörigen Dateien
als Beispieldaten für die Erstellung von Modellen für maschinelles Lernen
zu verwenden.
Wenn Sie die gesamte QElectroTech-Sammlung oder Teile davon, mit oder ohne
Modifikationen, aus einem Schaltplan weitergeben, müssen Sie die Bedingungen
der CC-BY-Lizenz einhalten.
Dieses Werk steht unter einer Creative Commons Attribution 3.0 Lizenz.
Eine Kopie dieser Lizenz finden Sie unter:
http://creativecommons.org/licenses/by/3.0/
oder senden Sie einen Brief an:
Creative Commons, 171 Second Street, Suite 300,
San Francisco, Kalifornien, 94105, USA.
[ru]
Коллекция элементов, поставляемая вместе с QElectroTech, поставляется "как есть"
и без каких-либо гарантий пригодности для той или иной цели или работы.
Использование, изменение и интеграция элементов в электрическую
схему разрешается без каких-либо условий, безотносительно конечной лицензии на
схему.
Если Вы распространяете всю или часть коллекции QElectroTech, с или без
изменений, отдельно от электрической схемы, Вы должны соблюдать условия лицензии
CC-BY:
Эта работа лицензирована на условиях Creative Commons Attribution 3.0 License.
Чтобы увидеть копию этой лицензии, посетите
http://creativecommons.org/licenses/by/3.0/ или отправте письмо в Creative
Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
(данный перевод, на русский язык, является вольным и выполнен не юристом!)
[pt]
A colecção de elementos fornecida com o programa QElectroTech é fornecida como é
e sem nenhuma garantia da aptidão para o seu uso e sem garantia de que funciona.
É permitido, sem condição alguma, qualquer que seja a licença final, usar,
editar e incluir estes elementos em esquemas eléctricos.
Se você redistribuir uma parte ou toda a colecção de elementos do programa
QElectroTech, tendo editado ou não os elementos, sem ser num esquema eléctrico,
tem de respeitar as condições da licença CC-BY:
Este trabalho está licenciado de acordo com os termos da licença Creative
Commons Attribution 3.0 License.
Para ver uma cópia da licença visite http://creativecommons.org/licenses/by/3.0/
ou envie uma carta para o endereço Creative Commons, 171 Second Street, Suite
300, San Francisco, California, 94105, USA.
[es]
La colección de elementos QElectrotech es distruibida tal cual y sin ninguna
garantía a la conveniencia de su uso y sin garantía de que funciona.
Se permite sin condicion alguna, cualquiera que sea la licencia final, usar,
editar, e incluir estos elementos en esquemas eléctricos.
Si usted redistribuye una parte de la colección o toda la collección de
QElectrotech, con o sin ediciones, fuera de un esquema eléctrico, tiene que
respetar las condiciones de la licencia CC-BY:
Esta obra está bajo una licencia Reconocimiento 3.0 de Creative Commons.
Para ver una copia de esta licencia, visite
http://creativecommons.org/licenses/by/3.0/ o envie una carta a Creative
Commons, 171 Second Street, Suite 300, San Francisco, California 94105, USA.
[ca]
La col·lecció de símbols QElectrotech és distribuïda tal qual i sense cap
garantia d'idoneïtat d'ús ni de funcionament.
Es permet incondicionalment, amb independència de la llicència final, emprar,
editar, i incloure aquests símbols en esquemes elèctrics.
Si vostè redistribueix una part de la col·lecció de QElectrotech o tota ella,
amb condicions o sense, separadament d'un esquema elèctric, haurà de respectar
les condicions de la llicència CC-BY:
Aquesta obra es troba sota una llicència Reconeixement 3.0 de Creative Commons.
Per veure una còpia d'aquesta llicència visiti
http://creativecommons.org/licenses/by/3.0/ o enviï una carta a Creative
Commons, 171 Second Street, Suite 300, San Francisco, California 94105,
[cs]
Sbírka prvků poskytovaná společně s QElectroTechem je poskytována tak, jak je,
bez záruky nebo vhodnosti pro váš účal nebo práci.
Používání, úpravy a začlenění prvků do nákresů elektrických
obvodů se povoluje bez jakýchkoli podmínek, cokoli je konečná licence nákresu.
Pokud rozdáte celou nebo část ze sbírky QElectroTechu, s nebo bez
jakýchkoli úprav, mimo elektrický nákres, musíte brát ohledy na podmínky
licence CC-BY:
tato práce je licencována pod licencí Creative Commons Attribution 3.0 License.
Kopii této licence si můžete prohlédnout, navštivte
http://creativecommons.org/licenses/by/3.0/ nebo pošlete dopis Creative
Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
[pl]
Biblioteka elementów dostarczana wraz z QElectroTech jest w formie "taka jaka jest",
bez żadnych gwarancji przydatności.
Dozwolona jest edycja, modyfikacja i użytkowanie elementów bez żadnych warunków
i bez względu na końcową licencję tworzonych schematów.
W przypadku wykorzystywania całości lub części biblioteki elementów QElectroTech
do innych celów niż tworzenie schematów elektrycznych, należy przestrzegać
warunków licencji CC-BY:
Niniejsza praca jest licencjonowana na zasadach Creative Commons Attribution 3.0 License.
Aby zobaczyć kopię licencji, należy odwiedzić stronę internetową:
http://creativecommons.org/licenses/by/3.0/ lub wysłać list do Creative
Commons, 171 Second Street, Suite 300, San Francisco, Kalifornia 94105, USA.
[it]
La collezione di elementi che si trova in QElectroTech è fornita così com'è
senza alcuna garanzia di usabilità o funzionamento.
L'uso, la modifica e l'integrazione degli elementi negli schemi elettrici
è permessa senza condizioni, qualunque si ala licenza dello schema finale.
Distribuendo tutto o parte della collezione di QElettroTech, con o senza
modifiche, fuori da uno schema elettrico, bisogna rispettare le condizioni
della licenza CC-BY:
Questo lavoro è licenziato sotto la Licenza Creative Commons 3.0.
Per vedere una copia di questa licenza, visitate il sito
http://creativecommons.org/licenses/by/3.0/ o inviate una lettera a Creative
Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
[el]
Η συλλογή στοιχείων που παρέχεται μαζί με το QElectroTech παρέχεται ως έχει και
χωρίς καμία εγγύηση καταλληλότητας για συγκεκριμένο σκοπό ή την εργασία σας.
Η χρήση, η τροποποίηση και η ενσωμάτωση των στοιχείων στα ηλεκτρικά
διαγράμματα επιτρέπεται χωρίς καμία προϋπόθεση, όποια και αν είναι η τελική άδεια
των διαγραμμάτων.
Εάν αναδιανείμετε το σύνολο ή ένα μέρος της συλλογής του QElectroTech, με ή
χωρίς καμία τροποποίηση, έξω από ένα ηλεκτρικό διάγραμμα, θα πρέπει να σεβαστείτε
τους όρους της άδειας CC-BY:
Το έργο αυτό είναι υπό την άδεια Creative Commons Attribution 3.0 License.
Για να δείτε ένα αντίγραφο της άδειας αυτής, επισκεφτείτε το
http://creativecommons.org/licenses/by/3.0/ ή στείλτε μια επιστολή στο Creative
Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
[nl]
De elementen collectie voorzien, samen met QElectroTech wordt geleverd als en
zonder enige garantie van geschiktheid voor uw doel of werk.
Het gebruik, de wijziging en de integratie van de elementen in elektrische
diagrammen wordt toegestaan zonder enige voorwaarden, ongeacht wat de uiteindelijke
vergunning van het diagram is.
Als u alle of een deel van de QElectroTech collectie, met of herdistribueren
zonder enige wijziging, van een elektrisch schema, moet u voldoen aan de
voorwaarden van de CC-BY-licentie:
Dit werk is gelicenseerd onder de Creative Commons Attribution 3.0-licentie.
Om een kopie van deze licentie te bekijken, bezoek
http://creativecommons.org/licenses/by/3.0/ of stuur een brief naar Creative
Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
[be]
De elementen collectie welke samen met QElectroTech wordt geleverd zonder enige garantie
of deze geschikt zijn voor uw doel of de werking.
Het gebruik, wijzigen en integratie van de elementen in uw elektrische
schema's wordt toegestaan zonder enige voorwaarden, ongeacht wat de uiteindelijke
liventie van het schema is.
Als u één of meerdere elementen van de QElectroTech collectie, met of zonder wijzigingen, herdistribuer in een elektrisch schema of zonder schzma , moet u de voorwaarden van de
CC-BY-licentie volgen:
Dit werk is gelicenseerd onder de Creative Commons Attribution 3.0-licentie.
Om een kopie van deze licentie te bekijken, bezoek
http://creativecommons.org/licenses/by/3.0/ of stuur een brief naar Creative
Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
[da]
Element samlinger leveret sammen med QElectroTech er tilvejebragt som er og
uden nogen garanti for egnethed til dit formål eller arbejde.
Brug, modifikation og integration af elementer til elektrisk diagrammer er
tilladt uden nogen betingelse uanset den endelige diagram licens.
Omfordeling af hele eller dele af QElectroTech samlingen, med eller
uden ændring af et elektrisk diagram, skal du respektere betingelser for CC-BY-licens:
Dette værk er licenseret under Creative Commons Attribution 3.0 License.
For at se en kopi af denne licens, besøg
http://creativecommons.org/licenses/by/3.0/ or send a letter to Creative
Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
QElectroTech és una aplicació Qt5 per crear esquemes elèctrics.
QET utilitza el format XML per als seus elements i esquemes i inclou un editor d'esquemes, un editor d'elements i un editor de caixetins.
[en]
QElectroTech is a Qt5 application to design electric diagrams.
It uses XML files for elements and diagrams, and includes both a diagram editor, a element editor, and an titleblock editor.
[fr]
QElectroTech est une application Qt5 pour réaliser des schémas électriques.
QET utilise le format XML pour ses éléments et ses schémas et inclut un éditeur de schémas, un éditeur d'élément, ainsi qu'un editeur de cartouche.
[de]
QElectroTech ist eine Qt5 Software, um Schaltpläne zu erstellen.
QET benutzt das XML Format für seine Bauteile und seine Projekte, und beinhaltet einen Schaltplaneditor, einen Bauteileditor sowie einen Schriftfeldeditor.
[ru]
QElectroTech - приложение написанное на Qt5 и предназначенное для разработки электрических схем.
Оно использует XML-файлы для элементов и схем, и включает, как редактор схем, так и редактор элементов.
[pt]
QElectroTech é uma aplicação baseada em Qt5 para desenhar esquemas eléctricos.
QET utiliza ficheiros XML para os elementos e para os esquemas e inclui um editor de esquemas e um editor de elementos.
[es]
QElectroTech es una aplicación Qt5 para diseñar esquemas eléctricos.
Utiliza archivos XML para los elementos y esquemas, e incluye un editor de esquemas y un editor de elementos.
[cs]
QElectroTech je aplikací Qt5 určenou pro návrh nákresů elektrických obvodů.
Pro prvky a nákresy používá soubory XML, a zahrnuje v sobě jak editor nákresů, tak editor prvků.
[pl]
QElectroTech to aplikacja napisana w Qt5, przeznaczona do tworzenia schematów elektrycznych.
Wykorzystuje XML do zapisywania plików elementów i projektów. Posiada edytor schematów i elementów.
[it]
QElectroTech è una applicazione fatta in Qt5 per disegnare schemi elettrici.
QET usa il formato XML per i suoi elementi e schemi, includendo anche un editor per gli stessi.
[el]
Το QElectroTech είναι μια εφαρμογή Qt5 για σχεδίαση ηλεκτρικών διαγραμμάτων.
Χρησιμοποιεί αρχεία XML για στοιχεία και διαγράμματα, και περιλαμβάνει επεξεργαστή διαγραμμάτων καθώς και επεξεργαστή στοιχείων.
[nl]
QElectroTech is een Qt5 applicatie om elektrische schema's te ontwerpen.
Het maakt gebruik van XML-bestanden voor elementen en diagrammen, en omvat zowel een diagram bewerker, een element bewerker, en een bloksjabloon bewerker.
[be]
QElectroTech is een Qt5 toepassing voor het maken en beheren van elektrische schema's.
QET gebruikt XML voor de elementen en schema's en omvat een schematische editor, itemeditor, en een titel sjabloon editor.
[da]
QElectroTech er et Qt5 program til at redigere elektriske diagrammer.
Det bruger XML filer for symboler og diagrammer og inkluderer diagram, symbol og titelblok redigering.
[ja]
QElectroTech は電気回路図を作成する Qt5 アプリケーションです。
QET は要素と回路図に XML 形式を利用し、回路図エディタ、要素エディタ、表題欄エディタを含みます。
QElectroTech, or QET in short, is a libre and open source desktop application to create diagrams and schematics.
The software is primarily intended to create electrical documentation but it can also be used to draw any kinds of diagrams, such as those made in pneumatics, hydraulics, process industries, electronics...
Generally speaking, QET is a **CAD/CAE editor focusing on schematics drawing features**.
This means that there are no embedded simulating or calculating functionalities and it is not planned to implement them.
The main goal of the developers is to provide a libre, easy to use and effective software for **schematics drawing purposes**.
### Version
The current stable version is 0.100 and was released on 2026.01.25.
Once it has been officially released, the stable version is always frozen and is no longer developed.
New functionalities, bug and issue fixings are further made in the development version (currently 0.100.1 or 0.200.0 if based on new Qt6 port), which can also be [downloaded](https://qelectrotech.org/download.php).
Users who want to test and take benefits from the last software implementations should use the development version. But... use it at your own risk, since things are sometimes broken or only partially implemented until they are done!
### License
The software is licensed under [GNU/GPL](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html).
You are free to use, copy, modify and redistribute it under the terms of the license.
Like many other open source software, QElectroTech is provided as is, without any warranty.
### Development / technical choices
The development follows the classical way of free and open source software: the source code, written by a community of users, is freely accessible.
If you wish to be informed of the latest developments, browse the [archive](https://listengine.tuxfamily.org/lists.tuxfamily.org/qet/) of the project mailing list where all commits (changes) are registered. This archive is publicly available, you don't need any account to access it.
# Features
QElectroTech is a free and open source software.
No need to worry about restrictive licensing, privacy violation or dependency on a company.
Zero cost and no licensing fees!
But you are welcome to make a donation to support the development
QElectroTech runs on the 3 most widespread operating systems for desktop computers in the world.
Files that were created on an OS can be edited on another OS without any conversion or restriction.
MS Windows users can even run the "ready-to-use" version of QElectroTech from an external medium with no need to install it on an access restricted computer.
Take advantage of the modern GUI
Toolbars and panels can be enabled/disabled, moved and displayed the way you want to work.
Panels can be stacked on each other (as tabs) or docked on the sides (as docks) or completely separated from the main window (as windows).
The GUI can fit to small or big screens, and even to multi-display configurations.
Create technical documentation in professional quality
Size, look and informations of the folios (sheets) are fully configurable.
You can set vertical and horizontal headers (printed rulers) individually on and off, set number of columns and rows, and set width/height of each column/row.
Titlebocks can be created and edited with the embedded titleblock editor to perfectly suit your needs.
Custom variables can be defined to display the informations you wish in the titleblock.
Your whole documentation or only selected parts of it can be printed to a real printer or to a pdf file.
Alternatively, you can export to vector (svg) or pixel (png, jpg, bmp) format images.
### And much more:
* open and edit several projects at the same time
* import images (.bmp, .jpg, .png, .svg) in your diagrams
* add basic shapes (lines, rectangles, ellipses, polygons) to your drawings
* edit the thickness, the line style and the color of conductors
* define some autonum patterns for conductors, symbols and folios
* take advantage of the open xml standard of elements and projects to create custom tools
* search and replace Widget (Ctrl + F) in entire project
* conductors num can be exported to csv file.
****
Nomenclature
A new nomenclature tool appears in the menu: project -> Add a nomenclature.
The nomenclature is presented in the form of a configurable table separated into two parts: the display (the form) and the content (the background).
- Display: the size and position of the table, the margins between text and the table cell, the alignment of the text in the cells and the font. The configuration of the table headers and the table itself are separate.
- Content: the information to display in the table and the order in which it should be displayed.
In order to speed up the establishment of a nomenclature, it is possible to export / import the display and content configurations separately. This is the "Configuration" part that can be seen in the photos above.
Behind the scenes, an SQLite database does the work, so setting up the content is nothing more or less than an SQL query created using a dialog (screenshot by right).
The SQL query is configured as follows (from top to bottom in the screenshot):
- “Available information”: the information to display;
- "Filter": filter the information (is not empty, is empty, contains, does not contain, is equal to, is not equal to) only one filter can be applied per information, it is not possible combine several;
- "Type of elements": allows you to filter on what type of element you want to obtain information.
At the bottom, a checkmark "SQL query" allows you to edit a personalized query, if the basic options are not sufficient.
When a nomenclature is too large to be contained in a single folio, it is possible to separate it on several folios, the tables of each folio are then linked together. When creating a nomenclature, this option is activated by default, which has the effect of adding the necessary number of folios, adding a table in each of them and linking them together.
Finally two buttons are available in the property panel:
- "Fit the table to the folio": positions and adjusts the size and determines the number of rows in the table in relation to the folio;
- "Apply geometry to all tables linked to this one": applies the three properties mentioned above to all linked tables in order to save time and maintain aesthetic consistency.
The old summary has been completely removed from the code in order to make room for the new one which is exactly the same as the nomenclature (a large amount of the code is common), with the exception of the SQL query (and its dialog to configure it) which offers specific information for editing a summary.
Export of the internal database
The database used by the nomenclature and the summary can be exported in a “.sqlite” file.
Currently this is irrelevant, as the function was created during development for debugging purposes, we left it.
Note that the database will become increasingly important in the future of Qet.
Export of the wiring list
In order to be able to use the wiring number printers more easily, the names of conductors can be exported in CSV format, the export respects the quantity of conductors in order to print the right quantity of numbers, for example a potential numbered 240 composed of 3 wires will give 6 × 240 (2 numbers per wire × 3 wires) in the CSV.
### Story
The QElectroTech project was founded in 2007 by two french students, Xavier and Benoit.
Xavier developed the base application itself and made all technical choices about the development.
The first version of QET (0.1) was released on 09.03.2008.
However, both Xavier and Benoit do not participate anymore in the project since 2013.
Following this period, new developers and contributors took over the project and kept it alive.
The development and the many translations are actively maintained.
New functionalities and evolutions are planned to make QET ever better.
Nowadays, QET is not only used by many individuals, teachers and students but also by professional electricians and companies all over the world.
### Donate Money
If you love QElectroTech, you can help developers to buy new hardware to test
and implement new features. Thanks in advance for your generous donations.
For more information, look at [Paypal](https://www.paypal.com/donate/?cmd=_s-xclick&hosted_button_id=ZZHC9D7C3MDPC&ssrt=1694606609672)
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.