-
Notifications
You must be signed in to change notification settings - Fork 937
Add Connection Created/Destroyed slots to NodeDataModel #175
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 Connection Created/Destroyed slots to NodeDataModel #175
Conversation
|
AppVeyor is failing. Qt 5.7 no longer exists in appveyor, and it looks like it would be a good idea to specify a build worker image. |
src/FlowScene.cpp
Outdated
| connect(this, &FlowScene::connectionCreated, this, [this](Connection const& c) { setupConnectionSignals(c); }); | ||
|
|
||
| connect(this, &FlowScene::connectionCreated, this, [this](Connection const& c) { sendConnectionCreatedToNodes(c); }); | ||
| connect(this, &FlowScene::connectionDeleted, this, [this](Connection const& c) { sendConnectionDeletedToNodes(c); }); |
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.
Using a lambda instead of
connect(this, &FlowScene::connectionDeleted, this, &FlowScene::sendConnectionDeletedToNodes);The latter works just fine, except the minimal version of Qt we support is 5.2, and there's a bug where it rejects this code (it has a failing static-assertion which is a false positive). If we were willing to up the minimal version of Qt (idk what version it'd be though), this can be simplified
|
Cleaned-up, rebased, squashed and merged as #211 |
paceholder#211) Add signal for embedded widget size changes (paceholder#187) Fix paceholder paceholder#198 Avoid connecting nodes causing a loop Refactoring. Removed an odd "using". Fixed build errors: https://ci.appveyor.com/project/paceholder/nodeeditor/builds/22024775/job/eihd7371k7eo3pn6 Added the example of dynamic node change. Added the signals when ports are added or removed. Fix out of range exception when loading dynamic port nodes
Addresses #174
This adds the following virtual functions to
NodeDataModel:inputConnectionCreated(Connection const&)inputConnectionDeleted(Connection const&)outputConnectionCreated(Connection const&)outputConnectionDeleted(Connection const&)It might be more consistent to just have
connectionCreated(PortType, Connection const&), instead ofinputConnectionCreatedandoutputConnectionCreated, but I believe having them as separate functions is the better approach