Commit Graph

49 Commits

Author SHA1 Message Date
berniev
6ac4d8392e Gui: use emplace_back 2022-08-05 10:33:41 +02:00
Uwe
1d95c26e2e [Gui] remove more superfluous nullptr checks 2022-07-18 03:34:22 +02:00
Uwe
f256e3caf4 [Gui] attempt to improve NaviCube rendering
When the NaviCube is relatively small, it looks clumsy on some screens. This PR tries to improve that.
2022-06-08 01:06:15 +02:00
Uwe
f60e20ef98 [skip CI] [Gui] NaviCube.cpp revert a change
from commit f70329390c since the intended fix is not universal for all cube sizes, therefore leave the old pen width as compromise that obviously worked well

(as strange as it is, restarting FC brings me everytime a different border width)
2022-05-12 06:43:29 +02:00
Uwe
84feca0521 [skip CI] [Gui] NaviCube.cpp code cleanup
- fix a typo
- uniform a variable name
- style and whitespace fixes by MSVC
2022-05-12 06:37:12 +02:00
Uwe
f70329390c [Gui] NaviCube: fix #6689
- this is almost #6848 plus some changes suggested by @Jolbas in #6839 to get rid of some magic numbers

changes to:
- the default border width of 1.5 looked clumsy, therefore reduced to 1.1
- fix pen for SHAPE_CORNER (still not optimal, see comment in #6839)
2022-05-12 05:55:48 +02:00
wmayer
2a559df2cd Gui: [skip ci] a couple of IDEs or editors struggle with the degree symbol in the comment, replace it with 'deg' 2022-05-02 13:17:50 +02:00
wmayer
254a1c5645 Gui: issue #6306 was fixed with be2ddb37a6 but this doesn't work on high DPI monitors.
This commit fixes that now
2022-05-02 12:54:07 +02:00
wmayer
46cf94e20f Gui: fixes issue #6766: Navigation Cube -> Isometric View does not work 2022-04-19 19:06:45 +02:00
wmayer
be2ddb37a6 Gui: fixes #6306: UI Rotation box can be dragged out of view 2022-04-18 16:31:10 +02:00
wmayer
97330443a2 All: modernize C++11
* replace deprecated headers
2022-03-23 22:44:18 +01:00
wmayer
96adb98f46 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
Uwe
bd77ff03ce [skip ci] [Gui] fix a typo 2022-03-12 19:19:16 +01:00
Uwe
3f4e7e7df7 [Gui] remove more unused headers 2022-02-19 04:04:14 +01:00
wmayer
daf1269497 Gui: remove support of using deprecated Qt OpenGL API 2022-01-26 14:46:41 +01:00
wmayer
fe7f4c4be7 Gui: remove QT_TR_NOOP from command group names and use "CommandGroup" as context string 2021-09-29 16:31:55 +02:00
donovaly
8fb567291d [Gui] fix a NaviCube Corner
fixes a copy/paste issue of commit f525904c1b
2021-03-30 12:10:15 +02:00
wmayer
f525904c1b Gui: concatenate rotations and apply the result once at the end 2021-03-29 18:29:44 +02:00
donovaly
23747f9d11 fix animation issue
SO's auto rotation has its own rotation logic that ends at fixed positions. This collides with the "to nearest" option whose aim is to rotate to the next sensible state taking into account from what position the rotation was started.

Thus the solution is to disable SO's auto rotation while the cube is rotated.
2021-03-29 17:11:50 +02:00
donovaly
e58ee299d4 [Gui] improving NaviCube
fixes bug 4495

- add missing edge faces
- implement a proper rotation recipe -> rotate towards the nearest possible state
- add preferences settings to turn off this new rotation behavior
- get rid of transparent cube faces to avoid wrong clicks, this way also remove the backfaces
- to make the edge faces fit, use triangles for the corners
- expose cube size setting to preferences dialog
- add new button to view backside
- get rid of bitmaps because as reported in https://forum.freecadweb.org/viewtopic.php?f=3&t=52118&start=20#p481781
the x y z labels are not scaled on HiDPI screens
moreover they are often "in they way" when you want to click on a corner and in principle they don't provide more info since we already have the CS with the axis labels

- also fix an arithmetic overflow compiler warning
- also rename 2 variables
2021-03-29 17:11:34 +02:00
Benjamin Nauck
0d49525798 Gui: Auto update NaviCube when changing preferences 2021-03-09 17:27:48 +01:00
luz paz
298c677873 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
wmayer
27b6066beb clang/gcc/cmake: move handling of suppressed deprecated-copy warnings from source file to CMake file to more easily support gcc 10 2020-06-09 15:30:42 +02:00
wmayer
300e887480 Handle clang 10 warnings:
+ fix -Wtautological-bitwise-compare
+ fix -Wimplicit-int-float-conversion
+ fix -Wmisleading-indentation
+ fix -Wrange-loop-construct
+ suppress -Wdeprecated-copy of 3rd party libs
2020-05-25 15:34:43 +02:00
triplus
1090da622a NaviCube fix compiler warning
Forum discussion:

https://forum.freecadweb.org/viewtopic.php?f=10&t=45012
2020-04-21 10:20:01 +02:00
triplus
2241d0d112 NaviCube - tweaks and new parameters
By default navigation cube text now has more weight and CS axes are slightly shifted. A few additional parameters have been added, for being able to customize navigation cube offset, colors, font and visibility of CS. Parameters are consolidated under NaviCube group. Customization front-end, making use of this new parameters, will be added to CubeMenu module in the following days:

https://forum.freecadweb.org/viewtopic.php?f=34&t=43338
2020-03-24 11:12:54 +01:00
UR-0
e66f86c661 introducing user parameters: BaseApp->Preferences->View->NaviFontStretch
BaseApp->Preferences->View->NaviTextFront
 BaseApp->Preferences->View->NaviTextRear
 BaseApp->Preferences->View->NaviTextTop
 BaseApp->Preferences->View->NaviTextBottom
 BaseApp->Preferences->View->NaviTextLeft
 BaseApp->Preferences->View->NaviTextRight
2020-02-05 10:55:40 +01:00
UR-0
3e5806cd68 introducing user parameter: BaseApp->Preferences->View->NaviWidgetSize 2020-02-05 10:55:40 +01:00
wmayer
390a0a2c51 Gui: [skip ci] handle possible division by zero in NaviCube 2020-02-03 14:39:54 +01:00
0penBrain
232987d0e3 [NaviCube]Fix error when 'NaviStepByTurn' parameter value leads to non-integer angle increment step 2020-01-27 10:05:41 +01:00
0penBrain
4ea3007776 [NaviCube] Add user parameter 'NaviStepsByTurn' to make customizable the rotation step increment 2020-01-22 10:28:13 +01:00
asapelkin
e951094af9 use emplace_back instead of push_back where justified 2019-11-21 14:48:09 +01:00
wmayer
17831b7934 [skip ci] line width must be explicitly set in NaviCube and SoFCSelectionRoot to avoid that an inappropriate value is used when set from somewhere else 2019-11-10 11:13:10 +01:00
Jakub Tyszkowski
5562d919d0 NaviCube: Improve the widget style
This resizes down the cube, adjusts transparency and
text readability. Arrows and cube corners sizes were
adjusted.
2019-04-11 11:57:36 -03:00
luz.paz
50c82c2b91 Misc. source comment typos 2019-03-22 10:44:14 -03:00
wmayer
9d87d13dd2 fixes 0003843: registration of pointer in navigation cube/cluster is off, makes clicking difficult (fixed by garya) 2019-02-20 17:39:53 +01:00
wmayer
abe82e00f4 harmonize functions to set camera orientations 2019-01-12 22:59:44 +01:00
wmayer
64a94ae0f7 implement Isometric, Dimetric and Trimetric projection 2019-01-10 18:31:17 +01:00
wmayer
896aaf575f fix incorrect terminology in NaviCube, add support of isometric view 2019-01-09 14:18:26 +01:00
wmayer
a7094210f8 Fix scan coverity issues:
CID 184294: Uncaught exception
CID 183597: Unchecked return value
CID 175809: Dereference before null check
CID 175810: Logically dead code
CID 133000: Uninitialized scalar variable
CID 133001: Uninitialized scalar variable
CID 183591: Explicit null dereferenced
2018-11-13 16:47:58 +01:00
wmayer
4cff87ed57 add functions to customize NaviCube 2018-10-26 15:51:03 +02:00
luz.paz
79a4aa3ef4 Misc. typos
Found via `codespell`
[skip ci]
2018-05-31 12:50:58 -04:00
wmayer
78b7510ee1 fix inconsistent default parameters, fix warnings 2018-05-31 13:47:31 +02:00
wmayer
7c010ab9a4 implement option to change corner of navi cube 2018-05-26 18:51:53 +02:00
wmayer
d15c7d0673 + option to disable navi cube
+ handle destruction of GL context in 3d viewer class
+ fix for OpenGL error message: 'Texture is not valid in the current context. Texture has not been destroyed'
2018-05-26 15:33:45 +02:00
wmayer
865f83b574 remove unrealiable implementation of ViewNormalToSketchPlaneCmd 2018-05-26 15:33:45 +02:00
wmayer
ddf881a1db make NaviCube working for Qt4 and Qt5 2018-05-26 15:33:45 +02:00
wmayer
ba99fff1d9 fix Qt5 build failure 2018-05-26 15:33:45 +02:00
Kustaa Nyholm
13a4f84145 First Qt5 compatible NaviCube attempt 2018-05-26 15:33:45 +02:00