2644 Commits

Author SHA1 Message Date
Nyall Dawson
928c969e82 More appropriate equality operator for QgsDoubleRange 2020-11-26 04:18:01 +10:00
Nyall Dawson
f6f03cd8e1 [api] Add z range filtering option to QgsMapSettings/QgsRenderContext/QgsMapCanvas
Allows for map renders to be filtered by a z or elevation range,
such that only parts of the layer which are considered within
this range will be rendered.

Implements https://github.com/qgis/QGIS-Enhancement-Proposals/issues/201

*Requires support for respecting the QgsRenderContext zRange to be added
to the relevant map layer renderers
2020-11-26 04:18:01 +10:00
Nyall Dawson
95fa338264 Add repr for QgsIntRange/QgsDoubleRange 2020-11-26 04:18:01 +10:00
Nyall Dawson
752746d494 Add equality operators for QgsRange 2020-11-26 04:18:01 +10:00
Nyall Dawson
5ae0453064 Add isInfinite function to QgsIntRange/QgsDoubleRange 2020-11-26 04:18:01 +10:00
Nyall Dawson
99fa35cdd4 Fix dox 2020-11-24 12:59:42 +10:00
Nyall Dawson
a035f434f4 Dox++ 2020-11-24 10:19:32 +10:00
Nyall Dawson
13e8d45fed Add signal for when project preset full extent is changed 2020-11-24 04:44:19 +10:00
Nyall Dawson
483cb8dfb1 Add api to set the maximal extent for a project
If set, this extent will be used when zooming to full extent (or for the
full extent for a map overview frame) instead of the extent calculated
from all map layers.

The intention is to eventually allow users a way to manually set their
desired "area of interest" for a project, so that zooming to full extent
won't zoom all the way out when the project contains global or national
datasets...
2020-11-24 04:44:19 +10:00
Matthias Kuhn
5bd0058bae
Merge pull request #38032 from troopa81/feat_gen_field_readonly
Display generated fields as read-only in editors
2020-11-23 11:24:49 +01:00
Nyall Dawson
6a86642c78
Merge pull request #40220 from nyalldawson/papercut_dd_grid
Don't show degrees based annotation format options for non-geographic map grids
2020-11-23 12:09:06 +10:00
Nyall Dawson
3234489d87 Add a __repr__ method to QgsDataSourceUri 2020-11-23 11:39:35 +10:00
Nyall Dawson
494bf24bc0 Add signals for when layout item map crs or grid crs are changed 2020-11-23 07:03:37 +10:00
Julien Cabieces
87f8e1514e Display generated field as read-only is editors 2020-11-20 14:54:30 +01:00
Alexander Bruy
cc98fe30d9 support static (non-translated) strings as enum values in Processing 2020-11-19 19:33:18 +02:00
Nyall Dawson
acbeebe32a [pointclouds] Expose option to set point size for 2d point cloud renders 2020-11-19 15:49:43 +01:00
Richard Duivenvoorde
6797118e2f
On timestep-size change, Set timeslider to best possible fit (instead of resetting to start)
Try to remember/set last timeframe (upon timestep- or timeframe-changes).

Setting the stepsize to a different size, did reset the slider to start
(aka timeframe 0).
Same when you changed the range (data time) extent.

This commit tries to set the slider to the same position as before the
step change, if possible). Else it will take the position of the timeframe
in which the start of the old timeframe fits.

fixes #39994
2020-11-19 11:20:42 +10:00
Nyall Dawson
bf8075ced6 [FEATURE] Allow symbol opacity to be data defined
While it was possible to set the opacity for individual symbol layer
colors via data defined expressions, it's so far been impossible to
set a data defined expression to control the overall symbol opacity.

This commit fixes that omission...
2020-11-18 17:45:45 +10:00
Nyall Dawson
8c45aad09e Mark method as const 2020-11-18 08:21:43 +10:00
Nyall Dawson
7f9d90536a Ensure that all symbol layer types correctly respect the symbol's opacity
setting, even when the symbol layer has data defined colors set or involves
sub symbols (e.g. marker line symbols)

Fixes #18022
2020-11-17 19:00:31 +10:00
Nyall Dawson
4e13ad5555 Spelling, dox 2020-11-16 19:38:07 +10:00
Nyall Dawson
0d3ccf7040 Move setting for maximum screen error to QgsPointCloudRenderer, expose in GUI 2020-11-16 19:38:07 +10:00
Nyall Dawson
28c2788989 Spelling 2020-11-16 19:38:07 +10:00
Nyall Dawson
bf8ccad89e Add contrast enhancement options for point cloud RGB renderer 2020-11-16 19:38:07 +10:00
Even Rouault
e55107f85c QgsDataItem::createChildren(): fix SIP generated C++ method
The SIP_FACTORY annotation didn't do the job for a Python implementation
of createChildren(). We must write a custom VirtualCatcherCode to make
sure that if the returned QgsDataItem elements are Python objects they
aren't killed too early.

