Mercurial > hg > easyhg
annotate changesetitem.h @ 44:bed7ab59f62e
* A snatched bit of work on graph layout
author | Chris Cannam |
---|---|
date | Tue, 09 Nov 2010 17:51:12 +0000 |
parents | c32067cd19f8 |
children | bd3accba9b3f |
rev | line source |
---|---|
Chris@43 | 1 #ifndef CHANGESETITEM_H |
Chris@43 | 2 #define CHANGESETITEM_H |
Chris@43 | 3 |
Chris@43 | 4 #include <QGraphicsItem> |
Chris@43 | 5 |
Chris@43 | 6 class Changeset; |
Chris@43 | 7 |
Chris@43 | 8 class ChangesetItem : public QGraphicsItem |
Chris@43 | 9 { |
Chris@43 | 10 public: |
Chris@44 | 11 ChangesetItem(Changeset *cs) : m_changeset(cs), m_column(0), m_row(0) { } |
Chris@43 | 12 |
Chris@43 | 13 virtual QRectF boundingRect() const; |
Chris@43 | 14 virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *); |
Chris@43 | 15 |
Chris@44 | 16 int column() const { return m_column; } |
Chris@44 | 17 int row() const { return m_row; } |
Chris@44 | 18 void setColumn(int c) { m_column = c; } |
Chris@44 | 19 void setRow(int r) { m_row = r; } |
Chris@44 | 20 |
Chris@43 | 21 private: |
Chris@43 | 22 Changeset *m_changeset; |
Chris@44 | 23 int m_column; |
Chris@44 | 24 int m_row; |
Chris@43 | 25 }; |
Chris@43 | 26 |
Chris@43 | 27 #endif // CHANGESETITEM_H |