AddRemoteProjectDialog.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. #if !defined(Q_MOC_RUN)
  10. #include <ProjectInfo.h>
  11. #include <QDialog>
  12. #endif
  13. QT_FORWARD_DECLARE_CLASS(QLabel)
  14. QT_FORWARD_DECLARE_CLASS(QCheckBox)
  15. QT_FORWARD_DECLARE_CLASS(QDialogButtonBox)
  16. QT_FORWARD_DECLARE_CLASS(QPushButton)
  17. QT_FORWARD_DECLARE_CLASS(QTimer)
  18. namespace O3DE::ProjectManager
  19. {
  20. QT_FORWARD_DECLARE_CLASS(FormLineEditWidget)
  21. class AddRemoteProjectDialog
  22. : public QDialog
  23. {
  24. Q_OBJECT
  25. public:
  26. explicit AddRemoteProjectDialog(QWidget* parent = nullptr);
  27. ~AddRemoteProjectDialog() = default;
  28. QString GetRepoPath();
  29. QString GetInstallPath();
  30. bool ShouldBuild();
  31. void SetCurrentProject(const ProjectInfo& projectInfo);
  32. private:
  33. void SetDialogReady(bool isReady);
  34. signals:
  35. void StartObjectDownload(const QString& objectName, const QString& destinationPath, bool queueBuild);
  36. private slots:
  37. void ValidateURI();
  38. void DownloadObject();
  39. private:
  40. ProjectInfo m_currentProject;
  41. FormLineEditWidget* m_repoPath = nullptr;
  42. FormLineEditWidget* m_installPath = nullptr;
  43. QCheckBox* m_autoBuild = nullptr;
  44. QLabel* m_buildToggleLabel = nullptr;
  45. QLabel* m_downloadProjectLabel = nullptr;
  46. QLabel* m_requirementsTitleLabel = nullptr;
  47. QLabel* m_licensesTitleLabel = nullptr;
  48. QLabel* m_requirementsContentLabel = nullptr;
  49. QLabel* m_licensesContentLabel = nullptr;
  50. QDialogButtonBox* m_dialogButtons = nullptr;
  51. QPushButton* m_applyButton = nullptr;
  52. QTimer* m_inputTimer = nullptr;
  53. };
  54. } // namespace O3DE::ProjectManager