Replace the int of the SubType of SelectionChanges with an enum class.
The meaning of it is nowhere documented and some magic numbers like 0,1,2 are used in several places in the code.
Replace the int of the 'resolve' argument of several functions with a proper enum class.
* This avoids the inconsistencies in client code where often true/false is passed when an int is expected
* This avoids the use of magic numbers like 0, 1, 2 or the undocumented 3
- fix bug that you can select several objects across different document to make them a group
- fix bug that when more than one object is selected you get a context menu to rename, despite it is unclear what object should be renamed
- add feature to select also the child objects of the selection
The latter was also requested long time ago: https://tracker.freecadweb.org/view.php?id=2397
Qt has deprecated the following constants, this commit replaces them
with their new equivalent/replacement:
Qt::TextColorRole -> Qt::ForegroundRole
Qt::BackgroundColorRole -> Qt::BackgroundRole
QPainter::HighQualityAntialiasing -> QPainter::Antialiasing
QPalette::Foreground -> QPalette::WindowText
Adds checkboxes to the document tree which makes it possible to
select multiple document objects on devices without physical keyboard.
These checkboxes are opt-in and can be enabled/disabled from:
Edit -> Preferences -> Display -> Navigation -> Selection
Forum thread for feature the request:
https://forum.freecadweb.org/viewtopic.php?f=34&t=53065
We need to iterate the tree to add/remove the selection boxes when
the enable-setting has been changed.
The size for the first column in the tree is adjusted to fit both
name and optional checkbox.
===============================================
Before this implementation, specific status via former mergeOverlayIcon() was greyed out
with the visibility.
With this commit, the developer has two options:
a) override mergeGreyableOverlayIcons, in which case the overlay will
be greyed out when the item is greyed out as per former mergeOverlayIcon()
b) override mergeColorfulOverlayIcons, in which case the overlay will
be superimposed after the icon is greyed out as it is the case for stardard
error and recompute flags.
The sketcher view provider doesn't need a transaction on double-click or otherwise shows a useless entry in the undo dialog which when undoing leads to weird behaviour
+ rename method setMatchExact() to setExactMatch()
+ move handling of user-defined parameters to class ExpressionParameter
+ Qt::MatchExactly is not supported by QCompleter, use Qt::MatchStartsWith instead
+ add possibility to change match behaviour via context-menu
Fixes#4428
Filter mode set to Qt::MatchContains for tree view search and link
property editor object search.
Other usage of the completer (e.g. property editor, speadsheet) defaults
to Qt::MatchContains, but can be changed using parameter,
BaseApp/Preferences/Expression/CompleterMatchExact
Add new argument to Application::newDocument() to create a temporary
document. Also exposed to Python API App.newDocument() with a named
argument 'temp'.
The temporary document is marked with status bit 'TempDoc'. The user
will not be prompt for saving when closing. The undo/redo is disabled.
The AutoSaver skips it. And the tree view will not show it.
PropertyXLink allows linking to/from object within a temporary document
without saving.