7633 Commits

Author SHA1 Message Date
Nyall Dawson
23164df129 Correctly emit attributeValueChanged when changing an editable joined field
Fixes edits to a joined field value aren't immediately shown in attribute tables,
and instead appear as though they were discarded (until the attribute table is
reloaded)
2019-08-05 16:20:47 +10:00
Juergen E. Fischer
06b24d164a update INSTALL.html 2019-08-04 10:35:37 +02:00
sklencar
f5fe4cb010 [QgsQuick] Custom filepaths for external resource widget (#30929)
* Enabled using default path for external resources.
Value (filepath) can be relative to either project path or default root according field setup/config

* [QgsQuick] Added signal of event when a captured photo is confirmed. That enables custom handling of the action by externalResourceHandler.
Renamed Ok Button of PhotoPanel.

* [QgsQuick] Cleaning source of preview image after closing it
It was causing unpleasant effect when last taken photo has been shown for a short while before previewing another.

* [QgsQuick]
Evaluate and use defaultRootPath in a config of the external resource widget.
Added a function to evaluate expressions for QgsQuick

* [QgsQuick] Use Loader to load photo panel only when its going to be used.
Also prevents for asking camera permissions on form open, when photo panel was initialized as well.

* [QgsQuick] Better wrapping of a long filenames text in the external source widget if an image is not available.

* [QgsQuick] Use canonical path in function
Symlinks are used a lot on Android, therefore its better to use canonical paths.

* [QgsQuick] formatted code.

* [QgsQuick] External source widget - changes requested in review
Fixed test and added one test case for getting relative path.

* [QgsQuick] External widget update
Added function that returns absolute path of image according widget's config - takes into account relative/absolute setting for value and default path.
Added docs about how a path can be configured and used.

* [QgsQuick] External widget update
* removed lefover property
* corrected getAbsolutePath function

* [QgsQuick] Corrected function and fixed test
Do not use canonical path for non-existing file while getting relative path.
2019-08-02 13:30:11 +02:00
Julien Cabieces
4f7975d2dc Fix WMS GetMap 8bit mode with transparency (#31014)
* Fix WMS GetMap 8bit mode with transparency

* Correct indentation

* Remove french text in qgs test project

* Correct render checker for 8bit image

* Remove empty line
2019-08-01 17:14:43 +02:00
Sandro Mani
0a3ec2689a Fix case of dbghelp library 2019-07-31 11:03:06 +10:00
Nyall Dawson
b9482dda6b Dox++, unit tests 2019-07-31 05:08:37 +10:00
Nyall Dawson
99fce61d3b Add unit tests for QgsUnitTypes::areaToDistanceUnit 2019-07-31 05:08:12 +10:00
nirvn
b68a9c3b81 Add tests 2019-07-30 18:06:26 +07:00
lbartoletti
794a8efc81 Fixes empty WKT. Fixes #20753, Fixes #19190, Fixes #20754 (#9645)
* Fixes empty WKT. Fixes #20753, Fixes #19190, Fixes #20754
2019-07-30 09:34:53 +02:00
nirvn
8b5ba4a0cf Fix rebase gone wrong and address review 2019-07-29 15:14:34 +07:00
nirvn
3a37c83da7 [FEATURE][layout] Add horizontal placement option for scale bar labels 2019-07-29 15:14:34 +07:00
nirvn
e5deb5517b [FEATURE][layout] Add above/below segments placement option for scale bar labels 2019-07-29 15:14:34 +07:00
Nyall Dawson
4d5fe9a086 [FEATURE][callouts] Add setting to allow callouts to be drawn to all parts
of a multi-part feature

Also data-definable!
2019-07-29 11:18:10 +10:00
rldhont
fd504337d8 [Test] PyQgsRulebasedRenderer: add more complex 2019-07-29 09:52:18 +10:00
rldhont
238e0210df [Test] PyQgsRulebasedRenderer: add more complex usedAttributes test 2019-07-29 09:52:18 +10:00
rldhont
12df8d187a [Test] PyQgsCategorizedSymbolRenderer: add more complex usedAttributes test 2019-07-29 09:52:18 +10:00
rldhont
a0f3ceefce [Test] PyQgsPointDisplacementRenderer: add usedAttributes test 2019-07-29 09:52:18 +10:00
rldhont
3955c1e047 [Test] PyQgsPointClusterRenderer: add usedAttributes test 2019-07-29 09:52:18 +10:00
rldhont
26442d4edb [Test] PyQgsRulebasedRenderer: add usedAttributes test 2019-07-29 09:52:18 +10:00
rldhont
629c3e64d2 [Test] PyQgsSingleSymbolRenderer: add usedAttributes test 2019-07-29 09:52:18 +10:00
rldhont
96e012eb43 [Test] PyQgsSymbolLayer: add usedAttributes tests 2019-07-29 09:52:18 +10:00
Nyall Dawson
ab7106ae99 [labeling][FEATURE] Allow data defined control over "label every
part of multipart features" setting
2019-07-27 20:22:50 +10:00
Nyall Dawson
3484a0246d [labeling] Add API to allow curved labels to overrun features 2019-07-26 18:24:20 +10:00
Nyall Dawson
056f1e4f3c Add method to extend a pal pointset line by a set start and end distance 2019-07-26 18:24:20 +10:00
Nyall Dawson
f2d3bdd486 [proj6] Always normalize operations, even when we are using predefined
proj coordinate operation (e.g. those stored in a project)

Fixes #30643
2019-07-26 12:52:02 +10:00
Nyall Dawson
ca13055770 Add unit tests from #30643 2019-07-26 12:52:02 +10:00
Nyall Dawson
68c4a814b4 Add unit tests from #30569 2019-07-26 12:52:02 +10:00
Matthias Kuhn
4e33bc1fcf
Merge pull request #30610 from signedav/fix_valuerelation
Fix multi-selection on value relation widget using string fields
2019-07-25 18:16:25 +02:00
David Signer
7166f77dfa handle variant as list (instead of string) when the field.type() is QVariant::List - since these values are not stored as string, the tests don't need to check the GDAL version (what shouldn't have been done before anyway because it only concerns geopackages, where this version is checked on storing data...) 2019-07-25 09:46:04 +02:00
Nyall Dawson
fe4a82939e [labeling] Fix empty segment sometimes created when using repeated labels 2019-07-25 15:11:16 +10:00
Nyall Dawson
35a35fbbb1 [labeling] Fix repeated line labels gravitate to start of line
Avoids situations like

1. Line length of 3cm
2. Repeat distance of 2cm
3. Label size is 1.5 cm

    2cm    1cm
/--Label--/----/

i.e. the labels are off center and gravitate toward line starts

Instead, we first calculate how many complete repeats we can fit
in, and then divide the line into even sections of this length,
avoiding the situation where some leftover segment of the line
end isn't big enough for the label to fit.
2019-07-25 15:11:16 +10:00
Nyall Dawson
03d561b199 [labeling] Ensure short lines (wrt font size) still generate sufficient
candidates to ensure centered placement of labels
2019-07-25 12:11:45 +10:00
Nyall Dawson
83a842d44f Ensure ownership of path preprocessor is transferred 2019-07-25 08:41:28 +10:00
Nyall Dawson
2237c6ae99 [API][FEATURE] Allow setting a custom path pre-processor for QgsPathResolver
QgsPathResolver::setPathPreprocessor allows setting a custom path pre-processor
function, which allows for manipulation of paths and data sources prior
to resolving them to file references or layer sources.

The processor function must accept a single string argument (representing the
original file path or data source), and return a processed version of this path.

The path pre-processor function is called before any bad layer handler.

Example - replace an outdated folder path with a new one:

  def my_processor(path):
    return path.replace('c:/Users/ClintBarton/Documents/Projects', 'x:/Projects/')

  QgsPathResolver.setPathPreprocessor(my_processor)

Example - replace a stored database host with a new one:

  def my_processor(path):
    return path.replace('host=10.1.1.115', 'host=10.1.1.116')

  QgsPathResolver.setPathPreprocessor(my_processor)

Example - replace stored database credentials with new ones:

  def my_processor(path):
    path= path.replace("user='gis_team'", "user='team_awesome'")
    path = path.replace("password='cats'", "password='g7as!m*'")
    return path

  QgsPathResolver.setPathPreprocessor(my_processor)
2019-07-25 08:41:28 +10:00
Nyall Dawson
bbd2f65a6c Direct conversion from ogr multilinestrings to QgsGeometry
Avoid expense of converting to/from wkb
2019-07-24 16:41:37 +10:00
Nyall Dawson
4b79efcb19 Optimise reading of multipoints from OGR
Avoid WKB conversion on OGR side, and parsing on QGIS side, and
just handle the direct conversion of OGR geometries instead
2019-07-24 04:10:14 +10:00
Julien Cabieces
0dfa77ddb3 Add a new settings noProxyUrls and change UI to edit this setting 2019-07-23 19:03:51 +10:00
Julien Cabieces
906c8a1de0 fixes #28034 : Return NoProxy instead of DefaultProxy when url matches
excludes list
2019-07-23 19:03:51 +10:00
Nyall Dawson
45b23fd5b2 [callouts] Allow callout types to have icons, and use them in the type combobox
...and pick ugly icons to prompt @nirvn into action ;)
2019-07-23 12:12:18 +10:00
nirvn
aab8e511bd [FEATURE][callouts] Allow specifying an offset from label area distance 2019-07-22 18:29:05 +07:00
Nyall Dawson
2b554d8bab [FEATURE][callouts] Allow specifying an offset from feature distance
which controls a distance from the feature where callout lines end

