Select Git revision
-
* fix: Docker config + documentation * Revert "review: test code, not dead code" This reverts commit 922df964. * review: test code, not dead code * review: iodiomatic usage of stream * review: add --public-endpoints option * review: spawn_handle + BoundedVec * fix: metadata.scale * fix: warnings * fix: node was no more starting * clippy (again) * clippy * feat(#97): add RPC endpoint + gossip protocol for peerings
* fix: Docker config + documentation * Revert "review: test code, not dead code" This reverts commit 922df964. * review: test code, not dead code * review: iodiomatic usage of stream * review: add --public-endpoints option * review: spawn_handle + BoundedVec * fix: metadata.scale * fix: warnings * fix: node was no more starting * clippy (again) * clippy * feat(#97): add RPC endpoint + gossip protocol for peerings
edge.py 912 B
from PyQt5.QtWidgets import QGraphicsLineItem
from PyQt5.QtCore import Qt, QPointF
class BaseEdge(QGraphicsLineItem):
def __init__(self, source_node, destination_node, metadata, nx_pos):
"""
Create an arc between two nodes
:param str source_node: Source node id of the arc
:param str destination_node: Destination node id of the arc
:param dict metadata: Edge metadata
:param dict nx_pos: The position generated by nx_graph
"""
super().__init__()
self.metadata = metadata
self.source = source_node
self.destination = destination_node
self.status = self.metadata['status']
self.source_point = QPointF(nx_pos[self.source][0], nx_pos[self.source][1])
self.destination_point = QPointF(nx_pos[self.destination][0], nx_pos[self.destination][1])
self.setAcceptedMouseButtons(Qt.NoButton)