7801 Commits

Author SHA1 Message Date
Matthias Kuhn
6ca82a2717 Fix sipify 2021-03-28 06:29:24 +10:00
Matthias Kuhn
10e9de15e8 [qt6] compatibility with [[deprecated]] attribute 2021-03-28 06:29:24 +10:00
Matthias Kuhn
1a59efb177 [qt6] Qt6 uses utf-8 by default
for QTextStream and QSettings
2021-03-28 06:28:35 +10:00
Matthias Kuhn
a75f6ab903 [qt6] QVector and QList are unified 2021-03-28 06:26:33 +10:00
Matthias Kuhn
7f2c7c8330
Merge pull request #42448 from m-kuhn/qt6_recursive_mutex
[qt6] Use RecursiveMutex instead of QMutex( QMutex::Recursive )
2021-03-27 13:00:51 +01:00
Matthias Kuhn
e94d9bc024 [qt6] Use RecursiveMutex instead of QMutex( QMutex::Recursive )
QMutex::Recursive will be gone.
The replacement only entered the stage with Qt 5.14
2021-03-27 10:17:45 +01:00
Nyall Dawson
40ed79393e Instead of double-iterating over features caused by calling
QgsVectorLayer::minimumValue and then QgsVectorLayer::maximumValue
when we need BOTH the min and max value for a field, add an
optimised QgsVectorLayer::minimumAndMaximumValue() method
which can calculate both min and max at the same time in
a single iteration.

Potentially halves the cost of calculating these values whenever
we are forced to do a full iteration to calculate them.
2021-03-27 12:09:09 +10:00
Matthias Kuhn
31513ba412
Merge pull request #42469 from m-kuhn/qvariant_operators
[qt6] Add comparison operators for QVariant
2021-03-25 17:44:30 +01:00
Matthias Kuhn
20596227f7 Fix compiling with legacy Qt (aka Qt5) 2021-03-25 12:22:35 +01:00
Matthias Kuhn
8e8febb405 Fix dox
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
2021-03-25 19:34:40 +10:00
Matthias Kuhn
a379e1e610 Make QgsDxfExport Qt6 ready 2021-03-25 19:34:40 +10:00
Matthias Kuhn
42b79396b4 [qt6] Add comparison operators for QVariant
makes them usable as QMap keys
2021-03-25 09:01:40 +01:00
Nyall Dawson
929b7086b1 If a wms-t layer is the first temporal layer loaded into a project,
use the wms-t capabilities to set a sensible default time step
for the temporal controller (just like we do for mesh layers)
2021-03-25 17:55:04 +10:00
Nyall Dawson
41053cc479 De-duplicate code 2021-03-25 17:55:04 +10:00
Nyall Dawson
1bb042bc78 Add some methods to parse ISO8601 duration strings
(eg '2021-03-23T00:00:00Z/2021-03-24T12:00:00Z/PT12H')
to a list of datetimes
2021-03-25 17:55:04 +10:00
Nyall Dawson
7434c1b34f [feature] Add temporal navigation step for "source timestamps"
When selected, this causes the temporal navigation to step between
all available time ranges from layers in the project.

It's useful when a project contains layers with non-contiguous
available times, e.g. from a WMS-T which images available at
irregular dates, and you want to only step between time ranges
where the next available image is shown.

Refs Natural resources Canada Contract: 3000720707
2021-03-25 13:35:52 +10:00
Nyall Dawson
9c1ddfcf78 Push all available temporal ranges to temporal controller when
it changes
2021-03-25 13:35:52 +10:00
Nyall Dawson
d443e4a536 Add a time unit for "irregular steps"
This is a special "irregular step" time unit, used for temporal data
which uses irregular, non-real-world unit steps
2021-03-25 13:35:52 +10:00
Nyall Dawson
cae8aae849 Add method to collate all used time ranges for layers in project
Unlike the existing methods, this new method does not return
a single overall time range, but rather (possibly with gaps)
containing all time ranges were we know data actually exists
in the project.
2021-03-25 13:35:52 +10:00
Nyall Dawson
b7c1c3af4c Add method to merge a list of possibly non-contigous date/datetime ranges 2021-03-25 13:35:52 +10:00
Nyall Dawson
047e13eb22 Declare metatype for QgsDate/DateTimeRange 2021-03-25 08:01:51 +10:00
Nyall Dawson
894283b994 Add "allAvailableTemporalRanges" getter/setter to QgsRasterDataProviderTemporalCapabilities
So that we can store and retrieve a list of all available temporal
ranges for a raster data provider when that range of dates is
non-contiguous
2021-03-25 08:01:51 +10:00
Nyall Dawson
4fe99d8d6c Add better __repr__ methods for QgsDateTimeRange, QgsDateRange 2021-03-25 08:01:51 +10:00
Denis Rouzaud
ea7fc3c37e drop qMapLessThanKey in Qt6 builds
TestQgis::testQMapQVariantList() should check that everything is fine
further reading:
* https://stackoverflow.com/questions/17463889/does-qmap-support-custom-comparator-functions
* https://codereview.qt.nokia.com/c/qt/qtbase/+/297563
2021-03-24 09:52:39 +01:00
Jorge Gustavo Rocha
e1588fcc7c typo fix in sip 2021-03-23 17:14:15 +10:00
Jorge Gustavo Rocha
01806b1dea Add optional recursive = false to findGroups 2021-03-23 17:14:15 +10:00
Jorge Gustavo Rocha
2eb7781f51 add findAllGroups to recursively get all groups 2021-03-23 17:14:15 +10:00
Denis Rouzaud
ba8a445850 run sipify 2021-03-22 21:13:52 +01:00
Nyall Dawson
704b280065 Expose control over balloon wedge width 2021-03-21 16:57:29 +10:00
Nyall Dawson
2b0a2bf42c [feature] Add new "balloon" (speech bubble) callout style 2021-03-21 16:57:29 +10:00
Nyall Dawson
0c5ffe7ecf Spelling 2021-03-19 18:47:23 +10:00
Nyall Dawson
f759c59334 [feature] New callout style for curved lines
Renders a nice cartographically pleasing curved line between the
labels and features.

