EditorPreferencesPageViewportDebug.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. #include "Include/IPreferencesPage.h"
  10. #include <AzCore/RTTI/TypeInfoSimple.h>
  11. #include <AzCore/RTTI/RTTIMacros.h>
  12. #include <QIcon>
  13. namespace AZ
  14. {
  15. class SerializeContext;
  16. }
  17. class CEditorPreferencesPage_ViewportDebug
  18. : public IPreferencesPage
  19. {
  20. public:
  21. AZ_RTTI(CEditorPreferencesPage_ViewportDebug, "{BD98FC0D-9F07-46AF-A123-BE34EC33E454}", IPreferencesPage)
  22. static void Reflect(AZ::SerializeContext& serialize);
  23. CEditorPreferencesPage_ViewportDebug();
  24. virtual ~CEditorPreferencesPage_ViewportDebug() = default;
  25. virtual const char* GetCategory() override { return "Viewports"; }
  26. virtual const char* GetTitle() override { return "Debug"; }
  27. virtual QIcon& GetIcon() override;
  28. virtual void OnApply() override;
  29. virtual void OnCancel() override {}
  30. virtual bool OnQueryCancel() override { return true; }
  31. private:
  32. void InitializeSettings();
  33. struct Profiling
  34. {
  35. AZ_TYPE_INFO(Profiling, "{AF413B5A-DDF3-4635-9D8B-1E1A3DF60287}")
  36. bool m_showMeshStatsOnMouseOver;
  37. };
  38. struct Warnings
  39. {
  40. AZ_TYPE_INFO(Warnings, "{6CC8A276-24A4-4100-8F7F-7695ABAF6905}")
  41. float m_warningIconsDrawDistance;
  42. bool m_showScaleWarnings;
  43. bool m_showRotationWarnings;
  44. };
  45. Profiling m_profiling;
  46. Warnings m_warnings;
  47. QIcon m_icon;
  48. };