18671 Commits

Author SHA1 Message Date
Alessandro Pasotti
d5b65902c5 hasNextRow 2020-12-22 19:32:33 +01:00
Alessandro Pasotti
0978ff22f9 Connections API: execSql iterator 2020-12-22 16:53:42 +01:00
Alessandro Pasotti
5a2cfe563c
Merge pull request #40663 from elpaso/connections-api-executeSql-with-column-names
Connections API: execSql, return rows and column names
2020-12-21 13:39:45 +01:00
Alessandro Pasotti
3a2b8f889a Optimize column information 2020-12-21 11:36:47 +01:00
Alessandro Pasotti
a277cc6332 QgsAbstractDatabaseProviderConnection::QueryResult proper encapsulation
and rename to execSql
2020-12-21 10:43:51 +01:00
Juergen E. Fischer
7719668453 fix build (take II; followup 1c9d89a7c3d) 2020-12-19 22:57:54 +01:00
Matthias Kuhn
677ccf5aba
Merge pull request #40567 from maximlt/patch-2
Adapt import hook to allow importing py
2020-12-19 07:44:16 +01:00
Nyall Dawson
2ec448053f Add option to render color ramp legend items as horizontal bars 2020-12-19 05:28:20 +10:00
Nyall Dawson
eaea2aaf10 Allow users to set text format for ramp legend labels 2020-12-19 05:28:20 +10:00
Alessandro Pasotti
84131e0cfc Connections API: executeSqlWithNames, return column names
This is mainly useful for Python, this way we can probably
avoid calling fields() and all related cost when all we need
is colum names for display.

I'm not very happy with the method name and I would probably just
drop the old signature for executeSql and replace it with the new
one, unfortunately is public API.

But if everybody is happy we could consider an API break.
2020-12-18 18:15:27 +01:00
Nyall Dawson
13e4969817 Try to fix doc test 2020-12-18 18:14:49 +10:00
Nyall Dawson
99208ab45b Split query related functions out into a separate file 2020-12-18 18:14:49 +10:00
Nyall Dawson
8d45910535 Move QgsArcGisRestUtils to core, cleanup API, add docs and selectively
expose to Python
2020-12-18 18:14:49 +10:00
Nyall Dawson
2f2e410d0d Minor doc correction, tweak equality operator to consider original units 2020-12-18 18:14:29 +10:00
Samweli
6ae1bf22c6 Add API to set/retrieve original units in QgsInterval 2020-12-18 18:14:29 +10:00
Nyall Dawson
24549f05fd Allow customisation of color ramp legend items in a print layout legend 2020-12-18 12:03:26 +10:00
Nyall Dawson
8eb9448746 Prefix/suffix support, ensure correct size determination of legend text 2020-12-18 12:03:26 +10:00
Nyall Dawson
787f62fee2 Add a widget for customizing color ramp legend settings 2020-12-18 12:03:26 +10:00
Nyall Dawson
a0accab0c2 Add QgsColorRampLegendNodeSettings to QgsSingleBandGrayRenderer 2020-12-18 12:03:26 +10:00
Nyall Dawson
f96ba98bb8 Use QgsColorRampLegendNodeSettings to control settings for QgsColorRampLegendNode items 2020-12-18 12:03:26 +10:00
Nyall Dawson
45d2edda16 QgsColorRampShader can have color ramp legend node settings 2020-12-18 12:03:26 +10:00
Nyall Dawson
e48286c0d4 Pass QgsReadWriteContext onto QgsColorRampShader read/writeXml methods 2020-12-18 12:03:26 +10:00
Nyall Dawson
3fec67ac2c Add QgsColorRampLegendNodeSettings class 2020-12-18 12:03:26 +10:00
Nyall Dawson
60aea700d1 Forward declare more classes 2020-12-18 12:03:26 +10:00
Nyall Dawson
1be1229663 Forward declare 2020-12-18 12:03:26 +10:00
Matthias Kuhn
c56d2d8d88
Merge pull request #40628 from m-kuhn/timeout_disable
Allow disabling QgsNetworkAccessManager timeout functionality
2020-12-17 08:58:04 +01:00
Nyall Dawson
0d7b95fa67 Generate more descriptive legends for raster layers
- include band name details where its useful
- create a legend for multiband raster renderer
2020-12-17 04:57:56 +10:00
Matthias Kuhn
7388e67bd0 Allow disabling QgsNetworkAccessManager timeout functionality
by setting the timout to 0

