3
0

SceneContextMenuActions.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  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 <GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ContextMenuAction.h>
  10. namespace LandscapeCanvasEditor
  11. {
  12. class FindSelectedNodesAction
  13. : public GraphCanvas::ContextMenuAction
  14. {
  15. public:
  16. AZ_CLASS_ALLOCATOR(FindSelectedNodesAction, AZ::SystemAllocator);
  17. FindSelectedNodesAction(QObject* parent);
  18. virtual ~FindSelectedNodesAction() = default;
  19. GraphCanvas::ActionGroupId GetActionGroupId() const override;
  20. using GraphCanvas::ContextMenuAction::RefreshAction;
  21. void RefreshAction(const GraphCanvas::GraphId& graphId, const AZ::EntityId& targetId) override;
  22. using GraphCanvas::ContextMenuAction::TriggerAction;
  23. GraphCanvas::ContextMenuAction::SceneReaction TriggerAction(const GraphCanvas::GraphId& graphId, const AZ::Vector2& scenePos) override;
  24. private:
  25. void UpdateActionState();
  26. };
  27. }