190 Commits

Author SHA1 Message Date
nirvn
4131714907 [feature][api] Add a map settings / render context flag to skip symbol rendering 2021-12-28 20:04:49 +07:00
Nyall Dawson
6783347896 Implement framework for history providers
As per https://github.com/qgis/QGIS-Enhancement-Proposals/issues/130
2021-12-21 15:32:57 +10:00
Nyall Dawson
4e71e45ae2 Add method to convert QgsProcessingContext settings to equivalent
qgis_process arguments
2021-12-17 08:29:31 +10:00
Nyall Dawson
fadfb477d9 [api] Move text wrapping handling logic from layout table code to QgsTextRenderer
Allows other users of QgsTextRenderer to take advantage of the
automatic line wrapping behaviour
2021-11-29 13:03:13 +10:00
Nyall Dawson
bab7a911b2 [API] Add new map layer class "QgsGroupLayer"
A group layer is a map layer which consists of a set of
child layers, where all component layers are rendered as a single
flattened object during map renders.

This commit sets up the base framework for QgsGroupLayer only
(i.e. no rendering changes).
2021-11-23 16:08:05 +11:00
Nyall Dawson
4ae14dc546 Add since 2021-11-12 14:09:42 +11:00
Nyall Dawson
388a72abd8 [feature] Replace marker/hash line "on vertices" placement option
with "on inner vertices"

This new mode places the symbols on all inner vertices (ie all
vertices except the first or last). (We can safely do this now
that its easy for users to also set the symbols to show on
first/last vertex by clicking those checkboxes too!)

The motivation here is that when the "Vertex" mode puts the
symbols on the first/last vertex as well as inner vertices,
it's basically impossible to style a line with a different
marker on the first/last vertex to the rest of the line's
vertices. (The best you can get is just hiding the unwanted
first/last vertex by overlaying a second symbol layer on
the first/last vertices with a larger symbol)

Sponsored by North Road, thanks to SLYR
2021-11-12 14:09:42 +11:00
Nyall Dawson
aaafd786df
Make placement options in marker and hash line symbol layers checkboxes instead of mutually exclusive buttons
Makes it considerably quicker to create a marker line with the
markers on the first AND last vertex, amongst other things...

Fixes #18433

Sponsored by North Road, thanks to SLYR
2021-11-12 04:44:08 +10:00
Nyall Dawson
aaca87ca06 Move curve orientation enum (Clockwise/CounterClockwise) to Qgis and
generalise the name

These values are useful for more than just curve orientations
2021-11-10 18:42:42 +11:00
Nyall Dawson
dae69acc76 [feature] Support Small Caps style in labels/text renderer
Adds two new capitalization styles for labels and text symbols:

- Small Caps: Renders lowercase characters as small caps
- All Small Caps: Renders all characters as small caps (regardless
of their original case)

Requires Qt 6.3+, or Qt 5.15 using KDE's fork and the cmake
HAS_KDE_QT5_SMALL_CAPS_FIX switch defined during build.
2021-11-08 14:36:44 +11:00
Nyall Dawson
294282c970 Add new map settings/render context flag for high quality image transforms
which is opt in, and consistently respect this for better quality
raster image markers, svg/raster fills when set

We don't set this by default (keep things light for server), but
do use it in the map canvas and layout exports whenever antialiasing
is enabled.
2021-11-07 17:16:59 +11:00
Alessandro Pasotti
2fbb830c16 Address PR comments 2021-11-05 07:29:18 +11:00
Alessandro Pasotti
c5f956dbef Introduce VectorLayerType flags 2021-11-05 07:29:18 +11:00
Nyall Dawson
0795f726cf [api] Add function to apply a dash pattern vector to a geometry
This returns a new multilinestring geometry which represents the
input geometry with the dash pattern applied to the lines or rings
of the input geometry.

Options are available to set rules for the start/end of the pattern,
e.g. ending on a full dash or gap, or half dash or gap.

