21258 Commits

Author SHA1 Message Date
Julien Cabieces
d5505e329d Add missing Q_OBJECT macros and enable clazy check missing-qobject-macro 2022-07-13 08:24:23 +10:00
Nyall Dawson
8dc9635dbc Only offer to create supported domain types 2022-07-13 06:44:58 +10:00
Nyall Dawson
8b15f59639 Force use of raster masking in layout designer preview
The vector masking (while great for output quality) is much slower,
so for the layout designer preview renders we just use the faster
raster approach.
2022-07-12 14:59:43 +10:00
Nyall Dawson
5a6b76abaf Fix difference algorithm when differencing a point results in
a null geometry

Fixes #49291
2022-07-12 11:42:10 +10:00
Nyall Dawson
9b09445c08 Change project style disabling from being a project load flag
to a new project "capability"

This avoids the unwanted cost of initialising a blank style database
whenever QgsProject::clear is called and project styles are not
required (eg. for server)
2022-07-11 15:22:11 +10:00
Nyall Dawson
8d25fe973f Indentation 2022-07-09 07:12:08 +10:00
Nyall Dawson
44708b9c0c Create QgsColorUtils class
Contains methods to serialize/deserialize colors from xml and strings,
where the colors are losslessly stored/restored.

The previous methods for storing colors (Eg QgsSymbolLayerUtils::encode/decodeColor)
are lossy, and only store QColors as 8 bit RGB representations. In
contrast, the new methods store the full lossless representation of
a QColor, including support for 16 bit color components, extended
RGB color components, and storage of HSL/HSV/CMYK color specifications
using their original color components instead of RGB components.

When these new methods are used in place of the existing lossy methods,
they open the possibility of 16 bit color support for QGIS symbols/projects,
(and potentially future CMYK color support).
2022-07-09 07:12:08 +10:00
Nyall Dawson
356974e401 When loading a new vector tile source into a project, if the associated
MapBox GL style includes any raster sublayers, then also load those
into the project with converted styles.

