Attached to QgsProject, this provides a stable, supported method
of managing project bookmarks (vs the old undocumented, not stable
approach of directly manipulating project keys)
This causes the project to be read, but no data providers created for
layers (i.e. the same result as loading a project in the app and
choosing to leave bad layers in the project).
It's intended for occasions when you want to efficiently access properties
of a project without the (often very expensive) cost of actually
loading layers. E.g. to just read project metadata, parse the
layer tree structure, extract print layouts or renderer properties, etc.
Adds a new visitor pattern API for creation of visitors which visit
all the style entities (symbols, color ramps, text formats, and
label styles) associated with different objects. Can be used on a
renderer, map layer, or project wide level.
E.g. on a project wide level, allows collection of ALL the style
symbols/color ramps/text settings inside a project, including those
in layouts or annotations!
For the c++ api dox this expands to "\c nullptr" (the
\c directive indicates a code literal value), and for sipify/Python
it expands to ``None`` (`` is sphinx annotation for literal values)
Makes for nicer dox for both c++ and Python!
... and to count them
Tests updated accordingly, note that from now on
the assumption that a layer store or a layer project
contains only valid layers will not be true anymore.
To be honest it has never been true, because a
layer can become invalid at any time during
its life cycle, so better never assume that a
layer from the store or from the project is vaid.
* create QgsMapLayer::LayerFlags for Searchable, Identifiable and Removable
this brings back the information previously saved in the project node back to the layer node
this will allow to embed this information in layer styles
* skip unexisting flag node to avoid setting wrong value for flag
* mark QgsProject::(set)requiredLayers as deprecated
* better API docs
* use new API in current code
* more docs and more old API fixes
* fix bad conversion
* more old API fix
* add missing SIP_OUT
* s/testFlags/testFlag
* fix var name
* adapt project test to test flags
* remove debug calls
* fixeS
Translated objects and tests included:
- [x] layer names
- [x] layer group names
- [x] relation names
- [x] attribute alias (if no alias, then the field translation)
- [x] forms group box titles
- [x] forms sub group box titles
included restructured with QTranslator object.
Updated test-data used for the test.