EditorPreferencesPageFiles.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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 <AzCore/Math/Vector3.h>
  13. #include <QIcon>
  14. namespace AZ
  15. {
  16. class SerializeContext;
  17. }
  18. class CEditorPreferencesPage_Files
  19. : public IPreferencesPage
  20. {
  21. public:
  22. AZ_RTTI(CEditorPreferencesPage_Files, "{5574AAD2-7619-4C61-A095-CBE70BDB3BF3}", IPreferencesPage)
  23. static void Reflect(AZ::SerializeContext& serialize);
  24. CEditorPreferencesPage_Files();
  25. virtual ~CEditorPreferencesPage_Files() = default;
  26. virtual const char* GetCategory() override { return "General Settings"; }
  27. virtual const char* GetTitle() override { return "Files"; }
  28. virtual QIcon& GetIcon() override;
  29. virtual void OnApply() override;
  30. virtual void OnCancel() override {}
  31. virtual bool OnQueryCancel() override { return true; }
  32. private:
  33. void InitializeSettings();
  34. struct Files
  35. {
  36. AZ_TYPE_INFO(Files, "{9952889C-2A03-4A8B-8ECB-27A2BCC9D7F6}")
  37. AZStd::string m_standardTempDirectory;
  38. AZStd::string m_saveLocation;
  39. int m_backupOnSaveMaxCount;
  40. bool m_autoNumberSlices;
  41. bool m_backupOnSave;
  42. };
  43. struct ExternalEditors
  44. {
  45. AZ_TYPE_INFO(ExternalEditors, "{6D04DAA8-C0DF-4AFE-B263-9B95619B2527}")
  46. AZStd::string m_scripts;
  47. AZStd::string m_shaders;
  48. AZStd::string m_BSpaces;
  49. AZStd::string m_textures;
  50. AZStd::string m_animations;
  51. };
  52. struct AutoBackup
  53. {
  54. AZ_TYPE_INFO(AutoBackup, "{C4EC2E11-EBE4-4DAE-B1E2-EB4C8731ECEE}")
  55. bool m_enabled;
  56. int m_timeInterval;
  57. int m_maxCount;
  58. int m_remindTime;
  59. };
  60. struct AssetBrowserSettings
  61. {
  62. AZ_TYPE_INFO(AssetBrowserSettings, "{5F407EC4-BBD1-4A87-92DB-D938D7127BB0}")
  63. AZ::u64 m_maxNumberOfItemsShownInSearch;
  64. };
  65. Files m_files;
  66. ExternalEditors m_editors;
  67. AutoBackup m_autoBackup;
  68. AssetBrowserSettings m_assetBrowserSettings;
  69. QIcon m_icon;
  70. };