fixed hardcoded viewer size

This commit is contained in:
itsmattkc
2019-09-27 03:51:08 +10:00
parent 9806c772ac
commit 150afb6ebc
6 changed files with 61 additions and 13 deletions
+21 -1
View File
@@ -20,7 +20,9 @@
#include "viewer.h"
ViewerOutput::ViewerOutput()
ViewerOutput::ViewerOutput() :
viewer_width_(0),
viewer_height_(0)
{
texture_input_ = new NodeInput("tex_out");
texture_input_->add_data_input(NodeInput::kTexture);
@@ -78,6 +80,24 @@ void ViewerOutput::InvalidateCache(const rational &start_range, const rational &
SendInvalidateCache(start_range, end_range);
}
void ViewerOutput::SetViewerSize(const int &width, const int &height)
{
viewer_width_ = width;
viewer_height_ = height;
emit SizeChanged(viewer_width_, viewer_height_);
}
const int &ViewerOutput::ViewerWidth()
{
return viewer_width_;
}
const int &ViewerOutput::ViewerHeight()
{
return viewer_height_;
}
QVariant ViewerOutput::Value(NodeOutput *output, const rational &time)
{
Q_UNUSED(output)