Beispiel #1
0
/**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)
		}
	}
}
Beispiel #2
0
/**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;
		}
	}
}
Beispiel #3
0
/**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);
	}
}
Beispiel #4
0
/**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);
	}
}