annotate src/changesetdetailitem.h @ 548:dca5bd5b2a06

Merge from branch "fswatcher"
author Chris Cannam
date Tue, 14 Feb 2012 17:55:39 +0000
parents 75003687f364
children 533519ebc0cb
rev   line source
Chris@117 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@117 2
Chris@117 3 /*
Chris@117 4 EasyMercurial
Chris@117 5
Chris@117 6 Based on HgExplorer by Jari Korhonen
Chris@117 7 Copyright (c) 2010 Jari Korhonen
Chris@244 8 Copyright (c) 2011 Chris Cannam
Chris@244 9 Copyright (c) 2011 Queen Mary, University of London
Chris@117 10
Chris@117 11 This program is free software; you can redistribute it and/or
Chris@117 12 modify it under the terms of the GNU General Public License as
Chris@117 13 published by the Free Software Foundation; either version 2 of the
Chris@117 14 License, or (at your option) any later version. See the file
Chris@117 15 COPYING included with this distribution for more information.
Chris@117 16 */
Chris@117 17
Chris@117 18 #ifndef CHANGESETDETAILITEM_H
Chris@117 19 #define CHANGESETDETAILITEM_H
Chris@117 20
Chris@117 21 #include <QGraphicsItem>
Chris@117 22 #include <QFont>
Chris@117 23
Chris@117 24 class Changeset;
Chris@117 25
Chris@117 26 class ChangesetDetailItem : public QGraphicsItem
Chris@117 27 {
Chris@117 28 public:
Chris@117 29 ChangesetDetailItem(Changeset *cs);
Chris@118 30 virtual ~ChangesetDetailItem();
Chris@117 31
Chris@117 32 virtual QRectF boundingRect() const;
Chris@117 33 virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
Chris@117 34
Chris@117 35 Changeset *getChangeset() { return m_changeset; }
Chris@117 36
Chris@117 37 private:
Chris@117 38 QFont m_font;
Chris@117 39 Changeset *m_changeset;
Chris@118 40 QTextDocument *m_doc;
Chris@118 41
Chris@402 42 QVariant itemChange(GraphicsItemChange, const QVariant &);
Chris@402 43
Chris@118 44 void makeDocument();
Chris@117 45 };
Chris@117 46
Chris@117 47 #endif // CHANGESETDETAILITEM_H