307 Commits

Author SHA1 Message Date
Jean Felder
f57c1d72dd qgslayoutelevationprofilewidget: Add support for subsections indicator
This adds some new customization associated with the introduction of
subsections indicator:
- it allows to display or hide them
- it allows to change the associated symbology
2025-03-25 09:47:50 +10:00
Jean Felder
c769795e36 qgslayoutitem: Remove empty lines at the end of file 2025-03-25 09:47:50 +10:00
Jean Felder
21dfcd261d qgslayoutitemelevationprofile: Add support for subsections indicator
This adds support to display vertices lines over the profile graph to
display indicator at the location of the curve's vertices.

This is achieved with mainly 2 changes:
- `setSubsectionsSymbol()` allows to set the line symbol of the
vertical lines
- Call `renderSubsectionsIndicator` on the `QgsProfilePlotRenderer`
2025-03-25 09:47:50 +10:00
Nyall Dawson
8911a5b726 Move QgsLegendStyle::Style enum to Qgis, rename to LegendComponent 2025-02-20 13:08:54 +10:00
Julien Cabieces
ed64834106 api(deprecated): add message to deprecated SIP annotation 2024-12-17 09:06:42 +01:00
Julien Cabieces
398f00bc26 doc(Deprecated): Fix missing \deprecated instruction 2024-12-17 09:05:46 +01:00
Denis Rouzaud
76f702e48a sipify 2024-12-05 13:19:50 +01:00
Nyall Dawson
2140c555fe Double-clicking a mouse handle for a layout label resizes to fit text
Double-clicking a handle will auto-size the label to exactly fit
the contained text (growing or shrinking as needed). The opposite
side of the label will remaining fixed in place, so eg double-click
the bottom-right handle causes the bottom-right corner of the label
to move.
2024-12-05 05:13:53 +10:00
Yoann Quenach de Quivillic
eaad2e930c Apply suggestions from review 2024-10-29 06:20:14 +10:00
Yoann Quenach de Quivillic
ca2688a977 Prevent creation of invalid polyline / polygon 2024-10-29 06:20:14 +10:00
Yoann Quenach de Quivillic
071b28903c Apply layout page size to all pages 2024-10-26 12:17:02 +10:00
Yoann Quenach de Quivillic
e8e55cdbd0
Add export quality slider for jpeg/jpg 2024-10-26 09:37:58 +10:00
Nyall Dawson
29b345e2c3 Add scale method option for layout scale bars
Instead of always calculating the scale along the bottom of the
map, expose a choice of methods to the user (along bottom,
middle, top, or average of the three measurements)

