Refactor CustomPaintWidget to handle widget recreation internally

* This allows us to expose to to python as a easy-to-use "replay output ready"
  widget.
This commit is contained in:
baldurk
2020-11-19 14:30:22 +00:00
parent 1dc1b4d167
commit 3f5a911483
13 changed files with 384 additions and 188 deletions
+18
View File
@@ -207,6 +207,24 @@ struct MiniQtInvoker : ObjectForwarder<IMiniQtHelper>
}
QWidget *CreateLabel() { return InvokeRetFunction<QWidget *>(&IMiniQtHelper::CreateLabel); }
QWidget *CreateOutputRenderingWidget()
{
return InvokeRetFunction<QWidget *>(&IMiniQtHelper::CreateOutputRenderingWidget);
}
WindowingData GetWidgetWindowingData(QWidget *widget)
{
return InvokeRetFunction<WindowingData>(&IMiniQtHelper::GetWidgetWindowingData, widget);
}
void SetWidgetReplayOutput(QWidget *widget, IReplayOutput *output)
{
InvokeVoidFunction(&IMiniQtHelper::SetWidgetReplayOutput, widget, output);
}
void SetWidgetBackgroundColor(QWidget *widget, float red, float green, float blue)
{
InvokeVoidFunction(&IMiniQtHelper::SetWidgetBackgroundColor, widget, red, green, blue);
}
QWidget *CreateCheckbox(WidgetCallback changed)
{
return InvokeRetFunction<QWidget *>(&IMiniQtHelper::CreateCheckbox, changed);