forked from CEFgoose/GEM5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathunuploaded_functions.py
45 lines (39 loc) · 1.38 KB
/
unuploaded_functions.py
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
from PyQt5.QtWidgets import *
from PyQt5.QtGui import QColor
#---saves team name to var on change
def team_name_changed(main,value):
main.team_name=value
#---saves changes to unuploaded line width to var
def unup_linewidth_changed(main,value):
main.unup_line_width=value
#---saves changes to unuploaded node size to var
def unup_nodesize_changed(main,value):
main.unup_node_size=value
#---saves changes to unuploaded line color to var & repaints unuploaded line color preview
def unup_linecolor_changed(main):
color = QColorDialog.getColor()
clr = color.name()
colr = ""
for i in clr:
colr+= str(i)
if colr =="#000000":
pass
else:
main.unup_line_color_ui=QColor(color)
main.unup_line_color_text = colr
main.unupLineColorpix.fill(main.unup_line_color_ui)
main.unupLineColorPreview.setPixmap(main.unupLineColorpix)
#---saves changes to unuploaded node color to var & repaints unuploaded node color & shape previews
def unup_nodecolor_changed(main):
color = QColorDialog.getColor()
clr = color.name()
colr = ""
for i in clr:
colr+= str(i)
if colr =="#000000":
pass
else:
main.unup_node_color_ui=QColor(color)
main.unup_node_color_text = colr
main.unupNodeColorpix.fill(main.unup_node_color_ui)
main.unupNodeColorPreview.setPixmap(main.unupNodeColorpix)