(self, obj, event)
return super().eventFilter(obj, event)
Reimplemented.
Reimplemented.
Reimplemented .
def eventFilter(self, obj, event):
        """Reimplemented."""
        if isinstance(obj, SequenceFlow.Frame) and obj.parent() is self:
            etype = event.type()
            if etype == QEvent.MouseButtonPress and \
                    event.button() == Qt.LeftButton:
                # Is the mouse press on the dock title bar
                # (assume everything above obj.widget is a title bar)
                # TODO: Get the proper title bar geometry.
                if event.pos().y() < obj.widget().y():
                    index = self.indexOf(obj.widget())
                    self.__dragstart = (obj, index, event.pos())
            elif etype == QEvent.MouseMove and \
                    event.buttons() & Qt.LeftButton and \
                    obj is self.__dragstart[0]:
                _, _, down = self.__dragstart
                if (down - event.pos()).manhattanLength() >= \
                        QApplication.startDragDistance():
                    self.__startInternalDrag(obj, event.pos())
                    self.__dragstart = None, None, None
                    return True
            elif etype == QEvent.MouseButtonRelease and \
                    event.button() == Qt.LeftButton and \
                    self.__dragstart[0] is obj:
                self.__dragstart = None, None, None

        return super().eventFilter(obj, event)
def eventFilter ( self , obj , event ) : if isinstance ( obj , SequenceFlow . Frame ) and obj . parent ( ) is self : etype = event . type ( ) if etype == QEvent . MouseButtonPress and event . button ( ) == Qt . LeftButton : # Is the mouse press on the dock title bar # (assume everything above obj.widget is a title bar) # TODO: Get the proper title bar geometry. if event . pos ( ) . y ( ) < obj . widget ( ) . y ( ) : index = self . indexOf ( obj . widget ( ) ) self . __dragstart = ( obj , index , event . pos ( ) ) elif etype == QEvent . MouseMove and event . buttons ( ) & Qt . LeftButton and obj is self . __dragstart [ 0 ] : _ , _ , down = self . __dragstart if ( down - event . pos ( ) ) . manhattanLength ( ) >= QApplication . startDragDistance ( ) : self . __startInternalDrag ( obj , event . pos ( ) ) self . __dragstart = None , None , None return True elif etype == QEvent . MouseButtonRelease and event . button ( ) == Qt . LeftButton and self . __dragstart [ 0 ] is obj : self . __dragstart = None , None , None return super ( ) . eventFilter ( obj , event )