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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user