Nyall Dawson
3601138d2a
Use a feature source instead of vector layer for QgsGeometrySnapper
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
3108d68f87
Indentation
2017-07-07 09:28:19 +10:00
Nyall Dawson
4fa2bc025c
Keep correct order for zonal stats options, set some stats by default
2017-07-07 09:28:19 +10:00
Nyall Dawson
4eca20f28d
Fix zonal stats algorithm execution
2017-07-07 09:28:19 +10:00
Nyall Dawson
274d684f64
Fix procesing test layer loading
2017-07-07 09:28:19 +10:00
Nyall Dawson
b917a82662
Better debuging from processing alg tests
2017-07-07 09:28:19 +10:00
Nyall Dawson
6654aec6a5
Fix execution of script algorithms was not releasing layers/sinks
2017-07-07 09:28:19 +10:00
Nyall Dawson
e9e335a7bd
Don't set thinking cursors when running processing algorithms
...
Since now they're run in a background thread, it's not appropriate
anymore
2017-07-07 09:28:19 +10:00
Nyall Dawson
e1184cd69a
Make QgsProcessingAlgRunnerTask work correctly
...
It now safely can execute algorithms in background threads
without issues
2017-07-07 09:28:19 +10:00
Nyall Dawson
e5b156b86a
Make processing algorithms safe to run in threads
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
6c6f646291
Add methods to retrieve current thread affinity and push contexts
...
to another thread
With suitable assert in place to ensure that pushes are only
made when current thread == existing thread affinity
2017-07-07 09:27:35 +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
1b2086e8a6
Make algorithm dialog use background tasks to execute algorithms
2017-07-07 09:27:35 +10:00
Nyall Dawson
8cfcf57541
Fix tests
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
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
5c4f64270d
Add clone method to ScriptAlgorithm
2017-07-07 09:26:17 +10:00
Nyall Dawson
1b2afea23e
Add some more clone methods to algorithm subclasses
2017-07-07 09:26:17 +10:00
Nyall Dawson
0c6b19cd85
Improvements to QgsProcessingAlgRunnerTask
...
- take a clone of algs before running them. This avoids issues
if the algorithm is removed or edited while a background task
is running
- accept an optional existing feedback object
2017-07-07 09:26:17 +10:00
Nyall Dawson
6d7b0a3bbc
Fix re-saving already saved models
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
603168e8fa
Update sip
2017-07-07 08:54:00 +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
e95b65ef48
[needs-docs] Mouse wheeling over font buttons can change font size
...
With ctrl+mouse wheel changing in smaller size increments
2017-07-06 19:56:39 +10:00
Nyall Dawson
0fd1f8e563
Fix size hint for 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
Denis Rouzaud
5b8e2c2f27
remove QgsVectorLayer::hasGeometryType in favor of QgsMapLayer::isSpatial
2017-07-05 10:18:32 +02:00
Nyall Dawson
1fc81d6f98
Fix typo (coordiantes)
2017-07-04 14:33:11 +10: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
Harrissou Sant-anna
b57cd0deb1
[processing] align the "Iterate over layer" button ( #4796 )
2017-07-03 14:13:30 +07: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
59e9f79658
ok is spelled OK
2017-07-03 08:49:50 +02:00
Nyall Dawson
ada01d8671
Fix build warnings
2017-07-03 15:00:00 +10:00
Nyall Dawson
7972092311
Update docs, sip
2017-07-03 14:21:40 +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
Nyall Dawson
97e8d9cf9e
Emit signal when new layout item types are added to registry
2017-07-03 13:29:23 +10:00
Nyall Dawson
d23abf955a
Add registration of item types to QgsLayoutItemRegistry
2017-07-03 13:22:15 +10:00
Nyall Dawson
4f21afac0f
Shell layout designer dialog
2017-07-03 12:14:56 +10:00
Nyall Dawson
4c52db94c6
Merge pull request #4805 from DelazJ/checkbox
...
Spelling: Replace check box by checkbox
2017-07-03 12:10:22 +10:00
Nyall Dawson
37cc8fc5f1
Don't allow removal of model parameters on which other parameters
...
depend
2017-07-03 11:02:45 +10:00
Nyall Dawson
921939e4ec
Add method to determine whether dependencies exist between model parameters
2017-07-03 10:50:35 +10:00
Nyall Dawson
6483984d0b
Add method to retrieve dependent parameters for a parameter
2017-07-03 10:45:15 +10:00
Nyall Dawson
f9f98593e0
Draw links between dependent parameters in graphical modeler
...
Fix #12907
2017-07-03 10:27:03 +10:00