Mercurial > hg > easyhg
view changesetitem.h @ 46:bd3accba9b3f
* Better layout for branches; spline connection paths
author | Chris Cannam |
---|---|
date | Wed, 10 Nov 2010 17:11:41 +0000 |
parents | bed7ab59f62e |
children | 3c46b2ac45d3 |
line wrap: on
line source
#ifndef CHANGESETITEM_H #define CHANGESETITEM_H #include <QGraphicsItem> class Changeset; class ChangesetItem : public QGraphicsItem { public: ChangesetItem(Changeset *cs) : m_changeset(cs), m_column(0), m_row(0) { } virtual QRectF boundingRect() const; virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *); int column() const { return m_column; } int row() const { return m_row; } void setColumn(int c) { m_column = c; setX(c * 100); } void setRow(int r) { m_row = r; setY(r * 100); } private: Changeset *m_changeset; int m_column; int m_row; }; #endif // CHANGESETITEM_H