Commit Graph

258 Commits

Author SHA1 Message Date
Rexbas
fcbee3ad49 Gui: Improve object center rotation mode 2023-08-16 16:02:32 -05:00
wmayer
2725c3a54f Gui: modernize C++: use range-based for loop 2023-08-14 19:42:18 +02:00
Yorik van Havre
16540a7f6d Merge pull request #9909 from Rexbas/rotationcenter
Gui: Add rotation center indicator
2023-08-07 17:57:13 +02:00
Benjamin Bræstrup Sayoc
33384cff9c [Everywhere] FileInfo::hasExtension for multiple values (#9774)
* [Base] Add hasExtension for multiple values

* [Gui] Use hasExtension for multiple values

* [Drawing] Use hasExtension for multiple values

* [Fem] Use hasExtension for multiple values

* [Import] Use hasExtension for multiple values

* [Mesh] Use hasExtension for multiple values

* [Part] Use hasExtension for multiple values

* [TechDraw] Use hasExtension for multiple values
2023-08-07 09:55:19 -06:00
andrea
6c2a5c1539 removed coin<3 references 2023-08-04 21:19:29 -06:00
Rexbas
625518c0ca Add option to disable rotation center indication 2023-07-11 17:33:47 +02:00
Rexbas
7fe3e1bd5d Add visual indication for the rotation center 2023-07-11 17:33:47 +02:00
wmayer
87749d1bb8 Gui: do not enable lighting when rendering from image or framebuffer 2023-05-04 07:55:05 +02:00
wmayer
bc7ad64452 Gui: add comment about troubleshooting OpenGL 2023-05-01 23:32:24 +02:00
wmayer
39fb455af2 Gui: workaround to show content of image plane
This workaround is needed on some platforms after the refactoring of the NaviCube code. For more details see also:
https://github.com/FreeCAD/FreeCAD/pull/9356#issuecomment-1529521654
2023-05-01 23:32:24 +02:00
Chris Hennes
3316a9d1a8 Merge pull request #9356 from Jolbas/Navicube_disable_drag
Refactor Navigation Cube
2023-04-24 15:21:38 -05:00
luzpaz
129d5882a7 Migrate domain name from freecadweb to freecad (#9352)
* Migrate domain name from freecadweb to freecad
* Migrate src/Mod/Material files
* Migrate Stylesheet related files
* Migrate *.svg files
* Migrate miscellaneous files
* Migrate some build files
* Migrate recently added TD AR_IRAM template files

Closes #6415
2023-04-24 15:19:20 -05:00
Jolbas
8abd6d0870 Refactor Navigation Cube
-Use std commands in menu coming with icons
-Only draggable if activated in menu
-Remove textures except labels and used gl fill instead
-Borders on surrounding buttons
-Fix some openGL issues
-Remove duplicate parameter managment. Kept and improved the one in View3DSettings
-Remove lots of other redundant code
-Replaced FontSize param with FontZoom and enabled auto zoom/size on labels.
-Merged BorderColor and TextColor to single EmphaseColor parameter
-Merged ButtonColor and FrontColor to BaseColor parameter
-Added ChamferSize parameter to control edge and corner size
-Use glDrawArrays() innstead of glBegin() and glEnd()
-Draw butt ends on RGB coordinate system
-Fixe issues where cube switch corner on resize window
2023-04-24 12:19:10 +02:00
wmayer
010e2ca377 Gui: [skip ci] fix typo View3DInventorViewer::toQPoint 2023-04-08 14:50:18 +02:00
wmayer
6237a0e67b Gui: rename getPointOnScreen() to getPointOnViewport() 2023-04-08 13:51:32 +02:00
wmayer
7bf0e2e703 Gui: add method to convert between QPoint and SbVec2s considering device pixel ratio 2023-04-08 13:51:32 +02:00
wmayer
eb3fd5fe47 Gui: add enum types to handle background gradients
This fixes some API flaws where booleans were used to distinguish between three different types
2023-04-04 18:44:27 +02:00
xtemp09
81cfe34085 [GUI] Radial gradient implementation
This commit implements radial gradient as background and adds the option
to settings. It also renames "Color gradient" as "Linear gradient",
keeping Linear gradient default. Internally, it remains unchanged for
compatibility.

Radio gradient is more suitable for CAD, since it gives a more balanced
color distribution across the screen, improving visibility of model and
sketches with a halo-like effect.
2023-04-02 16:33:01 +07:00
Paddle
0a78933685 Core: View3DInventorViewer, add 3 functions:
- getDimensions
- getMaxDimension()
- getCenterPointOnFocalPlane()
2023-02-25 23:13:55 +01:00
wmayer
961bef36c0 Gui: fix regression that NaviCube cannot be switched off any more 2023-02-07 22:16:09 +01:00
wmayer
2e5cb03261 Gui: move to new style connect() 2023-02-01 13:49:35 +01:00
Uwe
18fdd3f708 [Gui] View3DInventorViewer: fix a GH action report
- use sizeof instead of the hardcoded number
2023-01-29 09:38:16 -07:00
Uwe
588f2d50e4 [Gui] allow to specify font for NaviCube
- the problem is that depending on the OS, the font of the NaviCube is hardly readable. For example under Windows 11, there is no Helvetica font and therefore an ugly replacement font is used. On some laptop screens the font is too large or too small etc.
- as solution this PR add the change the NaviCube's font and font size

- the PR also fixes an issue that the position (corner) of the NaviCube was not respected when the NaviCube is recreated. This fix is necessary for the PR therefore included

- as by-product the PR fixes #8082 since every change in the preferences now properly recreates the NaviCube

- the PR also removes the strange and unused class "HuuhaaClassPy"
2023-01-27 02:23:46 +01:00
wmayer
28c757bc12 Gui: [skip ci] print warning in getViewProviderByPath, getViewProviderByPathFromTail, getViewProvidersOfType if for View3DInventorViewer no document is set
This gives the client programmer a clue if one of the mentioned methods fails
2023-01-10 17:46:05 +01:00
wmayer
787a37be82 Gui: fix View3DInventorViewer's getViewProviderByPath, getViewProviderByPathFromTail, getViewProvidersOfType
The View3DInventorViewer only contains the top-level view providers which caused unexpected behaviour when using the three methods above. Thus, in client code they haven't been used any more.
Now the methods internally invoke the corresponding methods of the document. This allows it in client code to directly call the appropriate methods again (LoD).
2022-12-12 16:41:58 +01:00
wmayer
4b17636c5e Gui: code-refactoring
Split selection handling from View3DInventorViewer and move to View3DInventorSelection
2022-11-16 20:27:14 +01:00
wmayer
45dc6d3a49 Gui: determine the view size of the focal plane in perspective mode 2022-11-10 13:34:59 +01: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
berniev
0c70d45c83 Gui: Use override etc 2 2022-08-09 12:43:23 +02:00
Uwe
6f546de8f0 [Gui] fix typos
- fix a typo found by codespell
- rename variables to please codespell
2022-08-08 14:14:23 +02:00
berniev
656ef8961f Gui: redundant void 2 2022-08-08 10:21:44 +02:00
berniev
d88729d2c4 Gui: use empty 2022-08-06 16:35:45 +02:00
wmayer
3b0b7775f4 Fix several clazy issues:
* Q_PROPERTY should have either NOTIFY or CONSTANT [-Wclazy-qproperty-without-notify]
* Use Q_ENUM instead of Q_ENUMS [-Wclazy-qenums]
* Add missing a Q_OBJECT macro [-Wclazy-missing-qobject-macro]
* Signal/Slot arguments need to be fully-qualified [-Wclazy-fully-qualified-moc-types]
2022-07-24 19:03:30 +02:00
Uwe
1d95c26e2e [Gui] remove more superfluous nullptr checks 2022-07-18 03:34:22 +02:00
wmayer
b548d3b1ef Partially revert "Remove unused code into GUI" 2022-07-17 12:32:03 +02:00
andrea
3018985f80 Remove unused code into GUI 2022-07-17 03:53:11 +02:00
wmayer
779128b5f4 Gui: get rid of some const_cast 2022-06-28 15:26:02 +02:00
wmayer
e9890c0798 Gui/Mod: replace several reinterpret_cast with static_cast 2022-06-25 11:36:55 +02:00
Uwe
c23a30b916 [Gui] remove unnecessary Boolean comparisons 2022-06-19 15:17:01 +02:00
marioalexis
c00699b15d Gui: Prevent crash when trying to delete pointer to BaseClass 2022-05-24 13:28:14 +02:00
wmayer
d1f5bb02fc Gui: [skip ci] reduce duplicated code 2022-04-12 13:55:18 +02:00
wmayer
f630844ad6 Gui: add convenience function View3DInventorViewer::getBoundingBox() 2022-04-12 13:43:58 +02:00
wmayer
aea110ba15 Gui: clean-up Selection API
Replace the int of the SubType of SelectionChanges with an enum class.
The meaning of it is nowhere documented and some magic numbers like 0,1,2 are used in several places in the code.
2022-04-09 23:07:02 +02:00
wmayer
9eac35cf5d Gui: clean-up Selection API
Replace the int of the 'resolve' argument of several functions with a proper enum class.
* This avoids the inconsistencies in client code where often true/false is passed when an int is expected
* This avoids the use of magic numbers like 0, 1, 2 or the undocumented 3
2022-04-09 17:03:43 +02:00
Chris Hennes
bedf920702 Gui: PR6497 move return statement to new line 2022-03-29 12:33:50 -05: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
wmayer
a999a249e3 Qt: remove some more leftovers of Qt4 2022-03-19 23:27:28 +01:00
Uwe
568b752363 [Gui] add a necessary debug header
as reported: c4f5628899 (r68944028)
2022-03-17 20:30:25 +01:00
Uwe
c4f5628899 [Gui] So headers: remove unused includes
- also sort out some headers to be used in precompiled headers
- also move a boost header to precompiled headers
2022-03-16 02:01:32 +01:00