232 Commits

Author SHA1 Message Date
Nyall Dawson
93f714d233 [FEATURE][API] Add new QgsFeatureSink subclass QgsRemappingProxyFeatureSink
This sink allows for transformation of incoming features to match the
requirements of storing in an existing destination layer, e.g. by reprojecting
the features to the destination's CRS, by coercing geometries to the
format required by the destination sink, and by mapping field values from
the source to the destination.
2020-04-07 17:05:44 +10:00
Nyall Dawson
c987e500bc Code shuffle to move QgsProxyFeatureSink to its own file 2020-04-07 17:05:44 +10:00
Nyall Dawson
0384ef03e6 Refactor picture north arrow handling to extract logic to seperate class 2020-04-06 14:04:20 +10:00
Nyall Dawson
632448c447 [FEATURE][layouts] New item type for marker symbols
Allows marker symbols to be placed directly on layouts, eg.
for manually placing markers over a map item or for creation
of advanced custom legends
2020-04-05 14:23:22 +10:00
Vincent Cloarec
75ddf3c7a6
[FEATURE][MESH] plug mesh layer to QGIS temporal framework (#35466)
[FEATURE] Use temporal controller for the mesh layer time handling.
2020-04-03 08:21:15 +02:00
Martin Dobias
53075848ce
Merge pull request #35341 from wonder-sk/vector-tile-layer
[FEATURE] Vector tile layer - part 1
2020-04-02 16:06:30 +02:00
Nyall Dawson
e788be93fa [processing][FEATURE] Add api for setting model component colors, and expose
the option to set manual colors for individual model comments
2020-04-01 18:20:09 +10:00
Martin Dobias
be98e2f0f6 [FEATURE] Raster layer contour renderer
This new renderer draws contour lines that are calculated on the fly
from the source raster band. It is possible to set interval of contour
lines and symbol used for drawing.

In addition there is support for "index contours" - contour lines
with higher interval, typically drawn with a wider line symbol.

If we generate contour lines on input raster block with the same size as our
output raster block, the generated lines would contain too much detail.
This detail can be reduced by the "downscale" factor - this will request
lower resolution of the source raster.
2020-03-31 08:51:54 +02:00
Martin Dobias
9e80f59f20 Use random colors, fix sip includes, fix warnings in server 2020-03-27 19:41:18 +01:00
Martin Dobias
bbc6af5ded Fixes to python bindings + some bits from code review 2020-03-26 19:31:00 +01:00
Martin Dobias
8105ad1fe5 Initial work on vector tile layer support 2020-03-25 13:27:11 +01:00
Nyall Dawson
78d445ee65 [FEATURE] Add numeric formatter "fraction" style
This style represents decimal numbers as vulgar fractions, e.g.
"3/4" instead of 0.75.

Options include using Unicode superscript and subscript characters
for nicer typography, e.g. ¹⁷/₂₃ (this is the default mode, disabling
this option uses the "17/23" format). An option also exists for
using dedicated unicode characters for specific fractions (where
a unicode character exists), e.g. ½ or ¾

Ultimately this allows for creation of scalebars with fractional
representations of distances, e.g. 0 ----- ½ ----- 1 km
(instead of 0 ------ 0.5 ------ 1km)

Fixes #21289

Sponsored by SLYR
2020-03-23 14:24:37 +10:00
Nyall Dawson
1887846a5c [FEATURE][layouts] Add "hollow" scalebar style
This matches the "hollow" scalebar style from ArcMap, and is a style
used in South African mapping standards

Fixes #20390

Sponsored by SLYR
2020-03-23 03:08:50 +10:00
Nyall Dawson
e7cc8307e4 [FEATURE][layouts] Add "Stepped Line" scalebar style
Designed to match the appearance and behavior of the ArcMap equivalent,
this was a scalebar format which was previously impossible to replicate
in QGIS.

Also fixes #26589

Sponsored by SLYR
2020-03-23 03:08:50 +10:00
Nyall Dawson
b45203a6c4 Make a proper registry for scalebar renderers 2020-03-21 03:45:24 +10:00
Nyall Dawson
40d5efce9b Add QgsConnectionRegistry
This registry provides a convenient place to add API relating
to generic connection fetching and handling methods

Currently contains a single method, which allows for retrieving
matching connections using a "provider://name" format (e.g.
"postgres://my connection")
2020-03-16 19:34:25 +10:00
Nyall Dawson
51f40f7180 Add interface class QgsFileFilterGenerator for classes which can generate a file filter string 2020-03-16 10:08:46 +10:00
Nyall Dawson
ade535b4c4 Move method for determining project temporal extent to new utils class QgsTemporalUtils 2020-03-13 18:06:02 +10:00
Nyall Dawson
0a2560ae09 Add shell for QgsVectorDataTemporalCapabilities
Just an API placeholder
2020-03-13 13:39:26 +10:00
Samweli
c119ea5518 logic for temporal navigation vcr widget 2020-03-12 20:06:25 +10:00
Nyall Dawson
f7731bc28f Add model for database tables from a connection
Optionally limited to a specific schema, if desired
2020-03-09 21:04:51 +10:00
Nyall Dawson
a0a57d5bf7 Add a model for schemas from a database connection 2020-03-09 21:04:51 +10:00
Nyall Dawson
1fba225840 Add model for connections from a provider 2020-03-09 21:04:51 +10:00
Samweli Mwakisambwe
0facf5450d
QGIS Project temporal settings
Adds the ability to set a temporal range for a project
2020-03-07 07:43:13 +10:00
Nyall Dawson
13fc85d740 [FEATURE][processsing] Add support for comments attached to components
This allows users to create comments attached to model components (inputs,
algorithms or outputs). Comments are shown linked to the associated component,
and can be freely moved around the model.
2020-03-06 03:49:16 +10:00
Samweli
2517b566d1 suggested changes from the review 2020-03-05 18:41:35 +10:00
Samweli
6352d6889c added abstract temporal class
updates on tests and abstract temporal class

updates on qgsabstracttemporal sip and tests

update qgsabstracttemporal test

updated docs

moved qgsabstracttemporal class to qgstemporalrangeobject class as per review suggestions

edits per review on qgs map canvas

remove access of private members from qgstemporalrangeobject

updated render context test and fix travis tests

added new temporal property class

added tests for temporal property

added tests for temporal property

added temporal widget ui

temporal support in raster layers, from wms provider

temporal properties in raster layer properties

added abstract temporal class

updates on tests and abstract temporal class

updates on qgsabstracttemporal sip and tests

update qgsabstracttemporal test

updated docs

temporal support in raster layers, from wms provider

update qgsabstracttemporal test

updated docs

moved qgsabstracttemporal class to qgstemporalrangeobject class as per review suggestions

edits per review on qgs map canvas

updated render context test and fix travis tests

added new temporal property class

added new map layer temporal properties sub classes with tests

updates on map layers temporal properties classes

fix travis tests

add read and write xml tests

added abstract temporal class

updates on tests and abstract temporal class

updates on qgsabstracttemporal sip and tests

update qgsabstracttemporal test

updated docs

edits per review on qgs map canvas

temporal properties in raster layer properties

temporal support in raster layers, from wms provider

moved qgsabstracttemporal class to qgstemporalrangeobject class as per review suggestions

edits per review on qgs map canvas

remove access of private members from qgstemporalrangeobject

updated render context test and fix travis tests

added new temporal property class

added new map layer temporal properties sub classes with tests

updated layer times ui

added advanced options in layer time constrains ui

fix for refreshing wms layer after temporal properties update

update on wms-t temporal properties

added support for bi-temporal WMS-T
2020-03-05 18:41:35 +10:00
Samweli
c4355ab8b7 updates on map layers temporal properties classes 2020-02-08 08:26:21 +03:00
Samweli
618f257874 moved qgsabstracttemporal class to qgstemporalrangeobject class as per review suggestions 2020-02-08 08:26:21 +03:00
Samweli
99bbe9bdde updates on qgsabstracttemporal sip and tests 2020-02-08 08:26:21 +03:00
Nyall Dawson
0cd955743c Create QgsLabeling class for labeling related enums and constants,
and avoid inclusion of pal header in a public QGIS header

pal is an internal implementation detail -- it should not be exposed
publicly
2020-01-15 17:10:37 +13:00
Nyall Dawson
49d56f6c19 [FEATURE] Add new layout item type for manually created tables
Allows for creation of tables with contents manually entered by users
(i.e. spreadsheet style), so that users can create completely custom
tables.

Supports control custom cell contents, foreground and background colors.
2020-01-14 19:08:20 +13:00
Nyall Dawson
5704412d96 New class QgsTableCell
Encapsulates the contents and formatting options for a single cell
in a table (e.g. background and foreground color)
2020-01-14 19:08:20 +13:00
Nyall Dawson
1f7140bfc5 New class QgsLocalDefaultSettings
This class contains a variety of default setting values. These values are local, profile
specific settings which may have been configured or tweaked by the user (as opposed to
global, fixed default settings).

The values encapsulated here should be inherited when creating new objects such as new
QGIS projects.

Typically, the QgsSettings backend is used to store and retrieve these local settings.

The intention here is to provide stable, structured and easily discoverable
methods for setting and retrieve these settings, rather than forcing raw QSetting
handling.
2020-01-09 17:10:30 +13:00
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
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
David Marteau
5bf8d2cd26
Pass project when creating relation from Xml
Fix dependency inconsistency to project from QgsRelationManager
    by forcing  'QgsRelation::createFromXml' to rely on project passed
    to 'QgsRelationManager' instead of using 'QgisProject::instance()'
2019-12-20 23:56:17 +01:00
Nyall Dawson
b1bbc8511b [labeling] Move settings related to removing labels (e.g. max no
of labels, min size for labels) to a new class QgsLabelThinningSettings

This new class is designed to contain settings related to how the label
engine removes candidate label positions and reduces the number of
displayed labels.
2019-12-12 07:44:11 +10:00
Nyall Dawson
a8adb2d6c2 Code shuffle: move all labeling related code into src/core/labeling
So that these files are all grouped together, making it easier to locate
all the components of the labeling engine and hopefully making things
easier to navigate
2019-12-11 14:05:44 +10:00
Peter Petrik
d1dd68ae11 remove averaging settings class and expore averaging methods outside qgis core 2019-12-05 07:08:50 +01:00
Nyall Dawson
9f63f49230 Move label obstacle settings out to their own class, and monkey patch around
to maintain current API

QgsPalLayerSettings is way too heavy, and we need to start refactoring
this into smaller atomic components
2019-12-03 19:38:24 +10:00
Vincent Cloarec
6d4c995a28 [FEATURE] API for rendering frames for mesh vector dataset animation (particles) (#33110)
* [FEATURE] API for rendering frames for mesh vector dataset animation (particles) 

Adds a renderer to generate frames that represent particle traces in a vector field of a mesh layer. The renderer cannot be chosen in the current GUI, however crayfish plugin can use API to generate avi/gif files with nice animations representing the movement of (random) particles in the mesh layer vector field.
2019-11-29 09:06:47 +01:00
Nyall Dawson
204bd47b19 [FEATURE][diagrams] New diagram type "stacked bars"
Stacks bars of varying colors for each attribute on top of each other
vertically or horizontally.

Sponsored by SLYR
2019-11-24 19:11:21 +10:00
Denis Rouzaud
16ca39ce21 fix sip 2019-11-07 10:01:26 +01:00
Hugo Mercier
845894b313
[FEATURE] Selective masking (#30747)
* [FEATURE] Selective masking

Advanced rendering feature that allows the definition of 'masks' areas around labels or with a new typ of symbol layer. These masks will "un-draw" symbol layers of other layers underneath.
It modifies the rendering process by adding an optional second pass.
2019-11-07 08:17:25 +01:00
Matthias Kuhn
4294dda083 Resipify 2019-11-03 21:05:34 +01:00
Nyall Dawson
65490ab13e Move QgsProject map scales settings to a new class, QgsProjectViewSettings
attached to QgsProject

And deprecate old getters/setters

The goal here is to create a place for project view related settings (e.g.
map scales, default extent, possibly future things like a fixed project
maximum area of interest, etc). Currently these are all handled in an
ad-hoc way, e.g. sometimes in project custom keys, sometimes inside
xml saved and restored by map canvases. But both these approaches break
important use case for plugins, e.g. creating a project from scratch
which will zoom to a desired extent on load. That's totally impossible
in the current API, unless you resort to extremely fragile manual
xml crafting...
2019-10-31 14:59:39 +10:00