Mercurial > hg > easyhg
comparison 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 |
comparison
equal
deleted
inserted
replaced
43:c32067cd19f8 | 44:bed7ab59f62e |
---|---|
6 class Changeset; | 6 class Changeset; |
7 | 7 |
8 class ChangesetItem : public QGraphicsItem | 8 class ChangesetItem : public QGraphicsItem |
9 { | 9 { |
10 public: | 10 public: |
11 ChangesetItem(Changeset *cs) : m_changeset(cs) { } | 11 ChangesetItem(Changeset *cs) : m_changeset(cs), m_column(0), m_row(0) { } |
12 | 12 |
13 virtual QRectF boundingRect() const; | 13 virtual QRectF boundingRect() const; |
14 virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *); | 14 virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *); |
15 | 15 |
16 int column() const { return m_column; } | |
17 int row() const { return m_row; } | |
18 void setColumn(int c) { m_column = c; } | |
19 void setRow(int r) { m_row = r; } | |
20 | |
16 private: | 21 private: |
17 Changeset *m_changeset; | 22 Changeset *m_changeset; |
23 int m_column; | |
24 int m_row; | |
18 }; | 25 }; |
19 | 26 |
20 #endif // CHANGESETITEM_H | 27 #endif // CHANGESETITEM_H |