3969 Commits

Author SHA1 Message Date
Nyall Dawson
fc26342f04 Fix incorrect doc link 2022-02-23 15:16:33 +10:00
Ismail Sunni
0990b87e89 Make function static. 2022-02-23 11:38:45 +10:00
Julien Cabieces
2d2cd13c58
Merge pull request #47392 from signedav/fix_relref_nomodal
Avoid modal dialogs in relation reference /  relation editor
2022-02-21 09:10:49 +01:00
Nyall Dawson
11a8d40a86 Allow geometries to be set separate to features in expression contexts
Refs #46455 -- we need a way to separate these too, as we don't always
want $geometry to refer to a feature's geometry
2022-02-21 13:04:07 +10:00
Nyall Dawson
c264eb50f5 Clarify removal 2022-02-20 06:48:03 +10:00
Nyall Dawson
3332b27edd QgsFieldItem is only equal when the QgsField is also equal
Otherwise the field item will not be updated when the gpkg parent
item is refreshed and the field definition has changed (e.g.
the field type)
2022-02-20 06:48:03 +10:00
Nyall Dawson
f8bbcab8bb Add flag for browser data item to indicate that children of the item
must be refreshed whenever the item is refreshed

This behaviour is not automatic. The new flag allows items to opt-in,
so that their children WILL be automatically refreshed when the
item is refreshed.

Should be used sparingly only to avoid expensive work
2022-02-20 06:48:03 +10:00
Nyall Dawson
063e059359 Add API to QgsAbstractDatabaseProviderConnection to create new field
domains on a database and set field domain associated with a field

And implement for OGR database provider connection class
2022-02-20 06:48:03 +10:00
Nyall Dawson
4a7fb87af5 [feature] Add browser properties page for field and fields items
In particular, this allows users to easily see what field domain
may be attached to particular fields
2022-02-20 06:48:03 +10:00
Nyall Dawson
e5a0d13ea4 Add domain name to QgsFieldConstraints 2022-02-20 06:48:03 +10:00
Nyall Dawson
a7b6b41fad Add docs 2022-02-20 06:48:03 +10:00
Nyall Dawson
8cd9b80149 Add browser properties widget for showing the properties of an existing
field domain
2022-02-20 06:48:03 +10:00
Nyall Dawson
1729ab1bc5 Add python file 2022-02-20 06:48:03 +10:00
Nyall Dawson
8036ea89ed Add API to retrieve field domain names and definitions to QgsAbstractDatabaseProviderConnection
and implement for GPKG connections
2022-02-20 06:48:03 +10:00
Nyall Dawson
3d9a74176e More repr 2022-02-20 06:48:03 +10:00
Nyall Dawson
2be52d9df9 Create QgsFieldDomain and subclasses which directly represent
the GDAL field domain coded value/range/glob domains
2022-02-20 06:48:03 +10:00
Nyall Dawson
237152e5ff [feature][labeling] Allow data-defined control over line anchor type
Allows data-defined control over whether the 'hint' or 'strict'
anchoring type is used
2022-02-20 06:47:15 +10:00
Nyall Dawson
a578ecb33a Add QgsFields()['field_name'] getter for PyQGIS
A nice shorthand way to retrieve a field definition by name, instead
of having to determine the field index first.
2022-02-19 09:00:43 +10:00
signedav
033b02b65c fix typo 2022-02-16 12:24:27 +01:00
signedav
7dac040b47 reenter lost override keyword and some docs 2022-02-16 12:05:47 +01:00
signedav
f971a47b67 Do dialogs not open modal since otherwise the canvas are blocked and we are not able to collect geometries.
Pass widget as parent to the dialog to avoid "orphaned" child dialogs. The widget is passed as parent to QgsFeatureAction. When creating a dialog the widget is passed as parent to the dialog and the dialog is set as parent to the QgsFeatureAction (last like before).
To avoid confusion with opened dialogs the parent's visibility is set to hidden, when child dialog is opened.

This fixes #47193
2022-02-16 09:24:11 +01:00
Nyall Dawson
29a59e70bf Add method to test whether model file name matches model name 2022-02-05 11:05:51 +10:00
Andrea Giudiceandrea
ed9bb49ff1 Add 'Stepped Line' and 'Hollow' styles to QgsLayoutItemScaleBar::setStyle() docs 2022-02-03 20:51:53 +10:00
Nyall Dawson
e46875b9b6 QgsDistanceArea::bearing can raise QgsCsExceptions, so ensure that
these are always gracefully caught

