EntityMimeDataHandler.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 <AzCore/Component/EntityId.h>
  10. #include <AzCore/Component/Component.h>
  11. #include <GraphCanvas/Components/MimeDataHandlerBus.h>
  12. namespace ScriptCanvasEditor
  13. {
  14. class EntityMimeDataHandler
  15. : public AZ::Component
  16. , protected GraphCanvas::SceneMimeDelegateHandlerRequestBus::Handler
  17. {
  18. public:
  19. AZ_COMPONENT(EntityMimeDataHandler, "{C5557609-DBB6-4ACA-A042-D03844B1EB2B}");
  20. static void Reflect(AZ::ReflectContext* context);
  21. EntityMimeDataHandler();
  22. // SceneMimeDelegateHandlerRequestBus
  23. bool IsInterestedInMimeData(const AZ::EntityId& sceneId, const QMimeData* mimeData) override;
  24. void HandleMove(const AZ::EntityId& sceneId, const QPointF& movePoint, const QMimeData* mimeData) override;
  25. void HandleDrop(const AZ::EntityId& sceneId, const QPointF& dropPoint, const QMimeData* mimeData) override;
  26. void HandleLeave(const AZ::EntityId& sceneId, const QMimeData* mimeData) override;
  27. ////
  28. //AZ::Component
  29. void Activate() override;
  30. void Deactivate() override;
  31. };
  32. }