This can be interesting to overcome the limitations of the timeout
functionality by replacing it with QNetworkAccessManager::setTransferTimeout.
E.g. to have more than 6 downloads running in parallel.
2020-12-16 19:08:10 +01:00
Nyall Dawson
d7ce1a3167 Create color ramp legend nodes for pseudocolor or grayscale rasters or
point clouds using a Linear color ramp based renderer
2020-12-16 18:46:53 +10:00
Nyall Dawson
e4a91e7659 Add missing sip casts for legend nodes 2020-12-16 18:46:53 +10:00
Nyall Dawson
869b24ea92 Add new QgsColorRampLegendNode class for rendering a color ramp item as a legend node 2020-12-16 18:46:53 +10:00
nirvn
d03d3b3ea0 [FEATURE][locator] Add delayed fetching of results 2020-12-16 13:14:27 +07:00
Nyall Dawson
7b141e92f0 Also add scaling factor option, test 2020-12-16 13:58:20 +10:00
Nyall Dawson
9fc11d93c7 Add a trigger3DUpdate method to QgsMapLayer so that an explicit update of the layer in 3d maps can be requested
This is the 3d equivalent of QgsMapLayer::triggerUpdate()
2020-12-16 13:58:20 +10:00
Nyall Dawson
1963ef9784 [pointclouds] Add an elevation tab in layer properties, and allow
users to set a manual offset to apply to point cloud z values

This allows for adjustment of the elevation of point clouds, eg so that:
1. They match nicely with point clouds from other datasources
2. Users can use point clouds from sources with arbitrary z values,
eg. a point cloud made by opendronemap without any actual reference
z values available
2020-12-16 13:58:20 +10:00
Peter Petrik
221bd2f68f
untwine pdalprovider integration (#40404)
[pointclouds] untwine pdalprovider integration
2020-12-15 14:25:09 +01:00
nirvn
a057e56fd3 Address review 2020-12-15 13:47:43 +07:00
nirvn
ebc2695dc1 [FEATURE][geocoder] Add a nominatim API geocoder 2020-12-15 13:47:43 +07:00
Nyall Dawson
3a3e771d04 Cache google maps geocoder results so that we don't send the same
request multiple times
2020-12-15 14:22:59 +10:00
rldhont
0b281073b7
[Bugfix] Processing @alg decorator support input help string (#40207) 2020-12-15 11:34:24 +10:00
Nyall Dawson
df28e637cd Fix see also link 2020-12-14 16:49:48 +10:00
Nyall Dawson
53831c6067 Add some useful methods to resize QgsFeature attributes without clearing existing attributes 2020-12-14 16:49:48 +10:00
Nyall Dawson
578813ac78 Geocoder algorithms can be run in in-place mode too 2020-12-14 16:49:48 +10:00
Nyall Dawson
6ae7a17bf0 [API] Add an adapter class QgsBatchGeocodeAlgorithm which creates
a batch geocoding algorithm from a QgsGeocoderInterface

Example usage:

  # create a class which implements the QgsGeocoderInterface interface:
  class MyGeocoder(QgsGeocoderInterface):

     def geocodeString(self, string, context, feedback):
        # calculate and return results...

  my_geocoder = MyGeocoder()

  # create an algorithm which allows for batch geocoding operations using the custom geocoder interface
  # and implement the few required pure virtual methods
  class MyGeocoderAlgorithm(QgsBatchGeocodeAlgorithm):

      def __init__(self):
          super().__init__(my_geocoder)

      def displayName(self):
          return "My Geocoder"

      def name(self):
          return "my_geocoder_alg"

      def createInstance(self):
          return MyGeocoderAlgorithm()

      # optionally, the group(), groupId(), tags(), shortHelpString() and other metadata style methods can be overridden and customized:
      def tags(self):
          return 'geocode,my service,batch'
2020-12-14 16:49:48 +10:00
Matthias Kuhn
0d55e61145 Add QgsRasterDataProvider::Capability::ReloadData for gdal, ams and wcs provider 2020-12-14 09:02:16 +10:00
Matthias Kuhn
a83319a075 Add QgsVectorDataProvider::Capability::ReloadData and return it for appropriate providers
This allows to only show reload actions for data providers that actually support it.
2020-12-14 09:02:16 +10:00
Matthias Kuhn
d94efac86b Add todo for QGIS 4 2020-12-14 09:02:16 +10:00
Nyall Dawson
932e70b247 Dox grammar 2020-12-14 08:51:51 +10:00
Maxime Liquet
fc02207f58
Less intrusive Python import hook
Fixes https://github.com/qgis/QGIS/issues/40564
2020-12-12 18:59:08 +01:00
nirvn
e1933c85c0 [FEATURE][map overview] Support zooming in/out by scrolling mouse wheel over map overview panel 2020-12-10 16:47:36 +07:00