4265 Commits

Author SHA1 Message Date
Nyall Dawson
f82b41e001 Move an enum to new QgsProcessing class 2017-07-08 20:49:17 +10:00
Nyall Dawson
febf0a0e6e Rename method to more generic name - it's usable by vector layer outputs too 2017-07-08 20:49:17 +10:00
Nyall Dawson
9e184feaed Add method to evaluate parameters to compatible vector layers
of a specified type
2017-07-08 20:49:17 +10:00
Matthias Kuhn
875a5d6d9d Merge pull request #4818 from DelazJ/spelling
Fix some spelling issues
2017-07-08 10:20:40 +02:00
Matthias Kuhn
ada9ce4dcf Merge pull request #4825
Various new expression functions and possibilities
2017-07-08 10:18:10 +02:00
rldhont
6b6a52be49 Merge pull request #4823 from rldhont/fix-qgis3-asgml2
Fix GML2 after GML3 improvements
2017-07-07 15:32:33 +02:00
Blottiere Paul
e6de737fad Add unit tests 2017-07-07 14:35:08 +02:00
rldhont
aa24896ce1 Fix GML2 after GML3 improvements 2017-07-07 13:01:31 +02:00
Matthias Kuhn
72da246b8b Add tests 2017-07-07 13:01:17 +02:00
rldhont
59d1f6d1b2 [Server] Tests update mask image 2017-07-07 13:00:11 +02:00
Martin Dobias
a8cceff0fc Make it possible to build just core lib and providers: -DWITH_GUI=FALSE
This is useful in some cases when working on a third party app/script
that only uses qgis_core. For example, I am working on qgis 3D project
and it is useful to be able to build QGIS core lib with custom Qt version
without having to spend too much time building what I do not need.
Also may be useful for QField to simplify the build of QGIS as a dependency
(no QScintilla, Qwt) and avoid bits of code in providers that would not
be used anyway.

No real source code changes, just configuration changes, mainly in providers.
2017-07-07 11:38:03 +02:00
Matthias Kuhn
632eca6079 Merge pull request #4795 from pblottiere/dynamicform
[FEATURE] Dynamic form for joined fields
2017-07-07 08:22:18 +02:00
Nyall Dawson
515ba24230 Update tests 2017-07-07 11:58:15 +10:00
Nyall Dawson
ac51ae106c Add unit tests 2017-07-07 11:36:41 +10:00
Nyall Dawson
35e16b2f31 Add method for specifying variable description when adding to contexts
And use this description in expression builders when it's set.
2017-07-07 11:35:31 +10:00
Nyall Dawson
82ef7d2a89 Create specific expression context scope for child algorithms
Contains variables for model parameters, algorithm results for
other child algorithms which are not dependent on the
algorithm.

Allows removal of final pieces of ModelerAlgorithm code
2017-07-07 11:35:31 +10:00
Nyall Dawson
17199c8ffd Reimplement getAvailableValuesOfType in QgsProcessingModelAlgorithm 2017-07-07 11:35:31 +10:00
Nyall Dawson
26cd6017b8 Use an expression context when evaluating child parameters with expression sources 2017-07-07 11:35:31 +10:00
Nyall Dawson
3243a1a34c Allow model child parameters to take values from an expression
The expression is evaluated just before the child algorithm is
executed, so can utilise results already calculated by other
children in the model through the use of expression context
functions
2017-07-07 11:34:17 +10:00
Nyall Dawson
52f4c5e975 Merge pull request #4799 from nyalldawson/m2
Run processing algorithms using task manager
2017-07-07 11:31:22 +10:00
Nyall Dawson
240dd19f97 Update tests 2017-07-07 11:15:05 +10:00
Nyall Dawson
70cc19687d Add a method to take result layers (and ownership) from processing context 2017-07-07 09:28:20 +10:00
Nyall Dawson
3cbcd75d2f Add equality operator for QgsProcessingFeatureSourceDefinition 2017-07-07 09:28:19 +10:00
Nyall Dawson
8a84e134cc Algorithms don't have to be split to prepare/process/postProcess
Since it's safe to evaluate parameters in background threads
now, it's usually going to be ok to evaluate everything in
the processAlgorithm step.

This keeps the algorithm code as simple as possible, and will
make porting faster.

Note that the prepare/postProcess virtual methods still exist
and can be used when an algorithm MUST do setup/cleanup work
in the main thread.
2017-07-07 09:28:19 +10:00
Nyall Dawson
5350483c90 Add method to take results from another processing context and
add to the current context

