20701 Commits

Author SHA1 Message Date
Nyall Dawson
63e2d1ec16 Newly created 3d symbols for a vector layer default to inheriting
appropriate parameters from the layer's elevation settings
2022-03-03 06:15:10 +10:00
Nyall Dawson
cc24106d01 Add QgsMapLayerElevationProperties subclass for vector layers
Allows elevation properties to be set for vector layers, including:

- altitude binding
- altitude clamping
- extrusion
- scale
- offset

These properties can be set through the new "Elevation" tab in
the vector layer properties dialog
2022-03-03 06:15:10 +10:00
Nyall Dawson
5395d87d7f Move altitude clamping/binding enums to Qgis namespace, promote to enum
class
2022-03-03 06:15:10 +10:00
Nyall Dawson
2379de4a95 Add QgsMapLayerElevationProperties subclass for raster layers
Allows elevation properties to be set for raster layers, including:

- whether raster values represent heights
- scale
- offset

These properties can be set through the new "Elevation" tab in
the raster layer properties dialog
2022-03-03 06:15:10 +10:00
Denis Rouzaud
d3d91950bf fix python implementation of enum/flag setting 2022-03-01 12:09:47 +01:00
Denis Rouzaud
332d5808ff add default value and remove extra virtual 2022-03-01 12:09:47 +01:00
Denis Rouzaud
b192904e54 add helper method to avoid code duplication 2022-03-01 12:09:47 +01:00
Denis Rouzaud
d06b1f1ff9 replace setVariantValue method to avoid API break 2022-03-01 12:09:47 +01:00
Denis Rouzaud
44681dc841 sipify 2022-03-01 12:09:47 +01:00
Denis Rouzaud
87d0f518ff add qgsEnumList to list enum keys (and test) 2022-03-01 12:09:47 +01:00
Denis Rouzaud
fbd27bde8f explicitely call a checkValue method for a more meaningfull API 2022-03-01 12:09:47 +01:00
Denis Rouzaud
f004242a03 fix typo in compatibility code 2022-03-01 12:09:47 +01:00
Denis Rouzaud
25262dadf7 create snapping mode setting + avoid confusion mode/type 2022-03-01 12:09:47 +01:00
Denis Rouzaud
f722ef641c fix dox 2022-03-01 12:09:47 +01:00
Denis Rouzaud
36a933bb2b move QgsSnappingConfig::SnappingTypeFlag + SnappingMode enum/flags to Qgis 2022-03-01 12:09:47 +01:00
Denis Rouzaud
1bd55ee237 simplify the API by removing extra method 2022-03-01 12:09:47 +01:00
Denis Rouzaud
3f88bd5002 further simplifications of template and implementations 2022-03-01 12:09:47 +01:00
Denis Rouzaud
08ada3aadf sipify + move sipify config file to ./python 2022-03-01 12:09:47 +01:00
Denis Rouzaud
2778276ff7 move QgsSettingsEntry::SettingsType to Qgis + create Qgis::SettingsOptions flags 2022-03-01 12:09:47 +01:00
nicogodet
a0397805f2
use QUrl.fromLocalFile 2022-02-28 11:30:12 +01:00
nicogodet
401bd915d7
fix url on windows
Co-authored-by: xcaeag <xavier.culos@gmail.com>
2022-02-28 11:15:14 +01:00
Nyall Dawson
5df4882380 Fix exception when editing outputs in models 2022-02-28 19:57:15 +10:00
Nyall Dawson
1d97b4548a Add internal version handling for model algorithms
Allows us to change behaviour of model algorithms (e.g. output names)
for newly created models only, without risk of breaking existing
scripts
2022-02-28 19:57:15 +10:00
Nyall Dawson
d62d0b82e3 Port model help editor dialog to c++ 2022-02-28 17:33:49 +10:00
Nyall Dawson
fffc3a768b Don't show 'model was correctly saved' notification when saving models
We don't do this elsewhere (e.g. saving QGIS projects), and it makes
it sound like it's suprising that the save worked correctly..!
2022-02-28 17:33:36 +10:00
Nyall Dawson
817895d6d3 [processing] When an input parameter is renamed in the model designer,
also update the internal name of that parameter and all child algorithms
in the model accordingly

