ReadOnlyNodePropertyDisplay.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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/Components/NodePropertyDisplay/NodePropertyDisplay.h>
  10. #include <GraphCanvas/Components/NodePropertyDisplay/ReadOnlyDataInterface.h>
  11. namespace GraphCanvas
  12. {
  13. class GraphCanvasLabel;
  14. class ReadOnlyNodePropertyDisplay
  15. : public NodePropertyDisplay
  16. {
  17. public:
  18. AZ_CLASS_ALLOCATOR(ReadOnlyNodePropertyDisplay, AZ::SystemAllocator);
  19. ReadOnlyNodePropertyDisplay(ReadOnlyDataInterface* dataInterface);
  20. virtual ~ReadOnlyNodePropertyDisplay();
  21. // NodePropertyDisplay
  22. void RefreshStyle() override;
  23. void UpdateDisplay() override;
  24. QGraphicsLayoutItem* GetDisabledGraphicsLayoutItem() override;
  25. QGraphicsLayoutItem* GetDisplayGraphicsLayoutItem() override;
  26. QGraphicsLayoutItem* GetEditableGraphicsLayoutItem() override;
  27. ////
  28. // DataSlotNotifications
  29. void OnDragDropStateStateChanged(const DragDropState& dragState) override;
  30. ////
  31. private:
  32. ReadOnlyDataInterface* m_dataInterface;
  33. GraphCanvasLabel* m_disabledLabel;
  34. GraphCanvasLabel* m_displayLabel;
  35. };
  36. }