17637 Commits

Author SHA1 Message Date
Marco Hugentobler
9ecded8b73 Comments 2020-06-30 13:06:53 +02:00
Marco Hugentobler
6ff2fe45ab Add possibility to set a minimum symbol size in layout legend. Minimum and maximum size are also valid for line widths 2020-06-29 17:37:02 +02:00
Marco Hugentobler
ab75840858 Sipify 2020-06-29 09:33:08 +02:00
Marco Hugentobler
f0ad33c8a9 [FEATURE] possibility to set a maximum marker size in layout legend 2020-06-29 09:02:05 +02:00
signedav
9b8e983d3c ITEM_NAME_ROLE in QgsExpressionItem to store the field name to use it on getting the example values in the expression builder
and still be able to store generic labels on the item (like the field name and the field alias)
This fixes that there has been no example values in the expression builder on the fields when an alias has been used
2020-06-28 15:55:44 +10:00
Nyall Dawson
edfdbdb427 Try to fix windows build 2020-06-28 15:50:10 +10:00
Nyall Dawson
ae8dbd884e More fine tuned profiling for vector layer loading in projects 2020-06-28 15:50:10 +10:00
Nyall Dawson
005ac8af2b [FEATURE] Add project load profile times to debugging tools dock
Now it's possible to get a breakdown of the various stages of
project load, in order to identify the causes of slow project
load times.

TODO: in 99% of cases this will be caused by one or more layers,
so it would be nice to further break down the individual layer load
times, e.g. so that for a WFS layer we see the time taken for
the initial server capabilities queries, etc...
For now, you just get the overall load time of each individual
layer.
2020-06-28 15:50:10 +10:00
Nyall Dawson
42a1ed1ce0 Fix clearing groups 2020-06-28 15:50:10 +10:00
Nyall Dawson
5c842a6286 [api] Rework QgsRuntimeProfiler for flexibility
- Make profiler thread safe
- Allow profiling of other, non-startup task groups (e.g. project
load times, map render times)
2020-06-28 15:50:10 +10:00
Germán Carrillo
4af5597e76 Clear ongoing drawing on map canvas when closing layer's edit session (fix #36292) 2020-06-20 04:32:52 +10:00
Germán Carrillo
f3d473cb27 Getter/setter for linking a map canvas with its QgsProject; link app canvases to QgsProject::instance(); rationale: using the QgsProject singleton is discouraged 2020-06-20 04:32:52 +10:00
nedjima
7d8a03b1fe Executed sipify_all script to fix the setDirectionalLights header definition 2020-06-20 04:31:10 +10:00
nedjima
9556bd2147 [Feature] directional lights support for QGIS 3D 2020-06-20 04:31:10 +10:00
Alessandro Pasotti
672d6ec5b2 Fix test: cast to float 2020-06-20 04:30:18 +10:00
Alessandro Pasotti
4304d8636d Fix precision in test 2020-06-20 04:30:18 +10:00
Alessandro Pasotti
50f66ba3cb Increase tolerance when comparing floats in processing tests 2020-06-20 04:30:18 +10:00
Alessandro Pasotti
7fa6f38689 Memory provider: roll back on errors
Long story short: calling provider's addFeatures
is implemented for some providers in a way that
will roll back all changes on errors, leaving
the backend storage unchanged.

Adding a QgsFeatureSink flag to control this
behavior allows certain providers to support
partial feature addition.

The issue comes from QgsVectorDataProvider::commitChanges
that is documented to leave the provider unchanged (roll
back) on any error, giving the client code the possibility
to fix errors (in the editing buffer) and re-commit.

Without a full rollback implementation in the memory
provider and after the type check introduction in this
PR we ended up with situations like this:

vl = ... an empty memory layer
self.assertTrue(vl.addFeatures([valid, invalid]))
self.assertFalse(vl.commitChanges())
self.assertEqual(vl.featureCount(), 1)  <--- fails!
We actually had 3 features from vl.getFeatures():
[valid, invalid, valid] (the first from the provider
the second and third from the editing buffer).

On the other hand, QgsFeatureSink would probably assume
that addFeatures will allow partial additions.

BTW: This is for sure the longest commit message I've ever
     written.
2020-06-20 04:30:18 +10:00
Alessandro Pasotti
f3bbc4d81c Use QgsField::convertCompatible to check for errors 2020-06-20 04:30:18 +10:00
Alessandro Pasotti
39068c1cd5 Sipify 2020-06-20 04:30:18 +10:00
Alessandro Pasotti
68baf74906 Add type check to file writer an memory layer
Fixes #36715

Adds a method to check for QVariant conversions, also
check for integral type narrowing so that for example
floating point 123.45 does not get down casted to integer
without raising an error.
2020-06-20 04:30:18 +10:00
Even Rouault
93bc7c2f04 Raster rendering: enable provider-side resampling when available, and reprojection is done 2020-06-20 04:29:36 +10:00
Even Rouault
47da98c070 Raster resampling: add provider-level settings, and a switch at rasterpipe level between resamplingFilter and provider resampling
Also
* in settings UI, add a 'Early resampling' checkbox
* in raster properties UI, add similar checkbox
* serialize/deserialize new settings in QgsRasterLayer XML
2020-06-20 04:29:36 +10:00
Even Rouault
f32026c8e0 [GDAL provider] Fix misalignment of raster with overviews
Fixes #36820

