5876 Commits

Author SHA1 Message Date
Nyall Dawson
7badf62596 [api] Add tab positions list for QgsTextFormat
Allows setting a list of custom tab stop distances, instead
of just a single distance
2024-11-10 09:52:14 +11:00
Nyall Dawson
0cccf4c42b Support CSS margins for block elements in HTML labels
Adds support for CSS margin properties for block elements in
the text renderer. Specifically:

- This is available for block type elements only, eg DIV, P, H1-H6.
- Margins are NOT available for spans or other non-block content (due to Qt
  limitations)
- Margins can be specified in pt units only
- Margins can be specified either via "margin-left: 5pt; margin-right:
  10pt" etc, or "margin: 5pt 0pt 10pt 0pt"
- Negative margins are supported for the bottom margin ONLY (due to Qt
  limitations)
2024-11-10 09:51:55 +11:00
Nyall Dawson
5a7fbaac1b Convert block margins to QgsTextBlockFormat margins 2024-11-10 09:51:55 +11:00
Nyall Dawson
e9a51d6806 Add repr for QgsMargins 2024-11-10 09:51:55 +11:00
Martin Dobias
5a6b07e22a Nyall's review 2024-11-08 12:44:27 +01:00
Martin Dobias
13251c2bf1 Make tessellator not flip axes and use the new option in QGIS code
We add a new setOutputZUp(true) option to QgsTessellator so that
the coordinates on output do not get flipped from [x,y,z] to [x,-z,y].

The default is still the old behavior with flipped axes (to make sure
we do not break the API), but all uses in the QGIS code were upgraded
to use the new option.

This means we do not need to add rotation to polygon / buffered line
symbol's 3D entities in 3D map views (and there's only translation left, yay!)
2024-11-08 12:44:27 +01:00
Nyall Dawson
ace375b686 Move raster iteration progress calculation to raster iterator class 2024-11-07 10:13:55 +11:00
Juho Ervasti
47b812bb9b
Don't allow non-polygon avoid intersection layers (#59331) 2024-11-05 06:41:56 +01:00
Nyall Dawson
f3fb1b87c8 [api] Add methods to find min/maximum value in QgsRasterBlock 2024-11-05 11:07:54 +11:00
Nyall Dawson
8b744fbda5 Expand docs with notes on caching 2024-11-04 15:14:00 +10:00
Nyall Dawson
ca5e4450b6 Support css line-height in HTML labels
Adds support for the line-height CSS property in HTML formatted labels.

Supports line-height in either points or percent, eg "line-height:
40pt" or "line-height: 40%"
2024-10-30 13:16:01 +10:00
Martin Dobias
ae13cfea17 Add QgsBox3D tests and fix the implementation 2024-10-30 06:20:42 +10:00
Martin Dobias
4f183696b0 Make QgsChunkNode use doubles instead of floats for bounding boxes
- move from QgsAABB to QgsBox3D
- also switch from "world" coordinates (relative to 3d map scene origin,
  and flipped axes) to map coordinates
