59 Commits

Author SHA1 Message Date
Nyall Dawson
519b82183c Fix numeric format configuration in dialog mode 2024-09-04 19:06:26 +10:00
Nyall Dawson
05003ba2fa [feature] Add "Linear Referencing" symbol layer type
This new symbol layer type allows placing text labels at regular
intervals along a line (or at positions corresponding to
existing vertices). Positions can be calculated using
Cartesian distances, or interpolated from z/m values.

Functionality includes:

- Labels can be placed using fixed cartesian 2d distances,
at regular linearly interpolated spacing calculated using
the Z or M values in geometries, or at existing vertices
- Labels can show either the running total distance, or
the linearly interpolated Z/M value
- Uses text rendered to draw labels, so the full range
of functionality is available for the labels (including
buffers, shadows, etc)
- Uses the QGIS numeric format classes to format numbers
as strings, so users have full range of customisation
options for eg decimal places
- An optional "skip multiples of" setting. If set, then
labels which are a multiple of this value will be skipped
over. This allows construction of complex referencing labels,
eg where a symbol has two linear referencing symbol layers,
one set to label every 100m in a small font, skipping multiples
of 1000, and a second set to label every 1000m in a big
bold font
- Labels are rendered using an angle calculated by averaging
the linestring, so sharp tiny jaggies don't result in
unslightly label rotation
- Optionally, markers can be placed at referenced points
in the line string, using a full QGIS marker symbol (this allows
eg showing a cross-hatch at the labeled point, for a "ruler"
style line)
- Data defined control over the placement intervals, skip
multiples setting, marker visibility and average angle
calculation length

Notes:

- When using the distance-based placement or labels, the
distances are calculated using 2D only, Cartesian calculations
based on the original layer CRS. This could potentially be
extended in future to expose options for 3D Cartesian distances,
or ellipsoidal distance calculations.

Sponsored by the Swiss QGIS User Group
2024-09-04 19:06:26 +10:00
Nyall Dawson
dd01c630e7 Checkin files 2024-09-04 13:54:39 +10:00
Nyall Dawson
c6233cb312 Add missing signal docs 2024-09-04 13:54:39 +10:00
Nyall Dawson
a4723d7b97 Add missing signal docs 2024-09-04 13:54:39 +10:00
Nyall Dawson
e5c5ecb88c Add missing signal docs 2024-09-04 13:54:39 +10:00
Nyall Dawson
0191ecbccd Add missing docs for signals 2024-09-04 13:54:39 +10:00
Nyall Dawson
bfa3bb3fc6 Misc doc cleanups 2024-09-04 13:54:39 +10:00
Nyall Dawson
502ad84f83 Cleanup QgsUnitSelectionWidget docs 2024-09-04 13:54:39 +10:00
Nyall Dawson
50408edac6
Fix PyQGIS docstrings for monkey patched enum values
We should be using the new name for the enum value instead
of the old one in the enum class docstring.

Move the old compatible name to an extra note
"Available as ``xx.yy`` in older QGIS releases."

Fixes #49171
2024-09-02 11:43:23 +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
765cbb32db Standardise some deprecated annotations 2024-09-02 11:42:12 +10:00
Nyall Dawson
343709f48a Always use correct \since annotation for enum values 2024-09-01 02:29:17 +10:00
Nyall Dawson
2af54ad057 Fix malformed python docstrings when enum value has \since annotation 2024-09-01 02:29:17 +10:00
Nyall Dawson
a5a3bf9ee8 Fix some more causes of warnings when building PyQGIS docs 2024-08-30 12:19:29 +10:00
Nyall Dawson
16e05a207b [feature] Add 'Custom Expression' numeric format
This numeric format allows users to craft a custom QGIS expression
to format numbers. The expression can use the @value variable
to retrieve the value to be formatted, and then use any standard
QGIS expression function to format this as desired.

It can be used anywhere QgsNumericFormat is accepted, eg layout
scalebars, elevation plots, layout tables, and color ramp
legends