For new scalebars, default to the average method, which better
handles the scenario where the scale at the top or bottom of
the map cannot be calculated (eg when the top/bottom of the map
falls just outside valid areas for the map's crs)

This fixes one of the most common scenarios which cause scale
bar widths to blow out to massive sizes

Refs #55240
2024-10-15 12:38:07 +10:00
Even Rouault
9f605a6426 Don't use the The Word Which Must Not Be Used
I limited the renaming to things that are not in the public API and
are not setting names. This is probably more than we strictly need to
do, but at least this will help doing potential future similar 'grep'
exercises.
2024-10-09 11:50:08 +10:00
Nyall Dawson
f61e33da4e Doxygen comments should use "NULLPTR", not "NULL"
NULLPTR will get correctly formatted in both c++ and Python docs
2024-09-19 09:55:44 +10:00
Nyall Dawson
cfd251e7f7 Capture signal arguments 2024-09-08 16:06:22 +10:00
Nyall Dawson
4ec5290a46 [layouts] Add support merging cells in manual tables
Allows adjacent cells to be merged in layout manual table items.

From the table editor, select multiple cells in a rectangular
shape and then from the Table menu, click "Merge Selected Cells".
Merged cells can be un-merged via the "Split Selected Cells"
menu action.

Fixes #51694
2024-09-05 09:19:02 +10:00
Nyall Dawson
0f1daa11f3 Fix formatting of some \see links 2024-09-04 06:32:03 +10:00
Nyall Dawson
ef0289f3ec Fix formatting of Python ..deprecated annotations in docstrings
Fixes https://github.com/qgis/pyqgis-api-docs-builder/issues/174
2024-09-02 11:42:12 +10:00
Nyall Dawson
519959154a Fix some overly verbose class "brief" descriptions 2024-08-28 11:58:21 +10:00
Nyall Dawson
3a578d6712 Header update 2024-08-13 20:28:55 +10:00
Nyall Dawson
be8dce7d0d Valid improvements from new sipify 2024-08-13 20:28:55 +10:00
Nyall Dawson
c2c75f3b19
More no-value dox removal 2024-07-25 09:04:22 +10:00
Nyall Dawson
6f652d251b Drop no-value copy constructor dox 2024-07-25 04:02:55 +10:00
Nyall Dawson
2fb85192aa Fix crash when extracting symbols from project with layout legend
Legend must be initialized before calling style visitor function

Fixes #57609
2024-07-23 16:40:47 +10:00
Nyall Dawson
28943f9c1b Remove a bunch of useless default constructor doxygen 2024-07-23 02:08:28 +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
711c75d873 Promote scalebar enums to enum class, move to Qgis 2024-07-12 05:36:22 +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
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
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
7a3bf17bf1 Provide detailed error message when creating GeoPDF from layout fails
Instead of a generic message (which is not very helpful), show the
full error message we receive from GDAL to the user
2024-05-22 14:28:03 +10:00
Alexander Bruy
8882fd9aa1 duplicate composer map grid (fix #47511) 2024-05-10 13:17:39 +01:00
Nyall Dawson
f02841dd5d Remove Q_DECL_DEPRECATED from constructor
Even though this class is deprecated, this breaks the qt 6 on qt 6.7+
2024-05-01 13:45:55 +10:00
Nyall Dawson
e22a1d605b [feature][layouts] Add z range filter option for layout maps
Similar to the existing setting for temporal filtering of 2d layout
maps, this setting allows users to set a specific elevation/z range
for a layout map item. When set, map layers with support for 2d
z range filtering (currently point clouds and raster DEMs) will
be filtered to show only content within this range.

The z range can be data-defined, allowing differing z range
for different atlas or report features.
2024-03-04 17:00:24 +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
feecb4017c Make some custom model roles enum class for Qt6 compatibility 2024-02-06 21:04:43 +10:00
Nyall Dawson
f1e3ba9e2d Use correct sip method
And use INDENT-OFF annotations to avoid astyle messing up
formatting of enum with inline macros
2024-01-31 13:48:49 +10:00
Nyall Dawson
23f3af4290 Use enum classes for QgsProperty property keys
Should fix usage on Qt 6 builds
2024-01-31 13:48:49 +10:00
Mathieu Pellerin
185724f892 Make QtPrinter support non-mandatory 2024-01-22 11:07:34 +10:00
Nyall Dawson
7e73b9bad0 Ensure we correctly set qt item caching only when appropriate 2023-10-19 17:30:10 +13:00
Nyall Dawson
cb187267ce Deprecate QgsLayoutEffect
QGraphicsEffects should NOT be used on QGraphicsItems. Despite
being part of stable Qt API, it is broken and results in crashes.

See https://bugreports.qt.io/browse/QTBUG-58501 for details.
2023-10-19 17:30:10 +13:00
Nyall Dawson
df1dc0dba2 Fix elevation profile item transparency forces rasterisation of
whole layout, expand unit test coverage
2023-10-11 11:36:40 +10:00
Nyall Dawson
3588d41786 Fix legend item with opacity forces whole layout to rasterize
and expand test coverage of blend modes and opacity with
legend items
2023-10-11 11:36:40 +10:00
Nyall Dawson
2bd25071f7 Ensure that we always call prepareGeometryChange BEFORE changing
properties which effect the boundingRect of a layout item

Refs #52079
Refs https://bugreports.qt.io/browse/QTBUG-18021
2023-10-05 13:24:47 +10:00