17353 Commits

Author SHA1 Message Date
Matthias Kuhn
b2890f0b6b
Merge pull request #36283 from nyalldawson/html_colors
Respect HTML colors in labels
2020-05-12 13:16:56 +02:00
Martin Dobias
a5160086ed Support TMS convention with vector tiles ({-y} instead of {y})
XYZ convention has zero Y at the top and increasing downwards,
but various map servers use TMS convention which has zero Y at
the bottom and rising upwards (within tile matrix)
2020-05-12 12:10:55 +02:00
Nyall Dawson
f2b03a8334 Doxygen test fixes 2020-05-12 19:21:39 +10:00
Alexander Bruy
3e63210725
Merge pull request #36289 from alexbruy/scratch-attributes
allow adding attributes in the New Scratch Layer dialog (fix #24397)
2020-05-12 08:39:12 +03:00
Nyall Dawson
99c8510709 Sipify 2020-05-12 15:37:22 +10:00
Nyall Dawson
e76013e9cd Fix F523 flake issues 2020-05-12 14:24:40 +10:00
Nyall Dawson
180bbeccb8 PyQGIS syntatic sugar, start on tests for QgsTextDocument 2020-05-12 13:26:50 +10:00
Nyall Dawson
7dfc510771 Fix scalebar text size calculation when HTML formatting is used 2020-05-12 11:37:08 +10:00
Nyall Dawson
8b263162d5 Try to fix Travis build 2020-05-12 10:46:45 +10:00
Nyall Dawson
bf71382065 Don't try to reuse True value in enum, causes Python issue 2020-05-12 10:33:30 +10:00
Nyall Dawson
9a63810d82 Use composition rather then inheritance for QgsTextBlock/QgsTextDocument
Allows us to expose these to python and hopefully fixes compilation issue on Travis
2020-05-12 10:33:30 +10:00
Nyall Dawson
cb1e8445d3 Expose some more classes to Python, but mark as unstable API 2020-05-12 10:33:30 +10:00
Nyall Dawson
0e139992e3 Split massive qgstextrenderer.cpp/.h files into separate files per
contained class

and tighten includes to speed up recompilation
2020-05-12 10:33:30 +10:00
Nyall Dawson
e4b201a414 Code shuffle 2020-05-12 10:33:30 +10:00
Nyall Dawson
7fc9c555de More cleanups, avoid multiple parsing of the same HTML content for a label 2020-05-12 10:33:30 +10:00
Nyall Dawson
fe14e52e16 General cleanups, and add support for underline/overline/strikethrough formatting tags 2020-05-12 10:33:30 +10:00
Nyall Dawson
173e209a15 Sip says no 2020-05-12 10:33:30 +10:00
Nyall Dawson
f268356947 Create custom QGIS classes for QgsTextDocument, QgsTextBlock, QgsTextCharacterFormat
etc

In the hope of eventually removing the QTextDocument dependancy for HTML
labels. We use this ONLY for parsing the HTML/css, and it's VERY
heavy for just these needs.
2020-05-12 10:33:30 +10:00
Nyall Dawson
d4fbb6c3d6 [FEATURE] Allow use of color related HTML font tags in label text
When enabled, this option will treat label contents as HTML, and
any FOREGROUND COLOR RELATED html formatting options will be
respected in the rendered label.

I repeat: ONLY HTML COLOR TAGS ARE RESPECTED. This is NOT a bug,
rather this feature has been designed as a "test of the waters"
with HTML formatting in labels, and accordingly only formatting
options which do not alter the font shape were considered.

On the plus side, it works correctly with ALL other label settings,
including shadows, buffers, curved labels, etc!

Sponsored by geoProRegio AG (www.geoproregio.ch)
2020-05-12 10:33:30 +10:00
Nyall Dawson
f5d68ff423 Adapt QgsPalLabeling.splitToLines to account for HTML formatting 2020-05-12 10:33:29 +10:00
Nyall Dawson
87296f246c Add method to extract blocks from HTML text for labeling 2020-05-12 10:33:29 +10:00
Nyall Dawson
df88d42eb3 Add html flag 2020-05-12 10:33:29 +10:00
Nyall Dawson
b6a7a10703 Fix some more python formatting issues, remove more flake exceptions 2020-05-11 11:41:50 +10:00
Andrea Giudiceandrea
27f345f0bf
Fix tick-style scalebar when subdivisions ticks height > segments ticks height
Take the subivisions ticks height into accout, for ticksscalebar box size calculation and horizontal line and labels position, only if the number of subdivisions to draw is greater than 1
2020-05-11 09:14:24 +10:00
Samweli Mwakisambwe
ac0249e8bc enable cumulative temporal controller range setting 2020-05-11 09:00:24 +10:00
nirvn
3675af1778 Address review 2020-05-10 14:30:07 +07:00
nirvn
f105add69a [FEATURE][layout] Expose temporal UI for map items 2020-05-10 14:30:07 +07:00
nirvn
ec32e3248e Address flag comment 2020-05-10 14:02:11 +07:00
nirvn
d0060fd89a Address review 2020-05-10 14:02:11 +07:00
nirvn
9be36fdbf3 [temporal] Optimize canvas rendering by avoiding needless cache clearing 2020-05-10 14:02:11 +07:00
nirvn
da23cb6ee0 [canvas] Insure a refreshed canvas due to temporal range changes reflects the last provided range 2020-05-10 14:02:11 +07:00
Nyall Dawson
702675ca64 Forward declare QgsMapLayerTemporalProperty subclasses instead of including in header
Speeds up recompilation time
2020-05-10 17:01:44 +10:00
Tom Palan
3dad4882a7 Do not build python analysis when WITH_ANALYSIS=FALSE 2020-05-10 13:03:42 +10:00
volaya
09c62f1e6b Removed email address from Processing metadata 2020-05-10 11:22:02 +10:00
Alexander Bruy
a4eabaf6e8
Merge pull request #36305 from alexbruy/fix-36290
[processing] fix file filter for i.landsat.toar (fix #36290)
2020-05-09 20:53:18 +03:00
Alexander Bruy
30219ecd65 [processing] fix file filter for i.landsat.toar (fix #36290) 2020-05-09 13:33:17 +03:00
Nyall Dawson
ca64c6cac9 Add a flexible QgsInterval constructor for creating from years/months/days/etc 2020-05-09 20:22:52 +10:00
Nyall Dawson
072222d2fd [feature][temporal] Add expression variables for frame properties
Adds @frame_number, @frame_rate, @frame_duration, which give
the current frame number, frames per second, and length of frames
respectively
2020-05-09 18:06:58 +10:00
Nyall Dawson
cd1f4f3378 [feature][temporal] Add a new "Redraw Layer Only" mode for temporal vector layers
When set to this mode, the layer will automatically be redrawn whenever
the temporal range is changed, but no time based filtering will be applied
to the features.

This configuration is useful when the layer has symbology settings which
vary based on the temporal range. For instance, when a layer is using
time-dependent rule-based renderer expressions or data-defined symbology
expressions.
2020-05-09 18:06:36 +10:00
Alexander Bruy
65dfb2221e allow defining fields directly in the new scratch layer dialog (fix #24397) 2020-05-09 11:01:55 +03:00
Matthias Kuhn
753a684c9f
Merge pull request #36265 from m-kuhn/export_label_positions
Abstract dxf export label provider away
2020-05-08 17:49:25 +02:00
Martin Dobias
ab2ec699e9 Clean up doxygen doc so that types are not mistaken as html tags 2020-05-08 12:55:08 +02:00
Martin Dobias
502429a0c0 Add processing test for the vector tile writer alg 2020-05-08 12:55:08 +02:00
Martin Dobias
299be94459 Review fixes 2020-05-08 12:55:08 +02:00
Martin Dobias
49f832a24d Added widget wrapper, added two separate algorithms (xyz + mbtiles) 2020-05-08 12:55:08 +02:00
Nyall Dawson
731ad8d788 Flesh out QgsVectorDataProviderTemporalCapabilities and implement
setDefaultsFromDataProviderTemporalCapabilities for QgsVectorLayerTemporalProperties

 Please enter the commit message for your changes. Lines starting
2020-05-08 11:46:46 +10:00
Nyall Dawson
bcbfc5eacd Fix sip 2020-05-08 11:46:46 +10:00
Nyall Dawson
82cc5a19cc Add sip casting 2020-05-08 11:46:46 +10:00
Nyall Dawson
0ca630115c Sipify 2020-05-08 11:46:46 +10:00
Nyall Dawson
d98defec1a [feature] Add basic temporal handling support for vector layers
This exposes some basic temporal capabilities for vector layers:
- static time range for layer (to match raster layer possibilities), this
sets a single static time range which applies to the whole layer. ALL
features from the layer will be shown whenever the canvas time
overlaps the layer time range
- "Single field with datetime": Allows selection of a single date
or datetime field from the layer. Features will be shown whenever
this field value is within the canvas time range
- "Separate Fields for Start and End Date/Time": Allows selection
of start and end date/datetime fields from the layer. Features will
be shown whenever the time interval calculated from these fields
overlaps the canvas time range

Some known limitations/inefficiencies:
- currently only date/datetime fields can be used. This was done
to simplify the format handling and avoid the need to worry about
string fields with different datetime formats. In future we should
allow selection of string fields and allow users to enter a custom
datetime format string
- unlike the Time Manager plugin approach, the approach taken here
is to rely completely on QGIS expressions and feature requests to
do the filtering (Time Manager uses layer filter strings and attempts
to set a native SQL filter syntax so that filtering is done on the
backend). This is intentional, because it provides a unified filter
approach regardless of the provider used (i.e. we don't need to worry
about the different SQL syntaxes used natively by the different
providers). The beauty of feature request expression compilation
**should** mean that the QGIS expressions are magically turned into
native backend queries, BUUUUUUUUUUUT... because we lack QGIS expression
support for date time literals, we currently rely on the "to_datetime"
expression function and coerce everything through strings. None of
the expression compilers handle this function, so currently ALL
filtering is done on the QGIS side. We need to add functions for
optimised datetime literal creation, and then ensure that the different
compilers correctly map these literals across to the backend
filter syntax to allow all the filtering work to be done on the database
side...

So currently, performance is much worse with large layers compared
to Time Manager. But, the advantage is that we can use the native
temporal framework and have vector layers animated alongside mesh
and raster layers!
2020-05-08 11:46:46 +10:00