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::EditorEntityUiHandlerBase Class Reference

Defines a handler that can customize entity UI appearance and behavior in the Entity Outliner. More...

#include <EditorEntityUiHandlerBase.h>

Inherited by AzToolsFramework::LayerUiHandler, AzToolsFramework::LevelRootUiHandler, and AzToolsFramework::PrefabUiHandler.

Public Member Functions

 AZ_RTTI (EditorEntityUiHandlerBase, "{EFB6CBC0-3A0A-4302-92EB-62CAF1C47163}")
 
EditorEntityUiHandlerId GetHandlerId ()
 
virtual QString GenerateItemInfoString (AZ::EntityId entityId) const
 Returns the item info string that is appended to the item name in the Outliner.
 
virtual QString GenerateItemTooltip (AZ::EntityId entityId) const
 Returns the item tooltip text to display in the Outliner.
 
virtual QIcon GenerateItemIcon (AZ::EntityId entityId) const
 Returns the item icon pixmap to display in the Outliner.
 
virtual bool CanRename (AZ::EntityId entityId) const
 Returns whether the element's name should be editable.
 
virtual bool CanToggleLockVisibility (AZ::EntityId entityId) const
 Returns whether the element's lock and visibility state should be accessible in the Outliner.
 
virtual void PaintItemBackground (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
 Paints the background of the item in the Outliner.
 
virtual void PaintDescendantBackground (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index, const QModelIndex &descendantIndex) const
 Paints the background of the descendants of the item in the Outliner.
 
virtual void PaintDescendantBranchBackground (QPainter *painter, const QTreeView *view, const QRect &rect, const QModelIndex &index, const QModelIndex &descendantIndex) const
 Paints the background of the descendant branches of the item in the Outliner.
 
virtual void PaintItemForeground (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
 Paints visual elements on the foreground of the item in the Outliner.
 
virtual void PaintDescendantForeground (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index, const QModelIndex &descendantIndex) const
 Paints visual elements on the foreground of the descendants of the item in the Outliner.
 
virtual bool OnOutlinerItemClick (const QPoint &position, const QStyleOptionViewItem &option, const QModelIndex &index) const
 
virtual bool OnOutlinerItemDoubleClick (const QModelIndex &index) const
 
virtual void OnOutlinerItemExpand (const QModelIndex &index) const
 Triggered when an entity's children are expanded in the Outliner.
 
virtual void OnOutlinerItemCollapse (const QModelIndex &index) const
 Triggered when an entity's children are collapsed in the Outliner.
 

Static Protected Member Functions

static AZ::EntityId GetEntityIdFromIndex (const QModelIndex &index)
 

Detailed Description

Defines a handler that can customize entity UI appearance and behavior in the Entity Outliner.

Member Function Documentation

◆ CanRename()

virtual bool AzToolsFramework::EditorEntityUiHandlerBase::CanRename ( AZ::EntityId  entityId) const
virtual

Returns whether the element's name should be editable.

Reimplemented in AzToolsFramework::LevelRootUiHandler.

◆ CanToggleLockVisibility()

virtual bool AzToolsFramework::EditorEntityUiHandlerBase::CanToggleLockVisibility ( AZ::EntityId  entityId) const
virtual

Returns whether the element's lock and visibility state should be accessible in the Outliner.

Reimplemented in AzToolsFramework::LevelRootUiHandler, and AzToolsFramework::PrefabUiHandler.

◆ GenerateItemIcon()

virtual QIcon AzToolsFramework::EditorEntityUiHandlerBase::GenerateItemIcon ( AZ::EntityId  entityId) const
virtual

Returns the item icon pixmap to display in the Outliner.

Reimplemented in AzToolsFramework::LayerUiHandler, AzToolsFramework::LevelRootUiHandler, and AzToolsFramework::PrefabUiHandler.

◆ GenerateItemInfoString()

virtual QString AzToolsFramework::EditorEntityUiHandlerBase::GenerateItemInfoString ( AZ::EntityId  entityId) const
virtual

Returns the item info string that is appended to the item name in the Outliner.

Reimplemented in AzToolsFramework::LayerUiHandler, AzToolsFramework::LevelRootUiHandler, and AzToolsFramework::PrefabUiHandler.

◆ GenerateItemTooltip()

virtual QString AzToolsFramework::EditorEntityUiHandlerBase::GenerateItemTooltip ( AZ::EntityId  entityId) const
virtual

Returns the item tooltip text to display in the Outliner.

Reimplemented in AzToolsFramework::PrefabUiHandler, and AzToolsFramework::ProceduralPrefabUiHandler.

◆ OnOutlinerItemClick()

virtual bool AzToolsFramework::EditorEntityUiHandlerBase::OnOutlinerItemClick ( const QPoint &  position,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
virtual

Triggered when the entity is clicked in the Outliner.

Returns
True if the click has been handled and should not be propagated, false otherwise.

Reimplemented in AzToolsFramework::LevelRootUiHandler, and AzToolsFramework::PrefabUiHandler.

◆ OnOutlinerItemCollapse()

virtual void AzToolsFramework::EditorEntityUiHandlerBase::OnOutlinerItemCollapse ( const QModelIndex &  index) const
virtual

Triggered when an entity's children are collapsed in the Outliner.

Reimplemented in AzToolsFramework::PrefabUiHandler.

◆ OnOutlinerItemDoubleClick()

virtual bool AzToolsFramework::EditorEntityUiHandlerBase::OnOutlinerItemDoubleClick ( const QModelIndex &  index) const
virtual

Triggered when the entity is double-clicked in the Outliner.

Returns
True if the double-click has been handled and should not be propagated, false otherwise.

Reimplemented in AzToolsFramework::LevelRootUiHandler, and AzToolsFramework::PrefabUiHandler.

◆ PaintDescendantBackground()

virtual void AzToolsFramework::EditorEntityUiHandlerBase::PaintDescendantBackground ( QPainter *  painter,
const QStyleOptionViewItem &  option,
const QModelIndex &  index,
const QModelIndex &  descendantIndex 
) const
virtual

Paints the background of the descendants of the item in the Outliner.

Reimplemented in AzToolsFramework::LayerUiHandler, and AzToolsFramework::PrefabUiHandler.

◆ PaintDescendantBranchBackground()

virtual void AzToolsFramework::EditorEntityUiHandlerBase::PaintDescendantBranchBackground ( QPainter *  painter,
const QTreeView *  view,
const QRect &  rect,
const QModelIndex &  index,
const QModelIndex &  descendantIndex 
) const
virtual

Paints the background of the descendant branches of the item in the Outliner.

Reimplemented in AzToolsFramework::LayerUiHandler.

◆ PaintDescendantForeground()

virtual void AzToolsFramework::EditorEntityUiHandlerBase::PaintDescendantForeground ( QPainter *  painter,
const QStyleOptionViewItem &  option,
const QModelIndex &  index,
const QModelIndex &  descendantIndex 
) const
virtual

Paints visual elements on the foreground of the descendants of the item in the Outliner.

Reimplemented in AzToolsFramework::LayerUiHandler, and AzToolsFramework::PrefabUiHandler.

◆ PaintItemBackground()

virtual void AzToolsFramework::EditorEntityUiHandlerBase::PaintItemBackground ( QPainter *  painter,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
virtual

Paints the background of the item in the Outliner.

Reimplemented in AzToolsFramework::LayerUiHandler, AzToolsFramework::LevelRootUiHandler, and AzToolsFramework::PrefabUiHandler.

◆ PaintItemForeground()

virtual void AzToolsFramework::EditorEntityUiHandlerBase::PaintItemForeground ( QPainter *  painter,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
virtual

Paints visual elements on the foreground of the item in the Outliner.

Reimplemented in AzToolsFramework::PrefabUiHandler.


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