element editor and diagram view, now can move view by holding wheel click and drag mouse

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2153 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2013-05-11 18:20:26 +00:00
parent 5a84e5161d
commit b837ffa0b1
4 changed files with 71 additions and 18 deletions

View File

@@ -52,6 +52,8 @@ class DiagramView : public QGraphicsView {
bool fresh_focus_in_; ///< Indicate the focus was freshly gained
ElementsLocation next_location_;
QPoint next_position_;
QPointF reference_view_;
QPointF center_view_;
// methods
public:
@@ -86,6 +88,8 @@ class DiagramView : public QGraphicsView {
private:
void mousePressEvent(QMouseEvent *);
void mouseMoveEvent(QMouseEvent *);
void mouseReleaseEvent(QMouseEvent *);
void dragEnterEvent(QDragEnterEvent *);
void dragLeaveEvent(QDragLeaveEvent *);
void dragMoveEvent(QDragMoveEvent *);