Commit Graph

240 Commits

Author SHA1 Message Date
Paddle
e0b1117701 Core: View3DInventorViewer, add 3 functions:
- getDimensions
- getMaxDimension()
- getCenterPointOnFocalPlane()
2023-02-25 23:13:55 +01:00
wmayer
9dc366f817 Gui: fix regression that NaviCube cannot be switched off any more 2023-02-07 22:16:09 +01:00
wmayer
8d42b6f93c Gui: move to new style connect() 2023-02-01 13:49:35 +01:00
Uwe
707b7efeda [Gui] View3DInventorViewer: fix a GH action report
- use sizeof instead of the hardcoded number
2023-01-29 09:38:16 -07:00
Uwe
5fdd405a69 [Gui] allow to specify font for NaviCube
- the problem is that depending on the OS, the font of the NaviCube is hardly readable. For example under Windows 11, there is no Helvetica font and therefore an ugly replacement font is used. On some laptop screens the font is too large or too small etc.
- as solution this PR add the change the NaviCube's font and font size

- the PR also fixes an issue that the position (corner) of the NaviCube was not respected when the NaviCube is recreated. This fix is necessary for the PR therefore included

- as by-product the PR fixes #8082 since every change in the preferences now properly recreates the NaviCube

- the PR also removes the strange and unused class "HuuhaaClassPy"
2023-01-27 02:23:46 +01:00
wmayer
1fcd62f213 Gui: [skip ci] print warning in getViewProviderByPath, getViewProviderByPathFromTail, getViewProvidersOfType if for View3DInventorViewer no document is set
This gives the client programmer a clue if one of the mentioned methods fails
2023-01-10 17:46:05 +01:00
wmayer
184afd9761 Gui: fix View3DInventorViewer's getViewProviderByPath, getViewProviderByPathFromTail, getViewProvidersOfType
The View3DInventorViewer only contains the top-level view providers which caused unexpected behaviour when using the three methods above. Thus, in client code they haven't been used any more.
Now the methods internally invoke the corresponding methods of the document. This allows it in client code to directly call the appropriate methods again (LoD).
2022-12-12 16:41:58 +01:00
wmayer
308cf4ffb0 Gui: code-refactoring
Split selection handling from View3DInventorViewer and move to View3DInventorSelection
2022-11-16 20:27:14 +01:00
wmayer
641d3ba35c Gui: determine the view size of the focal plane in perspective mode 2022-11-10 13:34:59 +01:00
berniev
ae53c9b0a4 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
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