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

Inherits AzQtComponents::DockMainWindow, GraphCanvas::AssetEditorRequestBus::Handler, GraphCanvas::AssetEditorSettingsRequestBus::Handler, GraphCanvas::AssetEditorNotificationBus::Handler, and GraphCanvas::SceneNotificationBus::Handler.

Public Member Functions

 AZ_CLASS_ALLOCATOR (AssetEditorMainWindow, AZ::SystemAllocator)
 
 AssetEditorMainWindow (AssetEditorWindowConfig *config, QWidget *parent=nullptr)
 
void SetupUI ()
 
void SetDropAreaText (AZStd::string_view text)
 
const EditorId & GetEditorId () const
 
GraphCanvas::GraphId GetActiveGraphCanvasGraphId () const
 

Protected Member Functions

void closeEvent (QCloseEvent *event) override
 
DockWidgetId CreateEditorDockWidget (const QString &title=QString())
 Create a new graph (EditorDockWidget) and pass it to our CentralDockWindow.
 
virtual EditorDockWidgetCreateDockWidget (const QString &title, QWidget *parent) const
 
AZStd::vector< GraphCanvas::GraphId > GetOpenGraphIds ()
 Return a list of the currently open GraphIds for asset editor.
 
virtual bool ConfigureDefaultLayout ()
 
virtual void OnEditorOpened (EditorDockWidget *dockWidget)
 Clients should override this to handle any additional logic when opening new editor dock widgets.
 
virtual void OnEditorClosing (EditorDockWidget *dockWidget)
 Clients should override this to handle any additional logic when closing an editor dock widget.
 
bool CloseEditor (DockWidgetId dockWidgetId)
 Close a specified editor dock widget (graph)
 
bool CloseAllEditors ()
 Close all open editor dock widgets (graphs)
 
bool FocusDockWidget (DockWidgetId dockWidgetId)
 Set the focus to an existing dock widget.
 
AssetEditorCentralDockWindowGetCentralDockWindow () const
 
virtual void RefreshMenu ()
 
virtual QMenu * AddFileMenu ()
 
virtual QAction * AddFileNewAction (QMenu *menu)
 
virtual QAction * AddFileOpenAction (QMenu *menu)
 
virtual QAction * AddFileSaveAction (QMenu *menu)
 
virtual QAction * AddFileSaveAsAction (QMenu *menu)
 
virtual QAction * AddFileCloseAction (QMenu *menu)
 
virtual QMenu * AddEditMenu ()
 
virtual QAction * AddEditCutAction (QMenu *menu)
 
virtual QAction * AddEditCopyAction (QMenu *menu)
 
virtual QAction * AddEditPasteAction (QMenu *menu)
 
virtual QAction * AddEditDuplicateAction (QMenu *menu)
 
virtual QAction * AddEditDeleteAction (QMenu *menu)
 
virtual void UpdateMenuActions ()
 
virtual void UpdateEditMenuActions ()
 
virtual void UpdatePasteAction ()
 
virtual QMenu * AddViewMenu ()
 
AZ::EntityId CreateNewGraph () override
 
bool ContainsGraph (const GraphCanvas::GraphId &graphId) const override
 
bool CloseGraph (const GraphId &graphId) override
 
ContextMenuAction::SceneReaction ShowSceneContextMenu (const QPoint &screenPoint, const QPointF &scenePoint) override
 
ContextMenuAction::SceneReaction ShowNodeContextMenu (const AZ::EntityId &nodeId, const QPoint &screenPoint, const QPointF &scenePoint) override
 
ContextMenuAction::SceneReaction ShowCommentContextMenu (const AZ::EntityId &nodeId, const QPoint &screenPoint, const QPointF &scenePoint) override
 
ContextMenuAction::SceneReaction ShowNodeGroupContextMenu (const AZ::EntityId &groupId, const QPoint &screenPoint, const QPointF &scenePoint) override
 
ContextMenuAction::SceneReaction ShowCollapsedNodeGroupContextMenu (const AZ::EntityId &nodeId, const QPoint &screenPoint, const QPointF &scenePoint) override
 
ContextMenuAction::SceneReaction ShowBookmarkContextMenu (const AZ::EntityId &bookmarkId, const QPoint &screenPoint, const QPointF &scenePoint) override
 
ContextMenuAction::SceneReaction ShowConnectionContextMenu (const AZ::EntityId &connectionId, const QPoint &screenPoint, const QPointF &scenePoint) override
 
ContextMenuAction::SceneReaction ShowSlotContextMenu (const AZ::EntityId &slotId, const QPoint &screenPoint, const QPointF &scenePoint) override
 
Endpoint CreateNodeForProposal (const AZ::EntityId &connectionId, const Endpoint &endpoint, const QPointF &scenePoint, const QPoint &screenPoint) override
 
void OnWrapperNodeActionWidgetClicked (const AZ::EntityId &wrapperNode, const QRect &actionWidgetBoundingRect, const QPointF &scenePoint, const QPoint &screenPoint) override
 
EditorConstructPresetsGetConstructPresets () const override
 
const ConstructTypePresetBucketGetConstructTypePresetBucket (ConstructType constructType) const override
 
void OnActiveGraphChanged (const GraphId &graphId) override
 
void OnSelectionChanged () override
 
ContextMenuAction::SceneReaction HandleContextMenu (EditorContextMenu &editorContextMenu, const AZ::EntityId &memberId, const QPoint &screenPoint, const QPointF &scenePoint) const
 
Endpoint HandleProposedConnection (const GraphId &graphId, const ConnectionId &connectionId, const Endpoint &endpoint, const NodeId &proposedNode, const QPoint &screenPoint)
 

Protected Attributes

NodePaletteDockWidgetm_nodePalette = nullptr
 
BookmarkDockWidgetm_bookmarkDockWidget = nullptr
 
SceneContextMenum_sceneContextMenu = nullptr
 
EditorContextMenum_createNodeProposalContextMenu = nullptr
 
QAction * m_cutSelectedAction = nullptr
 
QAction * m_copySelectedAction = nullptr
 
QAction * m_pasteSelectedAction = nullptr
 
QAction * m_duplicateSelectedAction = nullptr
 
QAction * m_deleteSelectedAction = nullptr
 
EditorConstructPresets m_constructPresetDefaults
 

Member Function Documentation

◆ ConfigureDefaultLayout()

virtual bool GraphCanvas::AssetEditorMainWindow::ConfigureDefaultLayout ( )
protectedvirtual

This base implementation will configure the default layout of all dock widgets provided. The client can extend or replace this depending if they would like to add new dock widgets or start from a blank slate. Returns false if any of the open dock widgets refuse to close during the reset

◆ CreateDockWidget()

virtual EditorDockWidget* GraphCanvas::AssetEditorMainWindow::CreateDockWidget ( const QString &  title,
QWidget *  parent 
) const
protectedvirtual

This base implementation provides an EditorDockWidget that creates and configures a scene and corresponding graphics view. The client can override this if a custom dock widget is desired.


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