Commit Graph

41 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
25c3ba7338 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
pjcreath
280addd21c Gui: Fix crash in placement window after closing a document. (#25110)
Fixes #18156
2025-11-10 11:03:05 -06:00
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
Alfredo Monclus
6693947ca1 Gui: correct the size and position of the expression (fx) icon 2025-03-20 14:23:36 +01:00
PaddleStroke
2390be5b3a Fix https://github.com/FreeCAD/FreeCAD/issues/20004 2025-03-05 18:58:35 +01:00
Benjamin Bræstrup Sayoc
f647d4a1eb Gui: Use QStringLiteral 2025-02-10 18:34:57 +01:00
Adrian Insaurralde Avalos
963652c6a7 Avoid sending unescaped quotes to python console 2024-02-04 16:44:25 -06:00
wmayer
cbc3d81bca Gui: save active palette
If the QLineEdit is disabled the current color group of the cached QPalette is set to 'Inactive'. Now when enabling the QLineEdit the wrong palette is set and the text looks like it's inactive.
2023-11-17 18:52:28 +01:00
Florian Foinant-Willig
773c701eec Core: modernize type checking 2023-10-23 18:07:07 +02:00
wmayer
5a153e50ff Gui: modernize C++: use default member init 2023-08-23 19:51:44 +02:00
wmayer
c016f1c1fb Gui: modernize C++: use equals default 2023-08-20 18:12:43 +02:00
wmayer
54bb9c9c62 Gui: modernize C++: return braced init list 2023-08-18 00:36:24 +02:00
wmayer
d150fa7164 modernize C++: avoid bind
In many cases std::bind() is kept because the code is much simpler
2023-08-08 21:10:16 +02:00
wmayer
68d22d864b modernize C++: move from boost::bind to std::bind 2023-08-08 17:36:13 +02:00
wmayer
0efab730c1 Gui: split icon handling from ExpressionBinding 2023-03-09 12:43:44 +01:00
wmayer
9d32c892f0 Gui: [skip ci] refactor QuantitySpinBox::apply 2022-10-28 00:46:37 +02:00
berniev
d88729d2c4 Gui: use empty 2022-08-06 16:35:45 +02:00
Uwe
3e99d39d05 [Gui] remove some more superfluous nullptr checks 2022-07-18 13:15:38 +02:00
wmayer
96adb98f46 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
Uwe
b9777464c3 [Gui] Expression: remove unused includes 2022-03-02 05:00:21 +01:00
wmayer
75bf85eb5b Gui: Change label type to ExpressionLabel in ExpressionBinding
* Add function ExpressionBinding::makeLabel() and use it in subclasses to reduce code duplication
2021-04-02 17:46:42 +02:00
Benjamin Nauck
f9ac51b6a6 [Gui] Use std::shared_ptr instead of boost::shared_ptr
There's no need to use boost version when stl has support for shared_ptr
2021-03-06 19:32:03 +01:00
wmayer
957eed7d2c Gui: [skip ci] allow to unbind() an ExpressionBinding and automatically unbind it if the observed object has been deleted
For more details see: https://forum.freecadweb.org/viewtopic.php?f=8&t=56097
2021-02-28 12:37:50 +01:00
luz paz
298c677873 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
wmayer
f3b460e42e boost: fix for boost < 1.60 2020-06-15 19:38:39 +02:00
wmayer
4ec45b545e boost 1.73.0: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated 2020-06-12 17:51:33 +02:00
wmayer
b143194f9d Qt5: 'static bool QPixmapCache::find(const QString&, QPixmap&)' is deprecated: Use bool find(const QString &, QPixmap *) instead [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
Zheng, Lei
a230d0d9a3 Gui: fix ExpressionBinding::apply()
Remove extra '.' because of newly introduced local property referencing
syntax.
2019-10-07 17:24:31 +02:00
Zheng, Lei
2bd4795e80 Gui: property view related changes
* Display property from linked object, colored green,

* Change DlgPropertyLink to support external linking and sub-object
  selection

* Improve large selection performance by using a timer

* Improve TAB key behavior in property editor

* Add context menu to show hidden properties, change property status,
  set expression on any and property, and add/remove dynamic properties

* Optimize expression completer model construction, as the original
  implementation gets prohibitively slow for moderate number of objects.
2019-08-17 15:08:33 +02:00
Eivind Kvedalen
f114cc8898 ExpressionBinding/QuantitySpinBox: skip updating if bound to a read-only property. 2017-07-26 23:39:00 +02:00
wmayer
1673ab801e use specialized exception classes 2017-04-28 18:49:11 +02:00
wmayer
f19d424d8b fix -Wextra in FreeCADGui 2016-09-21 20:54:52 +02:00
Mateusz Skowroński
cd2db00f22 QString::fromAscii() is obsolete in Qt5. Replace it with fromLatin1().
This change is Qt4/Qt5 neutral.
2016-01-05 16:07:25 +01:00
wmayer
dde207c360 + fix: -Wunused-variable 2015-12-09 16:52:47 +01:00
Stefan Tröger
dcad131357 Expressions: Fix property editor behavior
- change responsibility of python code emition
- Correct python code handling for expressions
- handle constraints expressions handling
2015-12-09 14:08:50 +01:00
Stefan Tröger
4203a6f35b Expressions: Integrate into the property editor
- basic infrastructure for handling of expressions
- port the unit properties editor to support expressions
- port placement editor to support expressions
- expressions for double spinbox
- expressions in sketch constraints
2015-12-09 14:08:48 +01:00
Eivind Kvedalen
081bc6b107 QuantitySpinBox: Make sure Python code is emitted also when expressions are not used.
In that case, the property should be set directly.
2015-11-13 20:26:13 +01:00
wmayer
232623d372 + fix build failure on Windows 2015-09-30 16:37:48 +02:00
Eivind Kvedalen
014bb5b519 QuantitySpinBox: Moved getIcon() and some data members to ExpressionBinding class.
Conflicts:
	src/Gui/QuantitySpinBox.cpp
2015-09-30 15:54:17 +02:00
wmayer
29c8e82dae + fixes unicode support in expression engine 2015-09-24 13:10:54 +02:00
Eivind Kvedalen
897f8b78b8 Added expression support to QuantitySpinBox and InputField classes. 2015-09-21 14:51:08 +02:00