/**Part of the mouse interactor: * Move manual tool tip when mouse pressed * */ void ViewWrapper2D::mousePressSlot(int x, int y, Qt::MouseButtons buttons) { if (buttons & Qt::LeftButton) { if (this->getOrientationType() == otORTHOGONAL) { setAxisPos(qvp2vp(QPoint(x,y))); } else { mClickPos = qvp2vp(QPoint(x,y)); this->shiftAxisPos(Vector3D(0,0,0)); // signal the maual tool that something is happening (important for playback tool) } } }
/**Part of the mouse interactor: * Move manual tool tip when mouse pressed * */ void ViewWrapper2D::mouseMoveSlot(int x, int y, Qt::MouseButtons buttons) { if (buttons & Qt::LeftButton) { if (this->getOrientationType() == otORTHOGONAL) { setAxisPos(qvp2vp(QPoint(x,y))); } else { Vector3D p = qvp2vp(QPoint(x,y)); this->shiftAxisPos(p - mClickPos); mClickPos = p; } } }
/**Part of the mouse interactor: * Move manual tool tip when mouse pressed * */ void ViewWrapper2D::mouseMoveSlot(int x, int y, Qt::MouseButtons buttons) { if (buttons & Qt::LeftButton) { Vector3D clickPos_vp = qvp2vp(QPoint(x,y)); moveManualTool(clickPos_vp, clickPos_vp - mLastClickPos_vp); } }
/**Part of the mouse interactor: * Move manual tool tip when mouse pressed * */ void ViewWrapper2D::mousePressSlot(int x, int y, Qt::MouseButtons buttons) { if (buttons & Qt::LeftButton) { Vector3D clickPos_vp = qvp2vp(QPoint(x,y)); moveManualTool(clickPos_vp, Vector3D(0,0,0)); samplePoint(clickPos_vp); } }