101 Commits

Author SHA1 Message Date
Nyall Dawson
f9c3da1e06 Move unit enums to Qgis, promote to enum class 2023-02-19 13:29:06 +10:00
Nyall Dawson
2ba6b4ffe5 Allow choice of style database when saving styles 2022-05-17 16:36:00 +10:00
Nyall Dawson
42a758ec6a Allow lazy setting of style manager QgsStyle 2022-05-17 16:36:00 +10:00
Nyall Dawson
4eede35d55 Allow any symbol to be an animated symbol
Users can now indicate that a symbol should be treated as a animated
symbol, through the new "Animation Settings" option in the symbol
widget's Advanced menu.

This settings panel allows users to enable animation for the symbol
and set a specific frame rate at which the symbol should be redrawn.
When enabled, the @symbol_frame variable can be used in any
symbol data defined property in order to animate that property.

For instance, setting the symbol's rotation to the data defined
expression

    @symbol_frame % 360

will cause the symbol to rotate over time. (with rotation speed
dictated by the symbol's refresh rate)
2022-04-09 18:14:44 +10:00
Nyall Dawson
78c8a670e3 [feature] New marker symbol type for "Animated Marker"
This new marker symbol type allows points to be rendered using
an animated marker, sourced from an animated gif, webp or mng
animation.

Options are present for marker file, size, angle and frame rate.

There are two ways in which animated symbols are handled:

1. If the map itself is considered an animation, then the frame
rendered for the animated marker is based on the map animation
frame and frame rate. This is the case when the temporal
controller is set to the Animation mode. In this case the
animated markers will follow the temporal controller animation,
e.g. pausing when the animation is paused, advancing frames
with the animation, etc. The map will also be redrawn using
the frame rate set for the temporal animation.

This mode also applies when exporting an animation from the
temporal controller.

It's also the mode used when a plugin specifically sets the
frame rate and current frame QgsMapSettings properties, so
e.g. @timlinux's QGIS Animation Workbench plugin will dictate
the marker animation frame to render.

2. If the map is NOT considered an animation (i.e. it's just
a plain old normal QGIS project), then the frame to render
will be based on the current timestamp alone.

Markers will be animated when their corresponding layer is set
to a temporal mode, and a temporal animation is playing.
2022-04-04 11:43:47 +10:00
Alessandro Pasotti
5c3915b9ed
Merge pull request #45587 from elpaso/bugfix-gh45582-vector-renderer-localization-issues
Fix multiple localization issues with vector renderers
2021-10-29 15:49:14 +02:00
Nyall Dawson
4a4e0061e1 [feature][symbology] New "Lineburst" line symbol layer type
This adds a new "Lineburst" symbol layer type, which renders
a gradient along the WIDTH of a line (as opposed to the interpolated
line renderer, which renders a gradient along the LENGTH of
a line). It's like the shapeburst fill symbol type, but for lines!

Sponsored by North Road, thanks to SLYR
2021-10-29 05:34:08 +11:00
Nyall Dawson
0667363261 [feature][symbology] New "Raster Line" symbol layer type
This new symbol layer type renders a raster image following
a line feature's shape.

Options are present for:
- picture path (including data defined path)
- line width
- opacity
- line join/cap styles

Sponsored by North Road, thanks to SLYR
2021-10-28 12:13:54 +11:00
Alessandro Pasotti
6a22e1ff4e Handle lists and address PR review comments. 2021-10-22 16:17:13 +02:00
Juergen E. Fischer
c6008b7ee1 fix MSVC build: reverts fee62e4, dff05dd and e3a77b9484c effectivly
reverting 3fb0f66 (followup #45348)

Using --no-public-is-protected (default on Windows) also works on Linux
and fixes #45331 too
2021-10-21 23:03:48 +02:00
nirvn
ef84e48a09 Run sipify_all.sh 2021-10-12 16:34:05 +10:00
Denis Rouzaud
ec16736306 run sipify 2021-10-12 16:34:05 +10:00
Nyall Dawson
68e7cd6609 Don't show symbol levels actions in renderer widgets for renderers
which are subrenderers for other renderers

Symbol layers have no effect in this situation (e.g. when a categorized
renderer is used as a subrenderer for point displacement renderer), so
don't show the option in the GUI
2021-05-26 11:50:44 +10:00
Nyall Dawson
f7f43e08c6 Fix memory leaks in renderer widgets 2021-05-26 11:50:44 +10:00
Nyall Dawson
f3f4c17c5f Use a safer approach to update renderers after symbol levels are changed
Instead of directly changing the renderer in place in the symbol levels
widget, we delegate responsibility for handling the changes to symbol
levels to the parent QgsRendererWidget subclass. This allows us to
implement different logic in the various subclasses which correctly
handle how that particular widget subclass should update any internal
symbol references and ultimately update the renderer.

Fixes instability and crashes after editing symbol levels.

Fixes #42671
2021-05-26 11:50:44 +10:00
Nyall Dawson
b61dc7c48a Sipify 2021-05-18 16:59:22 +10:00
Nyall Dawson
b5dfe8f155 Refactor enum handling
- Add enums to qgis.h instead of qgscoreenums, so that they belong to
a Qgis namespace
- Split up the various symbol headers into multiple files so that we
can fine-tune their inclusion and forward declare more readily, speeding
up recompilation
- Move QgsSymbol enums to qgis
2021-05-18 16:59:22 +10:00
Denis Rouzaud
c8c534df3a avoid adding unclear API 2021-05-11 11:15:58 +02:00
Denis Rouzaud
58dcd2420f better wording and dox 2021-05-11 11:15:56 +02:00
Denis Rouzaud
c1b8d4a524 adapt QgsSvgSelectorWidget to support other images:
* source line edit can be switched to image
* SVG specific components can be hidden
2021-05-11 11:15:55 +02:00
vcloarec
89c069f695 address review 2021-05-05 09:03:13 +02:00
vcloarec
9a3ad85533 interpolated line symbol layer 2021-05-05 09:03:13 +02:00
Nyall Dawson
352856f972 Slightly better worded QgsVectorFileWriter description 2021-04-19 12:54:13 +10:00
Denis Rouzaud
ba8a445850 run sipify 2021-03-22 21:13:52 +01:00
Denis Rouzaud
aa23d009a4 create a sort filter proxy model 2021-03-19 11:52:20 +01:00
Nyall Dawson
5245430461 Add widget for Embedded Symbols renderer
Allows users to control the default symbol used for features without
embedded styles
2021-03-06 16:37:46 +10:00
Alessandro Pasotti
7b2fc4c1f8 More doxy nonsense, pt 2 2021-02-19 08:15:29 +10:00
Nyall Dawson
50b9beaad6 [sipify] Catch more class references and insert :py:class: annotations 2021-01-31 05:41:22 +10:00
Nyall Dawson
9cba2489bc Use parent symbol type instead of layer geometry type to decide
which line symbol layer settings to show

Fixes fill symbol only related properties (like ring filters) show
for line symbols in some contexts.

Fixes #33398
Fixes #24131
2021-01-20 06:01:25 +10:00
Denis Rouzaud
defb091c48 add missing dox 2021-01-07 15:52:23 +01:00
Denis Rouzaud
9161a8c8b5 gui for dynamic SVGs 2021-01-07 15:02:26 +01:00
Nyall Dawson
7fba697bf3 [FEATURE] New "Merged feature" renderer for polygon and line layers
This renderer merges (or unions/dissolves) the line or polygon features
from a layer prior to rendering them. It's useful for rendering
a polygon layer with overlapping features as one single "coverage" feature,
or a line layer consisting of many smaller component line features
using a regularly spaced marker line or similar.

Internally, this just moves the guts of the existing inverted polygons
renderer to a new base class, as that renderer already had an option
to merge features prior to rendering. Basically it just exposes a new
renderer to users which is the inverted polygon renderer without
the inversion step!
2021-01-04 13:52:18 +10:00
Denis Rouzaud
22b622b163
also use SVG selector in SVG fill symbology (#39524) 2020-10-21 13:46:27 +02:00
Denis Rouzaud
139be61b29
Merge pull request #39421 from 3nids/svg-browser
make the SVG selector collapsible (+ remove duplicated code)
2020-10-21 06:10:06 +02:00
Nyall Dawson
b637b14d07 Remove a lot of duplicate hardcoded strings for color ramp types and use static method instead 2020-10-19 11:47:35 +10:00
Nyall Dawson
34fb646f7a Fix trying to create new color ramp from first page in style
manager dialog does nothing
2020-10-19 11:47:35 +10:00
Denis Rouzaud
07280da2b0 fix doygen 2020-10-18 12:03:13 +02:00
Denis Rouzaud
29b76f44b1 reuse existing SVG selector widget in QgsSvgMarkerSymbolLayerWidget 2020-10-16 15:48:31 +02:00
Denis Rouzaud
29382d0608 move SVG browser to a dedicated class
defer loading of SVG icons to only show them when the widget is made visible
2020-10-16 10:06:24 +02:00
Nyall Dawson
ab6bbfda1d Fix all remaining Qt QFlags deprecated constructor warnings 2020-10-02 13:04:49 +10:00
Nyall Dawson
f496173bd7 Fix messy doxygen blocks which mess with sipify script
Fixes #38291
2020-08-20 17:01:35 +10:00
Mathieu Pellerin
1386474e3c
[ui] Fix SVG marker widget not properly restoring colors 2020-08-20 10:08:20 +07:00
Nyall Dawson
81a9db9f57 [sipify] Fix creation of cross references 2020-06-15 13:43:58 +10:00
Alexander Bruy
d2f72e87af update SIP bindings 2020-05-29 08:14:46 +10:00
Nyall Dawson
b8a12be5b7 Fix more qt deprecation warnings 2020-02-05 14:06:31 +10:00
Nyall Dawson
f8e5861dca Fix rule-based renderer widgets swallow copy/paste/delete shortcut keys
when opened in panel modes

Fixes #33592
2020-01-05 05:32:03 +10:00
Denis Rouzaud
aec68661ca update python bindings 2019-12-04 22:20:26 +01:00
Hugo Mercier
845894b313
[FEATURE] Selective masking (#30747)
* [FEATURE] Selective masking

Advanced rendering feature that allows the definition of 'masks' areas around labels or with a new typ of symbol layer. These masks will "un-draw" symbol layers of other layers underneath.
It modifies the rendering process by adding an optional second pass.
2019-11-07 08:17:25 +01:00
Nyall Dawson
351970e1c2 Dox, spelling 2019-10-28 14:34:30 +10:00
Nyall Dawson
b5e92d41f5 [FEATURE] Random marker fill symbol layer type
This commit adds a new fill symbol layer type "Random marker fill". It
allows polygon features to be rendered using a marker symbol placed
at random locations within the polygon boundary.

Options include:
- number of marker symbols to render for the polygon
- whether markers rendered near the edges of polygons should be clipped
to the polygon boundary or not
- an optional random number seed, to give consistent placement
of markers whenever maps are refreshed (also allows random placement
to play nice with QGIS server and tile-based rendering)

Sponsored by the SLYR project
2019-10-28 14:34:30 +10:00