Mercurial > hg > easyhg
annotate changesetitem.h @ 51:bf3ab0ffb559
* some preliminaries for thinking about use of date in row layout
author | Chris Cannam |
---|---|
date | Thu, 11 Nov 2010 22:27:24 +0000 |
parents | bd3accba9b3f |
children | 3c46b2ac45d3 |
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@46 | 18 void setColumn(int c) { m_column = c; setX(c * 100); } |
Chris@46 | 19 void setRow(int r) { m_row = r; setY(r * 100); } |
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 |