added functions to override the resolution and matrix transform of the viewer widget

While in most circumstances these shouldn't be used, they're useful for
showing things like export previews
This commit is contained in:
itsmattkc
2019-12-19 15:55:08 +11:00
parent c5e16ed805
commit 0ef00245ad
4 changed files with 33 additions and 1 deletions
+10
View File
@@ -185,6 +185,16 @@ void ViewerWidget::SetColorMenuEnabled(bool enabled)
gl_widget_->SetColorMenuEnabled(enabled);
}
void ViewerWidget::SetOverrideSize(int width, int height)
{
SizeChangedSlot(width, height);
}
void ViewerWidget::SetMatrix(const QMatrix4x4 &mat)
{
gl_widget_->SetMatrix(mat);
}
void ViewerWidget::SetTexture(OpenGLTexturePtr tex)
{
if (tex == nullptr) {