34511 Commits

Author SHA1 Message Date
Juergen E. Fischer
a9464d7c94 db manager: don't consider added layer w/o a dataProvider
(cherry picked from commit 28aa9ebdb75eb099b83a3596b3f3c5c6e5c6f591)
2016-08-30 20:57:00 +02:00
Matthias Kuhn
46ea229049 Fix doxygen 2016-08-30 16:08:53 +02:00
Matthias Kuhn
d6a4ab1c0b Expose QgsCoordinateReferenceSystem to QML 2016-08-30 16:08:18 +02:00
Hugo Mercier
e6fd2e2503 Snapping: destroy index on dataChanged signal
Snapping caches on layers that have been changed by the provider or
by external sources are now invalidated.
2016-08-30 11:08:06 +02:00
nirvn
08f5ae67b1 Remove composer window visibiliy state restoration upon project load
(fixes #15495)
2016-08-30 13:45:37 +07:00
Nyall Dawson
15dd29564c Fix Capitalize First Letter fails with curved labels (fix #14875)
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
2016-08-30 15:34:05 +10:00
Martin Dobias
e2bcba54d6 WMTS preview - require a temporary image for updates of the raster
Otherwise we would end up with rendering artifacts due to overpainting
2016-08-30 12:04:59 +08:00
Nyall Dawson
0658640fa0 Merge pull request #3418 from nyalldawson/default_values2
[FEATURE] Client side default values
2016-08-30 13:25:37 +10:00
Nyall Dawson
97d7b7339e Move storage of field alias and default value to QgsField
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
2016-08-30 12:40:55 +10:00
Nyall Dawson
99405864ca Add a changed signal to QgsEditorConfigWidget
And update default value expression preview whenever editor
config changes

Sponsored by DB Fahrwegdienste GmbH
2016-08-30 12:40:52 +10:00
Nyall Dawson
e35c6b4640 Use widget representValue to preview default expression results
Sponsored by DB Fahrwegdienste GmbH
2016-08-30 12:40:47 +10:00
Nyall Dawson
6d28eb5f2a Optimise expression context creation
Sponsored by DB Fahrwegdienste GmbH
2016-08-30 12:40:42 +10:00
Nyall Dawson
8ae7e3f4ee Use client side default values when creating new features
Sponsored by DB Fahrwegdienste GmbH
2016-08-30 12:40:39 +10:00
Nyall Dawson
66cb422669 Add UI for setting default field value expressions in the
field property dialog

Sponsored by DB Fahrwegdienste GmbH
2016-08-30 12:39:55 +10:00
Nyall Dawson
4d5bae22b8 [FEATURE] Client side default field values
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()
2016-08-30 12:39:55 +10:00
Nyall Dawson
7dea9700a6 [FEATURE] Substitution list support for labeling
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.
2016-08-30 12:39:54 +10:00
Nyall Dawson
891370fd68 Merge pull request #3438 from nyalldawson/replace
[FEATURE] Substitution list support for labeling
2016-08-30 08:46:35 +10:00
Matthias Kuhn
4a89b7c470 Fix dimension detection in postgres provider 2016-08-29 19:33:32 +02:00
Matthias Kuhn
a529b448e7 Revert "Merge pull request #3338 from pvalsecc/editor_widgets_selection"
This reverts commit bbafbf48872eda48a2be8876cc89a0770552c6ad, reversing
changes made to 13ac0434e10fc7edd1eca665ea7c8b6cb5fd212d.
2016-08-29 19:22:04 +02:00
Matthias Kuhn
b1448233e9 Move QgsMapLayerProxyModel and QgsMapLayerProxyModel to core
Because it's also useful for non-widget applications
2016-08-29 18:43:20 +02:00
Matthias Kuhn
bbafbf4887 Merge pull request #3338 from pvalsecc/editor_widgets_selection
Smarter default edit widgets with plugins to pick them
2016-08-29 17:14:14 +02:00
Juergen E. Fischer
13ac0434e1 creatensis.pl: use passed in version number
(cherry picked from commit 88540c120e933715c397593f498e3a32ff5fb315)
2016-08-29 14:46:47 +02:00
volaya
7884e50c31 [processing] fixed dialog for selecting scripts 2016-08-29 14:13:49 +02:00
Matthias Kuhn
280203e988 If QgsRectangle is empty when combined, replace
It makes no sense to use an empty rectangle to combine with
2016-08-29 13:38:38 +02:00
Nyall Dawson
46fba7ce80 [FEATURE] Substitution list support for labeling
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.
2016-08-29 17:18:34 +10:00
Nyall Dawson
9253228f7f Merge pull request #3434 from pvalsecc/lessWKB
Avoid back and forth with WKB in rendering
2016-08-29 15:54:24 +10:00
Patrick Valsecchi
24bde35ce6 Smarter default edit widgets with plugins to pick them
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.
2016-08-29 07:42:50 +02:00
Patrick Valsecchi
db91330b66 Avoid back and forth with WKB in rendering 2016-08-29 06:55:52 +02:00
Nyall Dawson
235204fc3d Followup 9ba41e9, SQL convention is sum of no records=NULL 2016-08-29 13:41:13 +10:00
Nyall Dawson
7300cda86b Merge pull request #3435 from nyalldawson/interpolate_angle
Expression functions to Interpolate angle (+ related processing improvements)
2016-08-29 12:54:25 +10:00
Nyall Dawson
9ba41e9f27 Fix calculation of certain aggregates from expressions when no
matching features exist

Eg sum and count should return 0 in this case rather than
null
2016-08-29 12:08:28 +10:00
Nyall Dawson
da78ddeb7c [FEATURE] New expression functions for angle/distance interpolation
angle_at_vertex: returns average (bisector) angle to a geometry
at a specified vertex index
distance_to_vertex: returns distance along geometry to a specified
vertex index
line_interpolate_angle: calculates the angle parallel to a geometry
at the specified distance along the geometry

Sponsored by Andreas Neumann
2016-08-29 11:02:17 +10:00
Nyall Dawson
9fa4e776db [FEATURE][processing] Extract nodes algorithm now saves node
index, distance along line and angle at node

Also correctly handles null geometries
2016-08-29 11:02:14 +10:00
Nyall Dawson
986b5313ed Add QgsGeometry method to get bisector of angle at vertex
Sponsored by Andreas Neumann
2016-08-29 11:01:52 +10:00
Nyall Dawson
8db9284cb3 [FEATURE][processing] Optimised points along geometry algorithm
Supports also polygon geometries, handles null geometries,
and records the original line angle along with the distance
for each point.
2016-08-29 11:01:48 +10:00
Nyall Dawson
9a9a49c16a Make QgsGeometry::interpolate handle polygon geometries 2016-08-29 08:57:10 +10:00
Nyall Dawson
93c7f5f8b2 Add geometry methods for interpolating angle along geometry
Sponsored by Andreas Neumann
2016-08-29 08:57:10 +10:00
Juergen E. Fischer
420311e7f1 processing: fix population of commander combobox (fixes #15283)
(cherry picked from commit d3882d5)
2016-08-28 23:00:10 +02:00
Juergen E. Fischer
485d7a0a47 dxf export: link vertices to polyline (fixes #15484)
(cherry picked from commit 052d3ef851beef7cbbfa3c699c1c95b0d84dc3e2)
2016-08-28 17:17:08 +02:00
Nyall Dawson
d477d19ec8 Fix potential crash 2016-08-26 07:57:46 +10:00
mhugent
19dea08cf1 Merge pull request #3411 from mhugent/feature_info_segmentized_geometry
[FEATURE]: possibility to segmentize feature info geometry in server
2016-08-25 17:39:04 +02:00
Marco Hugentobler
9471a6bf3f Whitespace change 2016-08-25 13:57:45 +02:00
Nyall Dawson
e71e743c9d Merge pull request #3432 from nyalldawson/ramps
Color ramp API improvements, fixes + some style dock inlining
2016-08-25 20:57:42 +10:00
Juergen E. Fischer
1387695002 fix globe build 2016-08-25 10:42:38 +02:00
Martin Dobias
6214f6d4b5 WMTS preview functionality - early work 2016-08-25 15:18:58 +08:00
Nyall Dawson
5ac50353ef Indentation and docs 2016-08-25 06:00:10 +10:00
Alexander Bruy
57b5a7c843 Merge pull request #3431 from arnaud-morvan/processing_batch_none
[processing] do not set "None" value in batch panel string widgets
2016-08-24 14:36:06 +03:00
Nyall Dawson
b225a82b3e [FEATURE] Make color brewer and limited random ramp editors show
inline in style panel
2016-08-24 21:01:03 +10:00
Nyall Dawson
1d98b10904 Fix limited random color ramp always returns 1 less color than set 2016-08-24 21:01:03 +10:00
Nyall Dawson
b7716aa7fb Docs + cleanups for color ramp dialogs 2016-08-24 21:01:03 +10:00