comparison 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
comparison
equal deleted inserted replaced
45:4286836bb3c9 46:bd3accba9b3f
1 #ifndef CONNECTIONITEM_H
2 #define CONNECTIONITEM_H
3
4 #include <QGraphicsItem>
5
6 class Connection;
7
8 class ChangesetItem;
9
10 class ConnectionItem : public QGraphicsItem
11 {
12 public:
13 ConnectionItem() : m_parent(0), m_child(0) { }
14
15 virtual QRectF boundingRect() const;
16 virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
17
18 //!!! deletion signals from parent/child
19
20 ChangesetItem *parent() { return m_parent; }
21 ChangesetItem *child() { return m_child; }
22
23 void setParent(ChangesetItem *p) { m_parent = p; }
24 void setChild(ChangesetItem *c) { m_child = c; }
25
26 private:
27 ChangesetItem *m_parent;
28 ChangesetItem *m_child;
29 };
30
31 #endif // CONNECTIONITEM_H