forked from wtr9987/gvtree
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfromtoinfo.h
56 lines (47 loc) · 1.65 KB
/
fromtoinfo.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/* --------------------------------------------- */
/* */
/* Copyright (C) 2021 Wolfgang Trummer */
/* Contact: [email protected] */
/* */
/* gvtree V1.8-0 */
/* */
/* git version tree browser */
/* */
/* 28. December 2021 */
/* */
/* This program is licensed under */
/* GNU GENERAL PUBLIC LICENSE */
/* Version 3, 29 June 2007 */
/* */
/* --------------------------------------------- */
#ifndef __FROMTOINFO_H__
#define __FROMTOINFO_H__
#include <QGraphicsItem>
#include <QWidget>
#include <QString>
#include <QRectF>
#include "version.h"
/**
* \brief This graphics item is a markup for all versions which are displayed in the CompareTree.
*/
class FromToInfo : public QGraphicsItem
{
public:
FromToInfo(class GraphWidget* _graph, QGraphicsItem* _parent=NULL);
enum {Type = UserType + 4};
int type() const
{
return Type;
}
virtual QRectF boundingRect() const;
void setFromToPosition(QSet<Version*> _from, Version* _v);
virtual void update(const QRectF & rect = QRectF());
protected:
virtual void paint(QPainter* _painter, const QStyleOptionGraphicsItem* _option, QWidget* _widget);
private:
QRectF box;
QSet<Version*> from;
Version* v;
class GraphWidget* graph;
};
#endif