ShaderManagementConsoleTableView.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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/AtomToolsDocumentNotificationBus.h>
  11. #include <Document/ShaderManagementConsoleDocumentRequestBus.h>
  12. #include <QStandardItemModel>
  13. #include <QTableWidget>
  14. #endif
  15. namespace ShaderManagementConsole
  16. {
  17. class ShaderManagementConsoleTableView
  18. : public QTableWidget
  19. , public AtomToolsFramework::AtomToolsDocumentNotificationBus::Handler
  20. {
  21. public:
  22. AZ_CLASS_ALLOCATOR(ShaderManagementConsoleTableView, AZ::SystemAllocator);
  23. ShaderManagementConsoleTableView(const AZ::Crc32& toolId, const AZ::Uuid& documentId, QWidget* parent);
  24. ~ShaderManagementConsoleTableView();
  25. protected:
  26. // AtomToolsFramework::AtomToolsDocumentNotificationBus::Handler overrides...
  27. void OnDocumentOpened(const AZ::Uuid& documentId) override;
  28. void OnDocumentModified(const AZ::Uuid& documentId) override;
  29. void RebuildTable();
  30. void OnCellSelected(int row, int column, int previousRow, int previousColumn);
  31. void OnCellChanged(int row, int column);
  32. const AZ::Crc32 m_toolId = {};
  33. const AZ::Uuid m_documentId = AZ::Uuid::CreateNull();
  34. AZ::RPI::ShaderVariantListSourceData m_shaderVariantListSourceData;
  35. AZStd::vector<AZ::RPI::ShaderOptionDescriptor> m_shaderOptionDescriptors;
  36. size_t m_shaderVariantCount = {};
  37. size_t m_shaderOptionCount = {};
  38. };
  39. } // namespace ShaderManagementConsole