| 98 | #endif |
| 99 | |
| 100 | static |
| 101 | void |
| 102 | drawSketchLine(QPainter * painter, |
| 103 | Connection const & connection) |
| 104 | { |
| 105 | using QtNodes::ConnectionState; |
| 106 | |
| 107 | ConnectionState const& state = |
| 108 | connection.connectionState(); |
| 109 | |
| 110 | if (state.requiresPort()) |
| 111 | { |
| 112 | auto const & connectionStyle = connection.style(); |
| 113 | |
| 114 | QPen p; |
| 115 | p.setWidth(connectionStyle.constructionLineWidth()); |
| 116 | p.setColor(connectionStyle.constructionColor()); |
| 117 | p.setStyle(Qt::DashLine); |
| 118 | |
| 119 | painter->setPen(p); |
| 120 | painter->setBrush(Qt::NoBrush); |
| 121 | |
| 122 | using QtNodes::ConnectionGeometry; |
| 123 | ConnectionGeometry const& geom = connection.connectionGeometry(); |
| 124 | |
| 125 | auto cubic = cubicPath(geom); |
| 126 | // cubic spline |
| 127 | painter->drawPath(cubic); |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | static |
| 132 | void |
no test coverage detected