Open 3D Engine AzToolsFramework API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzToolsFramework::PropertyHandlerWidgetInterface Class Referenceabstract

#include <PropertyHandlerWidget.h>

Inherited by AzToolsFramework::PropertyHandlerWidget< QToolButton >, AzToolsFramework::PropertyHandlerWidget< QWidget >, AzToolsFramework::PropertyHandlerWidget< BaseWidget >, and AzToolsFramework::RpePropertyHandlerWrapper< WrappedType >.

Public Member Functions

virtual QWidget * GetWidget ()=0
 Gets the widget that should be added to the DocumentPropertyEditor.
 
virtual void SetValueFromDom (const AZ::Dom::Value &node)=0
 
virtual void PrepareWidgetForReuse ()
 Resets the widget's attributes for reuse.
 
virtual QWidget * GetFirstInTabOrder ()
 
virtual QWidget * GetLastInTabOrder ()
 

Static Public Member Functions

static bool ShouldHandleType (const AZ::TypeId &typeId)
 
static constexpr const AZStd::string_view GetHandlerName ()
 
static constexpr bool IsDefaultHandler ()
 

Detailed Description

Base class for all property editor widgets in the DocumentPropertyEditor. Property handler widgets are registered to the PropertyEditorToolsSystemInterface and instantiated as part of the DocumentPropertyEditor, with one handler instance being constructed for each property editor.

Member Function Documentation

◆ GetFirstInTabOrder()

virtual QWidget * AzToolsFramework::PropertyHandlerWidgetInterface::GetFirstInTabOrder ( )
virtual

Returns the first widget in the tab order for this property editor, i.e. the widget that should be selected when the user hits tab on the widget immediately prior to this. By default, this returns GetWidget, a single widget tab order.

Reimplemented in AzToolsFramework::RpePropertyHandlerWrapper< WrappedType >.

◆ GetHandlerName()

static constexpr const AZStd::string_view AzToolsFramework::PropertyHandlerWidgetInterface::GetHandlerName ( )
inlinestaticconstexpr

This must be implemented in subclasses registered with PropertyEditorToolsSystemInterface::RegisterHandler. Returns the handler name, used to look up the type of handler to use from a PropertyEditor node.

◆ GetLastInTabOrder()

virtual QWidget * AzToolsFramework::PropertyHandlerWidgetInterface::GetLastInTabOrder ( )
virtual

Returns the last widget in the tab order for this property editor, i.e. the widget that should select the widget immediately subsequent to this property editor when the user presses tab. By default, this returns GetWidget, a single widget tab order.

Reimplemented in AzToolsFramework::RpePropertyHandlerWrapper< WrappedType >.

◆ GetWidget()

virtual QWidget * AzToolsFramework::PropertyHandlerWidgetInterface::GetWidget ( )
pure virtual

◆ IsDefaultHandler()

static constexpr bool AzToolsFramework::PropertyHandlerWidgetInterface::IsDefaultHandler ( )
inlinestaticconstexpr

If overridden, this can be used to indicate that this handler should be added to the "default" pool of property handlers. Default property handlers will have ShouldHandleType queried for PropertyEditor nodes that don't have an explicit Type set. For example, a numeric spin box might be registered as a default handler, in which case a node like: <PropertyEditor Value=5 ValueType="int" > would resolve to a spin box, while <PropertyEditor Type="Slider" Value=5 ValueType="int" > would still resolve to a slider.

◆ PrepareWidgetForReuse()

virtual void AzToolsFramework::PropertyHandlerWidgetInterface::PrepareWidgetForReuse ( )
inlinevirtual

Resets the widget's attributes for reuse.

Reimplemented in AzToolsFramework::RpePropertyHandlerWrapper< WrappedType >.

◆ SetValueFromDom()

virtual void AzToolsFramework::PropertyHandlerWidgetInterface::SetValueFromDom ( const AZ::Dom::Value &  node)
pure virtual

Sets up the widget provided by GetWidget to reflect the values provided by a given DOM node. This should consume both the property value (if applicable) and any attributes, including OnChange.

Implemented in AzToolsFramework::GenericButtonHandler, AzToolsFramework::RpePropertyHandlerWrapper< WrappedType >, AzToolsFramework::ContainerActionButtonHandler, and AzToolsFramework::Prefab::PrefabOverrideLabelHandler.

◆ ShouldHandleType()

static bool AzToolsFramework::PropertyHandlerWidgetInterface::ShouldHandleType ( const AZ::TypeId &  typeId)
inlinestatic

Returns true if this handler should be used for this type (assuming its type already matches GetHandlerName()) This may be reimplemented in subclasses to allow handler specialization, for example a handler that handles integral types and a separate handler for handling floating point types.


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