1065 Commits

Author SHA1 Message Date
Hugo Mercier
e4288e5dea QgsExpression: set setGeomCalculator precedence
setGeomCalculator, setDistanceUnits and setAreaUnits have now
 precedence over expression scopes.
2019-02-14 13:40:12 +01:00
Hugo Mercier
809196693c Fix $length in labels (fixes #19355)
Use the project expression scope to access project
parameters (ellipsoid and distance/area units)
2019-02-14 13:40:12 +01:00
Nyall Dawson
7418c189d0 [processing] Also generate friendly names for outputs when converting models to scripts 2019-02-14 15:36:55 +10:00
Nyall Dawson
d342ce939b [processing] When converting models to Python, use friendlier (more
descriptive) names when storing child algorithm results

Makes for much easier to understand scripts
2019-02-14 15:36:55 +10:00
Nyall Dawson
69f45e389c Refactor QgsExpressionContext and move QgsExpressionContextUtils
out to its own header

Avoids slow recompilation caused by changes to the frequently
modified QgsExpressionContextUtils class
2019-02-13 07:59:30 +10:00
Nyall Dawson
e533a4078c [processing] Expose some model related variables to expressions
run inside models

Allows expressions to access important variables like the current
model path
2019-02-13 07:59:30 +10:00
Nyall Dawson
493aed58fb API tweak 2019-02-13 07:59:30 +10:00
Luigi Pirelli
2a917f4c10
Merge pull request #9049 from luipir/rasterSLD_export
Add SLD 1.0 export for rasters
2019-02-11 22:04:30 +01:00
Nyall Dawson
ceaf97b204 Remove a totally unused enum 2019-02-09 07:27:39 +10:00
Nyall Dawson
48e05434e4 Dox++ 2019-02-09 07:27:39 +10:00
Nyall Dawson
35ddb3b630 [browser] Provide mime data for directory items
Allows them to be dragged and dropped to file widgets
2019-02-09 07:27:39 +10:00
Matthias Kuhn
09407c1258
Merge pull request #9128 from m-kuhn/todo-qgis-4
Move QGIS 3 todos to QGIS 4
2019-02-08 08:02:17 +01:00
Matthias Kuhn
2fb37042a5
Fix TODO and docstrings 2019-02-07 14:36:43 +01:00
Matthias Kuhn
90f7989f4d
Move QGIS 3 todos to QGIS 4 2019-02-07 09:10:03 +01:00
Matthias Kuhn
32b6599df0
Merge pull request #9074 from m-kuhn/til
Deprecate QgsGeometry::set for usage in Python
2019-02-07 09:07:14 +01:00
lbartoletti
b4d01e461f qgsRound: places should be of integer type instead of double 2019-02-07 17:00:41 +11:00
Nyall Dawson
d61694cb42 Deprecate QgsDataItem API for setting item CRS
This is no longer used by QGIS (it was only ever used by the standalone
browser)
2019-02-07 04:14:16 +11:00
Matthias Kuhn
2400050878
Deprecate for sip 2019-02-06 13:09:23 +01:00
Matthias Kuhn
89ea819938
Make sure Python wrappers of quasi-singletons are kept alive
If they are deleted, any other python wrappers which have been parented to these singletons are deleted too.

One of the most common issues with this is, that subclasses of registry items are deleted and lost.
2019-02-06 12:18:41 +01:00
Matthias Kuhn
5f1cea13c7
Add docstrings and modernize code 2019-02-05 17:57:27 +01:00
Matthias Kuhn
4612521c50
Const correctnes for QgsFeature in labeling
A feature is not modified while it's sent through the labeling pipeline.
2019-02-05 17:16:23 +01:00
Martin Dobias
4f905cc2e8 [vertex tool] right-click to loop through editable features
Until now mouse right-click could only select and deselect the highlighted
feature to "lock" vertex tool (and numerical editor) to it, so that it is
easier to focus only on editing of the particular feature. It was however
still difficult to pick the right feature in case there were multiple
features in one location or very close to each other. This is now solved
by the fact that repeated right button clicks will loop through the editable
features. So if there are two features in one location (A, B) then repeated
right-clicks will select: A - B - nothing - A - B - nothing ...
2019-02-05 09:07:58 +01:00
Nyall Dawson
715395aa47 Fix incorrect 'not available in Python' dox 2019-02-05 13:46:34 +11:00
Nyall Dawson
867e39947b Allow for exact calculation of symbol sizes with mixed layer units
Fixes #21143
2019-02-05 11:07:02 +11:00
Nyall Dawson
384d310233 Minor improvements to PyQGIS returns for SIP_OUT params 2019-02-05 04:55:34 +11:00
Nyall Dawson
4b0f6b756c Slight improvements to Python docs 2019-02-05 04:55:34 +11:00
Mathieu Pellerin
8ac762e5e1
[ui] Fix tiny vertex marker on hidpi 2019-02-04 16:43:04 +07:00
Matthias Kuhn
612576ca8e
Deprecate QgsGeometry::set for usage in Python
When a new QgsAbstractGeometry is set on a geometry object, the previous child is deleted.
If the previous object was constructed by Python, it's wrapper will still be alive for
as long as the QgsGeometry is alive. If a new QgsAbstractGeometry is constructed at the same
memory address as the old one, the wrapper will be reused with wrong type (and other)
information, leading to all kind of weird issues.

See also https://www.riverbankcomputing.com/pipermail/pyqt/2019-January/041251.html
2019-02-03 19:47:01 +01:00
Nyall Dawson
eba5409ebc Dox++ 2019-02-03 13:02:18 +11:00
Nyall Dawson
c9e7616498 Fix hang when WMS credentials requested
Remove responsibility for credentials mutex locking from external
callers and handle appropriate locks internally. This allows the
mutex lock to be much "tighter" and avoids deadlocks when
credentials are requested while an existing credentials dialog
is being shown.

(No mutex is required protecting the credentials dialog itself
as this is ALWAYS shown in the main thread)

Fixes #20826
2019-02-03 13:02:18 +11:00
Etienne Trimaille
57695bd036 use upper camel case for the class name 2019-02-03 07:18:34 +11:00
Luigi Pirelli
3b1127ee70 spellechck do warning if htmls tags in methoid description => fail travis 2019-02-02 11:01:09 +01:00
Luigi Pirelli
bdda8d0b37 back to const methods 2019-02-01 18:13:05 +01:00
Luigi Pirelli
0e9af79165 fixed AStyle with astyle-all.sh 2019-02-01 14:42:36 +01:00
Nyall Dawson
03a2a03dcf Dox 2019-02-01 21:44:53 +11:00
Nyall Dawson
4908ef1641 Revert "Revert QgsBlockingNetworkRequest"
With recent changes in QgsNetworkAccessManager this should be
safe to resurrect (fingers crossed!). Also simplify code a lot,
because now QgsNetworkAccessManager handles waking the worker
thread after the auth request is handled.

Add a lot more tests
2019-02-01 21:44:53 +11:00
Nyall Dawson
f1040efc03 Nicer API for network timeouts 2019-02-01 21:44:53 +11:00
Nyall Dawson
dcb6104f47 Dox++ 2019-02-01 21:44:53 +11:00
Nyall Dawson
cc6d88e265 Add signal for logging after network authentication details have been added 2019-02-01 21:44:53 +11:00
Nyall Dawson
8ee2e793f8 Make network authentication request handling thread safe, avoid
races and crashes when auth requests occur in non-main thread

Like the recent SSL error handling, this commit abstracts out
the network authentication handling into a thread safe approach.
2019-02-01 21:44:53 +11:00
Nyall Dawson
9b2e60130f [processing] Update QgsProcessingModelAlgorithm::asPythonCode for 3.x API 2019-02-01 17:54:28 +11:00
Nyall Dawson
fb519ead46 Update QgsProcessingModelChildAlgorithm::asPythonCode for 3.x API 2019-02-01 17:54:28 +11:00
Nyall Dawson
946687c87b Update QgsProcessingModelChildParameterSource::asPythonCode 2019-02-01 17:54:28 +11:00
Nyall Dawson
37774f9aa9 [processing] Add util to convert QVariant value to Python literal 2019-02-01 17:54:28 +11:00
Nyall Dawson
ffa49df9fb Fix misleading dox 2019-02-01 17:54:28 +11:00
Luigi Pirelli
82e48f9c82 Added SLD 1.0 export for rasters 2019-01-31 15:21:05 +01:00
Peter Petrik
ebcc694ab1
fix #18954 add&rename vector fields (#8982)
fix #18954 add&rename vector fields at the same time
2019-01-31 09:20:49 +01:00
Nyall Dawson
e670371fa3 [layouts] Show an explicit warning when exporting a layout which contains a broken image 2019-01-31 10:02:18 +11:00
Nyall Dawson
60b8d05278 [needs-docs][layouts] Add checkbox to disable raster tiling for PDF/SVG exports
This setting, which is disabled by default and placed into an
"advanced" group on PDF/SFG export, disables the built-in
raster layer tiled rendering. While the tiling is good for
memory usage, it can cause visible "seams" in the rasters
for generated PDF/SVG files.

The setting has a tooltip warning users that disabling the
tiling results in high memory usage during exports.

Fixes #19500
2019-01-30 05:09:29 +11:00
Nyall Dawson
63b6a77702 [processing] Add API to convert a parameter definition to an equivalent
Python constructor string
2019-01-29 18:15:40 +11:00