Commit Graph

32 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
9fe130cd73 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
Billy Huddleston
db40eb1478 CAM: Fix expression editor so that widgets refresh after closing
src/Gui/QuantitySpinBox.cpp:
- Call updateExpression() after setExpression() in QuantitySpinBox

src/Gui/SpinBox.cpp:
- Call updateExpression() after setExpression() in ExpressionSpinBox

src/Gui/Widgets.cpp:
- Call onChange() after setExpression() in ExpLineEdit

src/Mod/CAM/Path/Base/Gui/Util.py:
- Connect to showFormulaDialog signal and refresh CAM QuantitySpinBox Python wrapper when dialog closes
2025-10-28 15:29:01 -05:00
Pieter Hijma
78ea999336 Merge pull request #23648 from pieterhijma/fix-enabled-ok-expr-editor
Gui: Fix issues with Expr dialog with VarSets
2025-09-22 10:51:35 -05: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
Kacper Donat
c6d2e2645e Merge pull request #23426 from pieterhijma/reconcile-add-prop-dialogs
Gui: Reconcile Add Property Dialogs
2025-09-13 11:26:52 +02:00
Pieter Hijma
0ef72b82aa Gui: Move DlgAddPropertyVarSet -> DlgAddProperty 2025-09-03 11:50:49 +02:00
B0cho
ae8679b8f6 Core: Show 'Expression' completer under cursor position 2025-09-02 01:09:12 +02:00
B0cho
d6ea05de75 Core: Make too long 'Result' message elide in Expression editor 2025-09-02 00:41:39 +02:00
B0cho
26ea2a9bb2 Core: Remove redundant spacers from Expression editor 2025-09-02 00:41:39 +02:00
B0cho
05517d2ff4 Core: Fix 'Result' message text not wrapped in Expression editor 2025-09-02 00:36:16 +02:00
B0cho
c158fd9cf6 Core: Switch widget from 'ExpressionLineEdit' to 'ExpressionTextEdit'
+ minor dialog layout adjustments
2025-09-01 23:47:16 +02:00
Pieter Hijma
c97305a9fc Gui: Add more translations to expr dialog
This adds translations to the feedback on the expression, for example if
there is a unit mismatch.
2025-08-27 14:59:28 +02:00
Pieter Hijma
118cad87de Gui: Make expr dialog input validation themeable 2025-08-27 14:58:44 +02:00
Pieter Hijma
6674a7084b Gui: Add translations expression dialog VarSets 2025-08-27 09:52:50 +02:00
Pieter Hijma
c0cb0b757e Gui: Process minor review comments
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2025-08-27 09:52:50 +02:00
Pieter Hijma
7eec8b5416 Gui: Process comments DWG expression dialog
This commit gives an error box on invalid input for the VarSet inputs.
2025-08-27 09:52:50 +02:00
Pieter Hijma
3f6b0f5b85 Gui: Process comments DWG expression dialog
This commit ensures that the buttons stay at the end of the dialog.
2025-08-27 09:52:50 +02:00
Pieter Hijma
2070b1c1c6 Gui: Improve presenting VarSets in expr dialog 2025-08-27 09:52:50 +02:00
Pieter Hijma
a99d903727 Gui: Stop remember state expression dialog
Before this commit, the expression dialog remembered the state of
whether the varset information should be shown.  This is removed
according to #17075.
2025-08-27 09:52:50 +02:00
Pieter Hijma
acea58f85f Gui: Improve layout expression dialog for varsets
According to #17075
2025-08-27 09:52:50 +02:00
Max Wilfinger
6692dacc0a Gui: Update UI strings for consistency
Closes: #22135
2025-08-04 20:14:45 +02:00
Syres916
39dc1e6210 [Gui] C++ preparation for deprecation of QCheckBox…
…stateChanged -> checkStateChanged
2025-06-13 10:40:48 +02:00
Benjamin Nauck
92bf6e5f2a Merge pull request #21147 from 3x380V/units
Units rework II
2025-06-04 15:58:00 +02:00
Ladislav Michl
a0917bcc7c Base: Units: introduce unit one
Dimensionless quantities have all exponents equal to zero.
Such quantities are simply numbers. The associated unit is
the unit one, symbol 1, although this is rarely explicitly
written.

See chapter 2.3.3 Dimensions of quantities, The International
System of Units, 9th edition.
2025-06-03 09:31:38 +02:00
Ladislav Michl
0c9584ab2d Base: Quantity: use isDimensionless whenever feasible
Quantity is often queried for Unit just to see if it has a dimension.
Ask Quantity directly using isDimensionless() method and modify that
method not to care about Quantity value validity; no user was ever
asking for value validity.
2025-06-03 09:31:38 +02:00
wmayer
87fca2c943 Gui: Use QDialogButtonBox in DlgExpressionInput
This way the order of buttons is more consistent than using
separate QPushButtons.

This fixes issue 19902
2025-05-30 18:04:33 +02:00
Kacper Donat
ef357aa07a Gui: Use freecad_cast whenever possible 2025-04-26 14:23:25 +02:00
Kacper Donat
77e40b9747 Base: Use explicit pointer syntax for freecad_cast (#20694)
* Base: Use explicit pointer syntax for freecad_cast

This aligns our custom cast with other casts

* All: Use explicit pointer syntax for freecad_cast
2025-04-11 14:11:33 +00:00
Kacper Donat
9d97d1c895 Base: Rename Base::freecad_dynamic_cast into freecad_cast
This is to make it shorter and easier to use. QT does the same thing
with their qobject_cast.
2025-04-07 10:32:28 -05:00
Benjamin Nauck
029a0555f2 Gui: Use constant for Type::BadType instead Type::badType() 2025-02-24 08:30:18 +01:00
Benjamin Nauck
be2c9c99af Gui: Use isBad() instead of comparing types with == 2025-02-24 08:30:18 +01:00
tritao
4c93a14fea Gui: Reorganize the dialog files into a top Dialogs folder. 2025-01-24 16:28:02 -06:00