ProjectSettingsScreen.h 1.4 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. #if !defined(Q_MOC_RUN)
  10. #include <ProjectInfo.h>
  11. #include <ScreenWidget.h>
  12. #include <AzCore/Outcome/Outcome.h>
  13. #endif
  14. QT_FORWARD_DECLARE_CLASS(QHBoxLayout)
  15. QT_FORWARD_DECLARE_CLASS(QVBoxLayout)
  16. namespace O3DE::ProjectManager
  17. {
  18. QT_FORWARD_DECLARE_CLASS(FormLineEditWidget)
  19. QT_FORWARD_DECLARE_CLASS(FormBrowseEditWidget)
  20. class ProjectSettingsScreen
  21. : public ScreenWidget
  22. {
  23. public:
  24. explicit ProjectSettingsScreen(QWidget* parent = nullptr);
  25. ~ProjectSettingsScreen() = default;
  26. ProjectManagerScreen GetScreenEnum() override;
  27. virtual ProjectInfo GetProjectInfo();
  28. virtual AZ::Outcome<void, QString> Validate() const;
  29. protected slots:
  30. virtual void OnProjectNameUpdated();
  31. virtual void OnProjectPathUpdated();
  32. protected:
  33. bool ValidateProjectName() const;
  34. virtual bool ValidateProjectPath() const;
  35. QString GetDefaultProjectPath();
  36. QHBoxLayout* m_horizontalLayout;
  37. QVBoxLayout* m_verticalLayout;
  38. FormLineEditWidget* m_projectName;
  39. FormLineEditWidget* m_projectVersion;
  40. FormBrowseEditWidget* m_projectPath;
  41. };
  42. } // namespace O3DE::ProjectManager