FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add Connection Created/Destroyed slots to NodeDataModel by Quincunx271 · Pull Request #175 · paceholder/nodeeditor · GitHub

Add Connection Created/Destroyed slots to NodeDataModel - #175

Closed
Quincunx271 wants to merge 18 commits into
paceholder:masterfrom
Quincunx271:model-connection-add-remove-slots
Closed

Quincunx271 wants to merge 18 commits into
paceholder:masterfrom
Quincunx271:model-connection-add-remove-slots

Conversation

Copy link
Copy Markdown
Contributor

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 of inputConnectionCreated and outputConnectionCreated, but I believe having them as separate functions is the better approach

Quincunx271 commented May 17, 2018
edited
Loading

Copy link
Copy Markdown
Contributor Author

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.

https://www.appveyor.com/docs/build-environment/#qt

Comment thread 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); });

Quincunx271 May 18, 2018
edited
Loading

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

Copy link
Copy Markdown
Owner

Cleaned-up, rebased, squashed and merged as #211
Thank you!

paceholder closed this Feb 10, 2019
Quincunx271 deleted the model-connection-add-remove-slots branch February 22, 2019 20:45
Daguerreo pushed a commit to Daguerreo/NodeEditor that referenced this pull request Aug 13, 2020
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL