Commit Graph

112 Commits

Author SHA1 Message Date
xtemp09
abb362f83a Fix the crash involving context menu
Closes #13637.
2024-08-05 11:43:56 -04:00
Bas Ruigrok
0001879be0 Gui: Fix rotation mode for Gesture style 2024-06-04 21:57:15 +02:00
Bas Ruigrok
5ba93dd9f0 Gui: Improve lookAtPoint (#13556)
* Gui: Rename NavigationStyle::pan to setupPanningPlane

* Gui: Replace duplicate code with NavigationStyle::setupPanningPlane

* Gui: Use panning plane when hit point not found in lookAtPoint

Also enables navigation animations when pressing MMB while the mouse is not over an object

* Gui: Remove unused methods
2024-05-06 10:45:14 -05:00
mos
a025af2d26 removed deprecaded functions
.

.
2024-02-26 17:38:01 +01:00
Rexbas
dfa20b4648 Gui: Prevent showing the context menu after dragging, panning or zooming 2024-01-24 21:02:25 +01:00
Rexbas
286ebec851 Gui: Only show context menu if not dragged in TinkerCAD navigation style 2023-12-26 22:03:02 +01:00
Rexbas
8588335c7f Gui: Show context menu on right click in OpenSCAD navigation style if not panned 2023-12-26 12:00:20 +01:00
wmayer
d9f680f901 Gui: fix several lint warnings 2023-12-04 10:53:51 -06:00
wmayer
0d079c885c Gui: refactor FCSphereSheetProjector 2023-12-04 10:53:51 -06:00
Bas Ruigrok
9e2577bce7 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
2a91413742 Gui: Find scene bounding sphere after zoom 2023-11-25 09:40:49 +01:00
Rexbas
72c69ce2f0 Gui: Update rotation center indicator after zoom 2023-11-24 22:43:48 +01:00
Rexbas
cafede514a Gui: Find bounding sphere after showing rotation center 2023-11-12 14:42:45 +01:00
Rexbas
a740632616 Gui: Find bounding sphere before drag or animation 2023-11-10 22:33:41 +01:00
Rexbas
e327a3fd40 Gui: Fix window center rotation mode and orthographic view clipping 2023-11-10 19:43:36 +01:00
Rexbas
870ca64654 Gui: Hide rotation center when in spinning mode 2023-10-28 11:04:51 +02:00
Rexbas
61c1b2bfc2 Gui: Apply Law of Demeter to starting and stopping animations 2023-10-25 11:17:55 +02:00
Rexbas
7bb97c1882 Gui: Bring back removed lookAtPoint(SbVec3f&) 2023-10-25 11:17:55 +02:00
Rexbas
37e600e766 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
ffd66cf826 Revert "Gui: Refactor navigation animations" 2023-09-26 19:44:16 +02:00
Rexbas
9fed764368 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
5a153e50ff Gui: modernize C++: use default member init 2023-08-23 19:51:44 +02:00
wmayer
c016f1c1fb Gui: modernize C++: use equals default 2023-08-20 18:12:43 +02:00
wmayer
54bb9c9c62 Gui: modernize C++: return braced init list 2023-08-18 00:36:24 +02:00
Rexbas
fcbee3ad49 Gui: Improve object center rotation mode 2023-08-16 16:02:32 -05:00
Rexbas
579e2ee6ea Set rotation center for WindowCenter mode 2023-07-11 21:35:19 +02:00
Rexbas
7fe3e1bd5d Add visual indication for the rotation center 2023-07-11 17:33:47 +02:00
Jolbas
3b92ebea3a Fix clipping near camera in orthogonal view
Fix #6836
2023-05-31 20:10:28 -04:00
Nabos
9cda82cf20 Gui: Added FreeTurntable orbit style (#8048)
* Added FreeTurntable orbit style
2022-12-20 03:21:46 +01:00
wmayer
d119c1c7a5 Gui/Sketcher: disable geometry deselection when user holds Ctrl or additionally Shift or Alt 2022-11-05 22:56:38 +01:00
Paddle
eeddcfd2aa Base: + Sketcher: disable deselection when user holds Ctrl. 2022-11-04 10:44:52 -05:00
0penBrain
63c7e62c79 Gui: remove hardcoded functions from NavigationStyle 2022-09-28 17:29:11 +02: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
0c70d45c83 Gui: Use override etc 2 2022-08-09 12:43:23 +02:00
Uwe
3e99d39d05 [Gui] remove some more superfluous nullptr checks 2022-07-18 13:15:38 +02:00
Uwe
1d95c26e2e [Gui] remove more superfluous nullptr checks 2022-07-18 03:34:22 +02:00
andrea
3018985f80 Remove unused code into GUI 2022-07-17 03:53:11 +02:00
wmayer
e9890c0798 Gui/Mod: replace several reinterpret_cast with static_cast 2022-06-25 11:36:55 +02: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
Uwe
00461a7aff [Gui] NavigationStyle: only include the actually used inventor files 2022-03-17 20:54:30 +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
9df3059d3b [Gui] Navigation styles: remove unused includes 2022-03-03 02:25:21 +01:00
Uwe
3f4e7e7df7 [Gui] remove more unused headers 2022-02-19 04:04:14 +01:00
wmayer
916fe37a6b Gui: move handling of SoMouseWheelEvent to its own handler function 2021-11-05 21:37:19 +01:00
wmayer
4a1c1c7004 C++11: modernize use nullptr (replaces NULL or 0) 2021-11-05 18:16:19 +01:00
wmayer
528ffce593 Gui: add method NavigationStyle::processClickEvent() to reduce code duplication in sub-classes 2021-11-05 14:37:18 +01:00
wmayer
5b023b0af5 Gui: [skip ci] rename handleKeyboardEvent to processKeyboardEvent 2021-11-05 12:58:36 +01:00