2222
2323class PIPE_STYLING (Enum ):
2424 """
25- Pipe Constant.
25+ Pipe styling layout:
26+ ``NodeGraphQt.constants.PIPE_STYLING``
2627 """
27- #: pipe width.
28+ #: default width.
2829 WIDTH = 1.2
2930 #: default color.
3031 COLOR = (175 , 95 , 30 , 255 )
3132 #: pipe color to a node when it's disabled.
3233 DISABLED_COLOR = (190 , 20 , 20 , 255 )
33- #: color when the pipe is selected or mouse hovered .
34+ #: pipe color when selected or mouse over .
3435 ACTIVE_COLOR = (70 , 255 , 220 , 255 )
3536 #: pipe color to a node when it's selected.
3637 HIGHLIGHT_COLOR = (232 , 184 , 13 , 255 )
@@ -44,41 +45,63 @@ class PIPE_STYLING(Enum):
4445
4546class PIPE_SLICER_STYLING (Enum ):
4647 """
47- Slicer Pipe Constant.
48+ Slicer Pipe styling layout:
49+ ``NodeGraphQt.constants.PIPE_SLICER_STYLING``
4850 """
49- #: pipe width.
51+ #: default width.
5052 WIDTH = 1.5
5153 #: default color.
5254 COLOR = (255 , 50 , 75 )
5355
5456
5557class PIPE_LAYOUT (Enum ):
5658 """
57- Pipe layout constant.
59+ Pipe connection drawing layout:
60+ ``NodeGraphQt.constants.PIPE_LAYOUT``
5861 """
59- #: draw the connection pipes as straight lines .
62+ #: draw straight lines for pipe connections .
6063 STRAIGHT = 0
61- #: draw the connection pipes as curved lines .
64+ #: draw curved lines for pipe connections .
6265 CURVED = 1
63- #: draw the connection pipes as angled lines .
66+ #: draw angled lines for pipe connections .
6467 ANGLE = 2
6568
66-
6769# ==================================== PORT ====================================
6870
69- #: Connection type for input ports.
70- IN_PORT = 'in'
71- #: Connection type for output ports.
72- OUT_PORT = 'out'
73-
74- PORT_DEFAULT_SIZE = 22.0
75- PORT_DEFAULT_COLOR = (49 , 115 , 100 , 255 )
76- PORT_DEFAULT_BORDER_COLOR = (29 , 202 , 151 , 255 )
77- PORT_ACTIVE_COLOR = (14 , 45 , 59 , 255 )
78- PORT_ACTIVE_BORDER_COLOR = (107 , 166 , 193 , 255 )
79- PORT_HOVER_COLOR = (17 , 43 , 82 , 255 )
80- PORT_HOVER_BORDER_COLOR = (136 , 255 , 35 , 255 )
81- PORT_FALLOFF = 15.0
71+
72+ class PORT_STYLING (Enum ):
73+ """
74+ Port styling layout:
75+ ``NodeGraphQt.constants.PORT_STYLING``
76+ """
77+ #: default port size.
78+ SIZE = 22.0
79+ #: default port color. (r, g, b, a)
80+ COLOR = (49 , 115 , 100 , 255 )
81+ #: default port border color.
82+ BORDER_COLOR = (29 , 202 , 151 , 255 )
83+ #: port color when selected.
84+ ACTIVE_COLOR = (14 , 45 , 59 , 255 )
85+ #: port border color when selected.
86+ ACTIVE_BORDER_COLOR = (107 , 166 , 193 , 255 )
87+ #: port color on mouse over.
88+ HOVER_COLOR = (17 , 43 , 82 , 255 )
89+ #: port border color on mouse over.
90+ HOVER_BORDER_COLOR = (136 , 255 , 35 , 255 )
91+ #: threshold for selecting a port.
92+ CLICK_FALLOFF = 15.0
93+
94+
95+ class PORT_TYPE (Enum ):
96+ """
97+ Port connection types:
98+ ``NodeGraphQt.constants.PORT_TYPE``
99+ """
100+ #: Connection type for input ports.
101+ IN = 'in'
102+ #: Connection type for output ports.
103+ OUT = 'out'
104+
82105
83106# ==================================== NODE ====================================
84107
0 commit comments