UI: GraphLayouting

Implemented graph layouting, hybrid approach using spectral and force based layouting

fortune cookie message = Giving credit where it's due ensures loyalty to you.
This commit is contained in:
Manuel
2015-01-29 15:47:02 +01:00
parent 016d692dda
commit a7eaeae432
23 changed files with 2003 additions and 11 deletions
+7
View File
@@ -1,10 +1,13 @@
#include "QtGraphView.h"
#include <iostream>
#include <QBoxLayout>
#include <QFrame>
#include <QGraphicsScene>
#include <QGraphicsView>
#include "qt/utility/QtGraphPostprocessor.h"
#include "qt/utility/utilityQt.h"
#include "qt/view/QtViewWidgetWrapper.h"
@@ -136,6 +139,8 @@ void QtGraphView::doRebuildGraph(
m_graph = graph;
}
QtGraphPostprocessor::doPostprocessing(m_nodes);
// Manually hover the items below the mouse cursor.
view->scene()->setSceneRect(view->scene()->itemsBoundingRect());
QPointF point = view->mapToScene(view->mapFromGlobal(QCursor::pos()));
@@ -148,6 +153,8 @@ void QtGraphView::doRebuildGraph(
node->hoverEnter();
}
}
m_graph = graph;
}
void QtGraphView::doClear()