Commit Graph

198 Commits

Author SHA1 Message Date
Kacper Donat
908f9ff36e Gui: Save defaults layout after first launch 2025-11-19 10:27:20 -06:00
pre-commit-ci[bot]
9fe130cd73 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
PhoneDroid
337b0aed9f Updated SPDX License Identifiers 2025-10-08 10:28:46 -05:00
Steven James
066bec1e95 Make repr for a TaskDialog indicate the associated document. 2025-10-02 04:27:59 -04:00
Markus Reitböck
a72a0d6405 Gui: use CMake to generate precompiled headers on all platforms
"Professional CMake" book suggest the following:

"Targets should build successfully with or without compiler support for precompiled headers. It
should be considered an optimization, not a requirement. In particular, do not explicitly include a
precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
generated precompile header on the compiler command line instead. This is more portable across
the major compilers and is likely to be easier to maintain. It will also avoid warnings being
generated from certain code checking tools like iwyu (include what you use)."

Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-14 09:47:03 +02:00
xtemp09
887e7bd595 Simplify repr() function 2025-08-25 10:38:39 -05:00
wmayer
b314d71c24 Gui: Hold the GIL when clearing the form attribute
Inside TaskDialogPython::clearForm() the interpreter may execute a lot of things where at the some point the GIL must be hold.

This very likely fixes https://github.com/FreeCAD/FreeCAD/issues/22863

@thyssentishman
Please check this branch
2025-08-24 22:17:10 -05:00
theo-vt
102650dd32 Core: Add setting to hide the TaskWatcher (#22857)
* Core: Add setting to hide the TaskWatcher

* Move setting to Display/UI

* Clarify option description

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

* Use sentence case for section title

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

---------

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>
2025-08-11 21:38:58 +02:00
paddle
d259beadc5 Sketcher: Refactor TaskSketcherMessages to move most of the logic into Core to be reused by Assembly 2025-08-10 15:17:35 +02:00
Max Wilfinger
6692dacc0a Gui: Update UI strings for consistency
Closes: #22135
2025-08-04 20:14:45 +02:00
paddle
b14c60e6ee Core: TaskView: add updateWatcher when an object is set in edit. And add a timer when active document changes. 2025-07-27 21:17:28 +02:00
PaddleStroke
ee47e00363 TaskView: Add 'Permanent task box' framework. (#22750)
* TaskView: Add 'Permanent task box' framework.

* Update TaskView.h
2025-07-26 22:46:49 +02:00
Alfredo Monclus
acdfdd5d1b Gui: Tasks: fix in place close and ok buttons 2025-06-19 18:42:24 +02:00
wmayer
c42dfe1ef3 Gui: Fix undo/redo behaviour in transformation tool
If the user clicks on undo while the transformation dialog is
open the currently active transaction will be closed.
From now on any change of the placement won't be recorded any
more so that e.g. canceling the dialog or an undo after
accepting the dialog leads to unexpected behaviour.

To fix the issue two new virtual methods onUndo() and onRedo()
are added to TaskDialog and reimplemented in TaskTransformDialog.
These functions make sure to open a new transaction.

This fixes issue 19152
2025-05-30 14:21:53 +02:00
Chris Hennes
f5ab6295ba UI: Remove qPixmapFromMimeSource pixmap function
This function dates back to Qt3, and was removed in Qt4. Modern Qt no
longer uses this ui file entry, and in some circumstances the uic
complains about its presence.
2025-05-15 00:56:30 +02:00
bofdahof
ba2c2ca5ad Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
Ladislav Michl
9683cf1e4f Base: rename Exception's PascalCase methods to camelCase 2025-05-05 23:50:01 +02:00
Kacper Donat
e18c88bd23 Misc: Replace dynamic_cast with qobject_cast 2025-04-26 14:23:25 +02:00
Karliss
42790475d6 Add missing parent for messagebox and other popups
Unparented popups can easily get lost in backround, but they still block top level event loop when run with ::exec() thus preventing interactions with main window.  This mainly happens on wayland. Setting the parent ensures they are always kept on top and reasonably positioned.
2025-03-16 16:02:36 -05:00
Chris Hennes
3ce193ddb8 Merge pull request #19921 from mosfet80/QT_CLEAN
REMOVE old QT<= 5.14 code
2025-03-11 20:54:59 +00:00
Andrea
cca14cf164 Remove old qt code
new round of removal following the report of @benj5378  .

.
2025-03-05 09:46:35 +01:00
Andrea
2d4ab5af20 REMOVE old QT<= 5.14 code
Ubuntu 22.04  use qt 1.15.3.
In the code is still used qt code <5.10.
A cleanup was done by removing qT code version used in ubuntu 18.04.
2025-03-05 09:32:06 +01:00
Alfredo Monclus
052a08cfa0 refactor: setup and use a single base scheme 2025-02-16 10:19:48 -03:00
Alfredo Monclus
9ed3c90303 refactor: remove scheme dependencies from group 2025-02-16 10:02:23 -03:00
Alfredo Monclus
162d7a5fe7 refactor: reduce qsint schemes to 1 2025-02-16 09:54:16 -03:00
tritao
551c2e48fb Gui: Reorganize the selection files into a top Selection folder. 2025-02-03 17:56:57 +01:00
Ladislav Michl
0b3adee2ab Base: Quantity: return std::string 2024-12-23 17:48:42 +01:00
PaddleStroke
3bc7f1e85e Core: Enable TaskDialogs to associate view (#17373)
* Core: Add possibility for task dialogs to associate a view and be able to close when associated view is closed.

* TaskImage: Use task dialog view association.

* Sketcher: Use task dialog view association. Preventing crash (https://github.com/FreeCAD/FreeCAD/issues/16702)

* EditableDatumLabel: Use QPointer to prevent crash
2024-10-29 09:58:11 -05:00
wmayer
f6818079d4 Core: Do not set to XY plane by default if the rotation of the image doesn't match 2024-09-28 19:05:52 +02:00
wmayer
1af82e621e Core: Fix resetting placement of transformed image
The restored Euler angles of a rotation may significantly differ from the input Euler angles so that determining the plane isn't very reliable.
To get the plane reliably multiply (0,0,1) with the rotation and use this as reference normal of the plane.
2024-09-28 18:46:35 +02:00
wwmayer
7b0a23337c Gui: Prepare for clang-format (#16051)
* Gui: Prepare for clang-format

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-02 17:48:55 +02:00
wmayer
8a4aa75dec PD: Fix crash when pressing ESC on chamfer/fillet dialog 2024-07-22 10:53:31 -05:00
PaddleStroke
2364a48cb9 Core: Image taskbox : close if document is closed. 2024-07-15 11:33:24 -05:00
wmayer
17c06a4a22 Gui: Extend TaskDialog
* Add TaskDialog::autoClosedOnDeletedDocument()
* Add option to automatically close task dialog when document is deleted
* Expose autoClosedOnDeletedDocument() to Python
* Expose autoClosedOnTransactionChange() to Python
* Change ControlPy::showDialog() to directly return the task dialog wrapper
* Change TaskView::slotDeletedDocument() to close task dialog if requested
2024-07-10 08:43:43 +02:00
wmayer
8e0cd381ab Gui: Fix crash when trying to calibrate image after document is closed 2024-07-04 22:19:42 +02:00
wmayer
594c382e5e Gui: Fix comparison of argument of clicked() with StandardButton
Fixes #14639: Comparison between integers and StandardButton fails for Python task dialogs with PySide6
2024-06-16 22:18:58 -05:00
wmayer
ae2b881477 Gui: Restore previous width when closing task dialog
This fixes #11016
2024-05-20 11:35:59 -05:00
Martin Rodriguez Reboredo
51987dc1ab Fixups with Qt6 enums (#13611)
* Python PySide enums to C++ converter

* Python IntFlags to C++ int in getStandardButtons

* Remove int conversion in mods Python sources
2024-05-06 18:02:18 +02:00
wmayer
858f6023b5 Gui: allow to add task box with no header and
add methods to add a task box to a watcher
2024-03-26 15:57:20 +01:00
wmayer
35a10e8717 Gui: use of TaskDialog::addTaskBox 2024-03-26 15:57:20 +01:00
wmayer
e48134e0e7 Gui: extend and add overloaded method of TaskDialog::addTaskBox 2024-03-26 15:57:20 +01:00
Chris Hennes
590fb19f31 Merge pull request #10978 from FlachyJoe/modernize-type-check
Modernize type and derived type checking
2023-11-06 10:44:32 -06:00
bgbsww
3df225df3d Fix #11032 flickering when switching to Part Design
* Remove unneeded timer on taskview updates to fix #11032

* Remove obsoleted class member
2023-11-02 16:32:32 +01:00
Chris Hennes
583e27e8af Merge branch 'main' into modernize-type-check 2023-10-25 16:07:28 -05:00
Paddle
20e41aea0b EditableDatumLabel : Change the 'invisibleToMouse' to 'visibleToMouse' to avoid double negation.
Also add parameter to startEdit to set this setting. Defaulting to false. So that we don't have to set manually again and again in tool settings.
2023-10-24 19:27:10 +02:00
Florian Foinant-Willig
741296b82e Core: modernize type checking 2023-10-23 18:07:07 +02:00
Zheng, Lei
ba6b2a4375 Gui: add support for transparent overlay docking widget 2023-10-11 09:58:53 +02:00
wmayer
d305f306df Core: Revert superfluous changes made with PR #9521 2023-10-09 15:06:45 +02:00
AgCaliva
a4e90b2609 Merge branch 'master' into User/Document/Feature_level_units_selection_#7746 2023-09-25 22:58:23 -03:00
wmayer
ac88cfb2c9 Gui: fixes #10724: TaskView gets truncated 2023-09-21 19:11:45 -05:00