Commit Graph

91 Commits

Author SHA1 Message Date
Benjamin Bræstrup Sayoc
f647d4a1eb Gui: Use QStringLiteral 2025-02-10 18:34:57 +01:00
Tobias Frost
7a5a3d1ffc spelling fixes (#18688)
* Fixes spelling of "Allow to" to "Allow one to"

and those variants:
Allows to -> Allows one to
allow to -> allow one to
allows to -> allows one to

* Fix "Let's -> Lets"

(and lower case variant.)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update src/3rdParty/salomesmesh/inc/MED_Wrapper.hxx

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Update src/Base/PyObjectBase.cpp
Update src/App/ExtensionContainer.h
Update src/App/PropertyContainer.h

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Use gerund in user-facing texts.

* Use gerund for two more user-facing strings.

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Update src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Update src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Update src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

---------

Co-authored-by: Tobias Frost <tobi@debian.org>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-01-13 11:22:20 -06:00
Ladislav Michl
2ea8a633ac Base: Quantity: return std::string 2024-12-23 17:48:42 +01:00
Ladislav Michl
0ee3c9f8e6 Base: Drop QString-std::string conversion functions from Tools
Convenience helpers function Tools::toStdString and Tools::fromStdString
were implemented for Qt4 or older to perform utf8 aware conversion as
QString::toStdString/QString::fromStdString were using toAscii/fromAscii
internally (see https://dreamswork.github.io/qt4/classQString.html).

Since Qt5 QString uses toUtf8/fromUTf8, which makes the helper functions
obsolete (see https://doc.qt.io/qt-5/qstring.html#fromStdString).
2024-12-02 23:30:53 -05:00
Benjamin Bræstrup Sayoc
e661774a29 [Gui] Center expression icon 2024-11-11 18:32:34 +01: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
0efab730c1 Gui: split icon handling from ExpressionBinding 2023-03-09 12:43:44 +01:00
wmayer
103de43a4e Gui: fix possible problems with new style connect
* In UIntSpinBox rename the signal to not overwrite the signal of the base class
* In UIntSpinBox use the (ambiguous) signal 'valueChanged' of the base class QSpinBox
* To avoid that connect() fails use the function pointer of the Qt class where the signal is defined
2023-01-12 17:02:59 +01:00
Uwe
ed995b5a15 [Gui] modernize some connect() settings
- addresses #6166
2023-01-12 15:13:16 +01:00
wmayer
09550656c2 Qt6 port:
* Constructor of QFontDatabase is deprecated, use static functions instead
* Fix QuantitySpinBox::selectNumber()
* Fix InputField::selectNumber()
* Make InputField::fixup() compatible with Qt6
* QFont::setWeight requires an enum now
* QInputEvent reuires a pointing device now
* QAbstractItemView::viewOptions() has been renamed to QAbstractItemView::initViewItemOption()
2022-11-03 12:38:11 +01:00
0penBrain
ccbc9612ed Gui: optionally disable wheel event when Gui::InputField doesn't have focus
Reuse "ComboBoxWheelEventFilter" switch that already acts on combo and spin boxes
2022-10-07 10:40:57 -07: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
berniev
a909df7f39 Gui: Single arg ctors must be explicit (PR #7369) 2022-08-24 15:06:03 +02:00
berniev
0c70d45c83 Gui: Use override etc 2 2022-08-09 12:43:23 +02:00
berniev
656ef8961f Gui: redundant void 2 2022-08-08 10:21:44 +02:00
berniev
d88729d2c4 Gui: use empty 2022-08-06 16:35:45 +02:00
Uwe
5b25c97589 [Gui] fix unreferenced local variable warning
- fixes: warning C4101: 'e': unreferenced local variable
2022-07-27 01:35:08 +02:00
0penBrain
38473f24be Make image scaling command aware of user units (#7222)
* Image: image scaling command is user unit aware ; fixes #6118

- if unitless value entered, InputField uses user choosen base unit
 Before change, always used FC core base unit
 Only applies to GUI user entered values, value changed programmatically still ...
 ... considered in core base unit if applied unitless
2022-07-25 21:17:02 +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
0penBrain
68d7892fb0 Gui: fix locale number formatting propagation 2022-03-29 10:26:49 +02:00
Uwe
94f871f126 [Gui] a Win compile fix 2022-03-27 15:30:48 +02:00
wmayer
0afc5e5af5 Gui: [skip ci] fix locale issue for InputField on Windows 2022-03-27 11:35:46 +02:00
wmayer
63636c8082 Gui: [skip ci] fix locale issue with InputField
The change of 7de33a8fa9 added a regression as shown here: https://github.com/FreeCAD/FreeCAD/pull/6640#issuecomment-1079727756
Thus reverting it.
2022-03-26 17:44:05 +01:00
Uwe
7de33a8fa9 [Gui] fix locale issue with InputField
fixes the issue first reported here: https://github.com/FreeCAD/FreeCAD/pull/6364#issuecomment-1072886169

Now, since PR #6364 was merged, we must no longer remove the group separator.

(The issue broke for example the FEM results: https://forum.freecadweb.org/viewtopic.php?p=582524#p582524.)
2022-03-25 22:09:43 +01:00
Uwe
10380abd95 [Gui] Manual alignment etc.: remove unused includes 2022-03-02 04:22:48 +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
Chris Hennes
50c7ee36bf [GUI] Remove code for Qt < 5.9 2021-04-02 10:10:37 +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
luz paz
298c677873 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
wmayer
34f4b712d8 Qt5: fix deprecation warnings of QWheelEvent in Qt 5.15 2020-10-18 14:45:31 +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
luz.paz
f11783a498 src/Gui: [skip ci] fix header uniformity
This PR fixes header uniformity across all `src/Gui` files
2019-12-25 11:39:17 +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
66da83ef92 fixes 0003605: Scrolling on length inputs with Building Euro unit system has max value 2019-02-21 13:30:13 +01:00
wmayer
a12f4f364f fixes 0003823: FEM, unusable material property changing when using task panel 2019-02-18 23:26:00 +01:00
wmayer
0cc8efa105 simplify handling of locale specific with InputField from Python 2019-01-17 02:57:00 +01:00
wmayer
a6a004b6b2 fixes #0002866: Gui::InputField rounds values to 2 digits 2018-01-02 12:32:09 +01:00
wmayer
483d099671 remove now superfluous member from InputField 2018-01-02 12:31:32 +01:00
wmayer
cfc3dc22ad respect format option when changing values with wheel or up/down keys in input field 2018-01-02 12:11:45 +01:00
wmayer
533a78026a add method toFormat to get number format from character 2017-08-20 18:50:13 +02:00
Oliver Oxtoby
21fd2743a8 Base: Add properties to InputField for setting Quantity from Python
These additions are designed to allow easier interaction with the
InputField box from Python. Particularly, the ability to put the
format into scientific notation to prevent truncation of values.
There is also a need for a way to input a new value into the
text box such that it is formatted correctly.
- 'quantityString' property - allows to check, set, format and
display the underlying value. The only way to achieve this
currently from Python is to set the widget text, then hide and
re-show it to format the value.
- 'format' property: set to 'f' (fixed - default),
'e' (scientific) or 'g' (general - recommended)
to set the number format from Python or UI file
- 'precision' property: as above, number of decimals/significant
figures if it is desired to override the global default
2017-08-20 16:50:01 +02:00
Markus Lampert
71130d09ed Do not overwrite tooltips for InputFields. 2017-08-20 10:22:33 +02:00
Kunda
19f8fd4c10 source typo fixes pt5
+ cleaning up some more non-short-URLs
Issue #2914
2017-03-04 13:07:13 -03:00
wmayer
816336ce65 register Quantity type for shiboken2, handle exception to fix abort when setting quantity property of InputField via Python 2016-12-30 22:51:17 +01:00
wmayer
9fe82bfbb9 fixes #0002460: Use keyword 'explicit' for Quantity constructor 2016-11-05 23:21:42 +01:00
wmayer
f944ab3846 replace deprecated auto_ptr with unique_ptr 2016-09-22 13:01:20 +02:00
wmayer
f19d424d8b fix -Wextra in FreeCADGui 2016-09-21 20:54:52 +02:00
maurerpe
8de9436c36 Add missing header files
Needed for Qt5, recommended for Qt4
2016-02-24 23:55:40 +01: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