103 Commits

Author SHA1 Message Date
Denis Rouzaud
0f032e5f2d run pre-commit on all files 2024-11-29 15:38:02 +01:00
Nyall Dawson
e42abf7dc5 Update python files 2024-01-22 05:46:15 +10:00
Nyall Dawson
c16a1e2b3d Update enums 2024-01-19 19:44:48 +10:00
Etienne Trimaille
3cab3c43a2
Python - Run pyupgrade on the processing plugin 2023-04-24 10:03:57 +02:00
Nyall Dawson
dd89f3779a [processing] Always use the same method to launder names
Ultimately avoids forced removal of _ characters in model
parameter names
2022-03-30 15:41:23 +10:00
Nyall Dawson
5df4882380 Fix exception when editing outputs in models 2022-02-28 19:57:15 +10:00
Nyall Dawson
817895d6d3 [processing] When an input parameter is renamed in the model designer,
also update the internal name of that parameter and all child algorithms
in the model accordingly

Before we just "faked" this by changing the parameter's description
only, but that meant that the old name was permenantly stuck and
had to be used in qgis_process or when calling the model via
python.
2022-02-28 17:33:19 +10:00
Nyall Dawson
d899da1ed2 [processing] Fix issues with edits to model outputs getting discarded
Specifically, this fixes two issues

1. If a user edits a dark green output block in a model and changes the
name of the output, that new name was always discarded and the only
way to change it was by editing the algorithm it was attached to

2. If an output was renamed through the algorithm properties dialog,
then any properties previously associated with that output (like
comments, coloring, placement, default value, mandatory flag)
would get reset back to their default settings
2022-02-07 10:04:00 +10:00
Nyall Dawson
814b65ba1c Cleaner approach -- create expression contexts in modeler parameter
definition dialogs using expression context and processing context
generators
2021-01-14 16:15:06 +10:00
Juergen E. Fischer
067e9254e7 translation string fixes 2020-04-24 16:30:45 +02:00
Nyall Dawson
2dc07ee8f7 [processing] Show warnings in model designer message bar if algorithm
definition is incomplete/invalid after editing a child algorithm
2020-04-14 20:27:21 +10:00
Nyall Dawson
e788be93fa [processing][FEATURE] Add api for setting model component colors, and expose
the option to set manual colors for individual model comments
2020-04-01 18:20:09 +10:00
Nyall Dawson
ef4344b674 Default to current layer when appropriate 2020-03-29 05:56:23 +10:00
Nyall Dawson
e7b5c26696 [FEATURE][processing] Add undo/redo support to model designer
Makes QGIS more forgiving for users!

Sponsored by NRCan
2020-03-11 08:39:54 +10:00
Nyall Dawson
23aa83c23e Add unit tests, minor fixes 2020-03-06 03:49:16 +10:00
Nyall Dawson
64868ce8f2 Bit more Python to c++ porting 2020-03-06 03:49:16 +10:00
Nyall Dawson
0af98f9f5b Nicer comment text appearance 2020-03-06 03:49:16 +10:00
Nyall Dawson
961557dacd UX improvements for comment editing 2020-03-06 03:49:16 +10:00
Nyall Dawson
03fc03355d Don't lose properties of existing outputs when editing algorithm 2020-03-06 03:49:16 +10:00
Nyall Dawson
13fc85d740 [FEATURE][processsing] Add support for comments attached to components
This allows users to create comments attached to model components (inputs,
algorithms or outputs). Comments are shown linked to the associated component,
and can be freely moved around the model.
2020-03-06 03:49:16 +10:00
Nyall Dawson
d8eb0efc06 Add missing changed signal emissions 2020-03-05 18:55:20 +10:00
Nyall Dawson
7d0b476fa7 Move almost all the remaining Python code for model graphic items to c++
Only minimal shells of objects are left in Python now, the bare minimum
required because they call objects which depend on Python compatibility
for deprecated API calls...
2020-03-04 07:19:00 +10:00
Nyall Dawson
d80bdd3371 Move last part of ModelerGraphicItem to c++, generalize handling of
folding buttons
2020-03-04 07:19:00 +10:00
Nyall Dawson
b9edcbd162 Move responsibility for painting model components to c++ 2020-03-04 07:19:00 +10:00
Nyall Dawson
d34c01350f Port model arrow item to c++ 2020-03-03 16:08:23 +10:00
Nyall Dawson
b624d3d5d6 Move logic for calculation of linkage points for model items to C++ 2020-03-03 16:08:23 +10:00
Nyall Dawson
a38f0cbbd4 Move another method to c++ 2020-03-02 18:53:31 +10:00
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
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
Nyall Dawson
10d6a8a122 [processing][API] Add API to QgsProcessingGuiRegistry and QgsProcessingParameterWidgetFactoryInterface
to handle creation of parameter definition widgets

Previously, these configuration widgets were all hardcoded into the Python modeler
dialog. This prevented 3rd party, plugin provided, parameters from ever being full
first class citizens in QGIS, as there was no way to allow their use as inputs to
user created models to be customised.

Now, the registry is responsible for creating the configuration widget, allowing
for 3rd party parameter types to provide their own customised configuration
widgets.

Refs #26493
2019-07-01 17:01:34 +10:00
Bas Couwenberg
2628c480c5 Don't include revision in sources.
Prevent changes to files that weren't changed between releases.
This eases review of the changes between releases significantly.
2019-05-17 16:47:47 +02:00
Nyall Dawson
dab4a04309 [processing] Draw arrows connected to selected/hovered components
slightly darker

Makes it easier to track connections in a complex model
2019-03-01 15:39:49 +10:00
Nyall Dawson
2178e1a71a [processing] Pre-highlight model components on hover 2019-03-01 15:39:49 +10:00
Nyall Dawson
93de4d15a6 [processing] Show tooltips in modeler when hovering over model component 2019-03-01 15:39:49 +10:00
Mathieu Pellerin
6957009f8b [themes] Fix the processing modeler's rendering on dark backgrounds 2019-01-15 12:24:50 +07:00
arnaud.morvan@camptocamp.com
81dabd185c [processing] Finish default values in model for destination parameters 2018-05-14 22:12:32 +10:00