Commit Graph

223 Commits

Author SHA1 Message Date
andrea
3018985f80 Remove unused code into GUI 2022-07-17 03:53:11 +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
Uwe
c23a30b916 [Gui] remove unnecessary Boolean comparisons 2022-06-19 15:17:01 +02:00
marioalexis
c00699b15d Gui: Prevent crash when trying to delete pointer to BaseClass 2022-05-24 13:28:14 +02:00
wmayer
d1f5bb02fc Gui: [skip ci] reduce duplicated code 2022-04-12 13:55:18 +02:00
wmayer
f630844ad6 Gui: add convenience function View3DInventorViewer::getBoundingBox() 2022-04-12 13:43:58 +02:00
wmayer
aea110ba15 Gui: clean-up Selection API
Replace the int of the SubType of SelectionChanges with an enum class.
The meaning of it is nowhere documented and some magic numbers like 0,1,2 are used in several places in the code.
2022-04-09 23:07:02 +02:00
wmayer
9eac35cf5d Gui: clean-up Selection API
Replace the int of the 'resolve' argument of several functions with a proper enum class.
* This avoids the inconsistencies in client code where often true/false is passed when an int is expected
* This avoids the use of magic numbers like 0, 1, 2 or the undocumented 3
2022-04-09 17:03:43 +02:00
Chris Hennes
bedf920702 Gui: PR6497 move return statement to new line 2022-03-29 12:33:50 -05:00
wmayer
97330443a2 All: modernize C++11
* replace deprecated headers
2022-03-23 22:44:18 +01:00
wmayer
96adb98f46 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
wmayer
a999a249e3 Qt: remove some more leftovers of Qt4 2022-03-19 23:27:28 +01:00
Uwe
568b752363 [Gui] add a necessary debug header
as reported: c4f5628899 (r68944028)
2022-03-17 20:30:25 +01:00
Uwe
c4f5628899 [Gui] So headers: remove unused includes
- also sort out some headers to be used in precompiled headers
- also move a boost header to precompiled headers
2022-03-16 02:01:32 +01:00
wmayer
68b92c504f Fix several coverity issues:
* CID 350617: Dereference after null check
* CID 350585: Out-of-bounds read
* CID 350624: Resource leak
* CID 332701: Uncaught exception
* CID 350642: Uninitialized scalar field
* CID 350590: Uninitialized scalar field
* CID 350629: Uninitialized scalar variable
* CID 350602: Uninitialized scalar variable
* CID 350564: Uninitialized scalar variable
* CID 350548: Uninitialized scalar variable
2022-03-13 12:12:49 +01:00
wmayer
1ca7429705 Gui: Optimize includes to reduce compile time 2022-03-07 20:29:18 +01:00
Uwe
7518dad67b [Gui] compilation fixes for non-PCH
the recent commits were done with PCH, this is the final commit of today's header work for PCH
2022-02-19 06:22:08 +01:00
Uwe
3b1280c587 [Gui] View3DPy and View3DInventorViewer: remove unused headers 2022-02-19 02:35:54 +01:00
wmayer
daf1269497 Gui: remove support of using deprecated Qt OpenGL API 2022-01-26 14:46:41 +01:00
wmayer
b6527a7098 Gui: add function View3DInventorViewer::projectPointToLine and expose to Python 2021-12-12 12:49:53 +01:00
wmayer
4dae213b45 Gui: harmonize classes View3DInventorViewer and View3DInventorPy 2021-12-12 11:33:04 +01:00
0penBrain
9d82286bc8 [Gui] Render corner cross lines with thin polygons so it can be scaled 2021-11-23 00:06:38 +01:00
0penBrain
513b49aa7e [Gui] Improve corner cross labels rendering by using larger antialiased pixmaps 2021-11-23 00:06:14 +01:00
0penBrain
3d32909302 [Gui] Render corner cross labels as pixel maps so they are scalable 2021-11-23 00:05:50 +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
72eceb91c6 Gui: remove WinNativeGestureRecognizers because this was a workaround for Qt4 under Windows 2021-04-02 11:47:12 +02:00
Chris Hennes
50c7ee36bf [GUI] Remove code for Qt < 5.9 2021-04-02 10:10:37 +02:00
wmayer
3d227cf717 Gui: [skip ci] fix issue found with -fsanitize-address-use-after-scope 2021-02-21 13:53:23 +01:00
wmayer
4af6c5a13e Gui: [skip ci] update standard cursors of 3d view when device pixel ratio changes (e.g. by moving between standard and high DPI monitor) 2021-01-19 19:19:30 +01:00
wmayer
254ed951f9 Gui: [skip ci] must set device pixel ratio to QBitmaps on Windows when using for cursor as otherwise garbage is shown 2021-01-18 15:20:57 +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
wmayer
99e9b4db1c Gui: [skip ci] Fix navigation styles
If a joystick is connected events of type Spaceball::MotionEvent might be emitted but the last saved mouse position is not passed to the SoMotion3Event and thus will lead to problems while panning.

