Contains methods to serialize/deserialize colors from xml and strings,
where the colors are losslessly stored/restored.
The previous methods for storing colors (Eg QgsSymbolLayerUtils::encode/decodeColor)
are lossy, and only store QColors as 8 bit RGB representations. In
contrast, the new methods store the full lossless representation of
a QColor, including support for 16 bit color components, extended
RGB color components, and storage of HSL/HSV/CMYK color specifications
using their original color components instead of RGB components.
When these new methods are used in place of the existing lossy methods,
they open the possibility of 16 bit color support for QGIS symbols/projects,
(and potentially future CMYK color support).
two separate new options
This setting was ambiguous in meaning -- it could be interpreted
as either:
"I don't care about overlapping labels, use them when
you have no other choice"
OR
"I want to see labels for EVERYTHING in this layer, and I don't
care what you have to do to show me those"
This leads to situations like those discussed in #41043, where some
users interpret the setting as the first meaning and get confused
when eg. a curved label line layer starts showing horizontal placements
for some features which couldn't otherwise be labeled (eg short
lines).
So, split the setting into two new options (checkboxes) with explicit, clear
distinction:
- "Allow overlapping labels if unavoidable": This setting means labels
can be overlapping, if there's no other option. It does NOT gaurantee
that all features in the layer will have labels, because other
constraints (such as lines too short to fit a label's text) will still
be respected and may prevent labels for the feature.
- "Allow inferior fallback placements": This mode permits features
to fallback to worse placement options when there's no other choice,
e.g. when a line is too short to fit a curved label text then the
label may be placed horizontally just over the feature's center
point.
The combination of checking BOTH options WILL gaurantee that
all features in the layer are labelled, albeit with both overlapping
labels and the degraded placements!
Fixes#41043
- Adds an abstract base class for profile generators,
QgsAbstractProfileGenerator. This is modeled off the approach
used by map layer renderers, where a QgsAbstractProfileGenerator
subclass object is created in the main thread and does all
required (hopefully inexpensive!) preparation steps necessary
to do on the main thread. Then a separate background thread can
later call the virtual generateProfile method, which does
the heavy lifting of calculating the associated profile. Later
the results of the profile generation can be retrieved back
on the main thread.
- Adds an interface "QgsAbstractProfileSource" for objects which
can create a profile generator given a QgsProfileRequest. Map layer
classes will implement this interface, but potentially 3rd party
(plugin based) objects can also implement the interface if they
also want to add custom results to the profile charts (e.g.
borehole trace lines).
correct place
This fixes the rendering of vector tiles layers which are constructed
in any non web mercator CRS.
(Unfortunately the required information is not recorded in mbtiles
packages, so it's necessary to set the correct parameters via
API calls when trying to load non-3857 mbtiles.)
Allows elevation properties to be set for vector layers, including:
- altitude binding
- altitude clamping
- extrusion
- scale
- offset
These properties can be set through the new "Elevation" tab in
the vector layer properties dialog
Allows elevation properties to be set for raster layers, including:
- whether raster values represent heights
- scale
- offset
These properties can be set through the new "Elevation" tab in
the raster layer properties dialog
A group layer is a map layer which consists of a set of
child layers, where all component layers are rendered as a single
flattened object during map renders.
This commit sets up the base framework for QgsGroupLayer only
(i.e. no rendering changes).