Add basic tranlation functionality to the viewer
Had to separate zoom and translate matrices to stop the zoom being applied to itelf. This also required adding separate get/set functions for each matrix and a GetcombinedMatrix() funtion. Added those functions ot other files where needed ut may be wrong. Need to look at export.cpp Also changed the mouse move and press events to make translation work.
This commit is contained in:
@@ -78,7 +78,7 @@ ViewerWidget::ViewerWidget(QWidget *parent) :
|
||||
connect(display_widget_, &ViewerDisplayWidget::CursorColor, this, &ViewerWidget::CursorColor);
|
||||
connect(display_widget_, &ViewerDisplayWidget::ColorProcessorChanged, this, &ViewerWidget::ColorProcessorChanged);
|
||||
connect(display_widget_, &ViewerDisplayWidget::ColorManagerChanged, this, &ViewerWidget::ColorManagerChanged);
|
||||
connect(sizer_, &ViewerSizer::RequestMatrix, display_widget_, &ViewerDisplayWidget::SetMatrix);
|
||||
connect(sizer_, &ViewerSizer::RequestMatrix, display_widget_, &ViewerDisplayWidget::SetMatrixZoom);
|
||||
sizer_->SetWidget(display_widget_);
|
||||
|
||||
// Create waveform view when audio is connected and video isn't
|
||||
@@ -322,9 +322,9 @@ void ViewerWidget::SetOverrideSize(int width, int height)
|
||||
|
||||
void ViewerWidget::SetMatrix(const QMatrix4x4 &mat)
|
||||
{
|
||||
display_widget_->SetMatrix(mat);
|
||||
display_widget_->SetMatrixZoom(mat);
|
||||
foreach (ViewerWindow* vw, windows_) {
|
||||
vw->display_widget()->SetMatrix(mat);
|
||||
vw->display_widget()->SetMatrixZoom(mat);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user