def METHOD_NAME(self, painter, option, widget=None):
    painter.save()
    painter.setTransform(self.scene().data2scene * painter.transform())
    painter.setPen(self.penDotted)
    if self.mode == self.modeXPosition:
        painter.drawLine(QPointF(self.x + 0.5, 0), QPointF(self.x + 0.5, self._height))
    elif self.mode == self.modeYPosition:
        painter.drawLine(QPointF(0, self.y), QPointF(self.width, self.y))
    else:
        painter.drawLine(
            QPointF(self.x - 0.5 * self.brushSize - 3, self.y), QPointF(self.x - 0.5 * self.brushSize, self.y)
        )
        painter.drawLine(
            QPointF(self.x + 0.5 * self.brushSize, self.y), QPointF(self.x + 0.5 * self.brushSize + 3, self.y)
        )
        painter.drawLine(
            QPointF(self.x, self.y - 0.5 * self.brushSize - 3), QPointF(self.x, self.y - 0.5 * self.brushSize)
        )
        painter.drawLine(
            QPointF(self.x, self.y + 0.5 * self.brushSize), QPointF(self.x, self.y + 0.5 * self.brushSize + 3)
        )
        painter.setPen(self.penSolid)
        painter.drawEllipse(QPointF(self.x, self.y), 0.5 * self.brushSize, 0.5 * self.brushSize)
    painter.restore()