def __init__(self, shape): QGraphicsLineItem.__init__(self) StMove.__init__(self, shape) self.allwaysshow = False self.path = QPainterPath() self.setFlag(QGraphicsItem.ItemIsSelectable, False) self.pen = QPen(QColor(50, 100, 255), 1, QtCore.Qt.SolidLine, QtCore.Qt.RoundCap, QtCore.Qt.RoundJoin) self.pen.setCosmetic(True) self.make_papath()
def plotAll(self, shapes): """ Instance is called by the Main Window after the defined file is loaded. It generates all ploting functionality. The parameters are generally used to scale or offset the base geometry (by Menu in GUI). """ for shape in shapes: shape.stmove = StMove(shape) # StMove.__init__(self, shape) self.shapes.append(shape)
def paint_shape(self, shape): shape.drawObject = self.makeShape(shape) # 1 object shape.stmove = StMove(shape) shape.drawStMove = self.makeStMove(shape.stmove) # 1 object shape.drawArrowsDirection = self.makeDirArrows(shape) # 2 objects
def __init__(self, shape): StMove.__init__(self, shape) self.allwaysshow = False