While it was possible to set the opacity for individual symbol layer
colors via data defined expressions, it's so far been impossible to
set a data defined expression to control the overall symbol opacity.
This commit fixes that omission...
The aim of this work is to be able to provide custom subset string editor
GUI according to the layer. Typically, so that a WFS layer uses the same
editor than in its select source, or that a plugin can provide a custom
editor.
* Add QgsSubsetStringEditorInterface: abstract interface to define a dialog
that can edit a subset string
* Make QgsQueryBuilder implement QgsSubsetStringEditorInterface
* Add QgsSubsetStringEditorProvider: interface for thos who want to provide
a dialog to edit a subset string.
* Add QgsSubsetStringEditorProviderRegistry: keeps a list of subset string
editor providers. Transposed from QgsDataItemGuiProviderRegistry
* Add QgsGui::subsetStringEditorProviderRegistry()
The SIP_FACTORY annotation didn't do the job for a Python implementation
of createChildren(). We must write a custom VirtualCatcherCode to make
sure that if the returned QgsDataItem elements are Python objects they
aren't killed too early.
Fixes the new added test, which uses to crash before the fix,
and corresponds to the use case of a plugin defining its own data items.
Has been checked not to cause memory leaks.
The change of SIP_FACTORY to SIP_TRANSFERBACK is to avoid a memory
leak when Python calls a C++ createChildren() implementation. Was found
by making test_provider_ogr.py::testDataItems() loop on its call to
createChildren()
- Make test() method virtual so it can be overriden in a derived class
- Make enabling/disabling of "use unfiltered layer" checkbox automatic
when layer's subsetString is changed (for example by an overriden
test() implementation)
- Add a codeEditorWidget() method that returns the sql editor widget,
so that custom behavior can be added.
This is a "null" shading material which should be used when
rendering models or scenes with native textures and no material
should be explicitly set on the loaded entities.
All the logic for rendering non-opaque layers is handled in a layer
type agnostic way already, so this just allows the existing handling
to be used for mesh/point cloud/vector tile/etc layers also