16626 Commits

Author SHA1 Message Date
Nyall Dawson
410da5e358 New class QgsProjectDisplaySettings
This class (attached to a QgsProject object) provides a place to
store and retrieve settings related to project display behavior,
e.g. the numeric formats used for bearings and coordinates
2020-01-09 17:10:30 +13:00
Nyall Dawson
664ba234da Also respect other locale specific characters 2020-01-08 16:20:43 +13:00
Nyall Dawson
545edcf148 Dox++ 2020-01-08 16:20:43 +13:00
Nyall Dawson
bc997f077d Minor tweaks 2020-01-08 16:20:43 +13:00
Nyall Dawson
124df2d78d Add display of sample values to numeric format selector widget 2020-01-08 16:20:43 +13:00
Nyall Dawson
f5e965aa86 Add configuration widgets for all numeric format types 2020-01-08 16:20:43 +13:00
Nyall Dawson
1d6bc57df5 Unit tests and fixes for numeric format gui registry 2020-01-08 16:20:43 +13:00
Nyall Dawson
ccf6898eb9 Start on registry for numeric format configuration widgets 2020-01-08 16:20:43 +13:00
Nyall Dawson
552913cdeb Start on base class for numeric format widgets 2020-01-08 16:20:43 +13:00
Nyall Dawson
6b9cafb71f Nicer sorting of numeric format choices 2020-01-08 16:20:43 +13:00
Nyall Dawson
591e1a28e0 Start on GUI work 2020-01-08 16:20:43 +13:00
Nyall Dawson
90184a59eb Add methods to store/recreate formats from XML elements, and tweak
serialization API
2020-01-08 16:20:43 +13:00
Nyall Dawson
ec3763521a Avoid ambiguous test data, force minimum of 1 decimal place for scientific notation format to avoid undefined results 2020-01-08 16:20:43 +13:00
Nyall Dawson
a72d8faef5 Fix dox 2020-01-08 16:20:43 +13:00
Nyall Dawson
7affde6624 Add numeric formatter for currency values 2020-01-08 16:20:43 +13:00
Nyall Dawson
d445487c0d Add numeric formatter for scientific notation 2020-01-08 16:20:43 +13:00
Nyall Dawson
8bcba4780e Add percentage numeric formatter 2020-01-08 16:20:43 +13:00
Nyall Dawson
d0b5a01729 [api] Add registry and interface for QgsNumericFormats
QgsNumericFormat subclasses provide a means to format a numeric value
as a string, applying various formatting options. E.g. a default
string to value formatter (included here) includes settings for
controlling the number of decimal places, whether a thousands separator
should be shown, whether a leading + sign should be shown, whether
trailing zeros should be shown.

This PR also includes a formatter for bearings, allowing various
formats of numeric bearings to be applied (e.g. control over decimal
places, etc + control over whether direction E/W suffixes are shown,
or whether values should be limited to either the +/- 180 range or
0-360 degree range)

