Esempio n. 1
0
    def __init__(self, id, dicDotAttrs={}, x=0.0, y=0.0):
        self.id = id
        self.x = x
        self.y = y

        self.neighbours = {}
        self.dotAttrs = {}

        dictAttrs = dicDotAttrs.copy()
        dictAttrs[NodeDotAttrs.pos.value] = NodeDotPosUtils.formatPos(x, y)
        self.edit(dictAttrs)
Esempio n. 2
0
    def __init__(self, id, dicDotAttrs={}, x=0.0, y=0.0):
        self.id = id
        self.x = x
        self.y = y

        self.neighbours = {}
        self.dotAttrs = {}

        dictAttrs = dicDotAttrs.copy()
        dictAttrs[NodeDotAttrs.pos.value] = NodeDotPosUtils.formatPos(x, y)
        self.edit(dictAttrs)
Esempio n. 3
0
 def onEditPos(self):
     """Callback function when editing the pos."""
     self.graphicsGraphView.controller.onEditNode(
         self.id, {NodeDotAttrs.pos.value: NodeDotPosUtils.formatPos(self.x(), self.y())}
     )
Esempio n. 4
0
 def onEditPos(self):
     '''Callback function when editing the pos.'''
     self.graphicsGraphView.controller.onEditNode(self.id, {
         NodeDotAttrs.pos.value:
         NodeDotPosUtils.formatPos(self.x(), self.y())
     })