ImageComparisonSettings.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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 <ImageComparisonConfig.h>
  10. namespace AZ::ScriptAutomation
  11. {
  12. // Manages the available ImageComparisonToleranceLevels
  13. class ImageComparisonSettings
  14. {
  15. public:
  16. //! Return the tolerance level with the given name.
  17. //! The returned level may be adjusted according to the user's "Level Adjustment" setting in ImGui.
  18. //! @param name name of the tolerance level to find.
  19. ImageComparisonToleranceLevel* FindToleranceLevel(const AZStd::string& name);
  20. //! Returns the list of all available tolerance levels, sorted most- to least-strict.
  21. const AZStd::vector<ImageComparisonToleranceLevel>& GetAvailableToleranceLevels() const;
  22. private:
  23. bool IsReady() const {return m_ready;}
  24. void GetToleranceLevelsFromSettingsRegistry();
  25. ImageComparisonConfig m_config;
  26. bool m_ready = false;
  27. };
  28. } // namespace AZ::ScriptAutomation