示例#1
0
 def __init__(self, mode, flags=[], **kwargs):
     QGraphicsScene.__init__(self, 0, 0, 2*1280, 2*1024)
     self.pts = []
     self.curpts = []
     self.flags = flags
     proc_map = {'tricavity': (self.tricavity, [2,2,2]),
                 'ruler': (self.ruler, [2,2,2,2])}
     self.process_points, self.numpts = proc_map[mode]
     self.pts_left = self.numpts[:] # Shallow copy
     self.kwargs = kwargs
示例#2
0
 def __init__(self, mode, flags=[], **kwargs):
     QGraphicsScene.__init__(self, 0, 0, 2 * 1280, 2 * 1024)
     self.pts = []
     self.curpts = []
     self.flags = flags
     proc_map = {
         'tricavity': (self.tricavity, [2, 2, 2]),
         'ruler': (self.ruler, [2, 2, 2, 2])
     }
     self.process_points, self.numpts = proc_map[mode]
     self.pts_left = self.numpts[:]  # Shallow copy
     self.kwargs = kwargs
示例#3
0
    def __init__(self, parent=None):
        QGraphicsScene.__init__(self, parent)

        self.nodes = dict()
        self.edges = []