Mouse buttons 4 and 5 now work to navigate steps.

This commit is contained in:
leo 2015-09-06 19:52:17 +00:00
parent df28f02b82
commit 55f87378cd
4 changed files with 38 additions and 0 deletions

View file

@ -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) { }

View file

@ -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)

View file

@ -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);

View file

@ -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;
} }