ProjectsHome.cpp 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 <ProjectsHome.h>
  13. #include <Source/ui_ProjectsHome.h>
  14. #include <PythonBindingsInterface.h>
  15. namespace O3DE::ProjectManager
  16. {
  17. ProjectsHome::ProjectsHome(ProjectManagerWindow* window)
  18. : ScreenWidget(window)
  19. , m_ui(new Ui::ProjectsHomeClass())
  20. {
  21. m_ui->setupUi(this);
  22. ConnectSlotsAndSignals();
  23. // example of how to get the current project name
  24. ProjectInfo currentProject = PythonBindingsInterface::Get()->GetCurrentProject();
  25. }
  26. ProjectsHome::~ProjectsHome()
  27. {
  28. }
  29. void ProjectsHome::ConnectSlotsAndSignals()
  30. {
  31. QObject::connect(m_ui->newProjectButton, &QPushButton::pressed, this, &ProjectsHome::HandleNewProjectButton);
  32. QObject::connect(m_ui->addProjectButton, &QPushButton::pressed, this, &ProjectsHome::HandleAddProjectButton);
  33. QObject::connect(m_ui->editProjectButton, &QPushButton::pressed, this, &ProjectsHome::HandleEditProjectButton);
  34. }
  35. void ProjectsHome::HandleNewProjectButton()
  36. {
  37. m_projectManagerWindow->ChangeToScreen(ProjectManagerScreen::NewProjectSettings);
  38. }
  39. void ProjectsHome::HandleAddProjectButton()
  40. {
  41. //Do nothing for now
  42. }
  43. void ProjectsHome::HandleEditProjectButton()
  44. {
  45. m_projectManagerWindow->ChangeToScreen(ProjectManagerScreen::ProjectSettings);
  46. }
  47. } // namespace O3DE::ProjectManager