FirstTimeUse.cpp 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 <FirstTimeUse.h>
  13. #include <Source/ui_FirstTimeUse.h>
  14. namespace O3DE::ProjectManager
  15. {
  16. FirstTimeUse::FirstTimeUse(ProjectManagerWindow* window)
  17. : ScreenWidget(window)
  18. , m_ui(new Ui::FirstTimeUseClass())
  19. {
  20. m_ui->setupUi(this);
  21. ConnectSlotsAndSignals();
  22. }
  23. FirstTimeUse::~FirstTimeUse()
  24. {
  25. }
  26. void FirstTimeUse::ConnectSlotsAndSignals()
  27. {
  28. QObject::connect(m_ui->createProjectButton, &QPushButton::pressed, this, &FirstTimeUse::HandleNewProjectButton);
  29. QObject::connect(m_ui->openProjectButton, &QPushButton::pressed, this, &FirstTimeUse::HandleOpenProjectButton);
  30. }
  31. void FirstTimeUse::HandleNewProjectButton()
  32. {
  33. m_projectManagerWindow->ChangeToScreen(ProjectManagerScreen::NewProjectSettings);
  34. }
  35. void FirstTimeUse::HandleOpenProjectButton()
  36. {
  37. m_projectManagerWindow->ChangeToScreen(ProjectManagerScreen::ProjectsHome);
  38. }
  39. } // namespace O3DE::ProjectManager