mirror of
https://github.com/leozide/leocad
synced 2025-01-29 20:34:50 +01:00
Mouse buttons 4 and 5 now work to navigate steps.
This commit is contained in:
parent
df28f02b82
commit
55f87378cd
4 changed files with 38 additions and 0 deletions
|
@ -82,6 +82,10 @@ public:
|
||||||
virtual void OnMiddleButtonUp() { }
|
virtual void OnMiddleButtonUp() { }
|
||||||
virtual void OnRightButtonDown() { }
|
virtual void OnRightButtonDown() { }
|
||||||
virtual void OnRightButtonUp() { }
|
virtual void OnRightButtonUp() { }
|
||||||
|
virtual void OnBackButtonDown() { }
|
||||||
|
virtual void OnBackButtonUp() { }
|
||||||
|
virtual void OnForwardButtonDown() { }
|
||||||
|
virtual void OnForwardButtonUp() { }
|
||||||
virtual void OnMouseMove() { }
|
virtual void OnMouseMove() { }
|
||||||
virtual void OnMouseWheel(float Direction) { }
|
virtual void OnMouseWheel(float Direction) { }
|
||||||
|
|
||||||
|
|
|
@ -2366,6 +2366,16 @@ void View::OnRightButtonUp()
|
||||||
StopTracking(mTrackButton == LC_TRACKBUTTON_RIGHT);
|
StopTracking(mTrackButton == LC_TRACKBUTTON_RIGHT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void View::OnBackButtonUp()
|
||||||
|
{
|
||||||
|
gMainWindow->HandleCommand(LC_VIEW_TIME_PREVIOUS);
|
||||||
|
}
|
||||||
|
|
||||||
|
void View::OnForwardButtonUp()
|
||||||
|
{
|
||||||
|
gMainWindow->HandleCommand(LC_VIEW_TIME_NEXT);
|
||||||
|
}
|
||||||
|
|
||||||
void View::OnMouseMove()
|
void View::OnMouseMove()
|
||||||
{
|
{
|
||||||
if (mTrackButton == LC_TRACKBUTTON_NONE)
|
if (mTrackButton == LC_TRACKBUTTON_NONE)
|
||||||
|
|
|
@ -72,6 +72,8 @@ public:
|
||||||
void OnMiddleButtonUp();
|
void OnMiddleButtonUp();
|
||||||
void OnRightButtonDown();
|
void OnRightButtonDown();
|
||||||
void OnRightButtonUp();
|
void OnRightButtonUp();
|
||||||
|
void OnBackButtonUp();
|
||||||
|
void OnForwardButtonUp();
|
||||||
void OnMouseMove();
|
void OnMouseMove();
|
||||||
void OnMouseWheel(float Direction);
|
void OnMouseWheel(float Direction);
|
||||||
|
|
||||||
|
|
|
@ -229,12 +229,23 @@ void lcQGLWidget::mousePressEvent(QMouseEvent *event)
|
||||||
case Qt::LeftButton:
|
case Qt::LeftButton:
|
||||||
widget->OnLeftButtonDown();
|
widget->OnLeftButtonDown();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Qt::MidButton:
|
case Qt::MidButton:
|
||||||
widget->OnMiddleButtonDown();
|
widget->OnMiddleButtonDown();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Qt::RightButton:
|
case Qt::RightButton:
|
||||||
widget->OnRightButtonDown();
|
widget->OnRightButtonDown();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Qt::BackButton:
|
||||||
|
widget->OnBackButtonDown();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Qt::ForwardButton:
|
||||||
|
widget->OnForwardButtonDown();
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -255,12 +266,23 @@ void lcQGLWidget::mouseReleaseEvent(QMouseEvent *event)
|
||||||
case Qt::LeftButton:
|
case Qt::LeftButton:
|
||||||
widget->OnLeftButtonUp();
|
widget->OnLeftButtonUp();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Qt::MidButton:
|
case Qt::MidButton:
|
||||||
widget->OnMiddleButtonUp();
|
widget->OnMiddleButtonUp();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Qt::RightButton:
|
case Qt::RightButton:
|
||||||
widget->OnRightButtonUp();
|
widget->OnRightButtonUp();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Qt::BackButton:
|
||||||
|
widget->OnBackButtonUp();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Qt::ForwardButton:
|
||||||
|
widget->OnForwardButtonUp();
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue