Open 3D Engine GradientSignal Gem API Reference  24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
GradientSignal::GradientPreviewWidget Class Reference

Inherits QWidget, and GradientSignal::EditorGradientPreviewRenderer.

Signals

void popoutClicked ()
 

Public Member Functions

 GradientPreviewWidget (QWidget *parent=nullptr, bool enablePopout=false)
 
- Public Member Functions inherited from GradientSignal::EditorGradientPreviewRenderer
void SetGradientSampler (const GradientSampler &sampler)
 
void SetGradientSampleFilter (SampleFilterFunc filterFunc)
 
void OnTick ([[maybe_unused]] float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint time) override
 
void QueueUpdate ()
 
bool OnCancelRefresh ()
 

Protected Member Functions

void enterEvent (QEvent *event) override
 
void leaveEvent (QEvent *event) override
 
void paintEvent (QPaintEvent *paintEvent) override
 
void resizeEvent (QResizeEvent *resizeEvent) override
 
void OnUpdate () override
 
QSize GetPreviewSize () const override
 

Additional Inherited Members

- Public Types inherited from GradientSignal::EditorGradientPreviewRenderer
using SampleFilterFunc = AZStd::function< float(float, const GradientSampleParams &)>
 
- Protected Attributes inherited from GradientSignal::EditorGradientPreviewRenderer
GradientSampler m_sampler
 
SampleFilterFunc m_filterFunc
 
QImage m_previewImage
 
bool m_refreshUpdateJob = false
 
EditorGradientPreviewUpdateJobm_updateJob = nullptr
 

Member Function Documentation

◆ GetPreviewSize()

QSize GradientSignal::GradientPreviewWidget::GetPreviewSize ( ) const
overrideprotectedvirtual

Same as above, we need an abstract way to retrieve the size of the actual preview image from the QGraphicsItem

Implements GradientSignal::EditorGradientPreviewRenderer.

◆ OnUpdate()

void GradientSignal::GradientPreviewWidget::OnUpdate ( )
overrideprotectedvirtual

Since this base class is shared between a QWidget and a QGraphicsItem, we need to abstract the actual update() call so that they can invoke the proper one

Implements GradientSignal::EditorGradientPreviewRenderer.


The documentation for this class was generated from the following file: