def establish_connection(self, start_port, end_port): """ establish a new pipe connection. """ pipe = Pipe() self.scene().addItem(pipe) pipe.set_connections(start_port, end_port) pipe.draw_path(pipe.input_port, pipe.output_port)
def establish_connection(self, start_port, end_port): """ establish a new pipe connection. (adds a new pipe item to draw between 2 ports) """ pipe = Pipe() self.scene().addItem(pipe) pipe.set_connections(start_port, end_port) pipe.draw_path(pipe.input_port, pipe.output_port) if start_port.node.selected or end_port.node.selected: pipe.highlight()