504 Commits

Author SHA1 Message Date
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
Nyall Dawson
6d8ba6e2cf Support saving/loading cloud storage connections from XML 2024-07-10 04:07:12 +10:00
Nyall Dawson
995d0e6c49 Standardise naming 2024-07-10 04:07:12 +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
Alexander Bruy
f0db0f247b address review 2024-07-04 07:30:51 +10:00
Alexander Bruy
d5605a3321 update QGIS version in the doxygen comments 2024-07-04 07:30:51 +10:00
Alexander Bruy
709253a27a integrate favorite log into toolbox model and view 2024-07-04 07:30:51 +10:00
Alexander Bruy
5566473a1d add log for tracking Processing favorite algorithms 2024-07-04 07:30:51 +10:00
Nyall Dawson
87d9a3e7b2 Don't go to massive negative numbers when incrementing a NULL spin box
When a spin box is showing a NULL value, we DON'T do the default step
behavior, as that would add one step to the NULL value, which is usually
a very large negative value... so the user will get a very large negative number!

Instead, treat the initial value as 0 instead, and then perform the step.
2024-06-29 06:15:01 +10:00
Nyall Dawson
b0929e4ced Also permit drag and drop onto multi layer line edit
We supported drag and drop onto the full expanded panel, now
also support dropping onto the summary line edit widget too
2024-06-27 17:05:59 +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
Nyall Dawson
d4f9914288 Create QgsGdalCredentialOptionsWidget
A resuable widget for configuration GDAL credential options
for vsi file systems
2024-06-25 06:07:58 +10:00
Nyall Dawson
8dcb158394 Move "share on gist" logic to QgsCodeEditorWidget
Allows this functionality to be used by other code editors, not
just console script editor
2024-06-24 18:40:00 +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
uclaros
f82e803317 preserve MDAL mesh metadata when editing mesh layers 2024-06-21 12:29:11 +02:00
Nyall Dawson
5d81083c91 Add note about raster based exports 2024-06-20 05:41:37 +10:00
Nyall Dawson
f8172c48ed Add function to test whether clip geometries exist for a symbol layer 2024-06-20 05:41:37 +10:00
Nyall Dawson
32b62447f6 Add on-the-fly simplification support to QgsGeometryPaintDevice 2024-06-20 05:41:37 +10:00
Nyall Dawson
e931b9ade6 Add mask render settings to QgsMapSettings/QgsRenderContext
And API mechanism to propagate these from layout exports down
to the render context

Gives us a place to specify fine-tuned control over masking
settings for map renders
2024-06-20 05:41:37 +10:00
Nyall Dawson
102874e6d2 Port geos simplify linestring
Add QgsAbstractGeometry::simplifyByDistance, which is a direct
port of GEOS Douglas Peucker algorithm.

This is a trivial algorithm to implement, and we benefit from
avoiding the conversion to/from GEOS geometries.
2024-06-20 05:41:37 +10:00
Nyall Dawson
21935668ba Move logic for connection item deletion to new class
Adds a new "QgsDataItemGuiProviderUtils" class, with a generic
function for handling deletion of browser connection items.

Replace all the duplicate connection deletion logic from the
different browser connection providers with calls to the
generic function.

In addition to removing a lot of duplicate code, the new
generic function correctly handles deletion of multiple
selected connections (previously, only the first connection
would actually be removed).

Fixes #26276
2024-06-19 16:59:00 +10:00
Nyall Dawson
c214527a8e Add convenience function to filter a list of QgsDataItem to a subclass 2024-06-19 16:59:00 +10:00
Alessandro Pasotti
ecec4085d9
Merge pull request #57769 from elpaso/bugfix-gh57765-raster-identify-localization
[raster][UX] Raster identify: respect locale settings
2024-06-18 17:37:19 +02:00
Alessandro Pasotti
81357cba0b QgsRasterBlock::printValue add localized argument 2024-06-18 10:32:29 +02:00
Nyall Dawson
9946a1d739 Move console script editor external file watching logic to QgsCodeEditorWidget
Ensures a consistent behavior between console script editor and
eg processing script editor
2024-06-18 05:23:57 +10:00
Nyall Dawson
d345c68c5a Move responsibility for loading scripts to QgsCodeEditorWidget 2024-06-18 05:23:57 +10:00
Nyall Dawson
0931624dea Add (non-exposed) setting for the external Python editor
This isn't exposed in the GUI, but allows users to
set a specific editor command to use when opening
Python files in the external editor.

Use the token <file> to insert the filename, <line>
to insert line number, and <col> to insert the column number.

Eg:

  QgsSettings().setValue(
    'gui/code-editor/python/external-editor',
    'kate -l <line> -c <col> "<file>"')
2024-06-15 09:01:33 +10:00
Nyall Dawson
f23caeef50 Leave null QByteArray values as QByteArray() to maintain API
These should probably be returned as None or NULL for consistency,
but let's not break API right now...
2024-06-13 05:59:14 +10:00
Nyall Dawson
1a56be8cf8 Faster null conversions 2024-06-13 05:59:14 +10:00
Nyall Dawson
e85583fd7b Optimise QgsFeature __getitem__
Avoid calling expensive sipConvertFromNewType method when feature
attribute is a trivial type
Also avoid a copy of the feature attributes which we don't require
2024-06-13 05:59:14 +10:00
Nyall Dawson
f1c76432d5 Don't copy feature attributes just to get their length
Use attributeCount() directly instead
2024-06-13 05:59:14 +10:00