5698 Commits

Author SHA1 Message Date
Nyall Dawson
1bf51a4fbb Move item state handling to c++ 2020-03-02 18:53:31 +10:00
Nyall Dawson
2f8dbacc87 Move more functionality to c++ base class 2020-03-02 18:53:31 +10:00
Nyall Dawson
0dbb082dfd Move designer edit buttons to c++ 2020-03-02 18:53:31 +10:00
Nyall Dawson
8f6a6111d2 Use actual component sizes when drawing model instead of hardcoded values
(still not user-setable!)
2020-03-02 18:53:31 +10:00
Nyall Dawson
6c98448a7f Use signals to avoid storing arrows in graphic item 2020-03-02 18:53:31 +10:00
Nyall Dawson
0df4e35a02 Use subclasses instead of instance checking for component type
specific logic
2020-03-02 18:53:31 +10:00
Nyall Dawson
fe4352c236 Use signals to avoid hard dependancy between component graphic items and scene 2020-03-02 18:53:31 +10:00
Nyall Dawson
1d25155d15 Rework hiding of model controls to use a flag on the scene 2020-03-02 18:53:31 +10:00
Nyall Dawson
b567ddeccd Move model storage for graphic items to c++ base class 2020-03-02 18:53:31 +10:00
Nyall Dawson
167a8d3846 Less Python, more c++ 2020-03-02 18:53:31 +10:00
Nyall Dawson
72d7305456 Start using c++ base clases in model designer 2020-03-02 18:53:31 +10:00
Nyall Dawson
16841efa7e Start moving base classes to c++ 2020-03-02 18:53:31 +10:00
Nyall Dawson
cd6d51181b [processing] Port some model designer graphic item internals to c++
for stability and re-usability from c++ code
2020-03-01 19:12:25 +10:00
Nyall Dawson
58cabe6bfc Revert "Use a font size in points, not pixels, for hi-dpi compatibility"
This reverts commit ac412e38adb6abc9d113657f8466b3a833a6e546.
2020-03-01 19:12:25 +10:00
Nyall Dawson
ac412e38ad Use a font size in points, not pixels, for hi-dpi compatibility 2020-02-29 07:52:08 +10:00
Nyall Dawson
1924d82517 Don't use constants for model graphic item sizes
Allows flexibility for items to have different sizes (not currently user-settable!)
2020-02-29 07:52:08 +10:00
Nyall Dawson
435599a42b [processing] Avoid redefining model element size multiple times, don't
hardcode font name (instead use correct theme font)
2020-02-29 07:52:08 +10:00
Juergen E. Fischer
edee4a3d10 spelling fixes (closes #32408) 2020-02-28 21:04:02 +01:00
Håvard Tveite
833202f32c
Update the short help description of the Random points along line algorithm
Fixes #33160
2020-02-28 10:23:53 +10:00
Nyall Dawson
0391e17551 [processing] Fix cannot edit/delete/export project based models
Fixes #34627
2020-02-25 18:15:18 +10:00
Radoslaw Guzinski
8d1df2adb1 [Processing] Fix setting band parameter from string
Optional bool variables are in positions 5 and 6.
2020-02-20 09:32:07 +10:00
Harrissou Sant-anna
eb55d7555e Fix geometry type for "Convert geometry type" algorithm 2020-02-20 08:46:32 +10:00
Radoslaw Guzinski
550c8bf341 [Processing] Fix isEnabled check for modeler context menu actions
This aligns the check with Processing scripts context menu actions and allows subclasses of QgsProcessingModelAlgorithm to register their own actions.
2020-02-13 08:39:44 +10:00
lbartoletti
927d10c7dc
Fix oriented minimum bounding box algorithm
Fixes #33532
2020-02-07 09:02:06 +10:00
Nyall Dawson
692a14090b [needs-docs] Rename "Define layer projection" to "Define Shapefile projection"
This algorithm ONLY works on shapefile inputs, so make that clear in the algorithm's
display name and helper strings
2020-02-05 04:56:29 +10:00
Nyall Dawson
dae36b343e Remove qpj files when defining shp projection from processing and Proj >= build
is present

These files aren't/shouldn't be used under proj 6 builds
2020-02-05 04:56:29 +10:00
Nyall Dawson
f41dd11e92 [processing] Define Layer Projection tool should write .prj files
using WKT1 ESRI format, not GDAL

Fixes #34007
2020-02-05 04:56:29 +10:00
Andrea Giudiceandrea
02a6fd40cd Fix "Random points along line" alg
Fixes "Random points along line" (qgis:randompointsalongline) algorithm.
See https://github.com/qgis/QGIS/issues/33156#issuecomment-581395400
2020-02-04 08:13:03 +10:00
Andrea Giudiceandrea
e82ba52584 Fix "Random points along line" alg
Fixes "Random points along line" (qgis:randompointsalongline) algorithm
Fixes #33156
2020-02-04 08:13:03 +10:00
Shiva Reddy
7583d52ef6 Modify Graphical Modeler title
The menu item and title of the dialogue is now same i.e Graphical Modeler
2020-02-03 05:51:16 +10:00
Nyall Dawson
06082a15c0 [processing] Improve temporary directory handling
- Make the new Temp Folder setting optional, default to an empty
string, and note that empty = use default
- Move responsibility for cleanup of temporary folders to c++ (if
Processing Python part crashes, or doesn't exist, then we still
want these cleaned up correctly)
2020-02-03 05:48:02 +10:00
Nyall Dawson
5ae9807303 [processing] Fix modeler draws lines to wrong output when connecting
the green output boxes back to their linked algorithms
2020-02-01 05:59:22 +10:00
Nyall Dawson
3fb18a2260 [processing] Fix Points Along Geometry handling of multipart geometries
Fixes #34022
2020-01-31 14:46:33 +10:00
Nyall Dawson
d1d7dfe497 [processing] When listing available layer sources for an input in the
model designer, prefer to show the user's defined name for that output
instead of the generic one

Makes it easier to associate inputs with the correct outputs when
creating models
2020-01-31 07:33:44 +10:00
Radoslaw Guzinski
7771c6cea9 [processing] Looks for script algorithm files also in subfolders. 2020-01-30 08:48:54 +10:00
Radoslaw Guzinski
ea0a701d7a [processing] Catch AttributeError and TypeError when loading Processing script algorithms.
Otherwise an error in decorator of one script prevents all scripts from loading.
2020-01-30 08:48:54 +10:00
PedroVenancio
68cbc5b027 Add new -e -n flags
New features in GRASS 7.6: Add -n flag to create aspect as degrees clockwise from North (azimuth), with flat = -9999 (like gdaldem); new -e flag to compute values at edges (like gdaldem -compute_edges).
2020-01-30 08:47:45 +10:00
Harrissou Sant-anna
b0bffba9a1 Add short help to gdal's build virtual vector alg 2020-01-29 11:42:06 +10:00
Harrissou Sant-anna
adf63d6a90 Remove QGIS "build virtual vector" alg help 2020-01-29 11:42:06 +10:00
Andrea Giudiceandrea
41c847136e Remove qgis:pointsalonglines python alg help
after "Points along geometry" algorithm port to C++ since 3.8 qgis\QGIS@f30fcca5ece7019d83d2b385f954a0335c84e7c6 qgis\QGIS#30175
2020-01-28 05:10:22 +10:00
Andrea Giudiceandrea
2c84b43c18 Remove qgis:creategrid python alg help
after "Create grid" algorithm port to C++ qgis/QGIS@9e9ade3903
2020-01-27 16:25:17 +10:00
Alexander Bruy
57e211dc4e update tests 2020-01-15 15:17:39 +02:00
Alexander Bruy
1fe16b712a use native algorithm instead of RectanglesOvalsDiamondFixed 2020-01-15 13:41:52 +02:00
Alexander Bruy
c752919dd0 [processing][needs-docs] port Rectangle,ovals,diamonds algorithm to C++
and make width, height and rotation parameters dynamic.

Old Python implementations marked as deprecated to maintain API
compatibility.
2020-01-15 13:41:52 +02:00
Nyall Dawson
a9ed83f1a6 [FEATURE][processing] New algorithm "Rename table field"
Takes an input layer, existing field and a new name for the field, and
outputs a new layer with the selected field renamed.

While this result could also be achieved with the Refactor Fields
algorithm, Refactor Fields isn't particularly model friendly. It
relies on a constant, fixed table structure, and can't adapt to
input tables with different field structures.

In constrast, this simple Rename Field algorithm adapts nicely for
model use, because it operates on a single field only and leaves
all the other fields untouched.
2020-01-15 21:56:10 +13:00
Nyall Dawson
771fc3ff60 [FEATURE][processing] Add new mode to "Join Attributes by Location" algorithm
to take attributes from matching feature with largest area of overlap only

This allows for easy polygon->polygon joins, where you expect there to be
only a single matching feature and don't want to include features which
are just touching or have just tiny sliver polygon overlaps.

Sponsored by SMEC/SJ
2020-01-14 21:28:30 +13:00
Etienne Trimaille
0a4f0e51a6 add field name when reporting an error in refactorfield algo 2020-01-14 11:32:48 +13:00
Andrea Giudiceandrea
0d4d8254c1 [SAGA] Fix saga_cmd command with multiple outputs
Fixes a regression bug accidentally introduced with 40134d6473fcdbd8b6f53c3ea3db01e2dd606419 (PR #8968) and backported with a887b7d34bfa44a8400bcaa986ede96e15a760c9 (PR #9231): when there are multiple output parameters processAlgorithm incorrectly generates multiple saga_cmd commands, instead of a single command containing the output parameters.

Fixes #33658
2020-01-13 13:19:33 +13:00
root676
aa2b38f9ca remove hash based python test entry 2020-01-10 13:32:42 +13:00
root676
4b8177fda9 add linedensity testdata 2020-01-10 13:32:42 +13:00