Commit Graph

93 Commits

Author SHA1 Message Date
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
wmayer
5b3bf97f2b Gui: [skip ci] replace getNormalizedPosition() with normalizePixelPos() 2021-11-02 19:06:12 +01:00
wmayer
bec3c797a8 Gui: [skip ci] add method NavigationStyle::getNormalizedPosition() to reduce code duplication 2021-11-02 15:57:54 +01:00
wmayer
0b802eb717 Gui: [skip ci] add method NavigationStyle::handleKeyboardEvent() to achieve consistent handling and reduce code duplication 2021-11-02 15:32:20 +01:00
wmayer
1c93d3ee15 Gui: [skip ci] add method NavigationStyle::syncModifierKeys() to reduce code duplication 2021-11-02 14:52:22 +01:00
uLeonis
96f2ba2cb5 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
cb58706e80 Fix various typos [skip ci]
Found via `codespell v2.1.dev0`  
```
codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,apoints,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml
```
2020-12-12 08:07:47 +01:00
wmayer
0eba78d400 Gui: [skip ci] support of bitmasks for enum RotationCenterMode 2020-11-29 11:43:51 +01:00
wmayer
5e83aa8848 Gui: [skip ci] in user settings offer combo box to choose between rotation modes 2020-11-28 22:12:25 +01:00
wmayer
4c9eca5623 Gui: [skip ci] replace dragAtCursor with new enum value WindowCenter 2020-11-28 17:31:42 +01:00
wmayer
c582e8a085 Gui: [skip ci] implement new RotationCenterMode called BoundingBoxCenter 2020-11-27 15:12:10 +01:00
luz paz
298c677873 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
wmayer
daa2590672 Gui: add SoTimerSensor.h to PCH 2020-09-04 10:36:13 +02:00
wmayer
4b7e64381c Gui: avoid code duplication in NavigationStyle and remove superfluous doZoom_wheel method 2020-08-22 18:44:47 +02:00
DeepSOIC
b200801ebc Gui: use SoMouseWheelEvent in navigation styles 2020-08-22 17:15:02 +02:00
wmayer
dc65b055e5 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
b50b21576e core system
force strict ISO C++ (-Wpedantic)
TODO: still a lot of variadic macros are not valid ISO C++
2019-09-18 01:01:14 +02:00
wmayer
f581d5c8cb PVS: V560 A part of conditional expression is always true 2019-02-17 13:56:48 +01:00
wmayer
ff6ed27ba9 replace boolean to check for inside/outside cutting with enum values 2018-09-18 18:25:51 +02:00
wmayer
4686f27f64 fix -Wimplicit-fallthrough 2018-08-19 12:35:57 +02:00