Mercurial > hg > easyhg
comparison dateitem.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 | |
children | f583e44d9d31 |
comparison
equal
deleted
inserted
replaced
52:384420567575 | 53:3c46b2ac45d3 |
---|---|
1 #ifndef DATEITEM_H | |
2 #define DATEITEM_H | |
3 | |
4 #include <QGraphicsRectItem> | |
5 | |
6 class DateItem : public QGraphicsItem | |
7 { | |
8 public: | |
9 DateItem() : | |
10 m_minrow(0), m_maxrow(0), | |
11 m_mincol(0), m_maxcol(0), | |
12 m_even(false) {} | |
13 | |
14 virtual QRectF boundingRect() const; | |
15 virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *); | |
16 | |
17 void setRows(int minrow, int n); | |
18 void setCols(int mincol, int n); | |
19 | |
20 void setEven(bool e) { m_even = e; } | |
21 | |
22 QString dateString() const { return m_dateString; } | |
23 void setDateString(QString s) { m_dateString = s; } | |
24 | |
25 private: | |
26 QString m_dateString; | |
27 int m_minrow; | |
28 int m_maxrow; | |
29 int m_mincol; | |
30 int m_maxcol; | |
31 bool m_even; | |
32 }; | |
33 | |
34 #endif // DATEITEM_H |