2024-10-30 06:20:42 +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
Nyall Dawson
aaf4b90911
Fix malformed docstrings (#59244)
* Fix malformed docstrings

Fixes https://github.com/qgis/pyqgis-api-docs-builder/issues/188

* Fix malformed docstrings

* Fix more malformed docs
2024-10-28 14:29:21 +01: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
2fcd8b99b5 Fix crashes on newer GEOS with empty polygon rings
There was a previous fix for this protecting some geos calls, but
on newer GEOS versions we get crashes with other methods (eg
calculating centroid) when using geos geometries with empty
interior rings.

Avoid this by ALWAYS defaulting to skipping empty rings when
creating GEOS polygons, UNLESS explicitly asked to. Then, only
explicitly ask to do this when we are using GEOS to validate
a geometry. In all other cases we don't need or want empty rings.
2024-10-26 04:49:56 +10:00
David Koňařík
71b2591c62 Fix Identify tool on virtual point cloud
(fix #54729)
2024-10-25 08:26:00 +02:00
David Koňařík
8039ccb50d Fix elevation profile on intersecting polyline 2024-10-24 09:52:58 +10:00
Nyall Dawson
712b3e72c6 QgsMultiRenderChecker: avoid misleading console output noise
When the checker passes comparison against ANY reference image,
don't output mismatch failure message for all the other variants
2024-10-24 09:51:21 +10:00
Nyall Dawson
f9a7ac7329 Add methods to insert content into QgsTextBlock/QgsTextDocument 2024-10-21 13:41:51 +10:00
Nyall Dawson
cf1e6fd9bc Make "archive" copy of QgsPalLayerSettings::calculateLabelSize
For stable API use only, and then cleanup the private version
of this to remove all the consideration of 3.0 API compatibility.

Mark the archive copy as deprecated and remove in 4.0

This method has become completely unweildy because of all the
compatibility code. By making this private only we can rip
out all this old code and make the method much simpler and
easy to understand.
2024-10-21 13:41:51 +10:00
Germán Carrillo
512ea7d062 [fix] When passing from Stacked Diagram to a single one, take the first one (if it exists) in the stacked diagram as a basis for the new single one
Before this commit, the stacked diagram properties were taken as a basis, losing valuable diagram settings in the process.
Note this reverts commit 2f9a0758b309ef162d6390b7411cba71af3375be
2024-10-19 06:24:23 +10:00
Germán Carrillo
deb210929a [core] Remove unused method in QgsStackedDiagramRenderer 2024-10-19 06:24:23 +10:00
Germán Carrillo
4977c8f746 [gui] Document and handle ownership in QgsStackedDiagramProperties and underlying model 2024-10-19 06:24:23 +10:00
Germán Carrillo
cae14bb852 [core] Implement StackedDiagramRenderer's copy constructor (called by clone()) and operator= 2024-10-19 06:24:23 +10:00
Germán Carrillo
585d0df594 [core] Make sure QgsStackedDiagramRenderer::addRenderer() takes ownership 2024-10-19 06:24:23 +10:00
Nyall Dawson
6b3eefd115 Add test blocking any new introduction of QgsProject::instance() in core 2024-10-19 06:22:04 +10:00
Nyall Dawson
41553459d8 [gps] Be tolerant to talker IDs which don't start with 'G'
From the nmea specifications it is clear that the talker ID
does not have to start with 'G'. Accordingly remove ALL these
incorrect hardcoded checks against (a very small subset) of
known talker IDs, and permit any two-character string
as a valid talker ID

Fixes connection to NMEA devices which use "IN" for
talker ID (and others)
2024-10-19 06:21:20 +10:00
Germán Carrillo
cc6feb11f6 Add missing \since and \see in method docs, replace @param by \param 2024-10-17 13:37:13 +10:00
uclaros
da412089cd Make the QgsTracer not add unnecessary points on intersections 2024-10-16 16:27:40 +02:00
Alessandro Pasotti
8e106b8c10
Merge pull request #59105 from elpaso/bugfix-wms-max-tile-size
[wms] Fix unreported issue max tile size from capabilities ignored
2024-10-16 14:44:17 +02:00
Alessandro Pasotti
2078ef5c03 [wms] Fix unreported issue max tile size from capabilities ignored
Fix an unreported issue with WMS client ignoring the advertised tile
size from GetCapabilities (because the raster iterator always used
its own hardcoded default).

A new method was added to retrieve this information from data providers
only implemented for WMS at the moment.

The test has been reformatted for consistency with other core tests
by moving the implementation outside of the class. The actual change is
the addition of TestQgsWmsProvider::testMaxTileSize().

Funded by: M.O.S.S. Computer Grafik Systeme GmbH https://www.moss.de/
2024-10-16 09:29:36 +02:00
Nyall Dawson
f2f05abca1 Cleanup docs, use \param instead of @param 2024-10-16 13:01:39 +10:00
Nyall Dawson
4eb6ce1053 Add isValid() method for QgsScaleBarRenderer::RendererContext 2024-10-16 12:00:32 +10:00
Nyall Dawson
2f4e5f0269 Mark QgsOptional bool operator as explicit
And reimplement for Python
2024-10-16 10:51:47 +10:00
Nyall Dawson
b5fa8d51fb Mark QgsProperty bool operator as explicit
And reimplement in Python, as sip can't handle explicit bool
operator from c++
2024-10-16 10:51:47 +10:00
Denis Rouzaud
e1a059b1da
Merge pull request #59092 from nyalldawson/pointxy_equality
Remove duplicate equality operator for QgsPointXY
2024-10-15 14:32:46 +02:00
Nyall Dawson
7b1b51a886
Remove duplicate equality operator for QgsPointXY
We had two different(!!!!) implementations for equality operator
for QgsPointXY, with different logic (one handled empty points,
the other didn't). This compiled only because one was not marked
as const. So we'd get a DIFFERENT equality check logic depending
on whether or not the first point was const... eeek!

Remove the duplicate one, mark the better one as const
2024-10-15 16:47:46 +10:00
Alessandro Pasotti
9098fb9140
Merge pull request #58916 from elpaso/bugfix-gh58875-exp-compiler-with-plus-strings
Fix SQL expression compiler plus operator with strings
2024-10-15 08:45:39 +02:00
Nyall Dawson
bc28bfd333 Fix/suppress more duplInheritedMember warnings 2024-10-15 15:00:05 +10:00
Nyall Dawson
6b344cd1fc Remove broken swap methods, replace with standard assignment op
which correctly sets all members
2024-10-15 15:00:05 +10:00
Nyall Dawson
56e58a2f74 Remove duplicate inherited members 2024-10-15 15:00:05 +10:00
Nyall Dawson
b85e373a31 Remove duplicate methods defined in subclasses 2024-10-15 15:00:05 +10:00
Nyall Dawson
de73f3c975 Add docs 2024-10-15 15:00:05 +10:00
Nyall Dawson
967388df86 Fix cppcheck 'function can be const' warnings 2024-10-15 15:00:05 +10:00
Nyall Dawson
2084479191 Fix flipped docstrings 2024-10-15 15:00:05 +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