114 Commits

Author SHA1 Message Date
Nyall Dawson
627263ec0f Implement widget for symbol buffer settings 2024-08-02 05:09:03 +10:00
Nyall Dawson
6f652d251b Drop no-value copy constructor dox 2024-07-25 04:02:55 +10:00
Nyall Dawson
28943f9c1b Remove a bunch of useless default constructor doxygen 2024-07-23 02:08:28 +10:00
Nyall Dawson
19436fa9b1 Add framework for data defined property buttons at feature renderer level 2024-05-10 12:06:18 +10:00
Even Rouault
a68422b982 Various typo fixes
Including 3 public methods, which are deprecated by this commit and replaced by a typo-fixed version
2024-02-29 06:03:03 +10:00
Even Rouault
15ea5c46bc
Header files: remove all mentions of '\since QGIS 3.0' 2024-02-18 20:57:23 +01:00
Even Rouault
02caeb9db7
Header files: remove all mentions of '\since QGIS 2.' 2024-02-18 20:46:01 +01:00
Nyall Dawson
ac2f1179c8 More item data role enum to enum class conversions 2024-02-06 21:04:43 +10:00
Nyall Dawson
16c8c88247 New "Filled line" symbol layer type
This adds a new line symbol type which renders lines using a
fill symbol. The interior of the line is drawn using any standard
QGIS fill symbol, allowing for lines filled with gradients, line
hatches, etc.

Sponsored by North Road, thanks to SLYR
2023-11-06 11:42:28 +10:00
Nyall Dawson
784c844e30 Fix crash when certain symbol pages are open in style dock, eg
categorized class symbol editors, and QGIS is closed or a new project
opened

The symbol ownership of QgsSymbolSelectorWidget is very messy, and
we can't fix till 4.0. Workaround this by introducing a temporary
API to transfer symbol ownership to the widget.
2023-09-29 10:40:07 +10:00
Nyall Dawson
b5e3af7a3a Use QgsScreenProperties instead of direct QScreen pointers 2023-06-22 18:49:22 +10:00
Nyall Dawson
0641766902 Fix incorrect sizing & pixelation of symbol previews on hidpi
displays
2023-06-22 18:49:22 +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
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