Commit Graph

108 Commits

Author SHA1 Message Date
Rexbas
a01818a0c5 Gui: Prevent showing the context menu after dragging, panning or zooming 2024-01-24 21:02:25 +01:00
Rexbas
3e21fb9626 Gui: Only show context menu if not dragged in TinkerCAD navigation style 2023-12-26 22:03:02 +01:00
Rexbas
be09701e8b Gui: Show context menu on right click in OpenSCAD navigation style if not panned 2023-12-26 12:00:20 +01:00
wmayer
f8c3e5505a Gui: fix several lint warnings 2023-12-04 10:53:51 -06:00
wmayer
e8d6955908 Gui: refactor FCSphereSheetProjector 2023-12-04 10:53:51 -06:00
Bas Ruigrok
ea8b5b4b39 Gui: Add a separate checkbox for enabling spinning animations (#11534)
* Gui: Create group box for animation preferences

* Gui: Add spinning animation checkbox

* Gui: Implement isAnimating() for NavigationAnimator

* Gui: No need to enable animations in DemoMode

The spin animation is played regardless of the user preference and does not need to be enabled before starting the spin animation

* Gui: Change comment
2023-12-04 10:50:29 -06:00
Rexbas
21f10dd36b Gui: Find scene bounding sphere after zoom 2023-11-25 09:40:49 +01:00
Rexbas
affc49049e Gui: Update rotation center indicator after zoom 2023-11-24 22:43:48 +01:00
Rexbas
b7cb40a414 Gui: Find bounding sphere after showing rotation center 2023-11-12 14:42:45 +01:00
Rexbas
0309be88d1 Gui: Find bounding sphere before drag or animation 2023-11-10 22:33:41 +01:00
Rexbas
93468a5e0b Gui: Fix window center rotation mode and orthographic view clipping 2023-11-10 19:43:36 +01:00
Rexbas
54adf6fbd7 Gui: Hide rotation center when in spinning mode 2023-10-28 11:04:51 +02:00
Rexbas
796c2189e4 Gui: Apply Law of Demeter to starting and stopping animations 2023-10-25 11:17:55 +02:00
Rexbas
0f58c723b6 Gui: Bring back removed lookAtPoint(SbVec3f&) 2023-10-25 11:17:55 +02:00
Rexbas
0441ea10fc Gui: Refactor navigation animations
- Animations are played through an Animator
- Standard animations have a fixed duration and inherit from QVariantAnimation
- The animation duration can be changed in the preferences
- Fix animations when using the two arrows above the NaviCube
- Start an animation or start and wait for an animation
- Replaces standard camera animations (e.g. by selecting standard views or NaviCube) with FixedTimeAnimation
- Replace View3DInventorViewer's CameraAnimation with FixedTimeAnimation
- Replace OpenInventor navigation style infinite spin animation with SpinningAnimation
- Stops an active animation when a new animation is started
- Stops an active animation when the user starts dragging, panning or zooming
- Refactor reorientCamera so it can be used in animations
- Enable animations by default
2023-10-25 11:17:55 +02:00
Yorik van Havre
f1fb45960d Revert "Gui: Refactor navigation animations" 2023-09-26 19:44:16 +02:00
Rexbas
dc216cde2a Gui: Refactor navigation animations
- Animations are played through an Animator
- Standard animations have a fixed duration and inherit from QVariantAnimation
- The animation duration can be changed in the preferences
- Fix animations when using the two arrows above the NaviCube
- Start an animation or start and wait for an animation
- Replaces standard camera animations (e.g. by selecting standard views or NaviCube) with FixedTimeAnimation
- Replace View3DInventorViewer's CameraAnimation with FixedTimeAnimation
- Replace OpenInventor navigation style infinite spin animation with SpinningAnimation
- Stops an active animation when a new animation is started
- Stops an active animation when the user starts dragging, panning or zooming
- Refactor reorientCamera so it can be used in animations
- Enable animations by default
2023-09-04 21:43:41 +02:00
wmayer
6beace8da6 Gui: modernize C++: use default member init 2023-08-23 19:51:44 +02:00
wmayer
888a33917d Gui: modernize C++: use equals default 2023-08-20 18:12:43 +02:00
wmayer
fa8978ce99 Gui: modernize C++: return braced init list 2023-08-18 00:36:24 +02:00
Rexbas
20c462f45a Gui: Improve object center rotation mode 2023-08-16 16:02:32 -05:00
Rexbas
a67fca83c6 Set rotation center for WindowCenter mode 2023-07-11 21:35:19 +02:00
Rexbas
b0dbdfc74b Add visual indication for the rotation center 2023-07-11 17:33:47 +02:00
Jolbas
7fdfdcde49 Fix clipping near camera in orthogonal view
Fix #6836
2023-05-31 20:10:28 -04:00
Nabos
0c267efb30 Gui: Added FreeTurntable orbit style (#8048)
* Added FreeTurntable orbit style
2022-12-20 03:21:46 +01:00
wmayer
43d2fd2da9 Gui/Sketcher: disable geometry deselection when user holds Ctrl or additionally Shift or Alt 2022-11-05 22:56:38 +01:00
Paddle
90d78a9ef5 Base: + Sketcher: disable deselection when user holds Ctrl. 2022-11-04 10:44:52 -05:00
0penBrain
53a7e22d0c Gui: remove hardcoded functions from NavigationStyle 2022-09-28 17:29:11 +02:00
marioalexis
ff1b4eff05 Gui: Replace C cast 2022-09-18 11:06:51 -05: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
wmayer
23961706be Gui: modernize C++: replace 'typedef' with 'using' 2022-08-29 14:09:18 +02:00
berniev
75fa455c5d Gui: Use override etc 2 2022-08-09 12:43:23 +02:00
Uwe
c40e476a5b [Gui] remove some more superfluous nullptr checks 2022-07-18 13:15:38 +02:00
Uwe
d5b227e6a6 [Gui] remove more superfluous nullptr checks 2022-07-18 03:34:22 +02:00
andrea
7886d3cbf4 Remove unused code into GUI 2022-07-17 03:53:11 +02:00
wmayer
d5340a82ab Gui/Mod: replace several reinterpret_cast with static_cast 2022-06-25 11:36:55 +02:00
Chris Hennes
5df3dbae6f Gui: PR6497 move return statement to new line 2022-03-29 12:33:50 -05:00
wmayer
1178df06b4 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
Uwe
29ccaee7fd [Gui] NavigationStyle: only include the actually used inventor files 2022-03-17 20:54:30 +01:00
Abdullah Tahiri
6397201dc0 Gui: Pass wheel event to viewprovider
=====================================

https://forum.freecadweb.org/viewtopic.php?p=578857#p578857
2022-03-13 11:33:52 +01:00
Uwe
efa589c7c5 [Gui] Navigation styles: remove unused includes 2022-03-03 02:25:21 +01:00
Uwe
36b3ac81d2 [Gui] remove more unused headers 2022-02-19 04:04:14 +01:00
wmayer
befd78afd1 Gui: move handling of SoMouseWheelEvent to its own handler function 2021-11-05 21:37:19 +01:00
wmayer
3dcbceda3a C++11: modernize use nullptr (replaces NULL or 0) 2021-11-05 18:16:19 +01:00
wmayer
ef598dd1e3 Gui: add method NavigationStyle::processClickEvent() to reduce code duplication in sub-classes 2021-11-05 14:37:18 +01:00
wmayer
fbca4b10f2 Gui: [skip ci] rename handleKeyboardEvent to processKeyboardEvent 2021-11-05 12:58:36 +01:00
wmayer
5bd156066e Gui: [skip ci] replace getNormalizedPosition() with normalizePixelPos() 2021-11-02 19:06:12 +01:00
wmayer
0c59884e83 Gui: [skip ci] add method NavigationStyle::getNormalizedPosition() to reduce code duplication 2021-11-02 15:57:54 +01:00
wmayer
3b7a758563 Gui: [skip ci] add method NavigationStyle::handleKeyboardEvent() to achieve consistent handling and reduce code duplication 2021-11-02 15:32:20 +01:00
wmayer
4c1ddafb15 Gui: [skip ci] add method NavigationStyle::syncModifierKeys() to reduce code duplication 2021-11-02 14:52:22 +01:00