Add Project Manager File menu options to Editor

This commit is contained in:
Alex Peterson
2021-06-01 15:30:14 -07:00
committed by GitHub
parent 9e3b7b45d9
commit afe20906db
14 changed files with 147 additions and 17 deletions
@@ -14,13 +14,16 @@
#include <ScreensCtrl.h>
#include <AzQtComponents/Components/StyleManager.h>
#include <AzCore/IO/FileIO.h>
#include <AzCore/IO/Path/Path.h>
#include <AzFramework/CommandLine/CommandLine.h>
#include <AzFramework/Application/Application.h>
#include <QDir>
namespace O3DE::ProjectManager
{
ProjectManagerWindow::ProjectManagerWindow(QWidget* parent, const AZ::IO::PathView& engineRootPath)
ProjectManagerWindow::ProjectManagerWindow(QWidget* parent, const AZ::IO::PathView& engineRootPath, const AZ::IO::PathView& projectPath, ProjectManagerScreen startScreen)
: QMainWindow(parent)
{
m_pythonBindings = AZStd::make_unique<PythonBindings>(engineRootPath);
@@ -50,7 +53,18 @@ namespace O3DE::ProjectManager
// set stylesheet after creating the screens or their styles won't get updated
AzQtComponents::StyleManager::setStyleSheet(this, QStringLiteral("style:ProjectManager.qss"));
screensCtrl->ForceChangeToScreen(ProjectManagerScreen::Projects, false);
// always push the projects screen first so we have something to come back to
if (startScreen != ProjectManagerScreen::Projects)
{
screensCtrl->ForceChangeToScreen(ProjectManagerScreen::Projects);
}
screensCtrl->ForceChangeToScreen(startScreen);
if (!projectPath.empty())
{
const QString path = QString::fromUtf8(projectPath.Native().data(), aznumeric_cast<int>(projectPath.Native().size()));
emit screensCtrl->NotifyCurrentProject(path);
}
}
ProjectManagerWindow::~ProjectManagerWindow()