def setZoom(self, zoom):
     """ Sets zoom.
     """
     ZoomableWidget.setZoom(self, zoom)
     # make sure connections are updated after widgets were moved
     # setZoom function of ZoomableWidget does not guarantee connections are updated after widgets
     self.updateConnections()
Exemple #2
0
 def setZoom(self, zoom):
     """ Sets zoom.
     """
     ZoomableWidget.setZoom(self, zoom)
     # make sure connections are updated after widgets were moved
     # setZoom function of ZoomableWidget does not guarantee connections are updated after widgets
     self.updateConnections()
Exemple #3
0
    def __init__(self, workspace, sourcePoint, targetPoint):
        #logging.debug(__name__ +": __init__()")
        self._recalculateRouteFlag = True
        self._sourceDirection = PointToPointConnection.ConnectionDirection.RIGHT
        self._targetDirection = PointToPointConnection.ConnectionDirection.LEFT
        self._route = None
        self._selectableFlag = True
        self._selectedFlag = False
        self._deletableFlag = True
        self._deletedFlag = False
        self._sourcePoint = sourcePoint
        self._targetPoint = targetPoint
        self._dragReferencePoint = None

        ZoomableWidget.__init__(self, workspace)
        self.setFocusPolicy(self.FOCUSPOLICY)
        self.setType(self.CONNECTION_TYPE)

        self.updateConnection()
Exemple #4
0
 def __init__(self, workspace, sourcePoint, targetPoint):
     #logging.debug(__name__ +": __init__()")
     self._recalculateRouteFlag = True
     self._sourceDirection = PointToPointConnection.ConnectionDirection.RIGHT
     self._targetDirection = PointToPointConnection.ConnectionDirection.LEFT
     self._route = None
     self._selectableFlag = True
     self._selectedFlag = False
     self._deletableFlag = True
     self._deletedFlag = False
     self._sourcePoint = sourcePoint
     self._targetPoint = targetPoint
     self._dragReferencePoint = None
     
     ZoomableWidget.__init__(self, workspace)
     self.setFocusPolicy(self.FOCUSPOLICY)
     self.setType(self.CONNECTION_TYPE)
     
     self.updateConnection()
 def testExample(self):
     logging.debug(self.__class__.__name__ + ': testExample()')
     self.app = QApplication(sys.argv)
     self.window = QMainWindow()
     self.window.setWindowTitle("test ZoomableWidget")
     self.window.resize(300, 300)
     self.app.setActiveWindow(self.window)
     self.window.show()
     self.scrollArea = ZoomableScrollArea(self.window)
     self.window.setCentralWidget(self.scrollArea)
     self.zoomableWidget = ZoomableWidget()
     self.scrollArea.setWidget(self.zoomableWidget)
     self.widget = VispaWidget(self.zoomableWidget)
     self.widget.move(10, 10)
     self.widget.show()
     if not hasattr(unittest, "NO_GUI_TEST"):
         self.app.exec_()
Exemple #6
0
 def __init__(self, parent=None):
     logging.debug(__name__ + ": __init__")
     ZoomableWidget.__init__(self, parent)
     ConnectableWidgetOwner.__init__(self)
 def __init__(self, parent=None):
     logging.debug(__name__ + ": __init__")
     ZoomableWidget.__init__(self, parent)
     ConnectableWidgetOwner.__init__(self)
Exemple #8
0
 def setZoom(self, zoom):
     ZoomableWidget.setZoom(self, zoom)
     self.forceRouteRecalculation()
Exemple #9
0
 def setZoom(self, zoom):
     ZoomableWidget.setZoom(self, zoom)
     self.forceRouteRecalculation()