def __init__(self, parent=None):
     """ QVersionTreeView(parent: QWidget) -> QVersionTreeView
     Initialize the graphics view and its properties
     
     """
     QInteractiveGraphicsView.__init__(self, parent)
     self.setWindowTitle('Version Tree')
     self.setScene(QVersionTreeScene(self))
     self.versionProp = QVersionPropOverlay(self, self.viewport())
     self.versionProp.hide()
示例#2
0
 def __init__(self, parent=None):
     """ QVersionTreeView(parent: QWidget) -> QVersionTreeView
     Initialize the graphics view and its properties
     
     """
     QInteractiveGraphicsView.__init__(self, parent)
     BaseView.__init__(self)
     self.controller = None
     self.set_title('Version Tree')
     self.setScene(QVersionTreeScene(self))
     self.versionProp = QVersionPropOverlay(self, self.viewport())
     self.versionProp.hide()
def QVTV_mousePressEvent(self, e):
    foundMultiSelection = False
    if (self.translateButton(e)==QtCore.Qt.LeftButton and
        self.selectingIndicator!=None):
        for item in self.items(e.pos()):
            if isinstance(item, gui.version_view.QGraphicsVersionItem):
                self.selectingIndicator.versionId = item.id
                self.scene().updateIndicator(self.selectingIndicator)
                self.selectingIndicator.show()
                self.emit(QtCore.SIGNAL('versionSelected()'))
                foundMultiSelection = True
                break
    if not foundMultiSelection:
        QInteractiveGraphicsView.mousePressEvent(self, e)