Commit Graph

59 Commits

Author SHA1 Message Date
Adrian Insaurralde Avalos
3db6da540d [fixes #7875] Gui: use hexagon shape in NaviCube corners
makes the corners bigger and therefore easier to click

fix inconsistent NaviCube borders


Co-authored-by: Rexbas <rexbasie@gmail.com>
2022-11-29 01:31:48 +01:00
Uwe
7a26e69405 [skip ci] [Gui] NaviCube: fix warning about too short variable name
- also some whitespace unification
2022-11-11 05:16:18 +01:00
Uwe
4bade5d96b [Gui] NaviCube: fix rotation to backside
- when pressing the "dot" besides the NaviCube, the rotation to the backside was not in the center thus the view jumped
2022-11-11 04:58:20 +01:00
wmayer
abc4e6bf39 Qt6 port:
* Constructor of QFontDatabase is deprecated, use static functions instead
* Fix QuantitySpinBox::selectNumber()
* Fix InputField::selectNumber()
* Make InputField::fixup() compatible with Qt6
* QFont::setWeight requires an enum now
* QInputEvent reuires a pointing device now
* QAbstractItemView::viewOptions() has been renamed to QAbstractItemView::initViewItemOption()
2022-11-03 12:38:11 +01:00
wmayer
fac648fff5 Qt6 port:
* Explicitly include some missing headers
* Use 'static const char*' for XPM icon
* Skip template parameters for qMakePair
* Constructor of QFileInfo is marked as 'explicit' now
* QString::fromLatin1() also accepts a QByteArray
* QDateTime::fromTime_t() is deprecated in Qt5 and has been removed in Qt6. Use QDateTime::fromSecsSinceEpoch()
* QDateTime::toTime_t() is deprecated in Qt5 and has been removed in Qt6. Use QDateTime::toSecsSinceEpoch()
* QApplication::globalStrut() is deprecated. Don't use it any more.
* QWidget::isTopLevel() is deprecated, use QWidget::isWindow()
2022-11-02 15:16:41 +01: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
berniev
3877fc62c3 Gui: Single arg ctors must be explicit (PR #7369) 2022-08-24 15:06:03 +02:00
Uwe
6f3bd9812c [Gui] [skip CI] NaviCube: fix indentation mistake from previous commit 2022-08-13 15:11:32 +02:00
Uwe
3a2c408c8f [Gui] fix NaviCube step handling
- as reported in https://forum.freecadweb.org/viewtopic.php?f=3&t=71050
2022-08-13 15:02:26 +02:00
berniev
75fa455c5d Gui: Use override etc 2 2022-08-09 12:43:23 +02:00
berniev
066656f62a Gui: use emplace_back 2022-08-05 10:33:41 +02:00
Uwe
d5b227e6a6 [Gui] remove more superfluous nullptr checks 2022-07-18 03:34:22 +02:00
Uwe
a58514b260 [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
b60bd550f9 [skip CI] [Gui] NaviCube.cpp revert a change
from commit cb5e316a708f 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
6d4776e32c [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
27a13fb67d [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
ed5ec8a7ea 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
cc7ddbccd4 Gui: issue #6306 was fixed with 2cacbb41caf1f2 but this doesn't work on high DPI monitors.
This commit fixes that now
2022-05-02 12:54:07 +02:00
wmayer
131a8a6bf9 Gui: fixes issue #6766: Navigation Cube -> Isometric View does not work 2022-04-19 19:06:45 +02:00
wmayer
ad0dba3d3a Gui: fixes #6306: UI Rotation box can be dragged out of view 2022-04-18 16:31:10 +02:00
wmayer
d21a60b294 All: modernize C++11
* replace deprecated headers
2022-03-23 22:44:18 +01:00
wmayer
1178df06b4 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
Uwe
ec0d0beb19 [skip ci] [Gui] fix a typo 2022-03-12 19:19:16 +01:00
Uwe
36b3ac81d2 [Gui] remove more unused headers 2022-02-19 04:04:14 +01:00
wmayer
a87e33258d Gui: remove support of using deprecated Qt OpenGL API 2022-01-26 14:46:41 +01:00
wmayer
6f20e3e4d8 Gui: remove QT_TR_NOOP from command group names and use "CommandGroup" as context string 2021-09-29 16:31:55 +02:00
donovaly
1a28c4969a [Gui] fix a NaviCube Corner
fixes a copy/paste issue of commit 7831a218d7
2021-03-30 12:10:15 +02:00
wmayer
2887eadea7 Gui: concatenate rotations and apply the result once at the end 2021-03-29 18:29:44 +02:00
donovaly
8e417f96b8 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
54fd82b109 [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
fd6d471a24 Gui: Auto update NaviCube when changing preferences 2021-03-09 17:27:48 +01:00
luz paz
38815b9550 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
wmayer
3632c81435 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
be8634d05c 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
1d6d841cf6 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
ba9a7d3227 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
73cc683874 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
3b714e0bad introducing user parameter: BaseApp->Preferences->View->NaviWidgetSize 2020-02-05 10:55:40 +01:00
wmayer
49cb974bca Gui: [skip ci] handle possible division by zero in NaviCube 2020-02-03 14:39:54 +01:00
0penBrain
0ead4c5946 [NaviCube]Fix error when 'NaviStepByTurn' parameter value leads to non-integer angle increment step 2020-01-27 10:05:41 +01:00
0penBrain
783f505516 [NaviCube] Add user parameter 'NaviStepsByTurn' to make customizable the rotation step increment 2020-01-22 10:28:13 +01:00
asapelkin
ced8100ab9 use emplace_back instead of push_back where justified 2019-11-21 14:48:09 +01:00
wmayer
08b54bb5a0 [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
af734bbbc6 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
ad0ee86589 Misc. source comment typos 2019-03-22 10:44:14 -03:00
wmayer
d82e7e736d 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
11c0c9adde harmonize functions to set camera orientations 2019-01-12 22:59:44 +01:00
wmayer
94c28e9fc8 implement Isometric, Dimetric and Trimetric projection 2019-01-10 18:31:17 +01:00
wmayer
5a1c43b131 fix incorrect terminology in NaviCube, add support of isometric view 2019-01-09 14:18:26 +01:00
wmayer
31963f16c1 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