2 import QtQuick.Controls 2.15
3 import QtQuick.Shapes 1.15
9 property real startX: parent.startX
10 property real startY: parent.startY
11 property real endX: parent.endX
12 property real endY: parent.endY
13 property real mouseAreaWidth: style.connectionStrokeWidth
14 property string state: parent.state
15 property QtObject style: parent.style
17 property point fromPortPosition: parent.fromPortPosition
18 property point toPortPosition: parent.toPortPosition
20 containmentMask: shape
25 property real controlPoint1Distance: connectionShape.fromPortPosition.x * style.connectionControlPointDistance
26 property real controlPoint2Distance: connectionShape.toPortPosition.x * style.connectionControlPointDistance
28 property real normalizedPointerSize: toPortPosition.x * style.connectionPointerSize
30 property int relativeVerticalPosition: connectionShape.startY < connectionShape.endY ? 1 : -1
33 containsMode: Shape.FillContains
34 state: connectionShape.state
40 target: connectionPath
41 strokeColor: style.connectionStrokeFocusColor
42 strokeWidth: style.connectionStrokeFocusWidth
48 target: connectionPath
49 strokeColor: style.connectionStrokeHoverColor
50 strokeWidth: style.connectionStrokeHoverWidth
56 id: connectionMouseArea
58 property real mouseAreaShift: shape.relativeVerticalPosition * connectionShape.mouseAreaWidth
61 strokeColor:
"transparent"
62 fillColor:
"transparent"
64 startX: connectionShape.startX
65 startY: connectionShape.startY
68 x: connectionShape.startX - connectionMouseArea.mouseAreaShift
69 y: connectionShape.startY - connectionShape.mouseAreaWidth
72 x: connectionShape.endX - connectionMouseArea.mouseAreaShift
73 y: connectionShape.endY - connectionShape.mouseAreaWidth * connectionShape.toPortPosition.x
74 relativeControl1X: shape.controlPoint1Distance
75 control2X: x + shape.controlPoint2Distance
80 x: connectionShape.endX + connectionMouseArea.mouseAreaShift
81 y: connectionShape.endY + connectionShape.mouseAreaWidth * connectionShape.toPortPosition.x
84 x: connectionShape.startX + connectionMouseArea.mouseAreaShift
85 y: connectionShape.startY + connectionShape.mouseAreaWidth
87 relativeControl1X: shape.controlPoint2Distance
89 control2X: x + shape.controlPoint1Distance
92 x: connectionShape.startX
93 y: connectionShape.startY
100 strokeWidth: style.connectionStrokeWidth
101 strokeColor: style.connectionStrokeColor
102 fillColor:
"transparent"
104 startX: connectionShape.startX
105 startY: connectionShape.startY
108 x: connectionShape.endX
109 y: connectionShape.endY
110 relativeControl1X: shape.controlPoint1Distance
111 control2X: x + shape.controlPoint2Distance
116 relativeX: shape.normalizedPointerSize
117 relativeY: style.connectionPointerSize
120 relativeX: -shape.normalizedPointerSize
121 relativeY: -style.connectionPointerSize
124 relativeX: shape.normalizedPointerSize
125 relativeY: -style.connectionPointerSize
128 x: connectionShape.endX
129 y: connectionShape.endY
132 x: connectionShape.startX
133 y: connectionShape.startY
135 relativeControl1X: shape.controlPoint2Distance
137 control2X: x + shape.controlPoint1Distance