Sponsored by the Swiss QGIS User Group
2024-08-29 13:27:23 +10:00
Julien Cabieces
3b7a3c0060 style(ColorWidgets): Rename Raw enum to Scaled0to255 2024-08-22 09:58:55 +02:00
Julien Cabieces
a24779fdeb fix(ColorWidget): Run sipify since new static wrapper 2024-08-21 13:46:45 +02:00
Julien Cabieces
bdb835d164 fix(ColorWidget): Add missing Q_ENUM 2024-08-21 10:06:30 +02:00
Julien Cabieces
5deb18f91c ui(ColorWidget): Display CMYK components as percent 2024-08-21 10:06:30 +02:00
Julien Cabieces
6cd3e14d5a fix(ColorWidget): update sip files since new sipify 2024-08-21 05:20:48 +10:00
Julien Cabieces
35dad9a7fe fix(ColorWidget): fix sip and missing deprecated 2024-08-21 05:20:48 +10:00
Nyall Dawson
1128c909ee Move all gui map tools files into maptools/ subfolder
Previously only a few were in this subfolder, which made it
confusing to find the others...
2024-08-20 16:38:45 +02:00
Nyall Dawson
3f481b568e Record header subfolders as __group__ attribute in PyQGIS classes
This will allow us to logically create subgroups for PyQGIS modules
in the API reference guide
2024-08-17 20:13:12 +10:00
Nyall Dawson
428a1cd405 Add missing files 2024-08-16 07:28:29 +10:00
Nyall Dawson
989e62a80f Handle docstrings for c++ structs
sip doesn't support the docstring directive for structs (only classes),
so patch these back in via sipify magic
2024-08-16 07:28:29 +10:00
Nyall Dawson
02d9cc2af2 Sipify 2024-08-15 06:25:08 +10:00
Nyall Dawson
1f27fc627a [pyqgis] Wrap unambiguously static methods in staticmethod
sip doesn't use the standard Python staticmethod type for defining
static methods, which means that standard means of testing
for a static method (like `isinstance(..., staticmethod)`) fail
with any PyQGIS static methods.

This causes issues with lint tools, which incorrectly flag
calls to QGIS static methods as missing self arguments. It also
breaks detection of static methods in the sphinx PyQGIS docs,
so all static methods are shown as non-static.

Work around this in sipify, by wrapping unambiguously static
methods in staticmethod wrappers.
2024-08-14 22:08:41 +10:00
Nyall Dawson
dc68f03f88 Be tolerant against optional sip modules 2024-08-14 13:05:46 +10:00
Nyall Dawson
ed19d996b2 Collect attribute docstrings for PyQGIS documentation 2024-08-14 13:05:46 +10:00
Nyall Dawson
e7b26478e2 Valid fixes 2024-08-13 20:28:55 +10:00
Nyall Dawson
6d8ba6e2cf Support saving/loading cloud storage connections from XML 2024-07-10 04:07:12 +10:00
Alexander Bruy
f0db0f247b address review 2024-07-04 07:30:51 +10:00
Alexander Bruy
d5605a3321 update QGIS version in the doxygen comments 2024-07-04 07:30:51 +10:00
Alexander Bruy
709253a27a integrate favorite log into toolbox model and view 2024-07-04 07:30:51 +10:00
Julien Cabieces
eaa0261c5d
Merge pull request #57361 from troopa81/cmyk_colorwidget
[ColorWidget] Add CMYK support
2024-05-23 18:03:52 +02:00
Julien Cabieces
4bd56fa0f8 feat(ColorWidget) : Add CMYK support
A new setting activeCmykComponent has been introduced, while the old
one activeComponent refers now only to the Rgb/Hsv part
2024-05-22 19:39:55 +02:00
Nyall Dawson
a34669e784 Add code editor color scheme option for search match highlight color 2024-05-10 06:11:36 +10:00
Nyall Dawson
e59c0df8a8 Port decorated scrollbar widget class from QtCreator
Allows decorating scrollbars with colored highlight bars
2024-05-10 06:10:59 +10:00
Nyall Dawson
a095dc5e4e Hide settings which don't apply for heatmap legends 2024-05-10 06:09:56 +10:00
Nyall Dawson
2357d80d25 Avoid sip property code for old api compatibility
This causes crashes on Qt6. Use Python monkey patching instead.
2024-02-17 05:38:14 +10:00
Nyall Dawson
926d6f90bd Support load/save sensor things connections 2024-02-15 12:39:11 +10:00
Nyall Dawson
0096246afe Sipify 2024-02-13 20:51:03 +10:00
Nyall Dawson
09dc6838a7 Upgrade another enum to get filtering working in processing toolbox 2024-02-10 17:25:22 +10:00
Nyall Dawson
ac2f1179c8 More item data role enum to enum class conversions 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
Nyall Dawson
b85db241c7 Sipify 2024-01-30 19:10:43 +10:00
Nyall Dawson
38cff47c9e Fix flags bool operator on qt6 2024-01-30 14:49:54 +10:00
Nyall Dawson
c1a47b2aa9 Sipify 2024-01-29 04:23:44 +10:00