Commit Graph

25 Commits

Author SHA1 Message Date
Benjamin Nauck
17dc7fce06 Gui: Add #include <limits> where used 2025-03-31 23:50:37 +02:00
Benjamin Nauck
34bc1d45ea Gui: Use std::numeric_limits and std::numbers instead of defines 2025-03-29 13:32:38 +01:00
Benjamin Nauck
cb4ee4737d Simplify logic using freecad_dynamic_cast 2025-01-27 16:08:19 +01:00
wwmayer
977e13795a Gui: Prepare for clang-format (#16051)
* Gui: Prepare for clang-format

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-02 17:48:55 +02: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
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
wmayer
3433ce70a6 Gui: fix automatic spinning of DemoMode 2023-09-26 15:41:12 +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
457fac38dd Gui: fix -Wclazy-connect-by-name 2023-04-05 00:44:13 +02:00
wmayer
2e5cb03261 Gui: move to new style connect() 2023-02-01 13:49:35 +01:00
Uwe
8801836321 [Gui] modernize some UI connections 2023-01-30 18:11:37 -07: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
Chris Hennes
bedf920702 Gui: PR6497 move return statement to new line 2022-03-29 12:33:50 -05:00
Uwe
fccb743fd6 [Gui] DockWindow and DemoMode: remove unused includes 2022-03-04 03:37:44 +01:00
luz paz
298c677873 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
wmayer
82c17b35cb use same button to start/stop animation of turntable 2019-07-20 20:31:36 +02:00
wmayer
f581d5c8cb PVS: V560 A part of conditional expression is always true 2019-02-17 13:56:48 +01:00
wmayer
f19d424d8b fix -Wextra in FreeCADGui 2016-09-21 20:54:52 +02:00
wmayer
a830b8feb3 improve whitespaces 2016-08-24 19:08:45 +02:00
Mateusz Skowroński
3b463f2138 Qt::WFlags is obsolete in Qt5. Replace it with Qt::WindowFlags.
This change is Qt4/Qt5 neutral.
2016-01-05 16:07:58 +01:00
Stefan Tröger
72cab0c002 Adaption of FreeCAD to QuarterWidget
-removes all soqtviewer references
-create a quarter adaptor class which implements missing functionality
-adopts freecad code to make use of SoRenderManager and changed View3DInventorViewer  interface
2014-09-23 10:11:11 +02:00
wmayer
0361730d98 + do not reset viewing mode when animating 3d view 2013-07-01 12:50:00 +02:00
wmayer
9e546120bc 0000920: Hide turntable dialog when in fullscreen mode 2013-06-30 19:07:41 +02:00
wmayer
120ca87015 + unify DLL export defines to namespace names
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 13:44:52 +00:00