348 Commits

Author SHA1 Message Date
Nyall Dawson
fe0ab98ee0 Manually monkey patch compatibility, since we can't auto patch to gui classes 2022-11-28 11:46:45 +10:00
Nyall Dawson
fa0adc03fe Typo 2022-11-28 11:46:45 +10:00
Nyall Dawson
3efb1e604a Move action enums to Qgis, promote to enum class, and considerably thin
includes as a result
2022-11-28 11:46:45 +10:00
Nyall Dawson
a10b971156 Add additional text renderer rect modes
Adds some text layout modes where the line heights are based
on cap heights or font ascent alone

These are required in order to port additional parts of QGIS
text rendering to the QgsTextRenderer class
2022-11-24 12:41:24 +10:00
Nyall Dawson
913c6ae68e Include ellipsoidal altitude in available GPS information values 2022-11-19 07:21:20 +10:00
Nyall Dawson
79b809a585 Prepare framework for text renderer vertical alignment 2022-11-14 20:46:15 +10:00
Nyall Dawson
281f1d0d0c Make QgsVectorLayerGpsLogger API easier to use, and add capacity
to store all GPS information components
2022-11-14 18:00:29 +10:00
Nyall Dawson
b572e54622 Add more GPS component flags 2022-11-14 18:00:29 +10:00
Nyall Dawson
5c6c63d0e7 Allow track length and distance from start to be shown in floating
GPS toolbar
2022-11-11 11:12:57 +10:00
Alessandro Pasotti
8e0a5e1cbe Address PR comments 2022-11-09 09:46:13 +10:00
Alessandro Pasotti
5a88611b38 Paletted RAT auto-loading 2022-11-09 09:46:13 +10:00
Nyall Dawson
b436282b59 Add GPS Component enum, useful for referring to specific pieces
of GPS information in a generic way
2022-11-08 18:43:39 +10:00
Nyall Dawson
f2a3db0b12 Move enum to hopefully fix windows build 2022-11-08 12:58:29 +10:00
Nyall Dawson
5fc94c3fe2 Add debugging setting to show label metrics when rendering labels
Shows the text bounds of the label in red and baselines in blue.
Designed for debugging purposes only.

Also move label engine enums to Qgis, promote to enum class
2022-11-07 09:24:02 +10:00
Nyall Dawson
a9a57a6fbe Start on dedicated GPS toolbar 2022-11-04 11:24:05 +10:00
Nyall Dawson
fa185872cb Add constellation information to QgsGpsInformation and handle GPS fix type across different constellations 2022-11-01 16:08:15 +10:00
Nyall Dawson
f79eaf61e8 Cleanup GPS fix status handling, remove duplicate code 2022-10-31 17:22:54 +10:00
Nyall Dawson
4c3ab10058 [gps] Move GPS connection settings from GPS information panel
to GPS options tab in QGIS settings

This is a more of a "set once and forget" setting, vs something
which needs to be frequently changed and always right in the user's
face.
2022-10-27 13:37:14 +10:00
Mathieu Pellerin
09d4b0a77e Rebase sip fixes 2022-10-24 14:44:40 +07:00
Mathieu Pellerin
a17ab8f03b Add UI to select which insertion method should be used when adding new layers 2022-10-24 14:41:40 +07:00
Nyall Dawson
04dbee6eb7 Add a script language enum 2022-10-24 16:46:11 +10:00
Alessandro Pasotti
d51d1365eb Move enums 2022-10-22 08:52:37 +10:00
Alessandro Pasotti
7592f38620 More tests for import/export 2022-10-22 08:52:37 +10:00
Alessandro Pasotti
0473d363a6 RAT save 2022-10-22 08:52:37 +10:00
Alessandro Pasotti
7debc91480 sipify 2022-10-22 08:52:37 +10:00
Nyall Dawson
3d168eddee Fix raster contour renderer ignores opacity setting
Fixes #41663
2022-09-29 19:10:59 +10:00
rldhont
0fc64b101a feat: Open layers in a read only mode with Qgis::ProjectReadFlag::ForceLayerReadOnly
In most cases of use of QGIS Server, it is not necessary to access the layers in write mode.
The read-only mode is sufficient.

