-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgplace.cpp
executable file
·113 lines (90 loc) · 1.41 KB
/
gplace.cpp
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#include "gplace.h"
std::list<gPlace*> glob_places;
gPlace::gPlace()
{
item = NULL;
txt = NULL;
brush = QBrush(Qt::yellow);
node = NULL;
}
gPlace::gPlace(unsigned m_ID)
{
ID = m_ID;
item = NULL;
txt = NULL;
brush = QBrush(Qt::yellow);
node = NULL;
}
gPlace::~gPlace()
{
delete item;
delete txt;
}
void gPlace::setX(qreal m_X)
{
X = m_X;
}
void gPlace::setY(qreal m_Y)
{
Y = m_Y;
}
qreal gPlace::x()
{
return X;
}
qreal gPlace::y()
{
return Y;
}
void gPlace::setID(unsigned m_ID)
{
ID = m_ID;
}
unsigned gPlace::id()
{
return ID;
}
void gPlace::setItem(QGraphicsEllipseItem *m_item)
{
item = m_item;
}
void gPlace::setBrushYellow()
{
brush.setColor(Qt::yellow);
}
void gPlace::setBrushGreen()
{
brush.setColor(Qt::green);
}
void gPlace::setText(QGraphicsTextItem *m_txt)
{
txt = m_txt;
}
void gPlace::setKeyText(QGraphicsTextItem *m_txt_key)
{
txt_key = m_txt_key;
}
QGraphicsEllipseItem *gPlace::getItem()
{
return item;
}
QBrush &gPlace::getBrush()
{
return brush;
}
QGraphicsTextItem *gPlace::getText()
{
return txt;
}
QGraphicsTextItem *gPlace::getKeyText()
{
return txt_key;
}
void gPlace::setFibNode(FibNodePtr m_node)
{
node = m_node;
}
FibNodePtr gPlace::getFibNode()
{
return node;
}