7160 Commits

Author SHA1 Message Date
Nyall Dawson
5d97d03ad5 [processing] Fix simplify alg handling of null goemetry, add tests 2016-09-01 07:50:02 +10:00
Nyall Dawson
f9e508c566 [processing] More efficient point count for simplify algorithm 2016-09-01 07:42:29 +10: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
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
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
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
volaya
7884e50c31 [processing] fixed dialog for selecting scripts 2016-08-29 14:13:49 +02: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
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
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
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
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
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
b7716aa7fb Docs + cleanups for color ramp dialogs 2016-08-24 21:01:03 +10:00
Nyall Dawson
cf9292cc6d Color ramp dialogs no longer edit ramps in place
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.
2016-08-24 21:01:03 +10:00
Nyall Dawson
7413db79b0 Rename color ramp dialogs to match new ramp class names 2016-08-24 21:01:03 +10:00
Nyall Dawson
932e469e5f Rename color ramp classes to more sensible names
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.
2016-08-24 21:01:03 +10:00
nirvn
2a326ef8ad [FEATURE] support aggregation of geometry
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.
2016-08-24 08:39:05 +07:00
Nyall Dawson
5735be131f [FEATURE] Make map unit scaling dialog show inline in style dock 2016-08-24 07:51:03 +10:00
Alexander Bruy
6475fd2129 fix typo 2016-08-24 00:03:07 +03:00
Nyall Dawson
e0229ad8c7 Merge pull request #3423 from nyalldawson/remove_deprecated
Remove unused QgsProvider(Count|ExtentCalc)Event classes
2016-08-24 06:59:41 +10:00
arnaud.morvan@camptocamp.com
f0413e36d6 Do not set "None" value in batch panel string widgets 2016-08-23 17:52:10 +02:00
Denis Rouzaud
f5aa28bb32 rename QgsFieldProxyModel::Filter All to AllTypes 2016-08-23 15:42:37 +02:00
Denis Rouzaud
7fdade1a3a remove some deprecated methods, rename QgsAnnotation::mapPositionFixed() to hasFixedMapPosition() 2016-08-23 15:00:56 +02:00
Alexander Bruy
eb308a604d fix open() call 2016-08-23 15:49:03 +03:00
volaya
008d3cd79a [processing] fixed extent selection from batch processing interface
fixes #15408
2016-08-23 14:41:20 +02:00
Alexander Bruy
3711a17066 add missed codecs import 2016-08-23 15:18:28 +03:00
Alexander Bruy
d7634bafff remove unused imports 2016-08-23 15:01:39 +03:00
Alexander Bruy
993aa842fb forgot to remove import 2016-08-23 13:34:51 +03:00
Alexander Bruy
6a7fa7dd5a [processing] add missed error() method 2016-08-23 11:25:14 +03:00
Alexander Bruy
640f93e758 [processing] update TauDEM tools to latest TauDEM version 2016-08-23 11:18:50 +03:00
Alexander Bruy
19a6a5fb90 [processing] fix CMakeLists.txt 2016-08-23 11:18:50 +03:00
Alexander Bruy
7866bdadf1 [processing] remove obsolete TauDEM multifile stuff 2016-08-23 11:18:49 +03:00
Alexander Bruy
df248dbe93 fix indentation 2016-08-23 10:17:03 +03:00
Alexander Bruy
10f72cd762 Merge branch 'otb_apps_export_improvment' of https://github.com/grizonnetm/QGIS into otb_apps_export_improvment 2016-08-23 10:16:24 +03:00
Nyall Dawson
cb313761ca Remove unused QgsProvider(Count|ExtentCalc)Event classes 2016-08-23 10:03:52 +10:00
Manuel Grizonnet
ce0a2ae062 forget to commit xml descriptors for otb 5.6 2016-08-22 15:56:30 +02:00
Manuel Grizonnet
d772a68472 Update otb processing maintenance files to version 5.6.0 2016-08-22 15:39:41 +02:00
Martin Dobias
26dd13063e [FEATURE] Drag'n'drop layers from layer tree view to browser dock
Makes it easy to e.g. store your temporary layers in PostGIS
2016-08-22 10:38:10 +08:00
Nyall Dawson
8f4ca47b70 New QgsExpressionLineEdit widget
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.
2016-08-22 08:39:33 +10:00
Manuel Grizonnet
bf7db728f3 ENH: update log info when parsing otb apps 2016-08-21 20:55:29 +02:00