3
0

Application.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 <AzFramework/Application/Application.h>
  11. #include <QCoreApplication>
  12. #include <PythonBindings.h>
  13. #include <Settings.h>
  14. #include <ProjectManagerWindow.h>
  15. #endif
  16. namespace AZ
  17. {
  18. class Entity;
  19. }
  20. namespace O3DE::ProjectManager
  21. {
  22. class Application
  23. : public AzFramework::Application
  24. {
  25. public:
  26. AZ_CLASS_ALLOCATOR(Application, AZ::SystemAllocator)
  27. using AzFramework::Application::Application;
  28. virtual ~Application();
  29. bool Init(bool interactive = true, AZStd::unique_ptr<PythonBindings> pythonBindings = nullptr);
  30. bool Run();
  31. void TearDown();
  32. private:
  33. bool InitLog(const char* logName);
  34. bool RegisterEngine(bool interactive);
  35. AZStd::unique_ptr<PythonBindings> m_pythonBindings;
  36. AZStd::unique_ptr<Settings> m_settings;
  37. QSharedPointer<QCoreApplication> m_app;
  38. QSharedPointer<ProjectManagerWindow> m_mainWindow;
  39. AZ::Entity* m_entity = nullptr;
  40. };
  41. }