378 Commits

Author SHA1 Message Date
Nyall Dawson
71d6188e3d Add method to return CRS type, based on proj_get_type() values
And show in CRS details for layer properties
2023-07-09 22:48:59 +10:00
Nyall Dawson
4557632c46 Move enum 2023-06-28 17:47:17 +10:00
Nyall Dawson
1e1535d63d Handle tiled mesh layers in more code paths 2023-06-28 17:47:17 +10:00
Nyall Dawson
5cf8f2ceb5 Shell for QgsTiledMeshLayer/QgsTiledMeshDataProvider 2023-06-28 17:47:17 +10:00
Nyall Dawson
8adb33cbcf Add TiledMesh to Qgis::MapLayerType enum and partially handle 2023-06-28 17:47:17 +10:00
Nyall Dawson
61a3f44e98 Provider registry tiled mesh file handling support 2023-06-28 17:39:09 +10:00
Nyall Dawson
391ab37539 Another 3.32 -> 3.34 update 2023-06-27 14:49:20 +10:00
Nyall Dawson
eca6b7a409 Add framework for handling non-keyboard/mouse map controllers
This is the base API interface classes for creation of custom
2d or 3d map controllers, and registering them in a common
QgsInputControllerManager singleton class.
2023-06-27 14:49:20 +10:00
Nyall Dawson
26493802dc Move some QgsRasterFileWriter enums to qgis 2023-06-15 08:28:44 +10:00
Nyall Dawson
7a784cdfd6 Flag OneDrive remote folders as remote, slow to open paths on Windows
Refs #51710
2023-06-08 14:06:01 +10:00
Denis Rouzaud
5bccd556e2
move QgsTolerance::UnitType to Qgis::MapUnitType (#53347)
* move QgsTolerance::UnitType to Qgis::MapUnitType

* missing forward declaration

* forward declaration

* use MapToolUnit

* forward declaration

* sipify

* fix tests

* Apply suggestions from code review

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

* forward declaration

* forward declaration

* forward declaration

* sipify

* fix missing parenthesis

---------

Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
2023-06-06 18:33:50 +02:00
Nyall Dawson
a764e2da76 Expose setting for point text annotations to control how
the text annotation should handle map rotation

Previously, text annotations just ignore map rotation, which
matches how regular map labels are handled. But this is not
desirable for some point text annotations, where it can
be considered a bug that the item ignores the map rotation (eg
when a text annotation has been placed to align with a feature
on the map, such as a road)

There's no one "correct" behaviour here, so add a new
combo box widget in the annotation point text settings with
options for
"Ignore Map Rotation"
"Rotate With Map"
so that users can pick the desired behavior for their annotations
2023-06-02 17:26:07 +10:00
Nyall Dawson
bb5cfb87ff Add no labels option 2023-05-29 14:18:35 +10:00
Nyall Dawson
ddc0012f9c Add api to set a label suffix and placement for labels in plot axis 2023-05-29 14:18:35 +10:00
Nyall Dawson
7f8fd5ea8e Create QgsProfileExporterTask task for generating and exporting
elevation profiles to files
2023-05-27 06:34:04 +10:00
Nyall Dawson
33ffe9f6b9 [api] Add framework for exporting elevation profile results
as vector layers
2023-05-27 06:34:04 +10:00
Nyall Dawson
6c4f96a5aa Add "Fill Above" mode for elevation profile drawing
Fixes #51074
2023-05-22 14:48:57 +10:00
Alexander Bruy
a1013f87c6 [processing] add vector tile destination parameter 2023-05-18 07:09:16 +10:00
Nyall Dawson
7ee5e32211 Add flag to indicate that vector tile provider matrix set should
always be used for the layer (as opposed to any previously
stored matrix sets)

For some vector tile data providers this is more appropriate --
specifically for those with tilemap information where we MUST
ensure that the tilemap matches the data source or missing
tiles may be present. (If we store the matrix set information
in projects then loading older projects may mean that a stored
tilemap is out-of-sync with the actual data source's current
tilemap).
2023-05-16 19:57:02 +10:00
Nyall Dawson
12c261b75b Move vector tile provider capabilities enum to Qgis 2023-05-16 19:57:02 +10:00
Nyall Dawson
bc2cc98790 Read ESRI tilemaps in vtpk and arcgis tile services
This allows us to correctly handle "indexed" vector tile sets,
where higher zoom level tiles may be missing where a lower
zoom level tile is deemed to have sufficient detail for higher
zoom levels.
2023-05-16 19:57:02 +10:00
Nyall Dawson
b0d67ecddf Move QgsVectorFileWriter::SymbologyExport to Qgis, promote to enum class 2023-05-15 16:38:52 +10:00
Alessandro Pasotti
f63dd2c360 Move CadConstraintType to Qgis, translate degree symbol 2023-05-12 06:32:11 +10:00
Julien Cabieces
09eac909fa register flags with Q_FLAG not Q_ENUM 2023-05-11 05:50:14 +10:00
Alexander Bruy
10b02e02ed move expression type enum to qgis.h 2023-05-02 14:00:43 +02:00
Nyall Dawson
ab19e8ed32 Add new attribute form container type "Row"
This container always lays out child widgets in a horizontal
row, where the number of columns is automatically determined
by the number of child widgets.

It's useful for creation of compact forms, where no space will
be wasted by assigning extraneous horizontal width to widgets
where the expected values will always be short.

Eg: creating 3 rows with 3, 2, 1 child widgets respectively
results in the layout:

    Attr 1: [...] Attr 2: [...] Attr 3: [...]
    Attr 4: [..........] Attr 5: [..........]
    Attr 6: [...............................]

Without the option of row containers then the all horizontal
rows will have the same number of columns, eg:

    Attr 1: [...] Attr 2: [...] Attr 3: [...]
    Attr 4: [...] Attr 5: [...] Attr 6: [...]

(leaving insufficient horizontal length for attributes 4-6), or

    Attr 1: [..........] Attr 2: [..........]
    Attr 2: [..........] Attr 3: [..........]
    Attr 4: [..........] Attr 5: [..........]
    Attr 6: [..........]

(resulting in wasted horizontal space next to attribute 6, and
an extra row taking up vertical space)

Sponsored by NIWA
2023-05-01 18:39:23 +10:00
Nyall Dawson
a434d0e7c0 Use enums for attribute form container types instead of bools
Gives flexibility for adding additional container types in future
2023-04-27 12:54:20 +10:00
Nyall Dawson
b290179951 Fix monkey patching when comment contains " 2023-04-27 03:58:30 +10:00
Nyall Dawson
9e552967f2 Promote attribute editor enums to enum class, move to Qgis 2023-04-27 03:58:30 +10:00
Yoann Quenach de Quivillic
79973312e6 Add missing auto_additions 2023-04-25 05:35:37 +10:00
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