diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dateitem.h	Fri Nov 12 16:48:18 2010 +0000
@@ -0,0 +1,34 @@
+#ifndef DATEITEM_H
+#define DATEITEM_H
+
+#include <QGraphicsRectItem>
+
+class DateItem : public QGraphicsItem
+{
+public:
+    DateItem() :
+	m_minrow(0), m_maxrow(0),
+	m_mincol(0), m_maxcol(0),
+	m_even(false) {}
+
+    virtual QRectF boundingRect() const;
+    virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
+
+    void setRows(int minrow, int n);
+    void setCols(int mincol, int n);
+
+    void setEven(bool e) { m_even = e; }
+
+    QString dateString() const { return m_dateString; }
+    void setDateString(QString s) { m_dateString = s; }
+
+private:
+    QString m_dateString;
+    int m_minrow;
+    int m_maxrow;
+    int m_mincol;
+    int m_maxcol;
+    bool m_even;
+};
+
+#endif // DATEITEM_H