6343 Commits

Author SHA1 Message Date
Nyall Dawson
95d65ae861 Add python safe addSmartgroup method, unit tests for smart groups 2018-09-12 16:22:44 +10:00
Nyall Dawson
adc31bb8a0 Fix test on Travis 2018-09-12 16:22:44 +10:00
Nyall Dawson
c5ab5891e0 Add a QAbstractItemModel for showing the entities within a QgsStyle object
- also adds QgsStyleProxyModel which handles filtering of entities
- lots of unit tests
- new signals in QgsStyle for when symbols/tags/etc change (with tests)
2018-09-12 16:22:44 +10:00
signedav
b3e4755e2e Enum Mode in QgsAttributeEditorContext
instead of QgsAttributeForm - because it's used on places not including QgsAttributeForm
now it's able to use @form_mode in expressions of containers and QML widgets
2018-09-11 12:14:20 +02:00
Matthias Kuhn
6d2ec207e1
Calculate layer to map conversion on the fly 2018-09-11 09:08:28 +02:00
Matthias Kuhn
7a5a52b162
Merge pull request #7845 from m-kuhn/apiCleanup
Naming changes for QgsFeaturePool
2018-09-11 08:16:39 +02:00
Matthias Kuhn
fae9256a41
Merge pull request #7844 from m-kuhn/conversionFactor
QgsCoordinateTransform::scaleFactor()
2018-09-11 08:16:24 +02:00
Nyall Dawson
5f5294f258 [FEATURE][processing] New algorithm to categorize a layer using a style XML file
Sets a vector layer's renderer to a categorized renderer using matching symbols
from a style database.

The specified expression (or field name) is used to create categories for the
renderer. A category will be created for each unique value within the layer.

Each category is individually matched to the symbols which exist within the
specified QGIS XML style database. Whenever a matching symbol name is found,
the category's symbol will be set to this matched symbol.

The matching is case-insensitive by default, but can be made case-sensitive
if required.

Optionally, non-alphanumeric characters in both the category value and symbol
name can be ignored while performing the match. This allows for greater
tolerance when matching categories to symbols.

