348 Commits

Author SHA1 Message Date
Nyall Dawson
8282b6631e Add QgsCodeEditorShell code editor subclass for Bash or Batch scripts 2023-04-24 15:26:50 +10:00
Nyall Dawson
308eb1d86f Expose api to determine capabilities of QgsVectorFileWriter
Currently allows determining whether field comments and aliases
are supported by the writer
2023-04-22 09:18:06 +10:00
Nyall Dawson
9aac2b8d8a [api] Add framework for setting field comments/aliases via
QgsAbstractDatabaseProviderConnection

When implemented by providers, will provide a method for
permanently setting field aliases/comments within a
database

Here we have no choice but to create a new Capability2
enum, as the original Capability has now consumed the
entire range of values for data types permitted by QFlag
2023-04-18 08:22:57 +10:00
Nyall Dawson
276ff97807 When creating new fields, only expose the 'Comment' option for
datasources which support editing comments

This support is currently limited to the postgres provider,
so exposing the comment field for all other vector layer types
is just misleading to users. The comment will be completed discarded
without any warning!
2023-04-14 14:14:41 +10:00
Nyall Dawson
acea87c859 Spelling 2023-04-06 17:18:05 +10:00
Nyall Dawson
0bc7bf5a79 Move postgres relkind enum to Qgis
Avoids having to include qgspostgresprovider header in a bunch
of non-provider related files
2023-04-06 17:18:05 +10:00
Nyall Dawson
fd11e0b45d Add file filter handling for vector tile layers to QgsProviderMetadata
And move QgsProviderMetadata.FilterType to Qgis
2023-04-02 20:04:02 +10:00
Nyall Dawson
cc2d032055 Add DistanceUnit value for inches 2023-04-02 06:01:48 +10:00
Nyall Dawson
2b2975817d Promote some label flags to enum class, move to Qgis 2023-03-31 13:17:25 +10:00
Nyall Dawson
b9c0fc46b5
Checkin missed file 2023-03-31 10:46:52 +10:00
Alexander Bruy
0325cf0c30 [processing] add layer options flag enum
This enum can be used in the QgsProcessingUtils::mapLayerFromString()
and parameterAsPointCloudLayer() calls to control layer loading, e.g.
skipping index generation or not applying default style, etc.
2023-03-29 06:06:09 +10:00
Nyall Dawson
1742934be5 Add more flexible/understandable api for setting layer tree legend filters
And update existing broken tests which are incorrectly showing
symbols which should not be visible in the legend
2023-03-26 20:21:56 +10:00
Mathieu Pellerin
d2b117a3c8 [sensors] Brand new sensors framework (manager, registry, sensor types) 2023-03-24 15:28:47 +07:00
Nyall Dawson
a87db9c91c Add capacity for storing additional metadata/properties in QgsField
This adds the API framework for storing additional, semi-structured
properties inside QgsField objects. The intention is that strong
field-type specific properties can be stored.

Eg for a geometry field type coming from the postgres provider
the metadata can be used to store the associated CRS and WKB types
so that clients can be aware of the correct format required for
geometries stored in that field. Instead of cluttering the QgsField
API with specific getters/setters for properties like crs(), wkbType(),
etc which only apply for a certain field type, the metadata map
approach helps us keep the API nice and slim.

The API has been designed to follow the approach used by various
Qt objects (such as QTextFormat) where a preset set of keys
are exposed as an enum, but additional ones can be used for
custom property storage. This allows for a more structured
use of properties with conventions which apply across different
providers (as opposed to a free-form string key approach).

