ui: graph transitions

This change adds animated transitions to the QtGraphView using sequential and parallel animations. First vanishing nodes
and all edges get faded out, then the remaining nodes are moved and resized, lastly new nodes and all edges are faded in.

fortune cookie message = Sorge dich nicht! Du wirst bekommen, was du brauchst.
This commit is contained in:
Eberhard Graether
2015-02-23 12:11:01 +01:00
parent 35867c17af
commit 4f7d31eb79
14 changed files with 426 additions and 65 deletions
+5 -2
View File
@@ -66,8 +66,11 @@ void QtGraphPostprocessor::doPostprocessing(std::list<std::shared_ptr<QtGraphNod
void QtGraphPostprocessor::allignNodeOnRaster(QtGraphNode* node)
{
Vec2i position = node->getPosition();
node->setPosition(alignOnRaster(node->getPosition()));
}
Vec2i QtGraphPostprocessor::alignOnRaster(Vec2i position)
{
int rasterPosDivisor = s_cellSize + s_cellPadding;
if(position.x % rasterPosDivisor != 0)
@@ -110,7 +113,7 @@ void QtGraphPostprocessor::allignNodeOnRaster(QtGraphNode* node)
position.y = t * rasterPosDivisor;
}
node->setPosition(position);
return position;
}
void QtGraphPostprocessor::resolveOutliers(std::list<std::shared_ptr<QtGraphNode>>& nodes, const Vec2i& centerPoint)