Moved all temporary projector members to a private class,
so even recursive block() calls will not affect each other
(there is no new performance penalty as block() call always
recomputes the temporary control point matrix anyway)
This change allows users to choose which method to use when running
the simplify geometries algorithm, with choices of the existing
distance based (Douglas Peucker) algorithm, area based (Visvalingam)
algorithm and snap-to-grid.
Visvaligam in particular usually results in more cartographically
pleasing simplification over the standard distance based methods.
This allows to declare data dependencies between layers. A data
dependency occurs when a data modification in a layer, not by direct
user manipulation may modify data of other layers.
This is the case for instance when geometry of a layer is updated by a
database trigger after modification of another layer's geometry.
Instead of using QFont's inbuilt capitalization support, which
applies only on rendering and accordingly fails for curved
labels which are drawn one character at a time, we now manually
capitalize label text while registering features.
The capitalize first method from Qt was reimplemented in QgsStringUtils
(together with what I expect is better handling of unicode characters
over the Qt method).
This change also makes it possible to implement other capitalization
methods not directly supported by Qt
This is a partial implementation - QMaps are still used internally
within QgsVectorLayer to track the alias/default values
between attribute edit operations.
Sponsored by DB Fahrwegdienste GmbH
Allows an expression to be set for a vector layer field which
is used to evaluate a default value for this field.
A new method,
QgsVectorLayer::defaultValue( int index,
const QgsFeature& feature = QgsFeature(),
QgsExpressionContext* context = nullptr )
has been added which evaluates the default value for a given field
using the optionally passed feature and expression context. This
allows default values to utilise properties of the feature
which exist at the time of calling, such as digitized geometries.
The expression context parameter allows variables to be used
in default value expressions, making it easier to eg insert
a user's name, current datetime, project path, etc
Default values are set using QgsVectorLayer::setDefaultValueExpression()
and retrieved using defaultValueExpression()
Adds the ability to specify a list of text substitutes to make
which apply to label text. Eg abbrevating street types.
Users can export and import lists of substitutes to make
reuse and sharing easier.
Now the widgets factories can give a score on how good they could handle
a widget.
Additionaly, plugins can be added to choose a widget factory in function
of an external information. One of them uses a table in PostgresQL to
allow specification of the widget type and configuration.
I took the opportunity to remove a few deprecated method in relation to
this.
Now the dialogs use a copy of the ramp, and the edited
ramp is retrieved by calling ramp() on the dialog after
it is executed.
Avoids pointer lifetime issues by storing and working
on a ramp pointer which the dialog does not have ownership
on.
Also fix a bunch of leaks relating to cloning color ramps.
QgsVectorColorRamp -> QgsColorRamp
QgsVectorGradientColorRamp -> QgsGradientColorRamp
QgsRandomColors -> QgsRandomColorRamp
QgsRandomColorRamp -> QgsLimitedRandomColorRamp
QgsVectorColorBrewerColorRamp -> QgsColorBrewerColorRamp
These color ramps are used throughout all of QGIS (not
just in vector symbology) and the current names are
misleading.
This feature adds a 'collect' aggregation method resulting in a
single multipart geometry from a list of geometries. This is exposed
in the expression engine via the existing aggregate() function,
as well as a new collect() function.