Refs #49380
2023-03-24 11:11:46 +10:00
Nyall Dawson
8e526353f9 Move toggle comment handling to base QgsCodeEditor class 2023-03-20 16:06:24 +10:00
Nyall Dawson
3312bf1ad2 Move syntax checking capability to QgsCodeEditorPython 2023-03-20 16:06:24 +10:00
Nyall Dawson
069f1a647e Add language capabilities 2023-03-20 16:06:24 +10:00
Nyall Dawson
141b9efe44 Expand available values for Qgis::FieldDomainSplitPolicy 2023-03-01 19:30:39 +10:00
Denis Rouzaud
ea53aa3ce2 move settings tree enums to Qgis 2023-02-23 16:07:14 +01:00
Nyall Dawson
2aa484ca23 Move QgsCameraController enums to Qgis, promote to enum class 2023-02-23 13:53:34 +10:00
Nyall Dawson
046883fa9c Promote QgsWkbTypes enums to enum class, move to Qgis 2023-02-22 12:39:21 +10:00
Nyall Dawson
ad16817fba Fix enum compatibility with python full enum use of old values 2023-02-19 13:29:06 +10:00
Nyall Dawson
6975a49f9c Avoid sipify issue with " in enum dox 2023-02-19 13:29:06 +10:00
Nyall Dawson
f9c3da1e06 Move unit enums to Qgis, promote to enum class 2023-02-19 13:29:06 +10:00
Nyall Dawson
1142e8ffac
Move QgsMapLayerType enum to Qgis.LayerType (#51874)
For consistency with other enums
2023-02-16 13:02:57 +01:00
Nyall Dawson
49ba64268e Move QgsPainting::BlendMode enum to Qgis namespace 2023-02-06 08:41:25 +10:00
Denis Rouzaud
7d628998d5 follow-up rename QgsSettingsTreeElement to QgsSettingsTreeNode 2023-01-30 10:03:39 +10:00
Even Rouault
47182b5c0f
[Raster] Add a Qgis::DataType::Int8 signed data type 2023-01-27 13:09:48 +01:00
Vincent Cloarec
3ca858af66
Global map terrain shading (#51535)
* QgsShadingRendering and pipe to render global elevation map

* gdal utils with datatype and resampling method enum

* raster layer elevation map

* optimize raster elevation map with rotation

* handle  no data value in the map elevation raster pipe

* mesh layer and some little fixes

* fix nodata and hillshading z factor

* render shading on layout

* activate/deactivate the shading from ui

* shading only for layer that have elevation

* apply Z scale and offset of layer elevation properties

* ui settings

* allow elevation from point cloud even edl is deactivate for pointcloud

* fix ui

* sipify

* Shading renderer widget in styling panel

* icone for shading renderer settings widget

* two methods to combin elevation

* rewording

* remove check box at the bottom of canvas

* use band of elevation properties

* fix styling pannel

* render shading in layout

* keep EDL point cloud shading individually

* add shading rendering tests

* add missing code for local EDL for point cloud

* shading inactive by default

* rework raster layer resampling

* improve nodata in elevation map

* don't allow elevation map with != size to be combined

* remove EDL from point cloud

* renaming

* sipify

* colorize tests

* renaming

* RGB32

* renaming leftover

* some ui fixes

* fix border for EDL alg

* fix EDL closed next to nodata value

* fix first shading when activated

* renaming and typo

* fixes for doc, doxygen, indentation and spelling

* remove leftover member

* fix clang-tidy

* fix edl tests

* fix dll export

* minor fixes

* adapt images of tests

* fix narrowing

* fix indentation

* sipify

* WIP

* minor ui changes
2023-01-26 15:02:16 +01:00
Giovanni Allegri
863d6fd615
Geonode provider removal (#2)
* Removal of GeoNode provider
2023-01-25 15:51:21 +01:00
Denis Rouzaud
42f4e1c80e
Merge pull request #51295 from 3nids/settings-registry-migration-core-5-tree-element
Tree structures for settings
2023-01-23 08:53:33 +01:00
Alessandro Pasotti
694ebda27c
Merge pull request #51467 from elpaso/sld-export-options-png
SLD: export options png
2023-01-22 10:29:47 +01:00
Matthias Kuhn
0fcb11ccc1 Fix python warning
../usr/lib/python3/dist-packages/qgis/core/__init__.py:435
  /usr/lib/python3/dist-packages/qgis/core/__init__.py:435: DeprecationWarning: invalid escape sequence \d
    QgsDataItem.SetCrs.__doc__ = "Can set CRS on layer or group of layers. \deprecated since QGIS 3.6 -- no longer used by QGIS and will be removed in QGIS 4.0"
2023-01-18 16:58:14 +10:00
Denis Rouzaud
7fa484dbf6 sipify 2023-01-17 16:52:47 +01:00
Denis Rouzaud
2a5838433b rename QgsSettingsTreeElement to QgsSettingsTreeNode 2023-01-17 11:53:39 +01:00
Denis Rouzaud
87fd5e26ee rename SettingsLocation to SettingsOrigin 2023-01-16 09:00:51 +01:00
Denis Rouzaud
53f37456de fix some dox + remove extra includes 2023-01-16 09:00:50 +01:00
Denis Rouzaud
ac8170e076 address review comments (docstring, typo, …) 2023-01-16 09:00:50 +01:00
Denis Rouzaud
6a043edd08 migrate XYZ settings + fix some migration + fix dox + fix QgsSettingsTreeNamedList::items 2023-01-16 09:00:50 +01:00
Denis Rouzaud
b440604c27 method to return location (global vs local) of a setting key 2023-01-16 09:00:49 +01:00
Denis Rouzaud
919c4c83f2 add missing enum value 2023-01-16 09:00:49 +01:00
Denis Rouzaud
44039d164c sipify them all 2023-01-16 09:00:49 +01:00
Alessandro Pasotti
ef89f7005f Add PNG export options 2023-01-05 08:38:20 +01:00
Alessandro Pasotti
118c956cff Add SLD export context 2022-12-21 11:09:03 +01:00
Harrissou Sant-anna
7da101acbe Fix GeometryOperationResult enums documentation 2022-12-16 11:23:02 +01:00
Denis Rouzaud
da4865872c [settings] add new type for variant map: QgsSettingsEntryVariantMap 2022-12-16 09:09:57 +01:00
Nyall Dawson
c43b558901 Upgrade raster enums to enum class, and remove some completely unused
enums
2022-12-16 12:01:44 +10:00
Nyall Dawson
6b65b42493 [feature] Add key dates to layer/project metadata
This adds the following fields to the QGIS layer/project metadata
standard:

- Date created
- Date published
- Date revised
- Date superseded

(Previously the layer metadata had no date fields, and project
metadata had only the created date field)
2022-12-01 06:56:46 +10:00
Nyall Dawson
7a3a57a562 Add API to retrieve relationship capabilities for a provider connection 2022-12-01 06:56:03 +10:00
Mathieu Pellerin
ec689c52f1
[wms] Allow for WMTS layers to take DPI into account and scale up on high DPI screens (#51018) 2022-11-29 11:05:43 +00:00