Open 3D Engine Atom Gem API Reference 24.09.2
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
MaterialCanvas::MaterialCanvasMainWindow Class Reference

MaterialCanvasMainWindow creates and manages all of the graph canvas and viewport related docked windows for Material Canvas. More...

#include <MaterialCanvasMainWindow.h>

Inherits AtomToolsFramework::AtomToolsDocumentMainWindow.

Public Types

using Base = AtomToolsFramework::AtomToolsDocumentMainWindow
 
- Public Types inherited from AtomToolsFramework::AtomToolsDocumentMainWindow
using Base = AtomToolsMainWindow
 
- Public Types inherited from AtomToolsFramework::AtomToolsMainWindow
using Base = AzQtComponents::DockMainWindow
 

Public Member Functions

 AZ_CLASS_ALLOCATOR (MaterialCanvasMainWindow, AZ::SystemAllocator)
 
 MaterialCanvasMainWindow (const AZ::Crc32 &toolId, AtomToolsFramework::GraphViewSettingsPtr graphViewSettingsPtr, QWidget *parent=0)
 
- Public Member Functions inherited from AtomToolsFramework::AtomToolsDocumentMainWindow
 AZ_CLASS_ALLOCATOR (AtomToolsDocumentMainWindow, AZ::SystemAllocator)
 
 AtomToolsDocumentMainWindow (const AZ::Crc32 &toolId, const QString &objectName, QWidget *parent=0)
 
QString GetDocumentPath (const AZ::Uuid &documentId) const
 Helper function to get the absolute path for a document represented by the document ID.
 
AZ::Uuid GetDocumentTabId (const int tabIndex) const
 Retrieves the document ID from a tab with the index.
 
AZ::Uuid GetCurrentDocumentId () const
 Retrieves the document ID from the currently selected tab.
 
int GetDocumentTabIndex (const AZ::Uuid &documentId) const
 Searches for the tab index corresponding to the document ID, returning -1 if not found.
 
bool HasDocumentTab (const AZ::Uuid &documentId) const
 Determine if a tab exists for the document ID.
 
bool AddDocumentTab (const AZ::Uuid &documentId, QWidget *viewWidget)
 
void RemoveDocumentTab (const AZ::Uuid &documentId)
 Destroys the tab and view associated with the document ID.
 
void UpdateDocumentTab (const AZ::Uuid &documentId)
 Updates the displayed text and tooltip for a tab associated with a document ID.
 
void SelectPrevDocumentTab ()
 
void SelectNextDocumentTab ()
 
virtual void OpenDocumentTabContextMenu ()
 Forces a context menu to appear above the selected tab, populated with actions for the associated document ID.
 
virtual void PopulateTabContextMenu (const AZ::Uuid &documentId, QMenu &menu)
 Insert items into the tab context menu for the document ID.
 
virtual AZStd::string GetSaveDocumentParams (const AZStd::string &initialPath, const AZ::Uuid &documentId) const
 Select the target path where a document will be saved.
 
void CreateMenus (QMenuBar *menuBar) override
 
void UpdateMenus (QMenuBar *menuBar) override
 
- Public Member Functions inherited from AtomToolsFramework::AtomToolsMainWindow
 AtomToolsMainWindow (const AZ::Crc32 &toolId, const QString &objectName, QWidget *parent=0)
 
void ActivateWindow () override
 
bool AddDockWidget (const AZStd::string &name, QWidget *widget, uint32_t area) override
 
void RemoveDockWidget (const AZStd::string &name) override
 
void SetDockWidgetVisible (const AZStd::string &name, bool visible) override
 
bool IsDockWidgetVisible (const AZStd::string &name) const override
 
AZStd::vector< AZStd::string > GetDockWidgetNames () const override
 
void QueueUpdateMenus (bool rebuildMenus) override
 
void SetStatusMessage (const AZStd::string &message) override
 
void SetStatusWarning (const AZStd::string &message) override
 
void SetStatusError (const AZStd::string &message) override
 
void CreateMenus (QMenuBar *menuBar) override
 
void UpdateMenus (QMenuBar *menuBar) override
 
virtual void OpenSettingsDialog ()
 
virtual void OpenHelpUrl ()
 
virtual void OpenAboutDialog ()
 

Protected Member Functions

void ResizeViewportRenderTarget (uint32_t width, uint32_t height) override
 
void LockViewportRenderTargetSize (uint32_t width, uint32_t height) override
 
void UnlockViewportRenderTargetSize () override
 
void OnDocumentOpened (const AZ::Uuid &documentId) override
 
void PopulateSettingsInspector (AtomToolsFramework::InspectorWidget *inspector) const override
 
void OnSettingsDialogClosed () override
 
AZStd::string GetHelpUrl () const override
 
- Protected Member Functions inherited from AtomToolsFramework::AtomToolsDocumentMainWindow
void BuildCreateMenu (QAction *insertPostion)
 
void BuildOpenMenu (QAction *insertPostion)
 
void AddDocumentTabBar ()
 
void UpdateRecentFileMenu ()
 
bool SaveDocument (const AZ::Uuid &documentId)
 
bool CloseDocumentCheck (const AZ::Uuid &documentId)
 
