391 Commits

Author SHA1 Message Date
Nyall Dawson
51b747efce Make API more flexible, allow any layer type for callout widget functions 2024-07-22 07:14:23 +10:00
Nyall Dawson
8c067b2782 Rename QgsRenderContext custom "flags" to custom properties
And deprecate the old methods
2024-07-19 06:13:00 +10:00
Nyall Dawson
73b25dca3e
Move QgsVectorDataProvider::Capability to Qgis::VectorProviderCapability
And promote to enum class
2024-07-18 10:42:22 +10:00
Nyall Dawson
145de5fb5e
Move QgsDataProvider::ReadFlag to Qgis::DataProviderReadFlag
and promote to enum class
2024-07-18 10:01:59 +10:00
Julien Cabieces
57595b409a
Merge pull request #58141 from nyalldawson/see
Use \see not \sa
2024-07-17 08:55:29 +02:00
Julien Cabieces
93b52a0b57
Merge pull request #58120 from nyalldawson/m2p_bounds
Add QgsMapToPixel method to transform bounding boxes
2024-07-17 08:35:21 +02:00
Julien Cabieces
25c28d6c7d
Merge pull request #58122 from nyalldawson/painter_dpi_methods
Cleanup QPicture dpi scaling workarounds
2024-07-17 08:32:21 +02:00
Julien Cabieces
76a4202f7e feat(ICCProfile): Add an action to save an ICC profile file 2024-07-17 15:30:52 +10:00
Nyall Dawson
45090576b2 Add method to determine whether a QgsCoordinateTransform has a vertical
component
2024-07-17 13:40:35 +10:00
Nyall Dawson
8e95b2c0ed Add helper method to calculate transform to apply for a QgsFeatureRequest 2024-07-17 13:40:35 +10:00
Nyall Dawson
27294b1374 Add QgsCoordinateTransform setter for QgsFeatureRequest
Sets the coordinate transform which will be used to transform
the feature's geometries.

If this transform is valid then it will always be used to transform
features, regardless of the destinationCrs() setting or the underlying
feature source's actual CRS.

This method should be used with caution, and it is recommended
to use the high-level setDestinationCrs() method instead. Setting a specific
transform should only be done when there is a requirement to use a particular
transform, eg when a specific, non-default coordinate operation
MUST be used for the transformation.
2024-07-17 13:40:35 +10:00
Nyall Dawson
cc937af28a Add equality operator for QgsCoordinateTransform 2024-07-17 13:40:35 +10:00
Nyall Dawson
1f27af64a9
Use \see not \sa
So that sipify docstring processing works
2024-07-17 09:02:51 +10:00
Nyall Dawson
f7237e287f
Deprecate QgsPaintEffect method 2024-07-17 07:47:33 +10:00
Nyall Dawson
1ac9494b41
Add high-level method to draw QPicture with correct scaling
This hides the messy scaling workaround details
2024-07-16 12:07:27 +10:00
Nyall Dawson
ee1a6bdaf2
Remove multi implementations of QPicture scaling fix
Move to a single function in QgsPainting
2024-07-16 12:07:24 +10:00
Nyall Dawson
909f097113
Add QgsPainting::qtDefaultDpiX/Y and use instead of qt_defaultDpiX/Y 2024-07-16 12:07:22 +10:00
Nyall Dawson
3b80fc0f4b
Move layout picture item format enum to Qgis, promote to enum class 2024-07-16 11:25:49 +10:00
Nyall Dawson
afa8297686
Add QgsMapToPixel method to transform bounding boxes 2024-07-16 10:22:13 +10:00
Nyall Dawson
f2d5c870cc Move translation to reusable function 2024-07-15 14:33:21 +10:00
Nyall Dawson
afd10759b0 [processing] Show notes for algs which regenerate primary keys
Add a new Qgis::ProcessingAlgorithmDocumentationFlag flag, with
a virtual method in QgsProcessingAlgorithm to return documentation
flags. These flags are used to indicate algorithm behavior which
should be noted in the documentation.

Add initial flags for algorithms which drop and regenerate
primary keys/FIDs, and automatically add a note to the algorithm's
help panel to explain that this will occur

In future this flag could be extended with other helpful warnings,
eg

- Algorithm requires valid geometries
- Algorithm will segmentize curved geometries
- Algorithm will drop Z or M values
2024-07-15 14:33:21 +10:00
Nyall Dawson
711c75d873 Promote scalebar enums to enum class, move to Qgis 2024-07-12 05:36:22 +10:00
Jean Felder
849df1bae4 qgsbox3d: Add support for set method 2024-07-11 17:43:00 +02:00
Jean Felder
180e2bd3e3 qgsbox3d: Add support for area method 2024-07-11 17:43:00 +02:00
Jean Felder
1b5390e7f9 qgsvector3d: Add support for minus operator 2024-07-11 16:05:15 +02:00
Julien Cabieces
43062c8833 fix(CMYK): treat review comments 2024-07-11 21:13:42 +10:00
Julien Cabieces
7e527d182b feat(CMYK): add API color model and profile methods to project
API allows to define a color model without a color space. If both are
set, consistency between defined color model and color space one is
checked (only in Qt version 6.8.0 or greater because it's not possible
to retrieve color model from color space before that)
2024-07-11 21:13:42 +10:00
Nyall Dawson
e8b2638c5c Add processing parameter types for Area and Volume
Adds dedicated parameter types for Area and Volume values.

