Mercurial > hg > easyhg
diff src/changesetscene.h @ 400:07eaf4e6003a
Merge from branch "item_appearance_adjustments"
author | Chris Cannam |
---|---|
date | Wed, 25 May 2011 14:59:09 +0100 |
parents | 61bde1f0ff0a |
children | 75003687f364 |
line wrap: on
line diff
--- a/src/changesetscene.h Tue May 24 13:29:27 2011 +0100 +++ b/src/changesetscene.h Wed May 25 14:59:09 2011 +0100 @@ -19,11 +19,11 @@ #define CHANGESETSCENE_H #include <QGraphicsScene> +#include <QMap> class ChangesetItem; class Changeset; class UncommittedItem; -class DateItem; class ChangesetScene : public QGraphicsScene { @@ -34,7 +34,20 @@ void addChangesetItem(ChangesetItem *item); void addUncommittedItem(UncommittedItem *item); - void addDateItem(DateItem *item); + + void addDateRange(QString label, int minrow, int nrows, bool even); + + struct DateRange { + QString label; + int minrow; + int nrows; + bool even; + }; + + typedef QMap<int, DateRange> DateRanges; // key is minrow + DateRanges getDateRanges() const { return m_dateRanges; } + + void itemAddCompleted(); // recalculate scene rect ChangesetItem *getItemById(QString id); // Slow: traversal required @@ -58,10 +71,13 @@ private slots: void changesetDetailShown(); void changesetDetailHidden(); - void dateItemClicked(); + +protected: + void drawBackground(QPainter *, const QRectF &); private: ChangesetItem *m_detailShown; + DateRanges m_dateRanges; }; #endif