diff connectionitem.h @ 46:bd3accba9b3f

* Better layout for branches; spline connection paths
author Chris Cannam
date Wed, 10 Nov 2010 17:11:41 +0000
parents
children 3c46b2ac45d3
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionitem.h	Wed Nov 10 17:11:41 2010 +0000
@@ -0,0 +1,31 @@
+#ifndef CONNECTIONITEM_H
+#define CONNECTIONITEM_H
+
+#include <QGraphicsItem>
+
+class Connection;
+
+class ChangesetItem;
+
+class ConnectionItem : public QGraphicsItem
+{
+public:
+    ConnectionItem() : m_parent(0), m_child(0) { }
+
+    virtual QRectF boundingRect() const;
+    virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
+
+    //!!! deletion signals from parent/child
+
+    ChangesetItem *parent() { return m_parent; }
+    ChangesetItem *child() { return m_child; }
+
+    void setParent(ChangesetItem *p) { m_parent = p; }
+    void setChild(ChangesetItem *c) { m_child = c; }
+
+private:
+    ChangesetItem *m_parent;
+    ChangesetItem *m_child;
+};
+
+#endif // CONNECTIONITEM_H