Skip to content
Snippets Groups Projects
Select Git revision
  • e0ea2c8cc2d348242e1eeedfeff9eac68c10ea5d
  • master default protected
  • issue_4
  • issue_780
  • gitlab_migration_1
  • dev
  • rml8
  • v1.3.11
  • v1.3.10
  • v1.3.9
  • v1.3.8
  • v1.3.7
  • v1.3.6
  • v1.3.5
  • v1.3.4
  • v1.3.3
  • v1.3.2
  • v1.3.1
  • v1.3.0
  • v1.2.10
  • v1.2.9
  • v1.2.8
  • v1.2.7
  • v1.2.6
  • v1.2.5
  • v1.2.4
  • v1.2.3
27 results

config.js

Blame
  • Forked from clients / Cesium-grp / Cesium
    Source project has a limited visibility.
    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)