Makes for visually more appealing callouts vs drawing them right
up against the edges of features
2019-07-22 18:40:08 +10:00
Nyall Dawson
f8cd54288c Improve appearance of multiline tooltips 2019-07-22 13:38:47 +10:00
Nyall Dawson
8f6f04885b [FEATURE] Add @scale_value expression variable for use when evaluating
data defined text format properties while rendering scale bar text

Allows for per-label customisation of the text format inside scale bars
2019-07-22 11:34:32 +10:00
Nyall Dawson
19a2b0e5d5 [api] Allow data defined properties to be set in QgsTextFormat, so
that these are automatically respected whenever the format is
rendered using QgsTextRenderer

This is done transparently to the caller - so by porting away
from the raw QPainter text apis to use QgsTextRenderer instead,
then they immediately gain the ability to use data defined
properties in their text formats.
2019-07-22 11:34:32 +10:00
Nyall Dawson
859d9a7233 Add test for drawing unplaced for a feature with no candidates 2019-07-21 20:29:34 +10:00
Nyall Dawson
c3b2f77a64 [FEATURE][labeling] Allow display of unplaced labels
This setting (accessed through the project label settings dialog)
allows unplaced labels to be shown on the map. These are rendered
using a red color by default (but the color can be changed from
the label settings dialog too), allowing users to determine whether
any important labels are missing from their maps (e.g. due to
overlaps or other constraints).
2019-07-21 20:29:34 +10:00
Nyall Dawson
39d4145aae Append additional "QgsCalloutContext" member to callout rendering virtual
methods

While unused for now, this gives us flexibility in future to specify
additional useful contextual information about how a callout should
be rendered without breaking API (e.g. label text alignment, label
font settings, etc)
2019-07-21 20:29:34 +10:00
Matthias Kuhn
4e0102f3b1
Merge pull request #30816 from m-kuhn/ellipsoid_from_first_layer
Update the project ellipsoid if CRS is taken from first layer
2019-07-20 10:29:54 +02:00
Matthias Kuhn
22dbeee989 Add test for QgsGeometryCheckError::contextBoundingBox() 2019-07-19 11:59:08 +02:00
Matthias Kuhn
ce8004446a Update the project ellipsoid if CRS is taken from first layer
Fix #30815
2019-07-19 11:08:39 +02:00