97 Commits

Author SHA1 Message Date
Harrissou Sant-anna
00392397dc Format alg helpUrl to match actually generated URL
replacing "_" characters by "-"
2024-12-17 07:46:56 +10:00
Denis Rouzaud
a6fab83cd9 run pre-commit 2024-12-07 05:16:00 +10:00
Matthias Kuhn
39e33dea65 Add include moc lines 2024-10-26 07:35:20 +02:00
Nyall Dawson
0969806f89 Show warning in help for algorithms for known issues or security risk 2024-10-02 10:36:00 +10:00
Andrea Giudiceandrea
e688fb104e [gui][pocessing][modeler] Fix window's title 2024-09-24 06:40:50 +10:00
Nyall Dawson
635562d7f8
Qstring fixup 2024-08-29 10:20:23 +10:00
Nyall Dawson
ad037183be Update src/gui/processing/qgsprocessingalgorithmdialogbase.cpp 2024-07-15 14:33:21 +10:00
Nyall Dawson
ada675b452 Use metaenum instead of hardcoded list 2024-07-15 14:33:21 +10:00
Nyall Dawson
f2d5c870cc Move translation to reusable function 2024-07-15 14:33:21 +10:00
Nyall Dawson
afd10759b0 [processing] Show notes for algs which regenerate primary keys
Add a new Qgis::ProcessingAlgorithmDocumentationFlag flag, with
a virtual method in QgsProcessingAlgorithm to return documentation
flags. These flags are used to indicate algorithm behavior which
should be noted in the documentation.

Add initial flags for algorithms which drop and regenerate
primary keys/FIDs, and automatically add a note to the algorithm's
help panel to explain that this will occur

In future this flag could be extended with other helpful warnings,
eg

- Algorithm requires valid geometries
- Algorithm will segmentize curved geometries
- Algorithm will drop Z or M values
2024-07-15 14:33:21 +10:00
Matthias Kuhn
33fd91c385 Add group name to processing algorithm title 2024-06-12 07:49:22 +02:00
Nyall Dawson
ee53b9ae48 Port processing enums to enum class
A step towards a Qt6 compatible Processing framework
2024-02-10 17:25:22 +10:00
Nyall Dawson
26798b84f4 Promote QgsFeatureRequest enums to enum class, move to Qgis 2024-01-30 19:10:43 +10:00
Nyall Dawson
b0666050f5 Allow clicking processing output file/folder/html names in the
log to open the containing folder and preselect the generated file
2024-01-09 17:02:21 +10:00
Nyall Dawson
3e7d376953 Add method to push formatted text to Processing feedback
Provides a method for algorithms to push HTML contents to the log
(the other feedback methods all escape HTML strings to strip
formatting characters)
2024-01-09 17:02:21 +10:00
Nyall Dawson
68536f8714 Ensure dialog focus is returned after saving files on mac
Fixes #54332
2023-08-29 13:29:50 +10:00
Nyall Dawson
bbc367a4ba Add choice of log level to algorithm settings panel
Allows users to run algorithms with verbose logging through the
GUI (previously only available via qgis_process or model designer)
2023-08-25 15:02:52 +10:00
Alexander Bruy
1c1e46029a address review 2023-04-25 05:41:04 +10:00
Alexander Bruy
0f2d2bc360 allow changing number of threads through the algorithm settings panel 2023-04-25 05:41:04 +10:00
Nyall Dawson
cc2d032055 Add DistanceUnit value for inches 2023-04-02 06:01:48 +10:00
Nyall Dawson
9d44782be4 [processing] Allow temporary folder to be temporarily changed through
the algorithm settings panel
2023-03-21 03:50:08 +10:00
Nyall Dawson
3962c29130 Move action to top of menu 2023-03-17 05:59:15 +10:00
Nyall Dawson
3c2446e54e Use correct capitalisation 2023-03-17 05:59:15 +10:00
Nyall Dawson
95b47b7bf1 Allow overriding the distance and area units in algorithm settings 2023-03-17 05:59:15 +10:00
Nyall Dawson
e19840e71c [processing] Add Algorithm Settings option to Advanced button
Shows a panel allowing users to control general processing settings
which apply to that algorithm execution only. It's intended to be
a place where a user can override their global processing settings
on an ad-hoc basis without having to change their usual default
settings.

Currently contains only a setting for the invalid geometry handling
to apply to vector features. (Unlike the existing per-parameter setting
override for this, setting the handling method here will apply
to ALL inputs for the algorithm)
2023-03-17 05:59:15 +10:00
Nyall Dawson
7cd6b616b1 Allow processing dialog to override default processing context settings 2023-03-17 05:59:15 +10:00
Nyall Dawson
02647443e4 Show "Complete" message in progress bar after a processing algorithm
completes instead of "0%"
2023-03-16 21:23:03 +10:00
Nyall Dawson
603ccb2904 [processing] Gracefully handle algorithms with no provider set
Fixes #51971
2023-02-23 19:38:45 +10:00
Nyall Dawson
7b29e796ff [processing] Add json syntax option for encoding data defined parameter
values