If desired, tables can also be output containing lists of the categories
which could not be matched to symbols, and symbols which were not matched to categories.
2018-09-11 06:01:06 +10:00
Nyall Dawson
97a964af4a Add method QgsCategorizedSymbolRenderer::matchToSymbols which
matches existing categories to symbol names from a QgsStyle
object and copies matching symbols to these categories
2018-09-11 06:01:06 +10:00
Matthias Kuhn
cf82c13324 Rename conversionFactor to scaleFactor 2018-09-10 13:36:33 +02:00
Matthias Kuhn
e0926e4445 Rename get() to getFeature() 2018-09-10 13:32:54 +02:00
Matthias Kuhn
57677f6aab Add test for QgsCoordinateTransform::conversionFactor 2018-09-10 13:26:25 +02:00
Matthias Kuhn
273e99877b
Merge pull request #7805 from m-kuhn/vectordataproviderfeaturepool
Refactor QgsFeaturePool
2018-09-10 07:53:55 +02:00
Denis Rouzaud
e4c69ff061
Merge pull request #7758 from 3nids/search_alllayers
[FEATURE] add new locator filter searching across all layers
2018-09-08 09:48:49 -04:00
Denis Rouzaud
89830f614e
create QgsMapLayer::LayerFlags for Searchable, Identifiable and Removable (#7815)
* create QgsMapLayer::LayerFlags for Searchable, Identifiable and Removable

this brings back the information previously saved in the project node back to the layer node
this will allow to embed this information in layer styles

* skip unexisting flag node to avoid setting wrong value for flag

* mark QgsProject::(set)requiredLayers as deprecated

* better API docs

* use new API in current code

* more docs and more old API fixes

* fix bad conversion

* more old API fix

* add missing SIP_OUT

* s/testFlags/testFlag

* fix var name

* adapt project test to test flags

* remove debug calls

* fixeS
2018-09-08 07:54:21 -04:00
Denis Rouzaud
5c172a6f9d add test for 'search all layers' locator 2018-09-07 06:41:20 -04:00
Blottiere Paul
3ad3fc4f9c
Merge pull request #7751 from pblottiere/server_filter_segfault
[server] Fixes segfault when WMS OGC filter is empty
2018-09-07 08:21:57 +02:00
Blottiere Paul
a6b44b15b3 Add unit test for OGC filters with multiple layers 2018-09-07 05:32:58 +01:00
Blottiere Paul
34c1d7acce Add unit test for empty OGC filter 2018-09-07 05:32:58 +01:00
luz.paz
0908daaa0e Misc. typos
Found via `codespell -q 3 -I ../qgis-word-whitelist.txt --skip="*.ts,*.po,./scripts/spell_check"`
2018-09-07 00:30:54 +02:00
Martin Dobias
1839daaa18
Merge pull request #7777 from PeterPetrik/mesh_vector_on_grid
[mesh] [feature] allow render vectors/arrows on the user-defined grid
2018-09-06 15:32:54 +02:00
Nyall Dawson
da670f9e63 Unit tests for CRS parameter wrapper 2018-09-06 18:11:24 +10:00
Nyall Dawson
88b324db26 [processing] Allow CRS parameters to be set to a direct QgsCoordinateReferenceSystem object 2018-09-06 18:11:24 +10:00
Nyall Dawson
06d37fced4 [processing] Port CRS widget wrapper to c++ classes 2018-09-06 18:11:24 +10:00
Mathieu Pellerin
d952ba422e
[3d] Use layout item bg color as 3D scene bg color 2018-09-05 21:24:04 +07:00
Matthias Kuhn
cdc7d39a14 Refactor QgsFeaturePool
QgsFeaturePool is now an abstract baseclass, with a new inherited class QgsVectorDataProviderFeaturePool. This allows creating other subclasses, most notably a QgsVectorLayerFeaturePool subclass, that is able to also work on uncommitted features.

Critical calls to methods which are not threadsafe have been protected by executing them on the main thread.
2018-09-05 16:22:53 +02:00
Peter Petrik
c89b7722a3 fix review items from Nyall 2018-09-05 09:00:30 +02:00
Matthias Kuhn
63630410fd qgsvectorlayer.h includes 2018-09-05 08:54:32 +02:00
Matthias Kuhn
17279a42e2 Only include qgsvectorlayer.h where required 2018-09-05 08:54:11 +02:00
Matthias Kuhn
f875bb77b4
Merge pull request #7792 from m-kuhn/threadsafefeaturesource
Add threadsafe method to get featuresource from layer
2018-09-05 08:13:44 +02:00
Matthias Kuhn
26626ea3d8 Fix test 2018-09-05 06:42:51 +02:00
Matthias Kuhn
e23167ee3d
Fix some test issues 2018-09-05 05:32:37 +02:00
Nyall Dawson
f79d86edab [processing] Port string widget wrapper to new c++ class 2018-09-05 13:14:50 +10:00
Nyall Dawson
e10d16e1da
Merge pull request #7659 from lbartoletti/reverseLine
[needs-docs][FEATURE] Add reverse line maptools AKA swap direction
2018-09-05 08:59:49 +10:00
Nyall Dawson
d449d41503 Don't crash when writing invalid variants via QgsXmlUtils 2018-09-05 08:11:48 +10:00
Nyall Dawson
0b4694fbee More efficient case insensitive string comparison 2018-09-05 07:54:35 +10:00
Matthias Kuhn
75bb5c40a7 Add test for QgsVectorLayerUtils::getFeatureSource 2018-09-04 22:07:33 +02:00
Nyall Dawson
8af1c3f9f0 Respect nodata values in ::sample() for gdal provider 2018-09-05 05:24:51 +10:00
Luigi Pirelli
580ecafa32
Merge pull request #7396 from luipir/rastercalculator_model_fix
[processing] Rebirth RasterCalculator in Modeler. Fixes #19302
2018-09-04 18:13:04 +02:00
Nyall Dawson
d563034583 Address review comments 2018-09-04 19:06:07 +10:00
Nyall Dawson
e76b761dd0 Correctly associate layer with dynamic properties 2018-09-04 19:06:07 +10:00
Nyall Dawson
70c1680754 Automatically handle adding data defined button for dynamic properties
Also exposes this capability to modeler - so that model algorithms
can use data defined parameters within their child algorithms.

TODO:
- tests
- setting the associated vector layer
2018-09-04 19:06:07 +10:00
Nyall Dawson
a717b85e2e [FEATURE][processing] New modeler parameter widget
A new widget which handles parameter values for child algorithms
within a model. Instead of the previous approach of requiring
individual widget wrappers to handle creation of a suitable
model widget, we do all this automatically for them.

This widget uses a stacked widget with a toolbutton to select
the parameter's source, instead of the previous combo box approach
(which didn't scale well for large models). I.e. users select
first whether the value is taken from a static value, a
model input, or an output from a different child algorithm. The
widget then changes appearance and behavior based on this
choice.

Additionally, a new option is present for all parameters
of using a "precalculated expression". This expression is
evaluated once before the child algorithm is executed
and used during the execution of that algorithm.
2018-09-04 19:06:07 +10:00
Nyall Dawson
644ef6a752 [processing] Initial work on porting base GUI classes to c++
- Add abstract base class for Processing widget wrappers to c++
- Add wrapper factory interface to c++
- Make QgsProcessingGuiRegistry also register widget wrapper
factories, and be responsible for creation of new c++
processing widget wrapper instances
- Start on private c++ implementation of boolean widget wrapper,
including unit tests
2018-09-04 19:06:07 +10:00
nirvn
5cd28034bd address comments, fix test 2018-09-04 10:07:07 +07:00
nirvn
48b18d4c6c [processing] add parameterAsInts function 2018-09-04 10:07:07 +07:00
nirvn
13ecaa4190 [needs-docs][processing] Add a multiple selection mode to the band parameter 2018-09-04 10:07:07 +07:00
Stéphane Brunner
b49485839f
Merge pull request #7776 from pvalsecc/empty_filter
[Server] Add support for empty OGC WMS filters
2018-09-03 16:36:35 +02:00
Peter Petrik
6ee9a47463 [mesh] [feature] allow render vectors/arrows on the user-defined grid 2018-09-03 16:31:35 +02:00
Patrick Valsecchi
da58c1d7cf Add support for empty OGC WMS filters
The FILTER query parameter can now look like that:
`(<Filter>...</Filter>)()`

That means that the second layer has no filter. This is compliant with
waht MapServer supports:
https://mapserver.org/development/rfc/ms-rfc-118.html#examples
2018-09-03 15:36:43 +02:00