Beispiel #1
0
    def setView(self, view):
        self.alignementProcessState.setView(view)
        ####### CENTER DRAWING #######
        self.__centerRotation = QubPointDrawingMgr(view.canvas(), view.matrix())
        self.__centerRotation.setCanBeModify(False)
        target = QubCanvasTarget(view.canvas())
        self.__centerRotation.addDrawingObject(target)
        view.addDrawingMgr(self.__centerRotation)
        self.__centerRotation.setColor(qt.QColor("red"))

        ####### Help lines #######
        self.__helpLines = []
        for i in range(3):
            dMgr = QubPointDrawingMgr(view.canvas(), view.matrix())
            view.addDrawingMgr(dMgr)
            if self.alignementProcessState.verticalPhi():
                line = QubCanvasVLine(view.canvas())
            else:
                line = QubCanvasHLine(view.canvas())
            dMgr.addDrawingObject(line)
            if not i:
                dMgr.setCanBeModify(False)
                dMgr.setPen(qt.QPen(qt.Qt.red, 1, qt.Qt.DashLine))
            else:
                dMgr.setPen(qt.QPen(qt.Qt.red, 2))
                dMgr.setEndDrawCallBack(self.__helpLineMoved)
            self.__helpLines.append(dMgr)
Beispiel #2
0
    def setView(self, view):
        self.alignementProcessState.setView(view)
        ####### CENTER DRAWING #######
        self.__centerRotation = QubPointDrawingMgr(view.canvas(),
                                                   view.matrix())
        self.__centerRotation.setCanBeModify(False)
        target = QubCanvasTarget(view.canvas())
        self.__centerRotation.addDrawingObject(target)
        view.addDrawingMgr(self.__centerRotation)
        self.__centerRotation.setColor(qt.QColor("red"))

        ####### Help lines #######
        self.__helpLines = []
        for i in range(3):
            dMgr = QubPointDrawingMgr(view.canvas(), view.matrix())
            view.addDrawingMgr(dMgr)
            if self.alignementProcessState.verticalPhi():
                line = QubCanvasVLine(view.canvas())
            else:
                line = QubCanvasHLine(view.canvas())
            dMgr.addDrawingObject(line)
            if not i:
                dMgr.setCanBeModify(False)
                dMgr.setPen(qt.QPen(qt.Qt.red, 1, qt.Qt.DashLine))
            else:
                dMgr.setPen(qt.QPen(qt.Qt.red, 2))
                dMgr.setEndDrawCallBack(self.__helpLineMoved)
            self.__helpLines.append(dMgr)
Beispiel #3
0
    def _helpLineDraw(self):
        hline = QubPointDrawingMgr(self._view.canvas(), self._view.matrix())
        hline.setAutoDisconnectEvent(True)
        hline.setEventName("HelpLine")
        hline.setExceptExclusiveListName(["StickAlignement"])
        if self._vertPhiFlag:
            drawingobject = QubCanvasHLine(self._view.canvas())
        else:
            drawingobject = QubCanvasVLine(self._view.canvas())
        hline.addDrawingObject(drawingobject)
        hline.setEndDrawCallBack(self._centeringPlug.endHline)
        self._view.addDrawingMgr(hline)
        hline.setPen(qt.QPen(qt.Qt.red, 2, qt.Qt.DashLine))

        hline.startDrawing()
        self._centeringPlug.hLines.append(hline)
Beispiel #4
0
    def _helpLineDraw(self):
        hline = QubPointDrawingMgr(self._view.canvas(), self._view.matrix())
        hline.setAutoDisconnectEvent(True)
        hline.setEventName("HelpLine")
        hline.setExceptExclusiveListName(["StickAlignement"])
        if self._vertPhiFlag:
            drawingobject = QubCanvasHLine(self._view.canvas())
        else:
            drawingobject = QubCanvasVLine(self._view.canvas())
        hline.addDrawingObject(drawingobject)
        hline.setEndDrawCallBack(self._centeringPlug.endHline)
        self._view.addDrawingMgr(hline)
        hline.setPen(qt.QPen(qt.Qt.red, 2, qt.Qt.DashLine))

        hline.startDrawing()
        self._centeringPlug.hLines.append(hline)