We would like to introduce a new flag Qgis::ProjectReadFlag::ForceLayerReadOnly to
open layers in a read-only mode.
2022-09-12 09:17:02 +10:00
Nyall Dawson
b4c9378625 Move text renderer enums to Qgis, promote to enum class, tighten includes 2022-09-06 15:30:00 +10:00
uclaros
1a7d160a50 add export to CSV files 2022-09-06 09:57:54 +10:00
Nyall Dawson
ed9dfa9f5a Move TextOrientation enum from QgsTextFormat and promote to enum class 2022-09-05 17:17:18 +10:00
Nyall Dawson
804951ea26 [api] Expose GEOS make valid options for geos 3.10+ builds 2022-09-05 12:35:53 +10:00
Mathieu Pellerin
b20cc301e7 Implement MapGeographic vs CustomCrs 2022-09-05 11:18:38 +10:00
Mathieu Pellerin
1570643d1d [api] Add project's default coordinate display type functions +
Q_PROPERTY for coordinate display type, distance units, and area units
2022-09-05 11:18:38 +10:00
uclaros
cf7137d218 use enum for supported formats 2022-09-02 14:28:07 -07:00
Zayne Tomlins
c7aa662662 Cleaned up docs 2022-08-10 08:04:42 +10:00
Nyall Dawson
c08cbfae4a Store test report as an artifact after running test workflow 2022-08-08 06:01:37 +10:00
Nyall Dawson
c4cebde0f9 Add additional properties to QgsWeakRelation to match those available
through GDAL api
2022-08-02 15:44:40 +10:00
Nyall Dawson
89c613a112 Move relationship enums to Qgis, promote to enum class 2022-08-02 15:44:40 +10:00
Nyall Dawson
65f700e700 Use enum classes for ArcGIS REST service types for clarity 2022-07-21 06:46:31 +10:00
Nyall Dawson
bd37677f6a Add missing file 2022-07-18 21:21:12 +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
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
dd3058eb42 Add support for parsing raster sources to QgsMapBoxGlStyleConverter 2022-07-08 16:06:19 +10:00
Nyall Dawson
542015a3df Implement toggling support for selecting single features 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
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
Nyall Dawson
486d3611ae Move more labeling enums to qgis 2022-06-03 18:20:03 +10:00
Nyall Dawson
7228526445 Further rework overlap/ always place label handling
- Move settings to be feature level, not layer level, and permit
data defined control of these settings
- Add additional option for overlap handling for "Always allow"
overlaps, which indicates that the user doesn't care at all
if the label overlaps other labels and that the ideal placement
should always be used for the label regardless of whether it
overlaps labels or not

To clarify further, the options are:

- Never Overlap : never ever place overlapping labels for the layer,
even if it means labels will be missing
- Allow Overls if Required: if the label can't otherwise be placed,
draw an overlapping label. This mode will cause the label to be moved
a less ideal placement if possible, e.g. moving the label further
from the center of a line or polygon, IF doing so will avoid overlapping
labels. But if there's no other positions possible, then draw the
label overlapping.
- Always Allow Overlaps": It doesn't matter at all if the label
overlaps other labels or obstacles, that's fine to do and the best
placement (e.g most central placement) should always be used even if an
alternate further placement is possible which avoids overlaps entirely.
2022-06-03 18:20:03 +10:00
Nyall Dawson
8bb64a0683 Split existing "Show all labels (including colliding labels)" into
two separate new options

This setting was ambiguous in meaning -- it could be interpreted
as either:

"I don't care about overlapping labels, use them when
you have no other choice"

OR

"I want to see labels for EVERYTHING in this layer, and I don't
care what you have to do to show me those"

This leads to situations like those discussed in #41043, where some
users interpret the setting as the first meaning and get confused
when eg. a curved label line layer starts showing horizontal placements
for some features which couldn't otherwise be labeled (eg short
lines).

So, split the setting into two new options (checkboxes) with explicit, clear
distinction:

- "Allow overlapping labels if unavoidable": This setting means labels
can be overlapping, if there's no other option. It does NOT gaurantee
that all features in the layer will have labels, because other
constraints (such as lines too short to fit a label's text) will still
be respected and may prevent labels for the feature.

- "Allow inferior fallback placements": This mode permits features
to fallback to worse placement options when there's no other choice,
e.g. when a line is too short to fit a curved label text then the
label may be placed horizontally just over the feature's center
point.

The combination of checking BOTH options WILL gaurantee that
all features in the layer are labelled, albeit with both overlapping
labels and the degraded placements!

Fixes #41043
2022-06-03 18:20:03 +10:00
Nyall Dawson
6e5a99d332 Sipify 2022-06-03 13:13:43 +10:00