Open 3D Engine GraphCanvas 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.
GraphCanvas::RootGraphicsItem< GraphicsItem > Class Template Referenceabstract

Generates EBus notifications for some QGraphicsItem events. More...

#include <RootGraphicsItem.h>

Inherits GraphicsItem, ViewSceneNotificationBus::Handler, RootGraphicsItemRequestBus::Handler, StateController::Notifications::Handler, and AZ::TickBus::Handler.

Public Types

enum  { Type = QGraphicsItem::UserType + 1 }
 

Public Member Functions

 RootGraphicsItem (AZ::EntityId itemId)
 
AZ::EntityId GetEntityId () const
 
bool IsSnappedToGrid () const
 
bool IsResizedToGrid () const
 
int GetGridXStep () const
 
int GetGridYStep () const
 
void SetSnapToGridEnabled (bool enabled)
 
void SetResizeToGridEnabled (bool enabled)
 
void SetGridSize (const AZ::Vector2 &gridSize)
 
void SetAnchorPoint (const AZ::Vector2 &anchorPoint)
 
void OnStateChanged ([[maybe_unused]] const RootGraphicsItemDisplayState &displayState) override
 
void OnTick (float delta, AZ::ScriptTimePoint) override
 
void AnimatePositionTo (const QPointF &scenePoint, const AZStd::chrono::milliseconds &duration) override
 
void CancelAnimation () override
 
void OffsetBy (const AZ::Vector2 &delta) override
 
void SignalGroupAnimationStart (AZ::EntityId groupId) override
 
void SignalGroupAnimationEnd (AZ::EntityId groupId) override
 
StateController< RootGraphicsItemDisplayState > * GetDisplayStateStateController () override
 
RootGraphicsItemDisplayState GetDisplayState () const override
 
void SetEnabledState (RootGraphicsItemEnabledState state) override
 
RootGraphicsItemEnabledState GetEnabledState () const override
 

Protected Member Functions

 RootGraphicsItem (const RootGraphicsItem &)=delete
 
void SetDisplayState (RootGraphicsItemDisplayState displayState)
 
void OnAltModifier (bool enabled) override
 
void hoverEnterEvent (QGraphicsSceneHoverEvent *hoverEvent) override
 
void hoverLeaveEvent (QGraphicsSceneHoverEvent *hoverEvent) override
 
void mousePressEvent (QGraphicsSceneMouseEvent *event) override
 
void mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override
 
void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *mouseEvent) override
 
QVariant itemChange (QGraphicsItem::GraphicsItemChange change, const QVariant &value) override
 
virtual QRectF GetBoundingRect () const =0
 
int type () const override
 
virtual void OnDeleteItem ()
 
virtual void OnEnabledStateChanged (RootGraphicsItemEnabledState enabledState)
 
void SetAllowQuickDeletion (bool enabled)
 

Detailed Description

template<typename GraphicsItem>
class GraphCanvas::RootGraphicsItem< GraphicsItem >

Generates EBus notifications for some QGraphicsItem events.


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