Fixes #46593
2022-07-08 16:06:19 +10:00
Nyall Dawson
6bb01c80f3 Convert raster sublayers in mapbox gl style layers, including
data defined layer opacity
2022-07-08 16:06:19 +10:00
Nyall Dawson
31fc7405d1 Add method to convert raster source to QgsRasterLayer 2022-07-08 16:06:19 +10:00
Nyall Dawson
dd3058eb42 Add support for parsing raster sources to QgsMapBoxGlStyleConverter 2022-07-08 16:06:19 +10:00
Mathieu Pellerin
52a34cc7b7 [positioning] Add missing equal-to operator to the QgsSatelliteInfo class 2022-07-08 10:05:10 +10:00
Nyall Dawson
56912b1602 Don't select invisible features 2022-07-08 09:12:46 +10:00
Nyall Dawson
542015a3df Implement toggling support for selecting single features 2022-07-08 09:12:46 +10:00
Nyall Dawson
12321df49a Allow actions which work on selection to also work with vector tile selections 2022-07-08 09:12:46 +10:00
Nyall Dawson
1f48f16b2f Render selected features on top of vector tile layer 2022-07-08 09:12:46 +10:00
Nyall Dawson
721bcaab66 Implement API for selecting features in a vector tile layer 2022-07-08 09:12:46 +10:00
Mathieu Pellerin
a351a3e301 Fix QgsGeometry documentation inaccuracy 2022-07-08 08:05:07 +10:00
Harrissou Sant-anna
8761480128 Add missing class reference 2022-07-02 09:58:37 +10:00
Harrissou Sant-anna
7717f39d48 Update and cleanup of geometry_checker dox 2022-07-02 09:58:37 +10:00
Thomas Stocker
a3a34e0de0
Enable Journal Wal, increase Timeout use only sqlite transaction (#49090)
Fixes Multithreading issues with Mbtile Creation on slow disks and or Machines with a lot of threads.

Fixes #47738
2022-06-22 09:50:56 +10:00
Nyall Dawson
54a979c600 Handle stops in text-field when converting mapbox styles 2022-06-21 11:10:55 +10:00
Nyall Dawson
864fee0172 Try to take stored font filename from response headers 2022-06-20 13:01:55 +10:00
Nyall Dawson
75355386c2 Add helper methods to get filename from content disposition headers 2022-06-20 13:01:55 +10:00
Nyall Dawson
dae637a67c Defer font download handling until QgsApplication is fully initialized
and make opt-in for non-app clients

There's a tricky initialization balancing act happening here -- but
if we try to load the default style on a system missing the fonts
referenced in that style, then we risk trying to download those
fonts before the QgsNetworkAccessManager is ready.

So play it safe and defer all font download handling until the
QGIS app is fully launched.
2022-06-20 13:01:55 +10:00
Nyall Dawson
b9ff03473b Download missing fonts when parsing vector tile styles wherever possible
This is an alternative approach to solving #46588, where we avoid the
issues which arise from trying to render vector tile PBF fonts.

Refs #46588
2022-06-20 13:01:55 +10:00
Nyall Dawson
3214235580 Add method to remove a user font 2022-06-20 13:01:55 +10:00
Nyall Dawson
e1dba0dbe0 Allow for multiple user font directories, and add method to return
all installed user fonts
2022-06-20 13:01:55 +10:00
Nyall Dawson
852480c7bc Wrap up font download in a nice method which just requires a family name
And populate hardcoded list with a bunch of known fonts available
from Google Fonts
2022-06-20 13:01:55 +10:00
Nyall Dawson
4772f6c27e Add method to download and install a font 2022-06-20 13:01:55 +10:00
Nyall Dawson
0f4f5cd2cc Description for QgsNetworkContentFetcherTask can be customised 2022-06-20 13:01:55 +10:00
Nyall Dawson
4f2705e435 Make any TTF/OTF fonts stored in the QGIS user profile/fonts directory
available for use in QGIS

Allows for use of fonts which aren't installed system-wide in QGIS, e.g.
when the user does not have permission to install fonts on a system.
2022-06-20 13:01:55 +10:00
Nyall Dawson
d4ef3e3c3d Make sure QgsFontManager methods are thread safe 2022-06-20 13:01:55 +10:00
Nyall Dawson
607b140c30 Add method to process a font family name and apply any matching
replacements
2022-06-20 13:01:55 +10:00
Nyall Dawson
602edc11d9 Attach font manager to QgsApplication 2022-06-20 13:01:55 +10:00
Nyall Dawson
3d7310b65c Persist font replacements across sessions 2022-06-20 13:01:55 +10:00
Nyall Dawson
0091696272 Start on QgsFontManager class 2022-06-20 13:01:55 +10:00
Nyall Dawson
dbdacac777 [feature] Add temporal manager support for WMTS layers with TIME dimension
This enhancement exposes any WMTS "time" dimensions for use in the
temporal framework, including allowing these layers to be animated
and controlled via the temporal controller.

There's some complexity involved here, because the WMTS specification
does NOT dictate how a time dimension should be exposed by services.
So different WMTS services are all handling this in different ways,
and we need to try to be as tolerant as possible.

Specifically, WMTS dimension values are just free-form strings, so
I've encountered a range of datetime formats -- e.g. "2021", "20210203",
"2021-02-03", "2021-02-03T12:13:14Z", and even WMS(T) style time
period designations ("2021-01-03T12:13:14/2021-01-05T12:15:11/P10M")!
These different formats all need special handling in order to correctly
interpret them as a date time value, and to be able to re-encode
an arbitrary datetime value back to the format string required
by the service. It's highly likely that we'll encounter additional
format strings when this feature is rolled out, and we'll need to
handle each individually.

When we do detect a time dimension on a WMTS layer, we no longer
expose this in the same way as other non-time dimensions. The browser
panel does not show the dimension values, and adding the layer
via Data Source Manager no longer prompts the user to pick from
the available time values. Instead, these layers are indicated with
a new "time capable raster layer" icon, and are added to a project
WITHOUT the user picking a specific time value.

Just like a WMS(T) layer, when a time-dimension enabled WMTS layer
is added to the project, it will default to the "automatic" temporal
mode, meaning that the layer will follow the temporal controller's
current time range by default. A user can then opt to show a specific
static time value for the layer through the layer's Temporal properties
page, by unchecking "Dynamic Temporal Control" and picking a specific
available time range from the "Predefined date" option. (Basically,
the user interaction and experience with a WMTS time enabled layer
is identical to with a WMS(T) layer).

Fixes #48364
2022-06-18 10:22:48 +10:00
Andrea Giudiceandrea
2c807f918b Add tests for native:setzfromraster with offset 2022-06-18 05:44:28 +10:00
uclaros
6e0eb8d4ca fix qgsgeometryrubberband on rotated canvas 2022-06-17 10:41:04 +10:00
Nyall Dawson
221e63cdfa Add icon to QgsProviderMetada 2022-06-16 13:55:09 +10:00
Nyall Dawson
9d0cb90705 Make virtual layer source layer creation much more user friendly
Instead of just forcing the user to type a free-form source string,
add a "..." button which allows them to browse for the layer source
using the browser dialog. Makes it MUCH easier for users to add
gpkg/postgis/wfs/... layers as sources for virtual layers.
2022-06-16 13:55:09 +10:00
Nyall Dawson
c1dbc90d30 [db manager] Don't load preview layers into project
Fixes #47159
2022-06-16 13:54:55 +10:00
pathmapper
4344d083ec Make sipify_all.sh happy
This change was made when running sipify_all.sh .
2022-06-16 08:21:05 +10:00
Nyall Dawson
21479e0814 Add QgsProviderRegistry.providersForLayerType method to list all providers supporting a layer type 2022-06-15 15:04:05 +10:00
Nyall Dawson
fc9b6053cf Add QgsProviderMetadata::supportedLayerTypes() so that we can
query the layer types supported by a data provider
2022-06-15 15:04:05 +10:00
Nyall Dawson
ff145d38ff Add __repr__ for QgsLayoutTableColumn 2022-06-13 17:33:52 +10:00
Nyall Dawson
48071fa228 Alternative fix for #43744
Fixes #48965
2022-06-13 17:33:52 +10:00
Sandro Santilli
8c18fa28b6 Drop gpkg_metadata_reference_column_name_update trigger generated by GDAL < 2.4.0
Presence of this trigger results in QGIS dropping it whenever the file
is opened in read-write mode (as it happens with vector layer is
created from it)

See https://github.com/qgis/QGIS/issues/48937#issuecomment-1152726973
2022-06-11 01:35:14 +02:00
Nyall Dawson
0e28ab5148 Also expose data defined control over scalebar height and subdivision
height, right number of subdivisions
2022-06-09 19:04:45 +10:00