Sponsored by North Road, thanks to SLYR
2021-10-30 18:18:03 +11:00
Nyall Dawson
b06e136a57 [feature][symbolgy] Expose choice of clipping behaviour for line
pattern fill

This allows users to control how lines in the fill should be
clipped to the polygon shape. Options are:

- Clip During Render Only: existing behaviour, lines are created
covering the whole bounding box of the feature and then clipped
while drawing. Line extremities (beginning and end) will not be
visible
- Clip Lines Before Render: lines are clipped to the exact
shape of the polygon prior to rendering. Line extremities (including
cap styles, start/end marker line objects, etc) will be visible,
and may sometimes extend outside of the polygon (depending
on the line symbol settings)
- No Clipping: no clipping at all is done - line will cover the
whole bounding box of the feature

Sponsored by North Road, thanks to SLYR
2021-10-26 14:30:13 +11:00
Nyall Dawson
40279cb996 Set new Qgis::RenderContextFlag::RenderingSubSymbol flag on render contexts
whenever a subsymbol component of a parent symbol is being rendered

This flag allows symbol layers to refine their behaviour based on whether
they are a subsymbol or not.
2021-10-23 20:06:32 +10:00
Nyall Dawson
b56e86181c [feature][symbology] Add option to control marker clipping for
point pattern fill

A new option exposes the ability to clip markers in the fill by:

- "Clip to shape": default behaviour, same as previous versions. Markers
are clipped so that only the portions inside the polygon are visible
- "Marker centroid within shape": only markers where the center of
the marker falls inside the polygon are drawn, but these markers
won't be clipped to the outside of the polygon
- "Marker Completely Within Shape": only markers which fall
completely within the polygon are shown
- "No clipping": any marker which intersects at all with the polygon
will be completely rendered

The clipping mode can be overridden via a data driven expression if
desired.

Sponsored by North Road, thanks to SLYR

Fixes #37825
2021-10-23 12:58:13 +10:00
Nyall Dawson
e976479b59 Fix python issue with enum doc 2021-10-23 05:16:41 +10:00
Nyall Dawson
fc0d1869bc Promote some symbol layer enums to enum classes, move to Qgis 2021-10-23 05:16:41 +10:00
Nyall Dawson
e733b517b3 Split QgsVertexId out to own file, promote type to enum class 2021-10-12 14:54:26 +10:00
Nyall Dawson
f2856db943 Implement a more robust way of limiting sizes for symbol preview icons 2021-09-27 11:42:33 +10:00
Nyall Dawson
2fc60fcd7f Fix compatibility of moved QFLAGS 2021-09-26 11:24:51 +10:00
Nyall Dawson
0ab6113e88 Promote QgsMapSettings and QgsRenderContext enums to enum class, move to Qgis 2021-09-26 11:24:51 +10:00
Nyall Dawson
e6b39077a2
Promote QgsCoordinateTransform::TransformDirection to enum class, move to Qgis
This enum was forcing an include of qgscoordinatetransform.h within the
widely used qgsabstractgeometry.h header, causing an absolute explosion
of includes of a bunch of very heavy header classes all across QGIS. By
removing the forced include we can avoid a ton of unwanted includes
and make wider use of forward declarations...
2021-09-22 16:40:49 +10:00
Nyall Dawson
cd2a17f779 Create Qgis::SymbolLayerFlags, add flag for symbol layers to prevent
feature clipping to map extent
2021-09-21 14:02:58 +10:00
David Marteau
ee6acb0ca2
Refactorize server properties 2021-09-16 14:10:07 +02:00
Nyall Dawson
c2c0f2574d [processing] Add parameter type for annotation layers 2021-09-11 07:59:51 +10:00
Nyall Dawson
4cb06c0ae2 Add an annotation item edit operation for adding nodes 2021-09-10 15:01:26 +10:00
Nyall Dawson
a7d299df92 Use an edit operation for annotation item translation, instead of
transform

