52 Commits

Author SHA1 Message Date
Nyall Dawson
3976e14ae8 Refine arrow API to allow control over whether arrows join to incoming or outgoing sides 2020-04-02 02:29:54 +10:00
Nyall Dawson
50b723ce7b [FEATURE][processing] Add menu to the Model Designer "View" menu
allowing users to zoom direct to any group box present in the model

Allows for simplified navigation of complex models
2020-04-01 18:20:09 +10:00
Nyall Dawson
4fa9083cf6 [FEATURE][processing] Allow creation of group boxes in models
These are a visual guide, allowing designers to create logical groups
of algorithms relating to a single task ("eg 'Prepare data')

The title and color of the group boxes can be customized
2020-04-01 18:20:09 +10:00
Nyall Dawson
f268b09d1b Also show child input values 2020-03-31 19:35:51 +10:00
Nyall Dawson
5963b90f2c [processing][FEATURE] After running a model through the model designer,
show the obtained values for all child algorithm outputs within the designer
canvas

This gives users better tools for debugging models - they can see exactly
what values were output by the child algorithms and flowed into other
parts of their model
2020-03-31 19:35:51 +10:00
Nyall Dawson
cb990c69c2 Setup framework for receiving model child results after running through model designer 2020-03-31 19:35:51 +10:00
Nyall Dawson
7bba9de2b9 Add a 'select all' action to model designer 2020-03-23 19:25:32 +10:00
Nyall Dawson
681d12e549 Tweak snapping logic, and add explicit action to "Snap Selected Components to Grid"
This is useful when a user doesn't want to enable the auto snapping, but wants to line
up stuff nicely by hand
2020-03-23 19:25:32 +10:00
Nyall Dawson
7614de451e [processing] Constrain model item resizing to prevent items being resized
to a too small size
2020-03-18 15:00:30 +10:00
Nyall Dawson
06e663eccd Pixel perfect model rendering 2020-03-17 19:40:01 +10:00
Nyall Dawson
fd65c2d05a Fix mouse handles go out of sync after moving items with cursor keys 2020-03-12 13:14:33 +10:00
Nyall Dawson
1e67ee42fa [FEATURE][processing] Add action to model designer to delete all selected components 2020-03-12 13:14:33 +10:00
Nyall Dawson
a82bd1decd Implement an ugly workaround due to QGraphicsScene lack of event
propagation
2020-03-12 13:14:33 +10:00
Nyall Dawson
4169c7bd68 Improved appearance of resized components 2020-03-12 13:14:33 +10:00
Nyall Dawson
3b61938e24 [FEATURE][processing] Allow interactive resizing of model components
Allows for components to be freely resized via the standard mouse controls
2020-03-12 13:14:33 +10:00
Nyall Dawson
d97f02420e Batch multi item move undo commands 2020-03-12 13:14:33 +10:00
Nyall Dawson
9044acd149 Start work on model designer mouse handles 2020-03-12 13:14:33 +10:00
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
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