3
0

MotionDataHandler.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 <AzCore/Asset/AssetCommon.h>
  11. #include <AzCore/std/containers/vector.h>
  12. #include <AzCore/Math/Uuid.h>
  13. #include <AzToolsFramework/UI/PropertyEditor/PropertyEditorAPI.h>
  14. #include <QComboBox>
  15. #endif
  16. namespace EMotionFX
  17. {
  18. class MotionDataHandler
  19. : public QObject
  20. , public AzToolsFramework::PropertyHandler<AZ::TypeId, QComboBox>
  21. {
  22. Q_OBJECT
  23. public:
  24. AZ_CLASS_ALLOCATOR_DECL
  25. MotionDataHandler() = default;
  26. AZ::u32 GetHandlerName() const override;
  27. QWidget* CreateGUI(QWidget* parent) override;
  28. bool AutoDelete() const override { return false; }
  29. void ConsumeAttribute(QComboBox* widget, AZ::u32 attrib, AzToolsFramework::PropertyAttributeReader* attrValue, const char* debugName) override;
  30. void WriteGUIValuesIntoProperty(size_t index, QComboBox* GUI, property_t& instance, AzToolsFramework::InstanceDataNode* node) override;
  31. bool ReadValuesIntoGUI(size_t index, QComboBox* GUI, const property_t& instance, AzToolsFramework::InstanceDataNode* node) override;
  32. private:
  33. AZStd::vector<AZ::TypeId> m_typeIds;
  34. };
  35. } // namespace EMotionFX