Fixes the new added test, which uses to crash before the fix,
and corresponds to the use case of a plugin defining its own data items.

Has been checked not to cause memory leaks.

The change of SIP_FACTORY to SIP_TRANSFERBACK is to avoid a memory
leak when Python calls a C++ createChildren() implementation. Was found
by making test_provider_ogr.py::testDataItems() loop on its call to
createChildren()
2020-11-16 08:57:42 +10:00
Nyall Dawson
0056bb1580 Proxy QgsRasterLayer::setOpacity/opacity to QgsRasterRenderer::setOpacity
This allows layer opacity for raster layers to be set and retrieved using
the exact same API as all other map layer types
2020-11-13 21:27:06 +10:00
Nyall Dawson
f3648ba3f6 Move getters and setters for layer opacity from QgsVectorLayer to QgsMapLayer
All the logic for rendering non-opaque layers is handled in a layer
type agnostic way already, so this just allows the existing handling
to be used for mesh/point cloud/vector tile/etc layers also
2020-11-13 21:27:06 +10:00
Alessandro Pasotti
8c06a1ac43
Merge pull request #39872 from elpaso/hidden-layers-bugfix
Hidden layers bugfix
2020-11-13 10:40:14 +01:00
Alessandro Pasotti
3f11294dfd
Merge pull request #39778 from elpaso/bugfix-gh39757-shared-locale-sort
Bugfix gh39757 shared locale sort
2020-11-13 10:38:49 +01:00
Even Rouault
bd32aa8fbb
Merge pull request #39942 from rouault/ogrprovider_featurecount
OGR provider: feature count improvements
2020-11-12 18:49:25 +01:00
Nyall Dawson
5158922428 Default to a RGB renderer for point clouds with Red/Green/Blue attributes present 2020-11-13 02:59:05 +10:00
Nyall Dawson
948a7dc9bc Move some common code to base class 2020-11-13 02:59:05 +10:00
Nyall Dawson
3ca572c0e3 2D RGB Renderer for point clouds 2020-11-13 02:59:05 +10:00
Nyall Dawson
a6d61c000a Start on registry for 2d point cloud renderers 2020-11-13 02:59:05 +10:00
Nyall Dawson
70e6cc7304 Implement QgsMapLayer methods required for saving/loading renderer properties 2020-11-13 02:59:05 +10:00
Nyall Dawson
1feccd1ea1 Add more methods to QgsPointCloudRenderer class 2020-11-13 02:59:05 +10:00
Nyall Dawson
1a2d6ec5d5 Add scale, offset and counter for points rendered to QgsPointCloudRenderContext 2020-11-13 02:59:05 +10:00
Nyall Dawson
2c59facf0f Don't copy dox from base class methods 2020-11-13 02:59:05 +10:00
Nyall Dawson
0169347f5b Hookup API for point cloud data providers to create default renderers for associated layers 2020-11-13 02:59:05 +10:00
Nyall Dawson
c2fe0d3749 Hook QgsPointCloudRenderer into QgsPointCloudLayerRenderer (non-functional for now) 2020-11-13 02:59:05 +10:00
Nyall Dawson
abbd634b44 API shell for QgsPointCloudRenderer 2d point cloud renderer 2020-11-13 02:59:05 +10:00
Nyall Dawson
8bb7edbbc6 Expose QgsPointCloudBlock to Python 2020-11-13 02:59:05 +10:00
Nyall Dawson
5924ff7cf5 Move guts of qgspointcloudrenderer.* to qgspointcloudlayerrenderer.* 2020-11-13 02:59:05 +10:00
Even Rouault
32608075e5
Add QgsDataProvider::ReadFlag::SkipFeatureCount and implement it in OGR provider to avoid featureCount() to be called 2020-11-12 15:28:43 +01:00
Nyall Dawson
38e6b6b93e Add proxy model for filtering QgsPointCloudAttributeModel by attribute type 2020-11-12 17:33:37 +10:00
Nyall Dawson
d8f6a2e152 Add attribute index role to point cloud attribute model 2020-11-12 17:33:37 +10:00
Nyall Dawson
b9a7a365c0 Add attributes() member to QgsPointCloudDataProvider, QgsPointCloudLayer
Gives direct access to point cloud attributes
2020-11-12 17:33:37 +10:00
Nyall Dawson
819fc50b0e Don't use generic "QgsMapLayer" class name in map layer Python repr
strings

Rather use actual layer subclass type, e.g. QgsVectorLayer
2020-11-12 16:05:52 +10:00
Even Rouault
af9da65c23 Add QgsLayerItem::iconForWkbType() and QgsWkbTypes::translatedDisplayString()
and use them to avoid a lot of copy&paste in "New layer XXXX" dialogs and
providers.
2020-11-12 10:19:55 +10:00
signedav
f360838fbd
Merge pull request #39527 from signedav/offlineindicator
Indicator for offline layers
2020-11-11 16:16:21 +01:00