Commit Graph

40 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
9fe130cd73 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
Markus Reitböck
a72a0d6405 Gui: use CMake to generate precompiled headers on all platforms
"Professional CMake" book suggest the following:

"Targets should build successfully with or without compiler support for precompiled headers. It
should be considered an optimization, not a requirement. In particular, do not explicitly include a
precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
generated precompile header on the compiler command line instead. This is more portable across
the major compilers and is likely to be easier to maintain. It will also avoid warnings being
generated from certain code checking tools like iwyu (include what you use)."

Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-14 09:47:03 +02:00
Ladislav Michl
9683cf1e4f Base: rename Exception's PascalCase methods to camelCase 2025-05-05 23:50:01 +02:00
Kacper Donat
13fbab9e42 Base: Move App::Color to Base
Every basic data type is stored in Base module, color is standing out as
one that does not. Moving it to Base opens possibilities to integrate it
better with the rest of FreeCAD.
2025-02-17 21:10:26 +01:00
tritao
4c93a14fea Gui: Reorganize the dialog files into a top Dialogs folder. 2025-01-24 16:28:02 -06:00
wmayer
68ae3c95dc Core: Update color bar when changing preferences
This solves one part of issue #10717
2024-07-01 10:55:21 -05:00
wmayer
86efa87fe1 Core: Refactor SoFCColorGradient and fix linter warnings 2024-06-30 19:16:33 +02:00
Syres916
0c96b7d903 [Gui] Fix color bar position and text (#10552)
* [Gui] Fix ColorBar position and labelling

* [Gui] Improve formatting

* [Gui] ColorBar adjusts if user squashes window height

* [Gui] Changes following feedback
2023-09-19 18:35:22 -05:00
wmayer
6beace8da6 Gui: modernize C++: use default member init 2023-08-23 19:51:44 +02:00
wmayer
bc427724f7 Gui: Add translations for color bar labels 2023-04-20 18:52:07 +02: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
wmayer
b9db257558 Gui: add SoColorBarLabel as workaround for a Coin3D bug 2022-06-07 19:42:04 +02:00
wmayer
9fd10e72d2 Gui: cache color bar width to avoid to compute it for every resize of the canvas 2022-06-06 19:11:00 +02:00
wmayer
f4ef15b9ce Gui: initialize _bbox with correct default values and fix incorrect label postions if ratio of width/height is less than 1 2022-05-30 14:08:33 +02:00
wmayer
683c9ac65c Gui: refactor SoFCColorGradient::setViewportSize and SoFCColorLegend::setViewportSize 2022-05-30 12:49:48 +02:00
Uwe
08ab216a13 [Gui] describe gradient code better
- to make it easier to see what is happening (not yet perfect since the start numbers 4.0 and 5.0 are not clear yet)
- avoid a jump of the gradient bar when decreasing window size
- return for now only the direct bar width 8will be tested thoroughly now on several PCs if this will work)
2022-05-30 04:08:19 +02:00
wmayer
e8850a36ea Gui: fix number display issue of color bar 2022-05-30 03:39:48 +02:00
Uwe
37cd94e4e4 [Gui] fix default color gradient numbering
as reported here: https://forum.freecadweb.org/viewtopic.php?p=598390#p598390
we must assure the user sees not by default get several gradient labels
showing the same and labels showing 0.000
2022-05-30 02:57:29 +02:00
wmayer
db2236fe22 Gui: [skip ci] improve readability of SoFCColorGradient::setRange 2022-04-08 15:17:41 +02:00
Uwe
bc017a7c03 [Gui] Color Gradient: handle case of min = 0
When the minimum is zero, we don't want scientific notation, for example for a range [0, 12.57]
2022-04-05 03:40:10 +02:00
Uwe
e34ecb0c5e [Gui] fix color gradient label format
- large numbers like e.g. stress outputs were not displayed in scientific notation

- also some code style improvements and a fixed typo
2022-04-05 02:42:53 +02:00
wmayer
7f66a6e170 Gui: handle number of labels and decimals in the immediate update 2022-04-04 15:27:13 +02:00
wmayer
078ce76b88 Gui: fixes DlgSettingsColorGradientImp:
* handle exception in lambda function if max <= min
* fix regression of 10768fb32: a validator can be set to only one widget at a time
2022-04-03 10:51:10 +02:00
wmayer
5409f1d86d Gui: fix some issues in DlgSettingsColorGradientImp:
* fix regression by rounding Max/Min values when setting up dialog
* switch signals from QLineEdit::editingFinished to QLineEdit::textEdited to get changes immediately
2022-04-02 13:24:12 +02:00
wmayer
de699f81c5 Gui: automatically apply changes made in color gradient dialog 2022-04-02 12:14:42 +02:00
wmayer
c2ba7cf414 Gui: refactor DlgSettingsColorGradientImp 2022-04-02 11:41:20 +02:00
wmayer
bb19d8cb03 App/Gui: refactor ColorGradient and move all settings to ColorGradientProfile 2022-04-02 10:58:04 +02:00
wmayer
fb86d1d5b4 Gui: change notification between SoFCColorBarBase nodes 2022-04-01 19:27:45 +02:00
wmayer
b3d8acf8e7 Gui: [skip ci] drop the _bOutInvisible member and use the corresponding function of ColorGradient instead 2022-04-01 10:39:02 +02:00
Uwe
0ed47fb26e [GUI] fix color gradient dialog
- large numbers as they appear of most simulations were not correctly displayed
- remove non-functional help button
2022-04-01 03:13:43 +02:00
Uwe
4bfee097e1 [skip CI] [Gui] some UI improvements for the color gradient dialog
- mostly by Qt Designer
- also some code style fixes by MSVC
2022-03-28 10:38:19 +02:00
Uwe
66dd0f62a5 [Gui] So headers: remove some unused includes
- also sort out some headers for precompiled headers
2022-03-14 15:13:13 +01:00
wmayer
64ea2e75af Gui: modernize C++11
* remove redundant void-arg
* use nullptr
2022-02-08 16:26:07 +01:00
wmayer
339c9841ff Gui: replace floats with SbBox2f in SoFCColorGradient 2022-02-06 14:24:11 +01:00
wmayer
2bf84e79ac App/Gui: make color bar to handle very small values 2022-02-02 21:12:59 +01:00
wmayer
ecac0b4d0c App: rework ColorGradient and allow to easily extend it with further color models 2022-01-29 15:29:07 +01:00
wmayer
90d9f58de0 App: code cleanup of Color models 2022-01-29 11:58:05 +01:00
wmayer
9fa56345cf 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
Zheng, Lei
5214f5b7ce Gui: add coinRemoveAllChildren to work around Coin3D bug
See bug description:
https://bitbucket.org/Coin3D/coin/pull-requests/119/fix-sochildlist-auditing/diff

Because of path based rendering (SoFCPathAnnotation) in mouse over
highlight, this bug causes crash more frequently here comparing to
upstream.

All C++ calling of SoGroup::removeAllChildren() is replaced by
Gui::coinRemoveAllChildren(), and python code is fixed by monkey
patching SoGroup.removeAllChildren() in FreeCADGuiInit.py.
2019-08-17 14:52:11 +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