ui: improved graph view layouting and bundling

* move top and bottom layout buckets closer to center buckets
* split undefined bundles into users and usees
* acknowledge zoom for graph view size in layouting
* bundle all referencing nodes
* fixed bundle node and bundle edge count
This commit is contained in:
Eberhard Graether
2016-02-04 16:15:01 +01:00
parent 5c49eaf293
commit acce0477b4
7 changed files with 216 additions and 22 deletions
+4 -2
View File
@@ -126,7 +126,9 @@ void QtGraphView::resizeView()
Vec2i QtGraphView::getViewSize() const
{
QGraphicsView* view = getView();
return Vec2i(view->width(), view->height());
float zoomFactor = GraphViewStyle::getZoomFactor();
return Vec2i(view->width() / zoomFactor - 80, view->height() / zoomFactor - 80);
}
void QtGraphView::centerScrollBars()
@@ -337,7 +339,7 @@ std::shared_ptr<QtGraphNode> QtGraphView::createNodeRecursive(
}
else if (node.isBundleNode())
{
newNode = std::make_shared<QtGraphNodeBundle>(node.tokenId, node.bundledNodes.size(), node.name);
newNode = std::make_shared<QtGraphNodeBundle>(node.tokenId, node.getBundledNodeCount(), node.name);
}
newNode->setPosition(node.position);