Refs #50482
2023-01-16 19:07:48 +10:00
Nyall Dawson
092279e90d [feature] Run batch processing steps in tasks
Instead of forcing all steps in the batch processing dialog to execute
in the main thread, we now run each step as a separate task whenever
possible. This keeps the UI nice and responsive, and permits
responsive cancelation and progress reporting.

Individual steps are still run sequentially, not in parallel (yet!)
2022-03-15 11:44:08 +10:00
Nyall Dawson
e608ba2fc6 Fix warning 2022-02-02 15:50:03 +10:00
Benjamin Jakimow
28b7fd9841 fixes #46697
QgsProcessingAlgorithmDialogBase shows algorithm help
2022-01-07 11:27:51 +10:00
Nyall Dawson
dd25b2877f Revise warning message 2021-12-21 15:32:57 +10:00
Nyall Dawson
89ee6281a0 Fix indentation dance 2021-12-17 08:29:31 +10:00
Nyall Dawson
86e94aed42 [feature] Add action to processing algorithm advanced menu to copy the
current settings as JSON and paste json settings from clipboard

The utility of this is two fold:

1. It provides a way for users to copy the settings defined in the
dialog in a text format, so they can store these easily and then
restore later by pasting the value

2. It provides an easy way for users to copy the settings into
the json format consumed by qgis_process (following
https://github.com/qgis/QGIS/pull/46497), so that it is easy
for users to see the expected format even for complex parameters
(like tin interpolation parameters)
2021-12-17 08:29:31 +10:00
Nyall Dawson
b4cb7ba3d3 [feature] Add action in advanced menu for processing algorithm to copy
equivalent qgis_process command

Allows for easy generation of qgis_process commands via the QGIS gui
2021-12-17 08:29:31 +10:00
Nyall Dawson
1405ba1a8e [feature][processing] Add an advanced button to the toolbox algorithm
dialog, which contains an option to copy the equivalent Python
command as the parameters define in the dialog

While this command is also available from the history dialog, the
advanced button provides a way for users to generate these
commands WITHOUT actually having to run the algorithm in advance.

Sponsored by the Research Institute for Nature and Forest, Flemish Govt
2021-12-16 11:15:34 +10:00
Nyall Dawson
03d0c573c4 Add mode enum for processing algorithm dialogs so that code can
determine if the single execution or batch execution dialog is shown
2021-12-16 11:15:34 +10:00
Nyall Dawson
dae69acc76 [feature] Support Small Caps style in labels/text renderer
Adds two new capitalization styles for labels and text symbols:

- Small Caps: Renders lowercase characters as small caps
- All Small Caps: Renders all characters as small caps (regardless
of their original case)

Requires Qt 6.3+, or Qt 5.15 using KDE's fork and the cmake
HAS_KDE_QT5_SMALL_CAPS_FIX switch defined during build.
2021-11-08 14:36:44 +11:00
Nyall Dawson
19565032e3 const ALL the things
Use clang-tidy const correctness fixit to add const to all
variables which it can
2021-08-13 15:25:15 +10:00
Even Rouault
3dae95756e QgsProcessingAlgorithmDialogBase: limit number of info messages to avoid blowing RAM (fixes #44202) 2021-07-21 20:16:08 +10:00
Nyall Dawson
02266ef8e6 Rename Qgis::MessageLevel::None to NoLevel. None is a reserved
keyword in Python, so this value was previously inaccessible to PyQGIS
scripts

Also change all references to Qgis::MessageLevel values to their
fully qualified names, to ease a future transition to an enum
class (when sip bugs are fixed)

Fixes #42996
2021-05-30 10:36:01 +10:00
Nyall Dawson
c6370c7f52
Speed up QGIS compilation by removing all Qt Module-wide includes
Refs https://www.kdab.com/beware-of-qt-module-wide-includes/
2021-03-05 11:23:15 +10:00
Nyall Dawson
bd82925df3 Replace qgis::make_unique with std::make_unique
Now that we require c++14 features, we don't need to use the custom
backported version anymore...
2021-02-25 11:08:56 +10:00
Nyall Dawson
c8d61499ff [processing] Instead of a hidden parameter for verbose model logging,
add an explicit log level getter/setter to QgsProcessingContext which
algorithms can use to determine an appropriate level of feedback
to push to users.

Initially the verbose log only triggers the full verbose output
of model executions (which is also used when running models through
the model designer), but the intention is that more algorithms
will fine tune their output based on the logging level.

qgis_process also gains a new --verbose switch to enable verbose
log output.
2021-02-20 05:04:00 +10:00
nirvn
04b9c6ab00 [processing] Add a warning-level information message feedback 2020-12-07 14:15:35 +07:00
Nyall Dawson
13951b2be4 Make it easier to use the correct timeout for messages in message bars,
and ensure that correct timeouts are used for all created messages
2020-11-22 04:58:42 +10:00
Even Rouault
a76670e521 QStringLiteral -> QLatin1String changes generated by scripts/qstringfixup.sh --all 2020-10-11 12:30:58 +10:00
Nyall Dawson
965595d25b [processing] Fix certain characters show as HTML escaped in processing log
Fixes #37934
2020-09-17 16:38:34 +10:00
Nyall Dawson
251dec51e8 [processing] Correctly close algorithm dialog when escape key pressed
Fixes #36777
2020-05-29 18:31:01 +10:00