MipmapSettingWidget.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 <QMainWindow>
  11. #include <AzCore/Memory/SystemAllocator.h>
  12. #include <AzToolsFramework/UI/PropertyEditor/PropertyEditorAPI.h>
  13. #include <Source/Editor/EditorCommon.h>
  14. #endif
  15. namespace Ui
  16. {
  17. class MipmapSettingWidget;
  18. }
  19. namespace ImageProcessingAtomEditor
  20. {
  21. class MipmapSettingWidget
  22. : public QWidget
  23. , public AzToolsFramework::IPropertyEditorNotify
  24. , protected EditorInternalNotificationBus::Handler
  25. {
  26. Q_OBJECT
  27. public:
  28. AZ_CLASS_ALLOCATOR(MipmapSettingWidget, AZ::SystemAllocator);
  29. explicit MipmapSettingWidget(EditorTextureSetting& textureSetting, QWidget* parent = nullptr);
  30. ~MipmapSettingWidget();
  31. //IPropertyEditorNotify Interface
  32. void BeforePropertyModified([[maybe_unused]] AzToolsFramework::InstanceDataNode* pNode) override {}
  33. void AfterPropertyModified(AzToolsFramework::InstanceDataNode* pNode) override;
  34. void SetPropertyEditingActive([[maybe_unused]] AzToolsFramework::InstanceDataNode* pNode) override {}
  35. void SetPropertyEditingComplete([[maybe_unused]] AzToolsFramework::InstanceDataNode* pNode) override {}
  36. void SealUndoStack() override {}
  37. public slots:
  38. void OnCheckBoxStateChanged(bool checked);
  39. protected:
  40. ////////////////////////////////////////////////////////////////////////
  41. //EditorInternalNotificationBus
  42. void OnEditorSettingsChanged(bool needRefresh, const AZStd::string& platform) override;
  43. ////////////////////////////////////////////////////////////////////////
  44. private:
  45. void RefreshUI();
  46. QScopedPointer<Ui::MipmapSettingWidget> m_ui;
  47. EditorTextureSetting* m_textureSetting;
  48. };
  49. } //namespace ImageProcessingAtomEditor