When formatting values, a QgsNumericFormatContext class is used
to provide context. Currently, this includes the thousands and
decimal separators to apply when formatting (which are taken by
default from the user's locale).

A registry of formatters is included to allow easy addition of
other formats in future (e.g. currencies, percentages, scientific
notation, etc...) and to allow plugin based formats.

The intention is to follow this up with gui configuration widgets
for the formats, and then expose them in various places through
the qgis ui (e.g. in the range editor widget for fields, in scalebar
numbers, as an option for formatting numeric labels, etc)
2020-01-08 16:20:43 +13:00
Nyall Dawson
400e3dace1 [FEATURE][layouts] Allow layout attribute tables to be styled using the foreground
and background colors of matching conditional styles attached to the layer

When the new "Apply layer conditional styling colors" option is enabled in the
layout attribute table settings, any conditional styling rules present in the
layer will be applied inside the layout attribute table (foreground and
background colors only, for now!).

Refs #25712

Sponsored by City of Canning
2020-01-08 15:31:24 +13:00
lbartoletti
18e9766d51 dox 2020-01-08 08:35:27 +13:00
lbartoletti
2b031cf418 Expose shape digitizing methods to QgisInterface 2020-01-08 08:35:27 +13:00
Nyall Dawson
494b52b231 [gps] Sync some changes from a fork of nmealib, and add support for
handling HCHDG and HCHDT heading packets
2020-01-07 12:29:19 +13:00
Alexander Bruy
cf6cd48b38 fix typo 2020-01-06 11:19:55 +10:00
Alexander Bruy
5e62e60de9 [processing] add user-defined parameters to gdal_rasterize 2020-01-06 11:19:55 +10:00
Alexander Bruy
b511841775 [processing] fix v.net,centrality 2020-01-06 11:19:55 +10:00
Alexander Bruy
432a8a5fd0 [processing] cleanup tests 2020-01-06 11:19:55 +10:00
Alexander Bruy
1fa3edfc51 [processing] add tests for r.series and r.reclass algorithms 2020-01-06 11:19:55 +10:00
Alexander Bruy
dcabb0536b [processing] fix r.rescale and r.rescale.eq 2020-01-06 11:19:55 +10:00
Alexander Bruy
0b749558b9 [processing] add proper support for range parameters (fix #29269) 2020-01-06 11:19:55 +10:00
Nyall Dawson
fcdf1f6e78 Fix test 2020-01-05 20:58:10 +10:00
Nyall Dawson
42885bfbb7 [needs-docs][processing] Move Build Vector VRT to gdal provider
and setup alias to avoid script/model breakage. This algorithm
uses GDAL utilities and fits better alongside the other GDAL based
algorithm rather than in the qgis provider.
2020-01-05 20:58:10 +10:00
Nyall Dawson
27277c54f1 Remove unused code 2020-01-05 20:50:05 +10:00
Nyall Dawson
54629b8f21 [FEATURE][processing][API] New parameter type QgsProcessingParameterMapTheme
Allows for selection from existing map themes
2020-01-05 20:50:05 +10:00
Nyall Dawson
223dfafb15 [processing] Port field parameter widget to new API 2020-01-05 08:59:38 +10:00
Nyall Dawson
70ee385f4a [processing] Add message bar to widget context 2020-01-05 08:59:38 +10:00
Nyall Dawson
f8e5861dca Fix rule-based renderer widgets swallow copy/paste/delete shortcut keys
when opened in panel modes

Fixes #33592
2020-01-05 05:32:03 +10:00
Nyall Dawson
1c4d691ad2 Dox++ 2020-01-04 23:06:03 +10:00
Nyall Dawson
1a74938ba8 [processing] Add option for multiple field parameters to default to
selecting all available fields

For some algorithms this is better UX then defaulting to an empty list
2020-01-04 23:06:03 +10:00
Nyall Dawson
d788dfc0cb Update menu link 2020-01-03 05:25:33 +10:00
Alex
e9aff0b695 join by location c++ port 2020-01-03 05:25:33 +10:00
Nyall Dawson
c43613d0b2 Another hash 2020-01-02 18:26:49 +10:00
Nyall Dawson
158dfcc3cc More test hashes 2020-01-02 18:26:49 +10:00
Nyall Dawson
c4672ef984 Add extra raster hashes 2020-01-02 18:26:49 +10:00
Panos Mavrogiorgos
d7f0ea2293 Fix tests 2020-01-02 18:26:49 +10:00
Panos Mavrogiorgos
0c3cb558a8 Introduce GRASS_USE_REXTERNAL setting
GRASS GIS, in addition to importing data in its native formats via
`r.in.gdal`/`v.in.ogr` (and likewise `r.import`/v.import`),
also supports `r.external`/`v.external` which only link the data into
the GRASS DB.

Nevertheless, both `r.external` and `v.external` occasionally have problems,
especially on windows. E.g.:

- https://trac.osgeo.org/grass/ticket/3927

GRASS 7 Processing Plugin already has a setting that controls whether
`v.external` is used (disabled by default).

With this commit the complementary setting for `r.external` gets added too.
Usage of `r.external` is disabled by default. This is changing the existing
behavior, which was to use r`r.external`. The downsides of this change
should be the somewhat lower import speed + higher disk usage. Nevertheless
this way we have the same default value as `v.external` + we circumvent the
`r.import/v.import` shortcomings.
2020-01-02 18:26:49 +10:00
Nyall Dawson
5792966b12 Update test results 2020-01-02 14:20:14 +10:00
Nyall Dawson
fe6abba251 [api] Add constructor for QgsSpatialIndex which allows for a callback
function during bulk index load from a feature iterator

Allows single-iteration of a source for dual purposes simultaneously,
e.g. doing other feature-based operations while still gaining the full
advantage of the bulk loaded spatial index without having to do multiple
feature iterations
2020-01-02 14:20:14 +10:00
Vincent Cloarec
30569bce1f Move QgsRasterLayerProperties class to the gui API
Motivation :
Move the QgsRasterLayerProperties class to the GUI API.
So, this class could be used using the QGIS API, notably for standalone applications.

The instance of this class was dependent, since QGIS 3.8, from the QgisApp instance, when calling the askUserForDatumTransform(). As this method, defines a title and only call QgsDatumTransformDialog::run() method from the gui API, this PR purpose to :
2020-01-02 13:02:32 +10:00
Andrea Giudiceandrea
ef9b8c2c25 Fix missing flags in r.reclass.area GRASS alg
Fixes #33569
2020-01-02 11:43:10 +10:00
Andrea Giudiceandrea
19465c6295 Fix validity mask filename quoting in Fillnodata alg
Fixes a bug similar to #33562
2020-01-01 09:07:58 +10:00