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
@@ -0,0 +1,28 @@
#ifndef QT_GRAPH_EDGE_H
#define QT_GRAPH_EDGE_H
#include <memory>
#include "qgraphicsitem.h"
#include "component/view/graphElements/GraphEdge.h"
class GraphNode;
class QtGraphEdge:
public GraphEdge,
public QGraphicsLineItem
{
public:
QtGraphEdge(const std::weak_ptr<GraphNode>& owner, const std::weak_ptr<GraphNode>& target);
virtual ~QtGraphEdge();
virtual void ownerMoved();
virtual void targetMoved();
private:
std::weak_ptr<GraphNode> m_owner;
std::weak_ptr<GraphNode> m_target;
};
#endif // QT_GRAPH_EDGE_H