andrea
3018985f80
Remove unused code into GUI
2022-07-17 03:53:11 +02:00
wmayer
d5921e08ec
fix (Qt) issues found by clang's clazy tool:
...
+ -Wclazy-incorrect-emit
+ -Wclazy-strict-iterators
+ -Wclazy-overloaded-signal
+ -Wclazy-qstring-arg
+ -Wclazy-unused-non-trivial-variable
+ -Wclazy-container-anti-pattern
+ -Wclazy-range-loop-reference
+ -Wclazy-const-signal-or-slot
+ -Wclazy-detaching-temporary
+ -Wclazy-qfileinfo-exists
2022-06-29 21:00:54 +02:00
wmayer
ac3390de12
Gui: add function to determine size that a quantity spin box would need to display a certain text
2022-06-12 20:01:41 +02:00
0penBrain
7dc130b00f
Revert "Gui: [skip ci] fix a small regression caused by PR #5232 (or commit c4c81e6e6)"
...
This reverts commit b330a83273 .
2022-04-02 18:09:35 +02:00
0penBrain
68d7892fb0
Gui: fix locale number formatting propagation
2022-03-29 10:26:49 +02:00
wmayer
b330a83273
Gui: [skip ci] fix a small regression caused by PR #5232 (or commit c4c81e6e6)
...
See also forum posting: https://forum.freecadweb.org/viewtopic.php?p=583303#p583303
2022-03-26 18:27:04 +01:00
0penBrain
c164e2210d
Gui: fix hot change of locale for QuantitySpinBox
2022-03-17 16:46:01 +01:00
Uwe
07ac6433c0
[Gui] QuantitySpinBox: remove unused includes
2022-03-05 03:17:58 +01:00
0penBrain
c4c81e6e69
[Core] Fix unit management in QuantitySpinBox
2022-01-23 22:04:06 +01:00
wmayer
88ded38ca1
Base: only handle Base::ParserError exceptions for quantity expressions
2022-01-22 01:15:12 +01:00
wmayer
ead1bce8e9
Gui: [skip ci] improve comment
2022-01-18 10:55:34 +01:00
wmayer
9d37d27229
Gui: fix handling of dimensionless expressions
2022-01-18 10:52:45 +01:00
wmayer
6aec424aa5
Gui: override QuantitySpinBox::setExpression and validate expression to update internal representation
2022-01-05 20:15:03 +01:00
wmayer
5d49bf78de
Gui: QuantitySpinBox inherits from ExpressionSpinBox to reduce code duplication
2021-04-02 22:22:16 +02: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
Chris Hennes
64fb634ed1
Add tooltip to f(x) when there is no expression
...
As suggested by @luzpaz, this adds a tooltip to the f(x) icon of all
of the widgets that use it: QuantitySpinBox, UIntSpinBox, IntSpinBox,
DoubleSpinBox, and ExpLineEdit. These five classes are divided across
three files, and all five classes duplicate the same basic code. In the
existing code, no tooltip is shown if there is no expression. If there
is an expression, it (alone) is used as the tooltip.
This commit modifies that behavior to have explanatory text as the
tooltip when there is no expression, and when there is, to prepend a
short string to the beginning.
To reduce further code duplication, this is implemented by adding a new
function to ExpressionLabel allowing the text of the expression to be set.
It checks that text and if it's empty, uses a preset default string as the
tooltip. If there is expression text, it instead prepends another
bit of text to the front and sets the entire expression+prefix as the
tooltip.
TODO: In the future a lot of the preexisting code duplication could be
removed by making the ExpressionLabel class do more internal management
of the expression.
Thanks to @kisolre for the assistance tracking these down, and
suggesting the default text used.
2021-04-02 16:17:04 +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
1939b93fa7
Gui: [skip ci] fixes #0004104 : Void property value defaults to 1
2021-02-23 17:32:02 +01:00
luz paz
298c677873
Gui: Fix header uniformity, whitespace, and doxygen fixes
2020-11-26 10:14:56 +01:00
wmayer
aabff60388
Gui: [skip ci] try to avoid to truncate QuantitySpinBox at bottom margin on macOS
2020-11-14 13:18:45 +01:00
wmayer
c5a4b01d2e
Gui: [skip ci] try to avoid to truncate QuantitySpinBox at bottom margin on macOS
2020-11-08 16:07:10 +01:00
wmayer
d205122160
Gui: [skip ci] fixes #0004422 : PartDesign value input does not accept trailing slash
2020-09-14 10:37:46 +02:00
wmayer
877d7e3c49
Gui: [skip ci] workaround for QWindowsStyle to disable spin buttons when it is set read-only
2020-09-11 14:10:45 +02:00
wmayer
050356aa55
plugin: [skip ci] add new signal textChanged() to QuantitySpinBox
2020-08-09 11:22:47 +02:00
Thomas Gimpel
33499a5552
Gui: do not drop unhandled key events in *SpinBox::keyPressedEvent() handlers
2020-07-12 11:38:44 +02:00
wmayer
1ee3d79d7c
Qt5: 'int QFontMetrics::width' is deprecated since Qt 5.11: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]
2020-06-12 17:51:33 +02:00
wmayer
9a67154e73
Gui: [skip ci] fix bug when keyboard tracking for QuantitySpinBox is disabled and value is changed by mouse wheel or the spin buttons
2020-06-07 23:38:03 +02:00
wmayer
03113405fc
Gui: [skip ci] fix bug when keyboard tracking for QuantitySpinBox is disabled and value is changed by mouse wheel or the spin buttons
2020-06-07 11:30:56 +02:00
wmayer
8fb5da86b4
Gui: [skip ci] in QuantitySpinBox first set pendingEmit to false before actually emitting the signals
2020-06-02 08:22:24 +02:00
wmayer
15c9644008
Gui: [skip ci] make QuantitySpinBox to handle disabled keyboard tracking
2020-06-01 18:47:54 +02:00
wmayer
a1ab4bb3f2
Gui: [skip ci] remove superfluous word
2020-04-30 11:35:53 +02:00
wmayer
227246e01b
Gui: [skip ci] avoid to override the format settings of the quantity after validating the input text
2020-04-28 18:43:50 +02:00
wmayer
a74137146b
Gui: [skip ci] fix size hint of QuantitySpinBox by setting text margins of 2px
...
See https://forum.freecadweb.org/viewtopic.php?f=3&t=45344
2020-04-28 16:53:52 +02:00
wmayer
379018cde4
[skip ci] fix superfluous workarounds
2020-01-09 23:36:28 +01:00
wmayer
d700744052
fixes 0004059: Tooltips for Gui::QuantitySpinBox not showing [skip ci]
2020-01-09 22:39:47 +01:00
wmayer
a03244fa1e
Gui: [skip ci] when changing expression of a widget then set tooltip only for the label child but not for the widget itself
...
this allows that a custom tooltip can be set
2020-01-09 21:35:13 +01:00
wmayer
222a84423d
Gui: [skip ci] avoid weird acronyms in function names
2020-01-09 17:23:12 +01:00
donovaly
65acf2371e
QuantitySpinBox: add function to set/change tooltip at runtime
2020-01-07 07:39:28 -03:00
wmayer
a056d85f7d
Gui: implement size hint for quantity spin box
2019-12-22 11:52:59 +01:00
wmayer
98dfe7c387
add posibility to use a unit schema other then the system schema to represent a quantity
2019-12-21 13:35:14 +01:00
wmayer
b6ae122351
Gui: set/get number of decimals of a quantity spin box
2019-12-20 14:44:40 +01:00
Zheng, Lei
ea7eee8061
Expression: split Expression.h to ExpressionParser.h
...
Split Expression details into a separate header to reduce recompilation
time on changes.
2019-09-28 15:30:41 +02:00
wmayer
5f4deea7c9
fixes 0003794: Shortcut-Key is executed in edit field of a constraint (Combo View)
2019-02-16 21:53:23 +01:00
wmayer
93163b28d0
Improve usability of expression dialog:
...
+ add signal showFormulaDialog to QuantitySpinBox in order to indicate whether the formula dialog opens or closes
+ when formula dialog opens then hide the button box in the parent dialog, show it again when the formula dialog closes
2018-08-23 12:22:57 +02:00
wmayer
e06ae2cfde
when resetting expression on angle convert value back to radian
2017-10-19 23:47:51 +02:00
wmayer
8b2fcf3677
fix several kind of warnings:
...
+ fix -Wparentheses/-Wlogical-op-parentheses
+ fix -Wunused-variable
+ disable -Wundefined-var-template due to many false-positives (clang)
+ fix -Winconsistent-missing-override
+ fix -Wmaybe-uninitialized
2017-10-15 19:12:07 +02:00
Markus Lampert
5632f17d81
Fixed expression retrieval if no expression is set.
2017-10-10 13:06:35 +02:00
wmayer
187c398cd4
support of sub-properties when binding QuantitySpinBox via Python
2017-10-07 19:01:33 +02:00
Markus Lampert
b76f9d5423
Disabled debug printing.
2017-10-07 15:52:31 +02:00
Markus Lampert
b28e48c10b
Added read-only 'expression' property to QunatitySpinBox and renamed 'boundTo' to 'binding'.
2017-10-07 15:52:31 +02:00