Modeled closely off the existing Distance paramter type.
2024-07-10 18:56:49 +10:00
Nyall Dawson
7ce057c2ea Remove broken see also link 2024-07-10 13:37:14 +10:00
Nyall Dawson
f5bfef80b3 Drop generic option, go with custom property specific for GeoPDF exports
It's too messy to try to handle this in a format-agnostic way, as
the requirement for GeoPDF is very unique to GeoPDF (ie SVG and other
formats don't export as mini-read-only-projects with custom layer
trees like GeoPDF does)
2024-07-10 13:37:14 +10:00
Nyall Dawson
06aa04dea7 [feature][layouts] Add option to set geopdf group name for items
This new setting, located in the layout item "Rendering" section,
allows users to set an optional "group name" for use in GeoPDF
exports. When set, a matching layer tree group will be created
in the exported GeoPDF and the item will only be visible when
this group is checked.

This allows content to be selectively displayed as a group by
viewers of the GeoPDF. Eg, it can allow extra layout content
such as descriptive labels or legends to only be shown when
layers from the group are visible, making GeoPDF export much
more flexible.
2024-07-10 13:37:14 +10:00
Alessandro Pasotti
bee010b182
Merge pull request #57981 from nyalldawson/bugfix-authmanager-initialization-in-tests
[tests][auth] Fix unreported issue with auth tests skipped, fix storage of ssl protocol
2024-07-04 17:58:29 +02:00
Nyall Dawson
74c0c95627 Add some helpful api to QgsFields
- Construct QgsFields from a list of QgsField
- Append a list of QgsField
- Append another QgsFields
2024-07-04 18:54:14 +10:00
Nyall Dawson
d28be7db98
Fix docs format 2024-07-04 07:56:37 +10:00
Nyall Dawson
190108e7f1 Fix automatic font download on Windows 2024-06-27 06:17:13 +10:00
Nyall Dawson
5e34d07bad Fix incorrect icon used for OGR items with vsi cloud driver prefixes
... and make API more useful for other use cases.

The zip icon should not be used for cloud based vsi prefixes
2024-06-27 06:15:40 +10:00
Nyall Dawson
1f1c5c952e Add ReadOnly flag for browser data items
Allows suppression of the standard user actions for managing
file based data items. Could be used in future to restrict
other browser actions for sources which the user does not
have permission to modify.
2024-06-26 21:51:13 +10:00
Mathieu Pellerin
2fb1de2ce1
Merge pull request #57584 from nirvn/cad_construction_guides
[advanced digitizing] Implement visual construction guides
2024-06-25 15:35:01 +07:00
Nyall Dawson
16c38f1d0e Remove old QPainterPath mask backend
Always use new geometry based backend, and deprecate related methods

The new method is more stable and results in better outputs
2024-06-25 12:42:16 +10:00
Mathieu Pellerin
73c886ac97 [api][processing] Also move inputParameterName() and inputParameterDescription() to public 2024-06-24 06:40:55 +10:00
Mathieu Pellerin
1aa1c35c94 [api][processing] QgsProcessingAlgorithm's supportsInPlace function should be public 2024-06-24 06:40:55 +10:00
uclaros
15ebae07df add userData property to 2024-06-22 10:23:34 +10:00
Juergen E. Fischer
ef9dbf6cb4 implement separate wfs title (implements #55317) 2024-06-21 21:20:53 +02:00
Nyall Dawson
5e752537dc Use SymbolRenderHint for flagging subsymbols
Instead of the extra argument to startRender
2024-06-21 23:10:32 +10:00
Nyall Dawson
5268e0ee0c Add optional flag to force global ("entire map") clipping paths
This is a new opt-in flag for map settings/render context/layouts.
If set, then when applying clipping paths for selective masking,
we always use global ("entire map") paths, instead of calculating
local clipping paths per rendered feature. This results in
considerably more complex vector exports in all current Qt versions,
but gives us a way to force this IF/when a future Qt version adds
optimisations which make global masks desirable.
2024-06-21 23:10:32 +10:00
Nyall Dawson
fced4e16d0 Add CanCalculateMaskGeometryPerFeature flag to "simple" symbol layers
These are the symbol layer classes where there's no special logic
required relating to feature rendering and features are rendered
one-by-one, with no sub symbols.
2024-06-21 23:10:32 +10:00
Nyall Dawson
0ca28af9a0 Greatly optimise selective masking vector exports
Optimise the logic used when the new geometry backend for
selective masking is in effect:

Whenever its SAFE, instead of calculating an "entire map" clipping
path and then applying this for every feature being rendered,
we now defer the calculation of the clipping path until we
are rendering individual features. Then, we create a clipping path
which contains ONLY the mask paths which are within the area
being drawn over.

This avoids having the entire map clipping path being used for
EVERY feature being rendered, which results in huge PDF/SVG
exports when masks are in effect, and instead results in
clipping paths which are confined just to a sensible area
around each rendered feature.

In some complex test projects this reduces the PDF export
size by a factor of 0.01!! (and results in PDFs/SVGs which
open much quicker in viewers and editors, and don't grind
their operation to a halt).
2024-06-21 23:10:32 +10:00
Nyall Dawson
7d49b89265 Make installMasks return TRUE if any masks were found and installed 2024-06-21 23:10:32 +10:00
Nyall Dawson
3c2ff6894a Add argument to QgsSymbol::startRender for whether symbol is subsymbol
Allows us to know in startRender whether the symbol is actually
a subsymbol for a QgsSymbolLayer. Currently unused.
2024-06-21 23:10:32 +10:00
Nyall Dawson
9181953df7 Add method to collect symbol layer clip geometries intersecting given bounds 2024-06-21 23:10:32 +10:00