MaterialEditorMainWindow.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #if !defined(Q_MOC_RUN)
  10. #include <AtomToolsFramework/Document/AtomToolsDocumentInspector.h>
  11. #include <AtomToolsFramework/Document/AtomToolsDocumentMainWindow.h>
  12. #include <AtomToolsFramework/EntityPreviewViewport/EntityPreviewViewportSettingsInspector.h>
  13. #include <AtomToolsFramework/EntityPreviewViewport/EntityPreviewViewportToolBar.h>
  14. #include <AtomToolsFramework/EntityPreviewViewport/EntityPreviewViewportWidget.h>
  15. #include <AzCore/Component/ComponentApplicationBus.h>
  16. #endif
  17. namespace MaterialEditor
  18. {
  19. //! MaterialEditorMainWindow is the main class. Its responsibility is limited to initializing and connecting
  20. //! its panels, managing selection of assets, and performing high-level actions like saving. It contains...
  21. //! 2) MaterialViewport - The user can see the selected Material applied to a model.
  22. //! 3) MaterialPropertyInspector - The user edits the properties of the selected Material.
  23. class MaterialEditorMainWindow : public AtomToolsFramework::AtomToolsDocumentMainWindow
  24. {
  25. Q_OBJECT
  26. public:
  27. AZ_CLASS_ALLOCATOR(MaterialEditorMainWindow, AZ::SystemAllocator);
  28. using Base = AtomToolsFramework::AtomToolsDocumentMainWindow;
  29. MaterialEditorMainWindow(const AZ::Crc32& toolId, QWidget* parent = 0);
  30. protected:
  31. // AtomToolsFramework::AtomToolsMainWindowRequestBus::Handler overrides...
  32. void ResizeViewportRenderTarget(uint32_t width, uint32_t height) override;
  33. void LockViewportRenderTargetSize(uint32_t width, uint32_t height) override;
  34. void UnlockViewportRenderTargetSize() override;
  35. // AtomToolsFramework::AtomToolsDocumentNotificationBus::Handler overrides...
  36. void OnDocumentOpened(const AZ::Uuid& documentId) override;
  37. // AtomToolsFramework::AtomToolsDocumentMainWindow overrides...
  38. AZStd::string GetHelpDialogText() const override;
  39. AtomToolsFramework::AtomToolsDocumentInspector* m_documentInspector = {};
  40. AtomToolsFramework::EntityPreviewViewportSettingsInspector* m_viewportSettingsInspector = {};
  41. AtomToolsFramework::EntityPreviewViewportToolBar* m_toolBar = {};
  42. AtomToolsFramework::EntityPreviewViewportWidget* m_materialViewport = {};
  43. };
  44. } // namespace MaterialEditor