-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAllocationsGraph.h
69 lines (28 loc) · 927 Bytes
/
AllocationsGraph.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
57
58
59
60
61
62
63
64
65
// AllocationsGraph.h
// Declares the AllocationsGraph class representing a UI widget to display Allocation's children in a graph
#ifndef ALLOCATIONSGRAPH_H
#define ALLOCATIONSGRAPH_H
#include <memory>
#include <QWidget>
// fwd:
class Allocation;
typedef std::shared_ptr<Allocation> AllocationPtr;
class AllocationsGraph:
public QWidget
{
typedef QWidget Super;
Q_OBJECT
public:
explicit AllocationsGraph(QWidget * a_Parent = nullptr);
/** Sets the allocation whose children are visualised. */
void setAllocation(AllocationPtr a_Allocation);
signals:
public slots:
protected:
AllocationPtr m_Allocation;
// QWidget overrides:
virtual void paintEvent(QPaintEvent * a_Event) override;
/** Draws a single pie chart based on the specified Allocation's children. */
void drawChart(QPainter & a_Painter, QRect & a_Rect, AllocationPtr a_Allocation);
};
#endif // ALLOCATIONSGRAPH_H