Options include selecting a specific curve orientation (clockwise
or counterclockwise), or an automatic orientation option which
determines optimal orientation for each individual label. Users
also have control over the amount of curvature applied to the
callout lines.
2021-03-19 18:47:23 +10:00
Nyall Dawson
425f27186f Add method to determine closest side of rectangle to a point 2021-03-19 18:47:23 +10:00
Nyall Dawson
ba6d96725b Add geometry util to calculate a point along a segment offset in a perpendicular direction by a set offset amount 2021-03-19 18:47:23 +10:00
Mathieu Pellerin
0b75c6caba
Merge pull request #42303 from nirvn/ellipse_fixes
Ellipse marker symbol layer fixes and code improvements
2021-03-19 09:43:55 +07:00
nirvn
ad998573d4 [optimization][symbology] Rely on enum for ellipse marker symbol layer shapes 2021-03-19 07:59:27 +07:00
Denis Rouzaud
4cd1b5b975
fix open form button not always enabled in relation reference widget (#42144)
* fix open form button not always enabled in relation reference widget

when the underlying model has more feature than what the model fetches by default (100),
the feature is not fetched yet when the combobox has its index changed

the new signal allows to be aware when the feature is ready to be used
2021-03-18 20:37:09 +01:00
Nyall Dawson
e5ab5358e2 Cleanup callout code to remove a lot of duplicated code between
simple line and manhattan line callout classes
2021-03-18 13:58:09 +10:00
nirvn
6d64fabe07 [ui] Disable fill color for stroke-only ellipse symbols 2021-03-18 10:15:08 +07:00
Nyall Dawson
5d06c1d48d [FEATURE] When the "show pinned labels" option is enabled, also
highlight any pinned callout start or end points

This allows users to immediately see which callouts points have
been manually placed vs are automatically placed.
2021-03-18 12:15:40 +10:00
Nyall Dawson
e8280d29bc More see also fixes 2021-03-18 11:43:00 +10:00
Nyall Dawson
b3b89733a8 Fix see also links 2021-03-18 11:43:00 +10:00
Nyall Dawson
a16ab723d5 [feature] Add option to trim the start and end of simple line symbol
layers by a preset amount

This allows for the line rendering to trim off the first x mm
and last y mm from the actual line string when drawing the line.
It can be used eg when creating complex symbols where a line layer
should not overlap marker symbol layers placed at the start
and end of the line.

The start/end trim distance supports a range of units, including
percentage of the overall line length, and can be data defined
for extra control.
2021-03-18 11:43:00 +10:00
Nyall Dawson
99c5ac3d66 Add method to calculate total length of a QPolygonF line 2021-03-18 11:43:00 +10:00
nirvn
2cbb1307cb Address review 2021-03-17 16:14:07 +07:00
nirvn
01f1f0c78a [symbology] Add a semi arc and arrow sign to ellipse markers 2021-03-17 15:52:55 +07:00
nirvn
b3d27aacce [symbology] Add a 1/2, 1/3, 1/4 arc signs to simple markers 2021-03-17 15:52:44 +07:00
Mathieu Pellerin
09620ad7db
[feature][symbology] Allow pen cap style to be set for ellipse marker symbol layers (#42289) 2021-03-17 15:22:49 +07:00
Nyall Dawson
109f95b3cd [feature] Allow pen cap style to be set for simple marker symbol layers
This is useful for the stroke-only symbols like the cross and arrowhead
markers, where it's sometimes nice to have round caps instead of square
caps.
2021-03-17 14:53:18 +10:00
Nyall Dawson
eb185d2682
Merge pull request #42187 from wonder-sk/fix-rasterize-alg-layer-list
Fix wrong list of layers in Rasterize alg (Convert map to raster)
2021-03-16 18:46:18 +10:00