Commit Graph

354 Commits

Author SHA1 Message Date
ispyisail 80fcd4283d Add Ctrl+G "jump to element" type-ahead popup (#574)
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>
2026-08-01 01:05:43 +12:00
ispyisail 464d516537 Add a local, per-project time-spent tracker (#576)
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>
2026-07-31 09:52:32 +12:00
Kellermorph 2db6c3968a feat: add backup dialog when opening an existing project 2026-07-07 21:42:45 +02:00
Laurent Trinques 14253930ae Merge pull request #509 from Kellermorph/master
Add Custom Guides
2026-07-07 16:34:56 +02:00
Gerhard Schwanzer e6124e941a Add Qt-only autosave recovery fallback
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)
2026-07-05 13:23:49 +02:00
Kellermorph 7a80ce40b7 Sync with upstream master and resolve conflict in qet_de.qm 2026-06-17 22:07:41 +02:00
Kellermorph 4e0c075575 Fix grid and guide startup behavior and update german translation 2026-06-16 17:41:03 +02:00
Shane Ringrose a666d2d0ae qet_tb_generator: drop dead ~/Application Data/qet fallback (Windows)
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>
2026-06-16 22:11:22 +12:00
Kellermorph 0b79dfd149 Fix and Improve Multi-selection for Diagram Operations 2026-05-13 19:42:11 +02:00
Kellermorph eb8f859038 Terminal numbering 2026-04-09 08:36:54 +02:00
Laurent Trinques 54e19f4074 Merge pull request #448 from ChuckNr11/master
Supplement to pull request #444 by Kellermorph
2026-04-06 05:50:03 +02:00
ChuckNr11 a82f6de23b Add highlight current page in ProjectView
- on clicking project tab
- on moving diagram tab
- on adding project
- on adding diagram
2026-04-05 22:11:38 +02:00
ChuckNr11 6452e03cdc refactor: move code to other place for cleaner code
connections for projectviews are made in "addProjectView"
2026-04-05 21:56:33 +02:00
Kellermorph bc9173d726 Add RAM-based wiring list export 2026-04-05 08:33:37 +02:00
Kellermorph bea1fb4353 Refactor elements_panel to elementsPanel 2026-03-29 18:13:14 +02:00
Kellermorph 9693df4252 Highlight current page in ProjectView on diagram activation 2026-03-28 14:49:00 +01:00
Laurent Trinques 4044d04cc5 One year
Auto-build doxygen docs / doxygen (push) Has been cancelled
Auto-build doxygen docs / deploy (push) Has been cancelled
2026-01-16 15:24:35 +01:00
joshua f83a5b3a79 Merge branch 'terminal_strip' 2025-10-15 23:30:54 +02:00
Pascal Sander ee49086d03 QMenu must set a parent for correct position. #3 2025-08-17 17:48:29 +02:00
joshua 74b55f3bf5 Disable deletion if a terminal can't be deleted.
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.
2025-07-24 22:24:15 +02:00
plc-user c7ed744481 Include some fonts to QElectroTech
- 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
2025-05-18 14:15:20 +02:00
plc-user 757df90951 minor: added some English comments 2025-03-13 21:05:21 +01:00
plc-user c2a2e5f5eb minor: whitespace and comments 2025-02-17 19:45:53 +01:00
Laurent Trinques 43f0107eb1 Revert "Try Clazy fix-its"
Segfault on old Qt versions!
This reverts commit dba7caed30.
2025-02-14 16:17:58 +01:00
Laurent Trinques dba7caed30 Try Clazy fix-its
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
2025-02-14 15:52:23 +01:00
plc-user 0b80d1b5b9 a few translated shortcuts were still there ... fixed! 2025-02-12 13:41:39 +01:00
plc-user 317c90c769 do not hardcode translations for shortcuts: let the system do it for you! 2025-02-11 14:36:15 +01:00
plc-user 9dad6963cb minor: typos, comments, whitespace, translation 2025-02-04 13:48:35 +01:00
plc-user e1dc978f97 more precise Log-Text for search of "qet_tb_generator" to avoid misunderstandings 2025-02-02 14:48:38 +01:00
plc-user 8162da1515 reorder search-paths and added currentPath() 2025-01-30 08:30:11 +01:00
plc-user 3cadc9275e improve readability 2025-01-30 07:25:30 +01:00
plc-user a459029f0d simplify code even more... 2025-01-30 00:15:09 +01:00
plc-user 9dda9f890f close the process in any case 2025-01-29 22:27:56 +01:00
plc-user 9be2ed604e moved "#endif" to always close process and adjusted qInfo-Text 2025-01-29 22:15:36 +01:00
plc-user a450680f6e rewrite code for executing “qet_tb_generator” plugin
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
2025-01-29 21:57:38 +01:00
plc-user 79f894a327 Set default-location for projects to documents-dir.
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.
2025-01-26 11:32:46 +01:00
Laurent Trinques 77bfe84a4c One year 2025-01-04 13:37:40 +01:00
Laurent Trinques 4894284520 Fix segfault due to calling method of uninitialized object, thanks
ladmanj

https://github.com/qelectrotech/qelectrotech-source-mirror/issues/311
2024-12-15 14:41:34 +01:00
Laurent Trinques 326387895a Update qetdiagrameditor.cpp 2024-10-06 06:29:24 +02:00
Laurent Trinques 566e7f7004 Update qetdiagrameditor.cpp 2024-10-06 06:18:48 +02:00
Laurent Trinques 625e673385 Update qetdiagrameditor.cpp 2024-10-05 14:34:20 +02:00
Laurent Trinques 1863329ca0 Typo 2024-10-05 13:47:08 +02:00
Laurent Trinques e83424459c Try to fix false positive message box warning when launching process-
>startDetached("qet_tb_generator")
Launch program "qet_tb_generator" by QET only when an project was open
2024-10-05 13:41:20 +02:00
plc-user 4c52c8c9d0 correct indentations / whitespace 2024-04-10 10:28:58 +02:00
Laurent Trinques f343395da0 Disable menu-entry for show grid, when no project is loaded 2024-04-07 11:13:39 +02:00
Laurent Trinques 8ce47848c2 Disable menu-entry for terminalBlock plugin, when no project is loaded 2024-04-05 12:59:55 +02:00
plc-user cad7fa1ae7 FIX SegFault: Disable menu-entry for DB-export, when no project is loaded 2024-04-02 00:32:34 +02:00
Laurent Trinques e73cf633ce 2023->2024 2024-03-29 10:09:48 +01:00
Laurent Trinques 047462f226 Fix macOS Deprecated synonym for Q_OS_DARWIN 2023-02-25 14:28:02 +01:00
Laurent Trinques 78644a3524 macOS update python PATH to launch qet_tb_generator to python 3.11 2023-02-22 15:40:38 +01:00