The way QGIS is currently handling resampling is sub-optimal given GDAL >= 2
capability of having sub-pixel accuracy. So when a QgsRasterResampleFilter
is set, make it try to delegate resampling back to the underlying input interface,
and implement that improved resampling in the GDAL provider.

The GDAL resampling will take into account the settings of the QGIS resample
filter: zoom-in resampling kernel, zoom-out resampling kernel and max resampling
factor. The later is important to avoid performance issues if not enough overview
levels are generated (in the case, we will fallback to the generic method, which
may introduce sub-pixel shifts)
2020-06-20 04:29:36 +10:00
Harrissou Sant-anna
f2f7236fc8
Layout new name dialog
Make the new layout dialog use the qgsnewnamedialog class
Add/enable help button to open user manual chapters
2020-06-20 04:28:18 +10:00
Alessandro Pasotti
4b362629e8 GPKG and spatialite AUTOINCREMENT: get next value from sequence
for PK default value, fixes #37222

Also, fix dangling transactions for spatialite.
2020-06-20 04:24:55 +10:00
Nyall Dawson
4dc9b38142 Add API to retrieve QGIS version used to save a QgsProject
project.lastSaveVersion()

now returns the version number used to save the project.
Also cleanup QgsProjectVersion code

Fixes #37288
2020-06-20 04:21:53 +10:00
Denis Rouzaud
0cb8408425
more flags warnings fixes for Qt 5.15 (#37309)
* more flags warnings fixes for Qt 5.15

* fix sip compilation
2020-06-19 12:02:00 +02:00
Denis Rouzaud
7fb552d62d fix layout 2020-06-19 08:47:23 +10:00
Denis Rouzaud
044a05d828 run sipify 2020-06-19 08:47:23 +10:00
Ivan Ivanov
c0f8dea17a Sipify 2020-06-18 05:53:23 +10:00
Nyall Dawson
b7eac07721 Add a render context flag so we know when a render operation is
occurring for drawing a symbol preview

Because these have no map association, certain settings like
sizes in "meters in map units" will have no meaning, and may need
special handling

Refs #28690
2020-06-17 08:02:49 +10:00
Nyall Dawson
75c86786c1 Add QgsCodeEditorJavascript subclass of QgsCodeEditor
Allows plugins to create a nice editor for JSON content -- not easy
to do if we don't expose this through the QGIS api!
2020-06-16 17:13:59 +10:00
Alexander Bruy
136c5a4bc2 perform rounding either if field type is numeric or if value was casted
to the number
2020-06-16 08:35:51 +10:00
Nyall Dawson
d98fe9f989 [symbology] When rendering a multipart geometry, ensure that
geometry generator symbol is only rendered once, instead of
once per part

Fixes #23730
2020-06-16 06:04:14 +10:00
Peter Petrik
81d2e5658a fix sip 2020-06-15 08:54:04 +02:00
Matthias Kuhn
91f1485a6e
Merge pull request #36514 from lbartoletti/fix_interpolation_split
[BUGFIX] Fix interpolation on split geometry
2020-06-15 08:45:59 +02:00
Vincent Cloarec
b5d61594ee
mesh layer expose datasetIndexAtTime() (#37197)
mesh layer expose datasetIndexAtTime()
2020-06-15 08:32:33 +02:00
Nyall Dawson
8d4f00b0af Remove TODO comments included in public API documentation
This is just "airing our dirty laundry". We don't want/need end users
to see this.
2020-06-15 13:43:58 +10:00
Nyall Dawson
e22ce34f60 Fix more doxygen warnings 2020-06-15 13:43:58 +10:00
Nyall Dawson
67896ebabc Fix some doxygen warnings 2020-06-15 13:43:58 +10:00
Nyall Dawson
74400c7ff8 Some fixes to numbered list handling in dox/PyQGIS API 2020-06-15 13:43:58 +10:00
Nyall Dawson
81a9db9f57 [sipify] Fix creation of cross references 2020-06-15 13:43:58 +10:00
Nyall Dawson
e653711509 QgsGeometry::error() does not exist, should be lastError() 2020-06-15 13:43:58 +10:00
Samweli Mwakisambwe
a17a49ea38 handle import and name errors with the Authentication class 2020-06-15 11:16:44 +10:00
Nyall Dawson
a5101f2ade [sipify] Fix header formatting 2020-06-13 16:49:14 +10:00
Nyall Dawson
cedd73ee4d More list formatting fixes 2020-06-13 16:49:14 +10:00
Nyall Dawson
561a8326c5 Modernize language
And avoid insensitive/trigger words (as far as possible -- some are
coming from Qt or other external APIs)
2020-06-13 16:48:38 +10:00
Juergen E. Fischer
49c62a556f [sip] Fix use of deleted method in QgsRequestHandler (followup #37116, refs #37072) 2020-06-12 21:42:26 +02:00
lbartoletti
04c3c0124f add an explanation 2020-06-12 15:39:36 +02:00