Skip to content

Conversation

@Quincunx271
Copy link
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
Copy link
Contributor Author

Quincunx271 commented May 17, 2018

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

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); });
Copy link
Contributor Author

@Quincunx271 Quincunx271 May 18, 2018

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

@paceholder
Copy link
Owner

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

@paceholder paceholder closed this Feb 10, 2019
@Quincunx271 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
Daguerreo pushed a commit to Daguerreo/NodeEditor that referenced this pull request Aug 13, 2020
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
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