Commit Graph

109 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
25c3ba7338 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
Chris Hennes
c5489e0f0a Gui: Fix allocation of posted ESC event 2025-11-01 21:47:00 +01:00
Chris Hennes
f6f919d229 Gui: Use postEvent instead of sendEvent for Esc handling
See https://github.com/FreeCAD/FreeCAD/pull/24277#issuecomment-3342091132

Co-authored-by: wwmayer <wmayer@freecad.org>
2025-10-23 14:39:31 -05:00
wwmayer
503ef79cea Gui: Do not accept changes when pressing ESC key in 3D view
Forward the ESC key event to the Task view to reject changes if needed. This fixes issue https://github.com/FreeCAD/FreeCAD/issues/23504
2025-10-23 14:35:40 -05:00
PaddleStroke
2e5b02e52c Link: Fix Selectable (#23567)
* Link: Fix Selectable

* to squash

* squash

* squash
2025-09-22 18:25:16 +02:00
Markus Reitböck
6ef07bb358 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
Max Wilfinger
ecf02b7878 Gui: Update UI strings for consistency
Closes: #22135
2025-08-04 20:14:45 +02:00
jffmichi
fea703c8be Gui: use correct cast with getActiveView 2025-07-21 00:44:18 +02:00
wmayer
ce6641cb81 Gui: Handle exception when trying to start editing an object 2025-05-30 18:04:33 +02:00
bofdahof
998f4e4d45 Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
Kacper Donat
b14d3a224b Misc: Replace dynamic_cast with qobject_cast 2025-04-26 14:23:25 +02:00
Pieter Hijma
381cb92f0a [Core] Add visibility toggling to ViewProvider
With this extension of the API, view providers can indicate whether
document objects should be able to be toggled for visibility.  There is
both a C++ and Python interface, idiomatic for FreeCAD code.
2025-04-05 15:57:09 +02:00
Kacper Donat
12a69fe296 Base: Add isNullOrEmpty string helper
This adds isNullOrEmpty string helper that cheks if string is... well
null or empty. It is done to improve readability of the code and better
express intent.
2025-02-21 15:04:43 +01:00
tritao
3b47599e43 Gui: Minor cleanups. 2025-02-05 22:13:07 +00:00
João Matos
6222b935f0 Gui: Scene inspector improvements (#18781)
* Improve naming for root scene graph switch/separator nodes.

* Improve scene graph inspector.

This commit improves the scene graph inspector by improving the UI
layout and displaying information in a more human-readable way.

Instead of having a main generic string column for all node-specific
data, introduce specific columns for node name, memory address and data.

Better visualization was also added for `SoDrawStyle`, `SoPickStyle`
and `SoCoordinate3` node types.
2025-01-13 21:38:41 -06:00
Kacper Donat
1df3b5be6c Gui: Rework TaskCSysDragger into new Transform Dialog
This commit refactor ViewProviderDragger and TaskCSysDragger to be more
modern and to support selecting TransformOrigin.
2025-01-04 16:32:52 +01:00
wmayer
f7da5f8505 Core: Implement SoFCTransform node
In its doAction() method it only sets the model matrix if it's not the identity matrix.
This improves the issue #7606
2024-11-28 19:31:44 +01:00
liukaiwen
4c6b7dadeb refactor: move some nodes to Inventor folder 2024-07-20 01:07:04 +08:00
PaddleStroke
3e2bc7ad3d Core: Tree / ViewProvider : Add canDragObjectToTarget 2024-07-15 17:53:02 +02:00
PaddleStroke
62cc8fc944 Core: ViewProvider: Add claimChildrenRecursive 2024-06-25 11:34:43 +02:00
wmayer
db314cfaeb Gui: fix drag and drop of ViewProvider
* ViewProvider::canDragAndDropObject should only return true if an extension handles drag and drop
  Currently it returns true if no extension is available
* ViewProvider::dropObject shouldn't throw an exception if no extension handles drag and drop

As an example consider https://forum.freecad.org/viewtopic.php?t=82957
When selecting two objects then ViewProvider::dropObject is called twice. But for the first call both objects are moved to the destination
and for the second call no extension handles drag and drop any more. This incorrectly leads to a thrown exception.
2023-11-27 11:07:29 -06:00
wmayer
56820718c5 Core: Revert superfluous changes made with PR #9521 2023-10-09 15:06:45 +02:00
AgCaliva
39dcb1da7b Merge Master 2023-08-30 16:24:16 -03:00
wmayer
5a153e50ff Gui: modernize C++: use default member init 2023-08-23 19:51:44 +02:00
wmayer
54bb9c9c62 Gui: modernize C++: return braced init list 2023-08-18 00:36:24 +02:00
wmayer
2725c3a54f Gui: modernize C++: use range-based for loop 2023-08-14 19:42:18 +02:00
AgCaliva
0c4ef0e106 merge master 2023-08-08 23:29:40 -03:00
wmayer
d150fa7164 modernize C++: avoid bind
In many cases std::bind() is kept because the code is much simpler
2023-08-08 21:10:16 +02:00
AgCaliva
52c55f59a8 Implementing agnostic version of ParameterGrp for reading XML, replacing XMLReader from src/Base/reader.cpp with new class DocumentReader 2023-06-16 15:36:43 -03:00
wmayer
b3372a5205 Gui: [skip ci] fix several warnings reported by GH Actions 2022-11-06 15:53:18 +01:00
marioalexis
0382f276a2 Gui: Replace C cast 2022-09-18 11:06:51 -05:00
berniev
75acacd1b7 Gui: Use auto and range-based for (#7481)
* On lines where the variable type is obvious from inspection, avoid repeating the type using auto. 
* When possible use a ranged for loop instead of begin() and end() iterators
2022-09-14 13:25:13 -05:00
wmayer
ba8d5ab055 Gui: modernize C++: replace 'typedef' with 'using' 2022-08-29 14:09:18 +02:00
berniev
656ef8961f Gui: redundant void 2 2022-08-08 10:21:44 +02:00
berniev
d88729d2c4 Gui: use empty 2022-08-06 16:35:45 +02:00
wmayer
9b2b0e0acf modernize C++: replace boost::function with std::function 2022-06-30 20:31:55 +02:00
wmayer
779128b5f4 Gui: get rid of some const_cast 2022-06-28 15:26:02 +02:00
wmayer
e9890c0798 Gui/Mod: replace several reinterpret_cast with static_cast 2022-06-25 11:36:55 +02:00
Zheng, Lei
3ef438eaf0 Fix mixed line endings 2022-04-26 12:52:55 -05:00
Chris Hennes
bedf920702 Gui: PR6497 move return statement to new line 2022-03-29 12:33:50 -05:00
wmayer
96adb98f46 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
Abdullah Tahiri
85cf3ca514 Gui: Pass wheel event to viewprovider
=====================================

https://forum.freecadweb.org/viewtopic.php?p=578857#p578857
2022-03-13 11:33:52 +01:00
Uwe
9654786c67 [Gui] Quarter: remove unused includes 2022-03-09 01:12:15 +01:00
Uwe
f706adc2c2 [Gui] ViewProviderDocument* etc.: remove unused includes 2022-03-06 00:01:37 +01:00
Yorik van Havre
04eecd0c92 Merge pull request #4178 from uLeonis/master
[v0.20][Gui] Consolidate Std view modes
2021-09-09 12:22:27 +02:00
wmayer
7c708eeca3 Gui: [skip ci] add convenience function updateActions() to Application
Use updateActions() in ViewProvider::onChanged() to also trigger an update on pure view property changes
2021-02-09 15:21:17 +01:00
Abdullah Tahiri
87c9f83bd6 Gui: Colorful/Greyable overlay status in icons
===============================================

Before this implementation, specific status via former mergeOverlayIcon() was greyed out
with the visibility.

With this commit, the developer has two options:

a) override mergeGreyableOverlayIcons, in which case the overlay will
be greyed out when the item is greyed out as per former mergeOverlayIcon()

b) override mergeColorfulOverlayIcons, in which case the overlay will
be superimposed after the icon is greyed out as it is the case for stardard
error and recompute flags.
2021-01-06 13:54:00 +01:00
Marcel Althaus
3abc60f1a2 Code cleanup. 2020-12-21 19:40:38 +01:00
uLeonis
96f2ba2cb5 MeasureDistance
- Abort mode via ESCAPE added

BoxZoom, BoxSelection and BoxElementSelection
- Change the cursor to give the user feedback about active mode.
- Abort mode via ESCAPE
2020-12-21 17:32:33 +01:00
luz paz
298c677873 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00