6588 Commits

Author SHA1 Message Date
Nyall Dawson
7ed4218b00 [needs-docs] Upgrade project level setting for Label as Outlines/text setting to use newer API
And replace labeling engine dialog "Draw text as outlines" checkbox with a combobox
presenting the choice of always rendering as outlines OR text.

(This will allow us to easily add additional methods in future, e.g. potentially
a "Render as text wherever possible" setting, for defaulting to text objects
whenever it doesn't impact the rendering quality to do so)
2018-12-11 12:28:29 +10:00
Nyall Dawson
ea069ed60e Push text format rendering setting into QgsLayoutExporter 2018-12-11 12:28:29 +10:00
Nyall Dawson
6755cbd6cf Push text format setting to layout render context 2018-12-11 12:28:29 +10:00
Nyall Dawson
1eaf95a866 [api] Move setting to control how text is rendered to QgsRenderContext
The new QgsRenderContext::TextRenderFormat enum controls how text
should be handled during a render operation, e.g. whether to render
text as outlines (paths) or keep it as real text objects.

Deprecate previous arguments in QgsTextRenderer which handled
this same use case.

This allows us to make the setting vary per-render, instead of
having a single global flag controlling the setting. Ultimately
this will allow us to have different behaviour within the
canvas renders vs print layout exports.

Refs #3975
2018-12-11 12:28:29 +10:00
Nyall Dawson
44fbb89450 [API] Throw IndexError on some QgsCurvePolygon methods when invalid
interior ring index is requested
2018-12-11 09:46:22 +10:00
Nyall Dawson
a49bf9f68f Unit tests for item opacity 2018-12-11 09:45:37 +10:00
nirvn
24d4640bc7 [afs] Add halo/buffer support to label creation 2018-12-10 19:07:21 +07:00
nirvn
ffded6f1d8 [afs] Picture marker & picture fill width/height use points as unit type 2018-12-10 16:09:39 +07:00
nirvn
74172fc176 [afs] Fix picture marker ratio calculation 2018-12-10 16:09:39 +07:00
nirvn
22a66ef390 [FEATURE][AFS] Create labels when settings provied by server 2018-12-10 16:09:39 +07:00
Alessandro Pasotti
cf0442dac6
Merge pull request #8630 from elpaso/bugfix-20674-db-manager-sqlite-aliased-queries
sqlite accept aliased queries from db manager
2018-12-10 08:39:44 +01:00
Nathan Woodrow
87d2da13fb
[FEATURE][needs-docs] Add new @alg decorator for nicer python processing scripts. (#8586)
@alg()
@alg.help()
@alg.input()
@alg.output()
2018-12-10 16:35:52 +10:00
nirvn
be8438b28d [afs] Fix wrong hard-coded OBJECTID reference, use the fetch object id name 2018-12-10 10:25:52 +07:00
Alessandro Pasotti
a44b13ba67 Add test cases for aliased spatialite tables
Also update a failing test case since when
we changed the priority in  QgsVectorLayerUtils
CreateFeature.

Test was blacklisted on travis in nov 2017
but here they are anyway.
2018-12-09 19:08:40 +01:00
Peter Petrik
28071728f1 [mesh] use MDAL 0.1.0 API in QGIS. Allows lazy loading of formats and effective transfer of data
introduce MeshDataBlock

use mesh block in rendering

calculate magnitude

use new mesh API

fix bug for memory layer

fix SIP, sip is unable to work with qvector<qgsmeshvertex>

fix tests

implement new MDAL min/max api

improve mesh documentation

fix travis build
2018-12-07 15:54:16 +01:00
Nyall Dawson
733d4ed578 Test masks 2018-12-07 08:08:52 +10:00
Nyall Dawson
048d526542 Add unit tests, standardise method names 2018-12-07 08:08:52 +10:00
Nyall Dawson
a97d335f31 Fix tests, test mask updates 2018-12-07 08:08:52 +10:00
Nyall Dawson
e6ec1ec53e [FEATURE][API] Add iterator for QgsGeometryCollection
Iterates over the geometries in the collection, allowing this type
of code:

  gc = QgsGeometryCollection()
  gc.fromWkt('GeometryCollection( Point(1 2), Point(11 12), LineString(33 34, 44 45))')
  for part in gc:
    print(part.asWkt())
2018-12-07 05:51:27 +10:00
Nyall Dawson
4bba8ae64d [FEATURE][API] Add some nice PyQGIS API for working with geometry collections
- Calling removeGeometry with an invalid index will now raise an IndexError
- Calling collection[0] will return the first geometry in the collection,
collection[1] the second, etc. And negative indices return from the end
of the collection, so collection[-1] returns the last geometry in the collection.
- Geometries can be deleted by calling `del collection[1]` (deletes the
second geometry from the collection). Also supports negative indices
to count from the end of the collection.
2018-12-07 05:51:27 +10:00
nirvn
31b82de5e3 [FEATURE][AFS] Automatically convert ESRI picture fill symbols 2018-12-06 17:47:24 +07:00
Nyall Dawson
b95400806a [FEATURE][processing] Native "split lines by maximum length" algorithm
This algorithm takes an input (multi)line (or curve) layer, and splits
each feature into multiple parts such that no part is longer then
the specified maximum length.

Supports data-defined maximum length property, and edit in place operation.

Credit to @NathanW2 for the inspiration!
2018-12-06 10:01:31 +10:00
Nyall Dawson
19b54ba2f9 Identation 2018-12-06 09:22:50 +10:00
Nyall Dawson
543acff4fe [FEATURE][AFS] Automatically convert ESRI picture marker symbols
and use as default style for remote layers with picture marker symbology
2018-12-06 09:22:50 +10:00
Nyall Dawson
3136885157 Fix QPainter warnings when broken image paths are passed to QgsImageCache 2018-12-06 09:22:50 +10:00
Nyall Dawson
bafda2451b Correctly handle empty paths in QgsImageCache 2018-12-06 09:22:50 +10:00
Nyall Dawson
58219d66f8 Test mask updates 2018-12-06 09:22:50 +10:00
Nyall Dawson
32dc102026 Fix embedding larger files then can fit in a QLineEdit's contents
Fixes #20329
2018-12-06 09:22:50 +10:00
Nyall Dawson
9d28a9699c Add a new widget QgsImageSourceLineEdit, based on QgsSvgSourceLineEdit
Allows images to be set to base64 embedded images, remote urls, etc
when used alongside QgsImageCache
2018-12-06 09:22:50 +10:00
nirvn
c6425338ee [FEATURE] Raster image marker 2018-12-05 15:44:44 +07:00
nirvn
60442980dd Add dox comment, fix travis 2018-12-05 11:14:13 +07:00
nirvn
ad4b876866 Add opacity parameter to image cache 2018-12-05 11:14:13 +07:00
nirvn
ce5636afed Allow passing {width,height}-only size to the image cache 2018-12-05 11:14:13 +07:00
Nyall Dawson
c1df802769 Add method to QgsImageCache to retrieve original image size 2018-12-05 11:14:13 +07:00
Nyall Dawson
84838d1ec6 [FEATURE][API] Add a content cache for raster images
This new class QgsImageCache is the equivalent of QgsSvgCache
but for raster images.

QgsImageCache stores pre-rendered resampled versions of raster
image files, allowing efficient reuse without incurring the
cost of resampling on every render.

Additionally, it offers the other benefits QgsSvgCache has,
such as thread safety, ability to transparently download remote
images, and support for base64 encoded strings.
2018-12-05 11:14:13 +07:00
Nyall Dawson
ff786f2223 Add group method to QgsSettings
Is present in the QSettings API, but missing from QgsSettings
2018-12-05 04:46:58 +10:00
Nyall Dawson
4bca7838bf [processing] Add method for providers to specify a different list
of supported output formats when an output has no geometry
2018-12-03 18:11:24 +10:00
Nyall Dawson
583b602e76 [processing] Fix hasGeometry() method when output is a geometry-less vector table
From the dox for QgsProcessing.TypeVector: "When used for a sink this indicates
the sink has no geometry.". If an algorithm is using this value to indicate
"maybe has geometry" for an output, then that algorithm is incorrect and
should be using TypeVectorAnyGeometry instead.
2018-12-03 18:11:24 +10:00
Alessandro Pasotti
a471934e56 Fix build warning and cl-std for 2.x builds 2018-11-30 16:14:28 +01:00
Alessandro Pasotti
6176159a00 [opencl] Support for platforms > 1.1 2018-11-30 13:41:35 +01:00
Alessandro Pasotti
0af1ce40a8
Merge pull request #8571 from elpaso/bugfix-20601-rastercalc-duplicated-layer-names
Fix rastercalc duplicated layer names
2018-11-30 10:17:38 +01:00
Denis Rouzaud
dde309439c
Merge pull request #8560 from 3nids/locator_context
Add context menu for locator filter results
2018-11-29 15:28:30 -04:00
Nyall Dawson
d72c4d001f [processing] Allow parameter metadata to set the number of decimal places
to show in numeric/distance widgets

E.g. to only show 2 decimal places:

  # only show two decimal places in parameter's widgets, not 6:
  param.setMetadata( {'widget_wrapper':
    { 'decimals': 2 }
  })
2018-11-30 05:02:59 +10:00
Blottiere Paul
b03d8a7f0e
Merge pull request #8551 from pblottiere/bugfix_wms
[server] OGC WMS 1.3.0
2018-11-29 16:36:37 +00:00
Blottiere Paul
51a27b31b1 Update tests 2018-11-29 11:49:58 +00:00
Alessandro Pasotti
49da1c3be9 Return a vector instead of a list and deprecate rasterEntries 2018-11-29 12:46:30 +01:00
Alessandro Pasotti
18854dc7b6 Do not add duplicates in raster calc layers list
Related to #20601
2018-11-29 12:26:57 +01:00
Denis Rouzaud
7bce9342e5 [sipify] fix initializer in strcuts 2018-11-28 07:46:24 -04:00
Alessandro Pasotti
e329fb5b97 Scanline implementation 2018-11-28 10:11:33 +01:00
Alessandro Pasotti
3801e9e28b Added findNodes method and tests 2018-11-28 10:11:09 +01:00