GeoreferenceLevelEditorComponent.cpp 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. #include "GeoreferenceLevelEditorComponent.h"
  9. namespace Georeferencing
  10. {
  11. GeoReferenceLevelEditorComponent::GeoReferenceLevelEditorComponent(const GeoReferenceLevelConfig& configuration)
  12. : GeoReferenceLevelEditorComponentBase(configuration)
  13. {
  14. }
  15. void GeoReferenceLevelEditorComponent::Reflect(AZ::ReflectContext* context)
  16. {
  17. GeoReferenceLevelEditorComponentBase::Reflect(context);
  18. AZ::SerializeContext* serializeContext = azrtti_cast<AZ::SerializeContext*>(context);
  19. if (serializeContext)
  20. {
  21. serializeContext->Class<GeoReferenceLevelEditorComponent, GeoReferenceLevelEditorComponentBase>()->Version(1);
  22. AZ::EditContext* editContext = serializeContext->GetEditContext();
  23. if (editContext)
  24. {
  25. editContext
  26. ->Class<GeoReferenceLevelEditorComponent>(
  27. "GeoReference Level Editor Component", "Component allows to provide georeference level for the level")
  28. ->ClassElement(AZ::Edit::ClassElements::EditorData, "Component allows to provide georeference level for the level")
  29. ->Attribute(AZ::Edit::Attributes::Category, "Georeferencing")
  30. ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC_CE("Level"))
  31. ->Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/Components/ROS2GNSSSensor.svg")
  32. ->Attribute(AZ::Edit::Attributes::ViewportIcon, "Editor/Icons/Components/Viewport/ROS2GNSSSensor.svg")
  33. ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly);
  34. }
  35. }
  36. }
  37. void GeoReferenceLevelEditorComponent::Activate()
  38. {
  39. GeoReferenceLevelEditorComponentBase::Activate();
  40. }
  41. void GeoReferenceLevelEditorComponent::Deactivate()
  42. {
  43. GeoReferenceLevelEditorComponentBase::Deactivate();
  44. }
  45. bool GeoReferenceLevelEditorComponent::ShouldActivateController() const
  46. {
  47. return true;
  48. };
  49. } // namespace Georeferencing