ScreenFactory.cpp 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
  3. * its licensors.
  4. *
  5. * For complete copyright and license terms please see the LICENSE at the root of this
  6. * distribution (the "License"). All use of this software is governed by the License,
  7. * or, if provided, by the license below or the license accompanying this file. Do not
  8. * remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
  9. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. *
  11. */
  12. #include <ScreenFactory.h>
  13. #include <CreateProjectCtrl.h>
  14. #include <UpdateProjectCtrl.h>
  15. #include <NewProjectSettingsScreen.h>
  16. #include <GemCatalog/GemCatalogScreen.h>
  17. #include <ProjectsScreen.h>
  18. #include <ProjectSettingsScreen.h>
  19. #include <EngineSettingsScreen.h>
  20. namespace O3DE::ProjectManager
  21. {
  22. ScreenWidget* BuildScreen(QWidget* parent, ProjectManagerScreen screen)
  23. {
  24. ScreenWidget* newScreen;
  25. switch(screen)
  26. {
  27. case (ProjectManagerScreen::CreateProject):
  28. newScreen = new CreateProjectCtrl(parent);
  29. break;
  30. case (ProjectManagerScreen::NewProjectSettings):
  31. newScreen = new NewProjectSettingsScreen(parent);
  32. break;
  33. case (ProjectManagerScreen::GemCatalog):
  34. newScreen = new GemCatalogScreen(parent);
  35. break;
  36. case (ProjectManagerScreen::Projects):
  37. newScreen = new ProjectsScreen(parent);
  38. break;
  39. case (ProjectManagerScreen::UpdateProject):
  40. newScreen = new UpdateProjectCtrl(parent);
  41. break;
  42. case (ProjectManagerScreen::ProjectSettings):
  43. newScreen = new ProjectSettingsScreen(parent);
  44. break;
  45. case (ProjectManagerScreen::EngineSettings):
  46. newScreen = new EngineSettingsScreen(parent);
  47. break;
  48. case (ProjectManagerScreen::Empty):
  49. default:
  50. newScreen = new ScreenWidget(parent);
  51. }
  52. return newScreen;
  53. }
  54. } // namespace O3DE::ProjectManager