See also: https://forum.freecadweb.org/viewtopic.php?f=3&t=50628 and https://github.com/FreeCAD/FreeCAD/pull/3902
2020-11-21 10:15:13 +01:00
wmayer
34f4b712d8 Qt5: fix deprecation warnings of QWheelEvent in Qt 5.15 2020-10-18 14:45:31 +02:00
wmayer
3a8a28ce92 Gui: [skip ci] Coverity: Uncaught exception 2020-09-14 17:21:50 +02:00
wmayer
dc65b055e5 LGTM: [skip ci] fix: Empty branch of conditional
An empty block after a conditional can be a sign of an omission and can decrease maintainability of the code.
Such blocks should contain an explanatory comment to aid future maintainers.
2020-07-26 15:49:14 +02:00
wmayer
43d9e82f97 Coverity: Uncaught exception 2020-07-20 17:34:26 +02:00
wmayer
9f890aa1a3 Gui: add comment 2020-07-09 19:59:24 +02:00
Zheng, Lei
4ce4177b2f Gui: disable COIN_AUTO_CACHING to work around coin3D bug 2020-07-09 19:57:48 +02:00
wmayer
419e8f7a99 [skip ci] fixes #0004309: The behavior of the Std_DrawStyle command is inconsistent when there are multiple 3D views for the active document. 2020-05-01 23:30:53 +02:00
wmayer
359d3a2b48 Gui: [skip ci] improve whitespaces 2020-04-06 19:50:08 +02:00
wmayer
d65d01b30d Gui: [skip ci] optimize View3DInventorViewer::containsViewProvider because it's sufficient to know if the root node of a view provider is part of the viewer or not 2020-04-02 16:08:47 +02:00
Zheng, Lei
0633abb70d Gui: refactor link property editor
PropertyLinkItem now support all major types of link property.
PropertyLinkListItem is no longer necessary, but kept for backward
compatible, which is now identical to PropertyLinkItem.

DlgPropertyLink, the link selection dialog, is now made modeless, so
that that user can select geometry sub-element directory from 3D view.
2020-02-11 15:40:27 -05:00
Zheng, Lei
5afd6a9641 Gui: fix screentshot 2020-01-14 15:59:38 +01:00
Zheng, Lei
7484738044 Gui: fix screenshot with opaque background 2020-01-12 18:50:37 +01:00
Zheng, Lei
20c85d9cc4 Gui: fix screenshot 2020-01-12 18:50:37 +01:00
wmayer
a9f820470b fix some const correctness 2019-12-29 17:13:18 +01:00
wmayer
eb4e2d2c56 Gui: add virtual method containsViewProvider to MDIView and re-implement it in some sub-classes
Improve Document::setActiveView to not always switch to the first 3D view but check the currently active view before
2019-12-29 15:00:35 +01:00
wmayer
bd36bcb22b [skip ci] scale grabbed image to defined width 2019-12-27 21:00:34 +01:00