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.
segments shorter than a certain threshold or sharp corners
with an angle exceeding a threshold
Expose the angle threshold to processing smooth algorithm
Also:
- optimise QgsGeometry::smooth for new geometry classes
- Fix smooth does not work with geometries containing Z/M
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()