Improve free selection behavior

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5732 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2019-02-04 19:00:46 +00:00
parent 7cd5fc57a9
commit ae68f08bb6
3 changed files with 80 additions and 55 deletions

View File

@@ -1,5 +1,5 @@
/*
Copyright 2006-2019 The QElectroTech Team
Copyright 2006-2017 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
@@ -47,16 +47,16 @@ class QetGraphicsItem : public QGraphicsObject
//protected method
protected:
void mousePressEvent(QGraphicsSceneMouseEvent *e) override;
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *e) override;
void mouseMoveEvent(QGraphicsSceneMouseEvent *e) override;
void mouseReleaseEvent(QGraphicsSceneMouseEvent *e) override;
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override;
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
protected:
bool is_movable_;
bool first_move_;
bool m_first_move;
bool snap_to_grid_;
QPointF mouse_to_origin_movement_;
QPointF m_mouse_to_origin_movement;
QET::GraphicsItemState m_state = QET:: GIOK;
};