Avoids some unwanted "unhandled exception" message boxes which
can pop up while moving the mouse around outside of the valid bounds
of the current map projection
2022-02-03 06:19:50 +10:00
Nyall Dawson
01f0130ffb Remove unused qgsCalloc function 2022-02-02 07:44:13 +10:00
NEDJIMAbelgacem
e5f625f8c9 extend attribute datatypes to include the ones used for extrabytes 2022-02-01 06:04:12 -08:00
Nyall Dawson
dd368a4289 When processing is initialized in external scripts, ensure the GRASS,
SAGA and OTB providers are included by default

Fixes #45935
2022-02-01 18:14:48 +10:00
Nyall Dawson
2f74a24eeb Fix typo 2022-02-01 08:23:29 +10:00
Alex
73e036ebdb Correctly handle sort field as field in atlas sorting
Fixes #40332
2022-02-01 08:23:29 +10:00
Nyall Dawson
d5856ec400 Allow enum parameters to have icons specified for values for parameter metadata 2022-01-31 21:01:44 +10:00
Nyall Dawson
7747c30dec Add support for field subtype to QgsFields::iconForFieldType 2022-01-31 21:01:44 +10:00
Nyall Dawson
a20f7789d9 Partial work on centralizing all QVariant::Type to display string
logic in a new QgsVariantUtils class

(I've likely missed a few places here, but it's a start!)
2022-01-31 17:24:53 +10:00
Nyall Dawson
8e04498d6b Safer approach to handling reprojection with distance within requests
We can't safely handle a distance within query when transforming, as
we cannot transform the static within tolerance distance from one
CRS to a static distance in a different CRS
2022-01-31 12:37:52 +10:00
Sandro Santilli
3004fde9c6 Add QgsAbstractFeatureIterator::updateRequestToSourceCrs method
The method superceeds filterRectToSourceCrs, deprecating it for
shortage of functionality now that we support multiple spatial
filters.

This commit makes use of the new method from
QgsVectorLayerFeatureIterator::QgsVectorLayerFeatureIterator
so to not drop the WithinDistance spatial filter from the
user Request.

References #45352
2022-01-31 12:37:52 +10:00
Sandro Santilli
95be545b81 Add equality/inequality operators for QgsFeatureRequest::OrderBy
Equality useful for unit tests, inequality for completeness
2022-01-31 12:37:52 +10:00
Sandro Santilli
182732e044 Add equality/inequality operators for QgsFeatureRequest::QgsSimplifyMethod
Includes unit test

The equality operator is useful for unit tests, the inequality
operator was added for completeness as requested by Nyall
in https://github.com/qgis/QGIS/pull/45384#discussion_r734174883
2022-01-31 12:37:52 +10:00
Denis Rouzaud
b98c1df904 use default args for Z/M values in QgsGeometry::coerceToType 2022-01-28 06:21:18 +01:00
Nyall Dawson
6bd1a7eb7d Document new behaviour 2022-01-24 17:26:05 +10:00
Nyall Dawson
1be383a301 [api] Add QgsProviderMetadata method to test whether a style with
a specified ID already exists
2022-01-24 17:26:05 +10:00
uclaros
d1d148f0c6 Address more comments 2022-01-19 06:24:20 +10:00
uclaros
a28cd2ce11 Address review 2022-01-19 06:24:20 +10:00
Stefanos Natsis
be99a166d9 Added pointcloud ordered by Z rendering for 2d views 2022-01-19 06:24:20 +10:00
Nyall Dawson
72116925ad Sip_skip some private api 2022-01-14 16:06:41 +10:00
Nyall Dawson
479d37def0 Add missing TransferThis annotation 2022-01-14 16:06:41 +10:00
Nyall Dawson
216b9d2a2a Fix getter name should not include 'get' prefix 2022-01-14 16:06:41 +10:00
Vincent Cloarec
9965eccdce
Template parameter {usage} for XYZ raster and vector tiles (#46731) 2022-01-13 15:11:31 +01:00
Nyall Dawson
370bdfd84d Add api to allow the native format for a crs definition (i.e. wkt
or proj) to be saved when the crs is saved to xml

Allows us a way to present a custom crs in the same format as it was
originally defined using
2022-01-13 13:58:00 +10:00
NEDJIMAbelgacem
ff5bde77a4 rename stuff 2022-01-12 13:46:49 +10:00
NEDJIMAbelgacem
f54136e616 address Nyall reviews 2022-01-12 13:46:49 +10:00
NEDJIMAbelgacem
33ee137c32 various fixes 2022-01-12 13:46:49 +10:00