SelectableGraphicView.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:urh 作者: jopohl 项目源码 文件源码
def mouseReleaseEvent(self, event: QMouseEvent):
        if self.scene() is None:
            return

        cursor = self.cursor().shape()
        if cursor == Qt.ClosedHandCursor:
            self.grab_start = None
            self.setCursor(Qt.OpenHandCursor)

        elif self.separation_area_moving:
            y_sep = self.mapToScene(event.pos()).y()
            y = self.sceneRect().y()
            h = self.sceneRect().height()
            if y_sep < y:
                y_sep = y
            elif y_sep > y + h:
                y_sep = y + h

            self.scene().draw_sep_area(y_sep)
            self.sep_area_moving.emit(y_sep)
            self.separation_area_moving = False
            self.y_sep = y_sep
            self.sep_area_changed.emit(-y_sep)
            self.unsetCursor()

        self.selection_area.finished = True
        self.selection_area.resizing = False
        self.emit_selection_size_changed()
        self.emit_selection_start_end_changed()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号