Mercurial > hg > easyhg
annotate changesetitem.h @ 53:3c46b2ac45d3
* Put proper labels &c in changeset items; colour branches and users; etc
author | Chris Cannam |
---|---|
date | Fri, 12 Nov 2010 16:48:18 +0000 |
parents | bd3accba9b3f |
children | 261bfb9481fe |
rev | line source |
---|---|
Chris@43 | 1 #ifndef CHANGESETITEM_H |
Chris@43 | 2 #define CHANGESETITEM_H |
Chris@43 | 3 |
Chris@43 | 4 #include <QGraphicsItem> |
Chris@53 | 5 #include <QFont> |
Chris@43 | 6 |
Chris@43 | 7 class Changeset; |
Chris@43 | 8 |
Chris@43 | 9 class ChangesetItem : public QGraphicsItem |
Chris@43 | 10 { |
Chris@43 | 11 public: |
Chris@53 | 12 ChangesetItem(Changeset *cs); |
Chris@43 | 13 |
Chris@43 | 14 virtual QRectF boundingRect() const; |
Chris@43 | 15 virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *); |
Chris@43 | 16 |
Chris@53 | 17 Changeset *getChangeset() { return m_changeset; } |
Chris@53 | 18 |
Chris@44 | 19 int column() const { return m_column; } |
Chris@44 | 20 int row() const { return m_row; } |
Chris@46 | 21 void setColumn(int c) { m_column = c; setX(c * 100); } |
Chris@53 | 22 void setRow(int r) { m_row = r; setY(r * 90); } |
Chris@44 | 23 |
Chris@43 | 24 private: |
Chris@53 | 25 QFont m_font; |
Chris@43 | 26 Changeset *m_changeset; |
Chris@44 | 27 int m_column; |
Chris@44 | 28 int m_row; |
Chris@43 | 29 }; |
Chris@43 | 30 |
Chris@43 | 31 #endif // CHANGESETITEM_H |