Will make it easier to add undo/redo support in future
2021-09-10 15:01:26 +10:00
Nyall Dawson
1228f59bff Make annotation item edit API a bit more flexible 2021-09-10 15:01:26 +10:00
Nyall Dawson
4b245f59e0 Add new annotation edit operation for deleting a vertex 2021-09-10 15:01:26 +10:00
Nyall Dawson
b8f65cbf01 Promote temporal related enums to enum classes, move to Qgis 2021-09-09 14:56:47 +10:00
Nyall Dawson
c7c7b6dd1e [api] Create annotation item gui registry
This registry is attached to QgsGui and handles registration of
functions which create widgets for modifying QgsAnnotationItems

Modeled heavily off the print layout API
2021-09-07 10:35:02 +10:00
Nyall Dawson
8f2eb9238f Qgis::HttpMethod should be an enum class 2021-09-06 11:28:04 +10:00
Etienne Trimaille
8b18399704 Add a POST parameter in the FileDownloader processing algorithm 2021-09-03 11:35:46 +10:00
Nyall Dawson
4ff1e55a21 [api] Add method to retrieve the nodes for an annotation item
For now all nodes just directly represent vertices in the item,
but the intention here is that they can represent any form of handle
which can be used to manipulate an item (e.g. a bezier curve point,
some "smart shape" handle for resizing or rotating an item, etc)
2021-09-03 08:06:48 +10:00
Nyall Dawson
b4acffbb31 Add flag for scale dependent bounding boes 2021-08-31 11:04:29 +10:00
Nyall Dawson
f2f40096ab Add support for filtering system tables in QgsProviderSublayerProxyModel 2021-08-26 12:56:45 +10:00
Nyall Dawson
7f090f64d1 [api] Add flags to QgsProviderSublayerDetails, to indicate that
a sublayer is a system or internal table
2021-08-26 12:56:45 +10:00
Nyall Dawson
3b2e640cee Add a new enum for inherent map layer properties, and add property
to annotation layers to reflect that while these are editable
users are not able to toggle edits on them (they are ALWAYS
editable!)

Note that we can't use the existing QgsMapLayer::LayerFlag enum here,
as that has a different meaning (flags which are set by users
at runtime)
2021-08-18 12:32:41 +10:00
Nyall Dawson
1608547066 Add utility function QgsFileUtils.renameDataset
Renames a dataset file, including all its associated sidecar
files (and optionally the .qmd/.qml sidecars)
2021-08-11 08:21:04 +10:00
Alexander Bruy
00dad40975
Merge pull request #44583 from alexbruy/processing-pointcloud
Point cloud parameter for Processing
2021-08-06 11:02:04 +03:00
Alexander Bruy
f801cb6816 [processing] new pont cloud parameter for processing 2021-08-05 16:03:50 +03:00
Nyall Dawson
686a6e5968 [api] Add option to QgsFeatureRequest to request features
within a certain distance of a reference geometry

E.g. this request will retrieve all features within 50 map units of the
provided linestring:

    QgsFeatureRequest().setDistanceWithin(QgsGeometry.fromWkt('LineString(0 0, 10 0, 12 1)'), 50)

A new enum Qgis::SpatialFilterType has been added to reflect whether
a request uses no spatial filter, a BoundingBox filter (via
setFilterRect), or the new DistanceWithin filter.

Distance within filters are treated like bounding box filters, in
that they are independant of any attribute/id filters (such as
feature ids or expressions).
2021-08-05 14:24:07 +10:00
Nyall Dawson
01e3e1dddc [api] Move QgsGeometry enums to Qgis, promote to enum classes 2021-08-04 09:54:32 +10:00
Nyall Dawson
47f7612004 Add flag to babel command generation methods to control whether
paths should be quoted
2021-08-02 13:36:46 +10:00
Julien Cabieces
9d732a238a Fix SIP 2021-07-30 10:53:13 +02:00
Julien Cabieces
deed238bc8 s/OnGoing/Running/g 2021-07-30 10:18:38 +02:00
Julien Cabieces
56acee931d Add enum ActionStart 2021-07-30 10:18:38 +02:00
Julien Cabieces
014a4aac3a Add StartLater / StartImmediately distinction 2021-07-30 10:18:36 +02:00