Originally from http://algoholic.eu/qnodeseditor-qt-nodesports-based-data-processing-flow-editor/