-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Add basic drag and drop support in the model designer #60664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add basic drag and drop support in the model designer #60664
Conversation
🪟 Windows buildsDownload Windows builds of this PR for testing. 🪟 Windows Qt6 buildsDownload Windows Qt6 builds of this PR for testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job! 👍
Please let me know when you have finished this work and the PR is not draft anymore, I would make a proper review.
Seems to be working on my side ? 2025-04-08.mp4I recall fixing something similar for algorithms, were you using the latest commit ? |
I adressed all the comments and should be ready for a final review @nyalldawson |
Hey @ValentinBuira , OK,my bad, you're right! Apologies for the false alarm, the error comes from a silly mistake of mine. |
…l., other we are stuck in an infinite loop
This PR was also impacted by #61528 so I had to add an extra check to make sure we properly return to the select tool |
Great work -- thanks for the responsive changes @ValentinBuira !! |
@ValentinBuira there's now a warning shown when opening the modeler - "signal not found in QgsModelGraphicsView". I also get a crash when attempting to unlink two components via drag. |
I'm looking into it thanks for the heads up |
@ValentinBuira A documentation ticket will be opened at https://github.com/qgis/QGIS-Documentation when this PR is merged. Please update the description (not the comments) with helpful description and screenshot to help the work from documentors. Thank you! |
@ValentinBuira |
This pull request has been tagged for the changelog.
You can edit the description. Format available for credits
Thank you! |
followup #60664 - Fix warning when open up the model (Qt: QObject::connect: signal not found in QgsModelGraphicsView )
Hi @nyalldawson #61758 was merged, can you confirm it fixed your issue ? |
Introduction
This PR add the new way to edit a model using a drag and drop interface. This is part of long waited improvements in the model designer capabilities.
The design is based of the Google Summer of code proposal I did last year, and that we discussed on the mailling list. Compared to the original proposal the UI looks more similar to the current modeler interface
I encourage anyone to open your existing models and give it a try !
Thanks to the Hauts-de-France region for sponsorising this work
How does it works ?
New sockets were added around each parameter and algorithm used in a model.
sockets.example.mp4
Those are interactive and are used to connect component between them. To connect component drag any output socket regardless of it's from a model parameter or a algorithm into an input socket. You can also remove a connection by dragging an edge out of the socket.
peek.drag.and.drop.mp4
Theses new capabilities have been added as part of the select/edit tool. No needs to switch to a new tool when you want to edit connection in your model.
This PR remain fully compatible with the previous user interface. When you connect sockets by drag and drop. The dialog used when opening an algorithm is updated as well.
retro.compatible.mp4