Commit Graph

39 Commits

Author SHA1 Message Date
Markus Reitböck
6ef07bb358 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
c293d74566 Base: rename Exception's PascalCase methods to camelCase 2025-05-05 23:50:01 +02:00
Kacper Donat
a72a63232a 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
8aa50c4380 Gui: Reorganize the dialog files into a top Dialogs folder. 2025-01-24 16:28:02 -06:00
wmayer
d64bf15f8a Core: Update color bar when changing preferences
This solves one part of issue #10717
2024-07-01 10:55:21 -05:00
wmayer
554310a6ba Core: Refactor SoFCColorGradient and fix linter warnings 2024-06-30 19:16:33 +02:00
Syres916
4e466355f1 [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
5a153e50ff Gui: modernize C++: use default member init 2023-08-23 19:51:44 +02:00
wmayer
8b1d094fb4 Gui: Add translations for color bar labels 2023-04-20 18:52:07 +02: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
77627bbc23 Gui: add SoColorBarLabel as workaround for a Coin3D bug 2022-06-07 19:42:04 +02:00
wmayer
3cccd4d69e 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
c5296fbb92 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
37d2492719 Gui: refactor SoFCColorGradient::setViewportSize and SoFCColorLegend::setViewportSize 2022-05-30 12:49:48 +02:00
Uwe
7907b0f8b3 [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
c4cd127499 Gui: fix number display issue of color bar 2022-05-30 03:39:48 +02:00
Uwe
79c218ad9a [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
6467ecab33 Gui: [skip ci] improve readability of SoFCColorGradient::setRange 2022-04-08 15:17:41 +02:00
Uwe
acede8c347 [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
b3fb3e4005 [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
f492a8fac4 Gui: handle number of labels and decimals in the immediate update 2022-04-04 15:27:13 +02:00
wmayer
9b3a50840f Gui: fixes DlgSettingsColorGradientImp:
* handle exception in lambda function if max <= min
* fix regression of 0938c98b6: a validator can be set to only one widget at a time
2022-04-03 10:51:10 +02:00
wmayer
2d5f34f329 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
027fb07743 Gui: automatically apply changes made in color gradient dialog 2022-04-02 12:14:42 +02:00
wmayer
9500706d6f Gui: refactor DlgSettingsColorGradientImp 2022-04-02 11:41:20 +02:00
wmayer
874a6ef28e App/Gui: refactor ColorGradient and move all settings to ColorGradientProfile 2022-04-02 10:58:04 +02:00
wmayer
c50924be03 Gui: change notification between SoFCColorBarBase nodes 2022-04-01 19:27:45 +02:00
wmayer
e8d3f60dbd Gui: [skip ci] drop the _bOutInvisible member and use the corresponding function of ColorGradient instead 2022-04-01 10:39:02 +02:00
Uwe
0938c98b6c [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
b3d74905ca [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
aa53698c55 [Gui] So headers: remove some unused includes
- also sort out some headers for precompiled headers
2022-03-14 15:13:13 +01:00
wmayer
f14f952c83 Gui: modernize C++11
* remove redundant void-arg
* use nullptr
2022-02-08 16:26:07 +01:00
wmayer
b806115015 Gui: replace floats with SbBox2f in SoFCColorGradient 2022-02-06 14:24:11 +01:00
wmayer
bc509c8069 App/Gui: make color bar to handle very small values 2022-02-02 21:12:59 +01:00
wmayer
38321cc2e9 App: rework ColorGradient and allow to easily extend it with further color models 2022-01-29 15:29:07 +01:00
wmayer
43ffd70111 App: code cleanup of Color models 2022-01-29 11:58:05 +01: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
Zheng, Lei
c8891be856 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