Open 3D Engine GraphCanvas Gem 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.
GraphCanvas::ViewRequests Class Referenceabstract

#include <ViewBus.h>

Inherits AZ::EBusTraits.

Public Types

using BusIdType = ViewId
 

Public Member Functions

virtual void SetEditorId (const EditorId &editorId)=0
 
virtual EditorId GetEditorId () const =0
 
virtual void SetScene (const AZ::EntityId &)=0
 Set the scene that the view should render.
 
virtual AZ::EntityId GetScene () const =0
 Get the scene the view is displaying.
 
virtual void ClearScene ()=0
 Clear the scene that the view is rendering, so it will be empty.
 
virtual AZ::Vector2 GetViewSceneCenter () const =0
 
virtual AZ::Vector2 MapToGlobal (const AZ::Vector2 &scenePoint)=0
 Map a scene coordinate to the global coordinate space.
 
virtual AZ::Vector2 MapToScene (const AZ::Vector2 &viewPoint)=0
 Map a view coordinate to the scene coordinate space.
 
virtual AZ::Vector2 MapFromScene (const AZ::Vector2 &scenePoint)=0
 Map a scene coordinate to the view coordinate space.
 
virtual void SetViewParams (const ViewParams &viewParams)=0
 Sets the View params of the view.
 
virtual void DisplayArea (const QRectF &viewArea)=0
 Changes the scene to display only the view area.
 
virtual void CenterOnArea (const QRectF &viewArea)=0
 
virtual void CenterOn (const QPointF &posInSceneCoordinates)=0
 Move the view center to posInSceneCoordinates.
 
virtual void CenterOnStartOfChain ()=0
 
virtual void CenterOnEndOfChain ()=0
 
virtual void CenterOnSelection ()=0
 Will adjust the view params so that the currently selected nodes are entirely in view.
 
virtual QRectF GetCompleteArea ()=0
 Get, in scene coordinates, the QRectF of the area covered by the entire content of the scene.
 
virtual void WheelEvent (QWheelEvent *ev)=0
 Send a wheelEvent to the CanvasGraphicsView.
 
virtual QRectF GetViewableAreaInSceneCoordinates ()=0
 Get, in scene coordinates, the QRectF of the area presented in the view.
 
virtual GraphCanvasGraphicsViewAsGraphicsView ()=0
 Get the view as a CanvasGraphicsView.
 
virtual QImage * CreateImageOfGraph ()=0
 Renders out the entire graph into a newly created QPixmap.
 
virtual QImage * CreateImageOfGraphArea (QRectF area)=0
 Renders out the specified area of the graph into a newly created QPixmap.
 
virtual qreal GetZoomLevel () const =0
 Returns the 'zoom' aka scale of the GraphCanvasGraphicsView object.
 
virtual void ScreenshotSelection ()=0
 Takes a screenshot of the current selection inside of the graph.
 
virtual void EnableSelection ()=0
 Enables the current selection inside of the graph.
 
virtual void DisableSelection ()=0
 Disable the current selection inside of the graph.
 
virtual void ShowEntireGraph ()=0
 Zooms the graph in order to display all of the nodes currently on the graph.
 
virtual void ZoomIn ()=0
 Zooms in the current graph by a single step.
 
virtual void ZoomOut ()=0
 Zooms out the current graph by a single step.
 
virtual void PanSceneBy (QPointF repositioning, AZStd::chrono::milliseconds duration)=0
 Pans the displayed scene by the specific amount in the specified time.
 
virtual void PanSceneTo (QPointF scenePoint, AZStd::chrono::milliseconds duration)=0
 Pans the display scene to the specificed point in the specified time.
 
virtual void RefreshView ()=0
 Refreshes the entire display to clear up any caching artifacts.
 
virtual void HideToastNotification (const AzToolsFramework::ToastId &toastId)=0
 Toast Notifications.
 
virtual AzToolsFramework::ToastId ShowToastNotification (const AzQtComponents::ToastConfiguration &toastConfiguration)=0
 
virtual AzToolsFramework::ToastId ShowToastAtCursor (const AzQtComponents::ToastConfiguration &toastConfiguration)=0
 
virtual AzToolsFramework::ToastId ShowToastAtPoint (const QPoint &screenPosition, const QPointF &anchorPoint, const AzQtComponents::ToastConfiguration &)=0
 
virtual bool IsShowing () const =0
 

Static Public Attributes

static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById
 

Detailed Description

ViewRequests Requests that are serviced by the View component.

Member Function Documentation

◆ CenterOnArea()

virtual void GraphCanvas::ViewRequests::CenterOnArea ( const QRectF &  viewArea)
pure virtual

Ensures that the specified area is centered and fully displayed. Tries to not change the scale value unless necessary.

◆ CenterOnEndOfChain()

virtual void GraphCanvas::ViewRequests::CenterOnEndOfChain ( )
pure virtual

Move the view center to the end of the currently select chain of nodes. Will do nothing if there are multiple chains selects.

◆ CenterOnStartOfChain()

virtual void GraphCanvas::ViewRequests::CenterOnStartOfChain ( )
pure virtual

Move the view center to the start of the currently selected chain of nodes. Will do nothing if there are multiple chains selected.


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