Before we just "faked" this by changing the parameter's description
only, but that meant that the old name was permenantly stuck and
had to be used in qgis_process or when calling the model via
python.
2022-02-28 17:33:19 +10:00
Tom Kralidis
15a2030e80 make exception finer grained 2022-02-28 11:41:39 +10:00
Tom Kralidis
0f98e3c5cf [MetaSearch] safeguard OWSLib version handling (#47360) 2022-02-28 11:41:39 +10:00
Nyall Dawson
caee2cabbd Add Qgis::MapLayerProperty flag for layers which should be considered
as "basemap" layers

This flag identifies if the layer is considered a 'basemap' layer, where
certain properties of the layer should be ignored when calculating
project-level properties. For instance, the extent of basemap layers
should be ignored when calculating the overall extent of a project,
as these layers are typically global and extend outside of a project's
area of interest.
2022-02-24 16:20:51 +10:00
Nyall Dawson
fc26342f04 Fix incorrect doc link 2022-02-23 15:16:33 +10:00
Nyall Dawson
e33336be5c Remove DB2 Provider
This provider has been marked deprecated and hidden from the UI
for a number of QGIS releases. No maintainers have stepped up
to take over maintainance of this provider, and accordingly it
is now subject for removal.
2022-02-23 15:15:21 +10:00
Ismail Sunni
0990b87e89 Make function static. 2022-02-23 11:38:45 +10:00
Antoine
66b45c2d69 change version to 3.26 2022-02-22 10:17:54 +01:00
Antoine
1d96d07774 modify method name getCapacities 2022-02-22 10:17:54 +01:00
Antoine
64ab38b9e4 modify code to simplify tests 2022-02-22 10:17:53 +01:00
Antoine
e0e9600857 static default Z/M value methods 2022-02-22 08:52:54 +01:00
Denis Rouzaud
36a1019582
refactoring of QgsMapToolCapture to integrate shape map tools (#46687)
* make QgsMapToolCapture capable of capturing point/line/polygons

This moves part of the code from QgsMapToolDigitizeFeature to QgsMapToolCapture so the tool can actually capture point, line and polygons. It's mainly the 'cadCanvasReleaseEvent` which has been transfered.

* use a current CaptureTechnique in QgsMapToolCapture

QgisApp has been adapted to switch between the different techniques

* add point/line/polygon specific handlers for capture map tool

* convert add part map tool to use QgsMapToolCapture capabilities

* fix use of deprecated methods

* also create a virtual handler for QgsMapToolDigitizeFeature::featureDigitized

* more dox

* use const abstract geom in virtual handlers

* add new class QgsMapToolCaptureLayerGeometry to handle layer specific operation in capture map tool

such as avoiding intersections

* allow to add linear geometries on curved geometry layers

* make actions exclusive

* add settings registry to app

* add a registry for shape map tools

* abstract class for shape map tools

* adapt QgsMapToolCapture to correctly support shape map tools

* clean up of QgisApp

* new class QgsMapToolsDigitizingTechniqueManager to handle actions in app related to capture map tools

* clean up QgisInterface

* sipify

* refactoring of existing shape tools

* refactor add ring to fully support capture map tool

* add missing folder to Doxygen

* fix layout

* fix erasing at iterator pos

* fix unused warning

* fix more dox

* fix cpp check warning

* fix unused warning

* fix annotation map tool does not support shape + set tool name

* correctly handle case when the capture is not done on a vector layer (annotation, mesh, …)

* enable shapes in annotation map tool

* correctly undo and clean

* adapt existing shape tests

the deletion test with circular vertices has been dropped since the capture map tool behaves differently

* fix warning

* refactor fill ring to support shape digitizing

* fix win build

* fix more tests

* avoid detach warnings

* fix app test + clean up

* harmonize new settings with existing ones

* fix categories

* support adding multi lines as a part

* fix adding curve part to multi line

* also handle points

* code a bit clearer

* cast not always valid

* allow adding curved polygon to multipolygon

* add test for QgsGeometry::addPart with curved parts on non-curved geoms (lines and polygons)

* fix with Python < 3.9

* better dox for deprecated interface actions methods

* remove files leftover

* remove leftover circular string curve point tool

* add default Z/M values when calling QgsGeometry::coerceToType

* Apply suggestions from code review

Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>

* fixes from review

* move layer specific part to specific tool

* fix typo

* fix leak

* fix dox

* fix segmentization

* call map tool implementation of addCurve when adding trace curve to avoid point duplication

* call sub-class implementation

* fix since 3.24 -> 3.26

* fix test

* add test to avoid extra curves when using tracing

* fix headers

Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
2022-02-22 07:59:50 +01:00
Denis Rouzaud
efcf169a09 fix since 3.24 -> 3.26 2022-02-21 17:05:13 +01:00
Denis Rouzaud
49b5926570 move layer specific part to specific tool 2022-02-21 10:33:26 +01:00
Denis Rouzaud
e9fc54c0bd fixes from review 2022-02-21 09:45:27 +01: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
118b3d32c1 Create QgsFieldDomainDialog dialog for configuring a field domain 2022-02-20 06:48:03 +10:00
Nyall Dawson
9c4bcf0092 Add widgets for creation of field domains 2022-02-20 06:48:03 +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