99 Commits

Author SHA1 Message Date
Nyall Dawson
b7b4ef232a Fix multi item moves, avoid unnecessary scene rebuilds 2020-03-12 13:14:33 +10:00
Nyall Dawson
e3f1c576a9 Snapping api work 2020-03-12 13:14:33 +10:00
Nyall Dawson
b22e669bbd Multi item selection work 2020-03-12 13:14:33 +10:00
Nyall Dawson
bb82c12791 [processing] Start re-working model designer to use view tools
Based heavily on the layout designer approach, which is working well..
2020-03-12 13:14:33 +10:00
Nyall Dawson
4dd598fbb5 Also warn for unsaved changes when opening a model through the model designer 2020-03-11 08:39:54 +10:00
Nyall Dawson
e9c594d388 Make Model Designer window title follow app conventions
Show unsaved changes via * prefix, show model name in title

Also less Python, more c++
2020-03-11 08:39:54 +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
0b3f7a58c1 Hookup toggle to hide comments from model designer 2020-03-06 18:22:49 +10:00
Nyall Dawson
08b47a496b Fix missing icon, less Python 2020-03-06 18:22:49 +10:00
Nyall Dawson
b84bf68dab Bit less Python 2020-03-06 18:22:49 +10:00
Nyall Dawson
8845b535c5 More c++ ports 2020-03-06 18:22:49 +10:00
Nyall Dawson
df7dd5ba90 More model dialog Python -> c++ ports 2020-03-06 18:22:49 +10:00
Nyall Dawson
a0e6a374eb Port some more model designer Python code to c++ 2020-03-06 18:22:49 +10:00
Nyall Dawson
eefd04cbc1 Start creation of a c++ base class for modeler dialog 2020-03-06 18:22:49 +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
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
70731d82d5 Port most of the remaining ModelerScene code to c++
ModelerScene is now a shell class, implementing the bare minimum
required for older Python API compatibility
2020-03-05 18:55:20 +10:00
Nyall Dawson
9ba699ee1c Port more of modeler scene to c++ 2020-03-05 18:55:20 +10:00
Nyall Dawson
5c44441cd3 Move some modeler scene code to c++, avoid hard link between scene
and dialog
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
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
62c9583004 Fix build 2020-03-02 18:53:31 +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
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
70ee385f4a [processing] Add message bar to widget context 2020-01-05 08:59:38 +10:00
luz.paz
604e66ba75 sipify_all 2019-07-16 11:29:42 +10:00
Nyall Dawson
7833162ca0 [processing] Fix occasional crash in Processing gui unit test cleanup 2019-07-11 10:36:59 +10:00
Nyall Dawson
164f6aec6b Spelling 2019-07-01 17:01:34 +10:00
Nyall Dawson
074c584c54 Don't allow name-less parameters 2019-07-01 17:01:34 +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
Nyall Dawson
fbd243be65 [processing] Port map layer selection combobox widget to c++
And:

- fix enable state of selected features only after changing between
map layers with/without selections
- fix state of selected features only when running an algorithm
from the history list, e.g. respect original setting for
selected features only (or not)
- ensure no duplicate changed signals are sent, and correctly
emit changed signals in all applicable circumstances
- handle drag and dropped layers from browser panel (UX fix)
- soak with unit tests
2019-06-15 15:05:48 +10:00
Nyall Dawson
719a225bca [processing] Port point widget wrapper to new API
And switch to a snapping canvas tool when selecting points from canvas
2019-03-17 16:19:40 +10:00
Nyall Dawson
5ec43cfdc1 [processing] Add project to QgsProcessingParameterWidgetContext 2019-03-12 08:16:52 +10:00
Nyall Dawson
cccf974211 [processing] Port enum widget wrapper to new API
Fixes:
- enum parameters set to "allow multiple" only allow a single
value selection when used in modeler
- optional enum parameters cannot be set to no value when
used outside of modeler

Fixes #20406
2019-03-08 15:46:59 +10:00
Nyall Dawson
63d648738d [processing][needs-docs] By default, hide algorithms with known issues from toolbox
And add a Processing setting to allow these to be shown. When shown, they
are highlighted in red with a tooltip explaining that the algorithm
has known issues
2019-03-06 06:33:06 +10:00
Nyall Dawson
107b48a430 Add NULLPTR macro for use in doxygen comments
For the c++ api dox this expands to "\c nullptr" (the
\c directive indicates a code literal value), and for sipify/Python
it expands to ``None`` (`` is sphinx annotation for literal values)

Makes for nicer dox for both c++ and Python!
2019-02-27 09:41:11 +10:00
Nyall Dawson
a7ca08784c Nullptr consistency in dox 2019-02-27 09:41:11 +10:00
Nyall Dawson
b6d66becab Sipify 2019-02-27 09:41:11 +10:00