* FEM: Add context menu entry for clearing the reference list in constraints
See #6085
* FEM: Add 'Remove' button to python based dialogs for adding geometry references
See #6085
This commit is generated using regex based find and replace:
```
s/[\w:]+_cast\s*<([^>]+)\*>\s*\(\s*getObject\(\s*\)\)/getObject<$1>/
s/[\w:]+_cast\s*<([^>]+)\*>\s*\(\s*([^)]*)\s*->\s*getObject\(\s*\)\)/$2->getObject<$1>()/
```
To regenerate if needed.
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).
- the spring constraint is currently unused but it can be used for Elmer mechanical analyses
This PR does so and also overhaul the dialog UI.
- use the spring constraint also in an example file
* Now the behavior is consistent with behavior of PD fillets, for example.
See https://forum.freecadweb.org/viewtopic.php?f=18&t=67135#p580192. In the
future it may be possible to reuse some code from there.
* When the last selected item is removed we need to reset the existing
highlighting separately.
* Use `Gui::ButtonGroup` in `TaskFemConstraintOnBoundary`
Use the previously added superclass `TaskConstraintOnBoundary` for more
constraints where it's usable.
Currently done:
TaskFemConstraintDisplacement
TaskFemConstraintForce
TaskFemConstraintSpring
TaskFemConstraintFluidBoundary
TaskFemConstraintHeatflux
TaskFemConstraintFixed
TaskFemConstraintTemperature
TaskFemConstraintPressure
Too different:
TaskFemConstraintTransform (single selection)
TaskFemConstraintContact (single selection, two fields)
TaskFemConstraintPlaneRotation (single selection)
(Other constraint tasks, which do not use `addToSelection`)
* improve implementation of TaskFemConstraintForce::onButtonDirection
* use QSignalBlocker to tmp. suppress signals instead of dis- and re-connecting
* directly access object from SelectionObject
* don't do type checks by class name but by typeid