annotate dateitem.h @ 131:2550aaa09240
* Add connecting line to uncommitted item; turn Revert icon blue; cut down menus to things that actually work (well, mostly)
author |
Chris Cannam |
date |
Tue, 30 Nov 2010 11:17:30 +0000 |
parents |
f583e44d9d31 |
children |
4bad3c5c053a |
rev |
line source |
Chris@57
|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
Chris@57
|
2
|
Chris@57
|
3 /*
|
Chris@57
|
4 EasyMercurial
|
Chris@57
|
5
|
Chris@57
|
6 Based on HgExplorer by Jari Korhonen
|
Chris@57
|
7 Copyright (c) 2010 Jari Korhonen
|
Chris@57
|
8 Copyright (c) 2010 Chris Cannam
|
Chris@57
|
9 Copyright (c) 2010 Queen Mary, University of London
|
Chris@57
|
10
|
Chris@57
|
11 This program is free software; you can redistribute it and/or
|
Chris@57
|
12 modify it under the terms of the GNU General Public License as
|
Chris@57
|
13 published by the Free Software Foundation; either version 2 of the
|
Chris@57
|
14 License, or (at your option) any later version. See the file
|
Chris@57
|
15 COPYING included with this distribution for more information.
|
Chris@57
|
16 */
|
Chris@57
|
17
|
Chris@53
|
18 #ifndef DATEITEM_H
|
Chris@53
|
19 #define DATEITEM_H
|
Chris@53
|
20
|
Chris@53
|
21 #include <QGraphicsRectItem>
|
Chris@53
|
22
|
Chris@53
|
23 class DateItem : public QGraphicsItem
|
Chris@53
|
24 {
|
Chris@53
|
25 public:
|
Chris@53
|
26 DateItem() :
|
Chris@53
|
27 m_minrow(0), m_maxrow(0),
|
Chris@53
|
28 m_mincol(0), m_maxcol(0),
|
Chris@53
|
29 m_even(false) {}
|
Chris@53
|
30
|
Chris@53
|
31 virtual QRectF boundingRect() const;
|
Chris@53
|
32 virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
|
Chris@53
|
33
|
Chris@53
|
34 void setRows(int minrow, int n);
|
Chris@53
|
35 void setCols(int mincol, int n);
|
Chris@53
|
36
|
Chris@53
|
37 void setEven(bool e) { m_even = e; }
|
Chris@53
|
38
|
Chris@53
|
39 QString dateString() const { return m_dateString; }
|
Chris@53
|
40 void setDateString(QString s) { m_dateString = s; }
|
Chris@53
|
41
|
Chris@53
|
42 private:
|
Chris@53
|
43 QString m_dateString;
|
Chris@53
|
44 int m_minrow;
|
Chris@53
|
45 int m_maxrow;
|
Chris@53
|
46 int m_mincol;
|
Chris@53
|
47 int m_maxcol;
|
Chris@53
|
48 bool m_even;
|
Chris@53
|
49 };
|
Chris@53
|
50
|
Chris@53
|
51 #endif // DATEITEM_H
|