DataConnectionComponent.h 1.5 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. #include <Source/Components/Connections/ConnectionComponent.h>
  10. namespace GraphCanvas
  11. {
  12. class DataConnectionComponent
  13. : public ConnectionComponent
  14. , public ConnectionNotificationBus::Handler
  15. , public SceneMemberNotificationBus::Handler
  16. {
  17. public:
  18. AZ_COMPONENT(DataConnectionComponent, "{ECC6A4D9-E8CD-451B-93BE-409F04A9A52B}", ConnectionComponent);
  19. static void Reflect(AZ::ReflectContext* context);
  20. static AZ::Entity* CreateDataConnection(const Endpoint& sourceEndpoint, const Endpoint& targetEndpoint, bool createModelConnection, const AZStd::string& substyle = "");
  21. DataConnectionComponent() = default;
  22. DataConnectionComponent(const Endpoint& sourceEndpoint,const Endpoint& targetEndpoint, bool createModelConnection = true);
  23. ~DataConnectionComponent() override = default;
  24. // ConnectionComponent
  25. bool AllowNodeCreation() const override;
  26. ////
  27. protected:
  28. DataConnectionComponent(const DataConnectionComponent&) = delete;
  29. const DataConnectionComponent& operator=(const DataConnectionComponent&) = delete;
  30. ConnectionMoveResult OnConnectionMoveComplete(const QPointF& scenePos, const QPoint& screenPos, AZ::EntityId groupTarget) override;
  31. };
  32. }