bool CloseDocuments (const AZStd::vector< AZ::Uuid > &documentIds)
 
const AZStd::vector< AZ::Uuid > GetOpenDocumentIds () const
 
void OnDocumentOpened (const AZ::Uuid &documentId) override
 
void OnDocumentClosed (const AZ::Uuid &documentId) override
 
void OnDocumentCleared (const AZ::Uuid &documentId) override
 
void OnDocumentError (const AZ::Uuid &documentId) override
 
void OnDocumentDestroyed (const AZ::Uuid &documentId) override
 
void OnDocumentModified (const AZ::Uuid &documentId) override
 
void OnDocumentUndoStateChanged (const AZ::Uuid &documentId) override
 
void OnDocumentSaved (const AZ::Uuid &documentId) override
 
void closeEvent (QCloseEvent *closeEvent) override
 
void dragEnterEvent (QDragEnterEvent *event) override
 
void dragMoveEvent (QDragMoveEvent *event) override
 
void dragLeaveEvent (QDragLeaveEvent *event) override
 
void dropEvent (QDropEvent *event) override
 
template<typename Functor >
QAction * CreateActionAtPosition (QMenu *menu, QAction *position, const QString &name, Functor fn, const QKeySequence &shortcut=0)
 
- Protected Member Functions inherited from AtomToolsFramework::AtomToolsMainWindow
void showEvent (QShowEvent *showEvent) override
 
void closeEvent (QCloseEvent *closeEvent) override
 
void BuildDockingMenu ()
 
void BuildLayoutsMenu ()
 
void BuildScriptsMenu ()
 
void RestoreDefaultLayout ()
 
void RestoreSavedLayout ()
 
virtual void SetupMetrics ()
 
virtual void UpdateMetrics ()
 
virtual void UpdateWindowTitle ()
 

Additional Inherited Members

- Protected Types inherited from AtomToolsFramework::AtomToolsMainWindow
using LayoutSettingsMap = AZStd::map<AZStd::string, AZStd::string>
 
- Protected Attributes inherited from AtomToolsFramework::AtomToolsDocumentMainWindow
QMenu * m_menuOpenRecent = {}
 
QAction * m_actionClose = {}
 
QAction * m_actionCloseAll = {}
 
QAction * m_actionCloseOthers = {}
 
QAction * m_actionSave = {}
 
QAction * m_actionSaveAsCopy = {}
 
QAction * m_actionSaveAsChild = {}
 
QAction * m_actionSaveAll = {}
 
QAction * m_actionUndo = {}
 
QAction * m_actionRedo = {}
 
QAction * m_actionNextTab = {}
 
QAction * m_actionPreviousTab = {}
 
AzQtComponents::TabWidget * m_tabWidget = {}
 
AZStd::shared_ptr< DynamicPropertyGroupm_documentSystemSettingsGroup
 
- Protected Attributes inherited from AtomToolsFramework::AtomToolsMainWindow
const AZ::Crc32 m_toolId = {}
 
QPointer< AzQtComponents::FancyDocking > m_advancedDockManager = {}
 
AzQtComponents::WindowDecorationWrapper * m_mainWindowWrapper = {}
 
bool m_shownBefore = {}
 
bool m_updateMenus = {}
 
bool m_rebuildMenus = {}
 
QByteArray m_defaultWindowState
 
QLabel * m_statusMessage = {}
 
QLabel * m_statusBarFps = {}
 
QLabel * m_statusBarCpuTime = {}
 
QLabel * m_statusBarGpuTime = {}
 
QTimer m_metricsTimer
 
QMenu * m_menuFile = {}
 
QMenu * m_menuEdit = {}
 
QMenu * m_menuView = {}
 
QMenu * m_menuTools = {}
 
QMenu * m_menuHelp = {}
 
AtomToolsFramework::AtomToolsAssetBrowserm_assetBrowser = {}
 
AzToolsFramework::LogPanel::StyledTracePrintFLogPanel * m_logPanel = {}
 
AZStd::shared_ptr< DynamicPropertyGroupm_applicationSettingsGroup
 
AZStd::shared_ptr< DynamicPropertyGroupm_assetBrowserSettingsGroup
 
- Static Protected Attributes inherited from AtomToolsFramework::AtomToolsMainWindow
static constexpr const char * ToolLayoutSettingsKey = "/O3DE/AtomToolsFramework/MainWindow/Layouts/Tool"
 
static constexpr const char * UserLayoutSettingsKey = "/O3DE/AtomToolsFramework/MainWindow/Layouts/User"
 

Detailed Description

MaterialCanvasMainWindow creates and manages all of the graph canvas and viewport related docked windows for Material Canvas.

Member Function Documentation

◆ GetHelpUrl()

AZStd::string MaterialCanvas::MaterialCanvasMainWindow::GetHelpUrl ( ) const
overrideprotectedvirtual

◆ OnSettingsDialogClosed()

void MaterialCanvas::MaterialCanvasMainWindow::OnSettingsDialogClosed ( )
overrideprotectedvirtual

◆ PopulateSettingsInspector()

void MaterialCanvas::MaterialCanvasMainWindow::PopulateSettingsInspector ( AtomToolsFramework::InspectorWidget * inspector) const
overrideprotectedvirtual

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