DefaultImageValidator.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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 "FunctorValidator.h"
  11. #include <AzCore/std/containers/list.h>
  12. #endif
  13. namespace ProjectSettingsTool
  14. {
  15. // Forward Declaration
  16. class PropertyImagePreviewCtrl;
  17. class DefaultImageValidator
  18. : public FunctorValidator
  19. {
  20. Q_OBJECT
  21. public:
  22. DefaultImageValidator(const FunctorValidator& validator);
  23. QValidator::State validate(QString& input, int& pos) const override;
  24. ReturnType ValidateWithErrors(const QString& input) const override;
  25. // Adds a specific override to the list for this default override
  26. void AddOverride(PropertyImagePreviewCtrl* preview);
  27. protected:
  28. AZStd::list<const PropertyImagePreviewCtrl*> m_specificOverrides;
  29. };
  30. } // namespace ProjectSettingsTool