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.
Consists of a filter line edit + button to open expression builder
This widget is a bit like the existing QgsFieldExpressionWidget,
but for cases where a combo box does not make sense. Eg, when
no fields are available for the expression to use.
It also has an optional multiline mode, which allows it to be
used in place of the full-blown QgsExpressionBuilderWidget when
space is a problem.