Commit Graph

230 Commits

Author SHA1 Message Date
berniev
75fa455c5d Gui: Use override etc 2 2022-08-09 12:43:23 +02:00
Uwe
271b27b7df [Gui] fix typos
- fix a typo found by codespell
- rename variables to please codespell
2022-08-08 14:14:23 +02:00
berniev
3d1f70765a Gui: redundant void 2 2022-08-08 10:21:44 +02:00
berniev
2db561561e Gui: use empty 2022-08-06 16:35:45 +02:00
wmayer
3fddaf4a2f Fix several clazy issues:
* Q_PROPERTY should have either NOTIFY or CONSTANT [-Wclazy-qproperty-without-notify]
* Use Q_ENUM instead of Q_ENUMS [-Wclazy-qenums]
* Add missing a Q_OBJECT macro [-Wclazy-missing-qobject-macro]
* Signal/Slot arguments need to be fully-qualified [-Wclazy-fully-qualified-moc-types]
2022-07-24 19:03:30 +02:00
Uwe
d5b227e6a6 [Gui] remove more superfluous nullptr checks 2022-07-18 03:34:22 +02:00
wmayer
07ccb73fe7 Partially revert "Remove unused code into GUI" 2022-07-17 12:32:03 +02:00
andrea
7886d3cbf4 Remove unused code into GUI 2022-07-17 03:53:11 +02:00
wmayer
299c20e918 Gui: get rid of some const_cast 2022-06-28 15:26:02 +02:00
wmayer
d5340a82ab Gui/Mod: replace several reinterpret_cast with static_cast 2022-06-25 11:36:55 +02:00
Uwe
0828d769e8 [Gui] remove unnecessary Boolean comparisons 2022-06-19 15:17:01 +02:00
marioalexis
42f7be2a4a Gui: Prevent crash when trying to delete pointer to BaseClass 2022-05-24 13:28:14 +02:00
wmayer
f9ae829b3c Gui: [skip ci] reduce duplicated code 2022-04-12 13:55:18 +02:00
wmayer
0082a80148 Gui: add convenience function View3DInventorViewer::getBoundingBox() 2022-04-12 13:43:58 +02:00
wmayer
c84c2fb6eb 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
0b2c73cf32 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
5df3dbae6f Gui: PR6497 move return statement to new line 2022-03-29 12:33:50 -05:00
wmayer
d21a60b294 All: modernize C++11
* replace deprecated headers
2022-03-23 22:44:18 +01:00
wmayer
1178df06b4 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
wmayer
e28f2a0c47 Qt: remove some more leftovers of Qt4 2022-03-19 23:27:28 +01:00
Uwe
ca40cec068 [Gui] add a necessary debug header
as reported: 2a49e389b2 (r68944028)
2022-03-17 20:30:25 +01:00
Uwe
99191c6679 [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
5fd93b7d3b 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
8f786ea6ef Gui: Optimize includes to reduce compile time 2022-03-07 20:29:18 +01:00
Uwe
8a0e6dd587 [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
83d5c787da [Gui] View3DPy and View3DInventorViewer: remove unused headers 2022-02-19 02:35:54 +01:00
wmayer
a87e33258d Gui: remove support of using deprecated Qt OpenGL API 2022-01-26 14:46:41 +01:00
wmayer
c111009ea6 Gui: add function View3DInventorViewer::projectPointToLine and expose to Python 2021-12-12 12:49:53 +01:00
wmayer
94a881f829 Gui: harmonize classes View3DInventorViewer and View3DInventorPy 2021-12-12 11:33:04 +01:00
0penBrain
e998f61d2c [Gui] Render corner cross lines with thin polygons so it can be scaled 2021-11-23 00:06:38 +01:00
0penBrain
f6337f6e79 [Gui] Improve corner cross labels rendering by using larger antialiased pixmaps 2021-11-23 00:06:14 +01:00
0penBrain
8890b59f09 [Gui] Render corner cross labels as pixel maps so they are scalable 2021-11-23 00:05:50 +01:00
Yorik van Havre
b84c2c7f09 Merge pull request #4178 from uLeonis/master
[v0.20][Gui] Consolidate Std view modes
2021-09-09 12:22:27 +02:00
wmayer
37eb08380a Gui: remove WinNativeGestureRecognizers because this was a workaround for Qt4 under Windows 2021-04-02 11:47:12 +02:00
Chris Hennes
098d7b9aee [GUI] Remove code for Qt < 5.9 2021-04-02 10:10:37 +02:00
wmayer
786955e022 Gui: [skip ci] fix issue found with -fsanitize-address-use-after-scope 2021-02-21 13:53:23 +01:00
wmayer
73f10fab47 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
8924bd4734 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
cbe1050441 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
38815b9550 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
wmayer
4608e9bc0a 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
2647987157 Qt5: fix deprecation warnings of QWheelEvent in Qt 5.15 2020-10-18 14:45:31 +02:00
wmayer
d16c35a17d Gui: [skip ci] Coverity: Uncaught exception 2020-09-14 17:21:50 +02:00
wmayer
e9ce75d544 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
1a34d3da1f Coverity: Uncaught exception 2020-07-20 17:34:26 +02:00
wmayer
901c24fec3 Gui: add comment 2020-07-09 19:59:24 +02:00
Zheng, Lei
f00a15b0ea Gui: disable COIN_AUTO_CACHING to work around coin3D bug 2020-07-09 19:57:48 +02:00
wmayer
bb55427ca2 [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
3c52ff6c7f Gui: [skip ci] improve whitespaces 2020-04-06 19:50:08 +02:00
wmayer
7b194bfe9f 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