With appropriate note and tests to ensure that both the current
context and that which the results being taken from share the
same thread affinity
2017-07-07 09:28:19 +10:00
Nyall Dawson
d20c68d3f1 Add method to copy thread safe settings between processing contexts 2017-07-07 09:28:19 +10:00
Nyall Dawson
1dce459610 Add method to transfer all layers from one map store to another
With a note and assert that both stores must have the same
thread affinity
2017-07-07 09:27:35 +10:00
Nyall Dawson
e0c7daa2d8 Rename QgsProcessingAlgorithm::clone to ::create
Since it better describes what the function does. It returns a new
pristine copy of the algorithm, not a clone of its current state
2017-07-07 09:27:35 +10:00
Nyall Dawson
cd7776ca1c Upgrade ported python algs to be thread ready 2017-07-07 09:27:35 +10:00
Harrissou Sant-anna
9e6b8ed59d Use PostGIS and PostgreSQL spelling when appropriate 2017-07-07 01:26:38 +02:00
Harrissou Sant-anna
6fab688298 Use SpatiaLite right spelling when needed 2017-07-07 01:26:38 +02:00
Nyall Dawson
c2621b1275 Split algorithm execution into separate prepare/process/postProcess steps
The prepare and postProcess steps are designed to be run in main
thread only, while the process step can safely be run in a background
thread.
2017-07-07 09:26:17 +10:00
Nyall Dawson
9156933c9e Add a pure virtual clone method for algorithms
This is required for safely executing the algorithm in a background
thread.
2017-07-07 09:26:17 +10:00
Nyall Dawson
fcf336170e Merge branch 'bugfix_relationquote' of https://github.com/pblottiere/QGIS into pblottiere-bugfix_relationquote 2017-07-07 08:59:19 +10:00
Nyall Dawson
bacad8cea6 [needs-docs] Show recently used fonts in submenu in font button 2017-07-06 19:56:39 +10:00
Nyall Dawson
99855ea35a Add method to use QgsFontButton in cut down mode for QFont settings only
The button can now be used in two different modes. The default behavior
is to include all settings used for configuring
QgsTextFormat/QgsTextRenderer classes. A cut down mode (without settings
for color/buffer/drop shadow/etc) is also available when the resultant
font is to be used only in a QFont object.
2017-07-06 19:56:39 +10:00
Nyall Dawson
5ac9745cad Add methods to convert QFont to/from mime data 2017-07-06 19:56:39 +10:00
Nyall Dawson
0b9fb5d6e1 [needs-docs] New gui widget QgsFontButton
A standard widget for configuring text format properties for use
with QgsTextRenderer/QgsTextFormat.

It's modelled heavily off QgsColorButton, and supports lots of nice
things like dragging formats between buttons, copying and pasting
format settings, dropping colors from color buttons, dragging colors
from font buttons to color buttons, directly setting font size
and opacity/color without having to open a dialog.
2017-07-06 19:56:39 +10:00
Nyall Dawson
ddf5acebe7 Merge pull request #4807 from nyalldawson/layout_item_registry
Create a layout item registry for item types
2017-07-06 19:12:43 +10:00
Blottiere Paul
e306cb4b09 Add some tests 2017-07-05 23:21:06 +02:00
Denis Rouzaud
5b8e2c2f27 remove QgsVectorLayer::hasGeometryType in favor of QgsMapLayer::isSpatial 2017-07-05 10:18:32 +02:00
Nyall Dawson
70d2ae292f Merge pull request #4730 from Zverik/atlas_rotate
Rotate geometry before calculating bounding box in atlas
2017-07-05 05:04:05 +10:00
rldhont
fe8522f811 [Geometry] Polygon::asGml: fix outer and add tests 2017-07-04 14:07:59 +02:00
Blottiere Paul
66591f9f4e Add unit test 2017-07-03 22:12:32 +02:00
Nyall Dawson
6307bc490d Merge pull request #4808 from nyalldawson/model_out_layer_names
Fix incorrect layer names used when loading result layers from models
2017-07-03 17:46:21 +10:00
Nyall Dawson
bdaba00a01 Fix incorrect layer names used when loading result layers from models 2017-07-03 17:08:52 +10:00
Harrissou Sant-anna
ab437cd4de Ok is spelled OK 2017-07-03 08:49:50 +02:00
Harrissou Sant-anna
59e9f79658 ok is spelled OK 2017-07-03 08:49:50 +02:00
Nyall Dawson
59d28a3525 Remove useless testqgslayoutitemregistry.cpp file 2017-07-03 14:01:37 +10:00
Nyall Dawson
c228132cbb Layout designers listen out for new item types in registry and
auto create actions for adding new items of the newly registered type

This avoids hard-coding in available item types into layout UI classes,
and allows designers to handle plugin-supplied item types
2017-07-03 13:57:42 +10:00