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