2
0

PrefabMakerPage.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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/Entity.h>
  10. #include <ROS2/Spawner/SpawnerInfo.h>
  11. #include <qcombobox.h>
  12. #if !defined(Q_MOC_RUN)
  13. #include <AzCore/Math/Crc.h>
  14. #include <AzCore/std/string/string.h>
  15. #include <QCheckBox>
  16. #include <QLabel>
  17. #include <QLineEdit>
  18. #include <QPushButton>
  19. #include <QString>
  20. #include <QTextEdit>
  21. #include <QWizardPage>
  22. #endif
  23. namespace ROS2RobotImporter
  24. {
  25. class RobotImporterWidget;
  26. class PrefabMakerPage : public QWizardPage
  27. {
  28. Q_OBJECT
  29. public:
  30. explicit PrefabMakerPage(RobotImporterWidget* parent);
  31. void SetProposedPrefabName(const AZStd::string prefabName);
  32. AZStd::string GetPrefabName() const;
  33. void ReportProgress(const AZStd::string& progressForUser);
  34. void SetSuccess(bool success);
  35. bool isComplete() const override;
  36. AZStd::optional<AZ::Transform> getSelectedSpawnPoint() const;
  37. Q_SIGNALS:
  38. void onCreateButtonPressed();
  39. private:
  40. static bool IsZeroPoint(AZStd::string spawnPointName);
  41. static constexpr AZStd::string_view zeroPoint = "Simulation origin";
  42. bool m_success;
  43. QLineEdit* m_prefabName;
  44. QPushButton* m_createButton;
  45. QTextEdit* m_log;
  46. QComboBox* m_spawnPointsComboBox;
  47. ROS2::SpawnPointInfoMap m_spawnPointsInfos;
  48. };
  49. } // namespace ROS2RobotImporter