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
+7 -1
View File
@@ -3,6 +3,8 @@
#include "component/view/GraphView.h"
class QGraphicsView;
class QtGraphView : public GraphView
{
public:
@@ -13,7 +15,11 @@ public:
virtual void createWidgetWrapper();
virtual void initGui();
virtual void addNode(const Vec2i& position, const std::string& name);
virtual std::weak_ptr<GraphNode> addNode(const Vec2i& position, const std::string& name);
virtual void addEdge(const std::weak_ptr<GraphNode>& owner, const std::weak_ptr<GraphNode>& target);
private:
QGraphicsView* getView();
};
#endif // QT_GRAPH_VIEW_H