ui: graph view edges

Added simple edges to the graph view. Also fixed a memory leak source in QtMainWindow.

fortune cookie message = Good health will be with you.
This commit is contained in:
Manuel Dobusch
2014-07-04 14:11:09 +02:00
parent b1023ba4ac
commit 610aa2eb09
15 changed files with 290 additions and 23 deletions
+5 -2
View File
@@ -25,9 +25,12 @@ ComponentManager::~ComponentManager()
void ComponentManager::setup()
{
std::shared_ptr<Component> graphComponent = m_componentFactory->createGraphComponent();
GraphView* graphView = graphComponent->getView<GraphView>();
graphView->addNode(Vec2i(-100, -100), "foo");
graphView->addNode(Vec2i(50, 50), "bar");
std::weak_ptr<GraphNode> node0 = graphView->addNode(Vec2i(-50, -50), "foo");
graphView->addEdge(node0, graphView->addNode(Vec2i(100, 100), "bar"));
graphView->addEdge(node0, graphView->addNode(Vec2i(50, -50), "war production co-ordinating commitee"));
m_components.push_back(graphComponent);
std::shared_ptr<Component> codeComponent = m_componentFactory->createCodeComponent();