Moved Qt files into to renamed 'S'ource

This commit is contained in:
nggieber
2021-05-05 12:29:06 -07:00
parent 83e2ec6800
commit 76ffff8bb5
26 changed files with 0 additions and 0 deletions
@@ -0,0 +1,35 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#include <Qt/EngineSettings.h>
#include <Qt/ui_EngineSettings.h>
namespace O3DE::ProjectManager
{
EngineSettings::EngineSettings(ProjectManagerWindow* window)
: ScreenWidget(window)
, m_ui(new Ui::EngineSettingsClass())
{
m_ui->setupUi(this);
}
EngineSettings::~EngineSettings()
{
}
void EngineSettings::ConnectSlotsAndSignals()
{
// Do nothing for now
}
} // namespace O3DE::ProjectManager
@@ -0,0 +1,39 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#if !defined(Q_MOC_RUN)
#include <Qt/ScreenWidget.h>
#endif
namespace Ui
{
class EngineSettingsClass;
}
namespace O3DE::ProjectManager
{
class EngineSettings
: public ScreenWidget
{
public:
explicit EngineSettings(ProjectManagerWindow* window);
~EngineSettings();
protected:
void ConnectSlotsAndSignals() override;
private:
QScopedPointer<Ui::EngineSettingsClass> m_ui;
};
} // namespace O3DE::ProjectManager
@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>EngineSettingsClass</class>
<widget class="QWidget" name="EngineSettingsClass">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>839</width>
<height>597</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>O3DE Settings</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Engine Version</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>v1.01</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_4">
<property name="text">
<string>3rd Party Software Folder</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit"/>
</item>
<item>
<widget class="QLabel" name="label_5">
<property name="text">
<string>Restricted Folder</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_2"/>
</item>
<item>
<widget class="QLabel" name="label_6">
<property name="text">
<string>Default Gems Folder</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_3"/>
</item>
<item>
<widget class="QLabel" name="label_7">
<property name="text">
<string>Default Project Templates Folder</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_4"/>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
@@ -0,0 +1,47 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#include <Qt/FirstTimeUse.h>
#include <Qt/ui_FirstTimeUse.h>
namespace O3DE::ProjectManager
{
FirstTimeUse::FirstTimeUse(ProjectManagerWindow* window)
: ScreenWidget(window)
, m_ui(new Ui::FirstTimeUseClass())
{
m_ui->setupUi(this);
ConnectSlotsAndSignals();
}
FirstTimeUse::~FirstTimeUse()
{
}
void FirstTimeUse::ConnectSlotsAndSignals()
{
QObject::connect(m_ui->createProjectButton, &QPushButton::pressed, this, &FirstTimeUse::HandleNewProjectButton);
QObject::connect(m_ui->openProjectButton, &QPushButton::pressed, this, &FirstTimeUse::HandleOpenProjectButton);
}
void FirstTimeUse::HandleNewProjectButton()
{
m_projectManagerWindow->ChangeToScreen(ProjectManagerScreen::NewProjectSettings);
}
void FirstTimeUse::HandleOpenProjectButton()
{
m_projectManagerWindow->ChangeToScreen(ProjectManagerScreen::ProjectsHome);
}
} // namespace O3DE::ProjectManager
@@ -0,0 +1,43 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#if !defined(Q_MOC_RUN)
#include <Qt/ScreenWidget.h>
#endif
namespace Ui
{
class FirstTimeUseClass;
}
namespace O3DE::ProjectManager
{
class FirstTimeUse
: public ScreenWidget
{
public:
explicit FirstTimeUse(ProjectManagerWindow* window);
~FirstTimeUse();
protected:
void ConnectSlotsAndSignals() override;
protected slots:
void HandleNewProjectButton();
void HandleOpenProjectButton();
private:
QScopedPointer<Ui::FirstTimeUseClass> m_ui;
};
} // namespace O3DE::ProjectManager
@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>FirstTimeUseClass</class>
<widget class="QWidget" name="FirstTimeUseClass">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>881</width>
<height>555</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>30</pointsize>
</font>
</property>
<property name="text">
<string>READY. SET. CREATE!</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Welcome to O3DE! Start something new by creating a project. Not sure what to create? &lt;/p&gt;&lt;p&gt;Explore whats available by downloading our sample project.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::AutoText</enum>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QPushButton" name="createProjectButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Create Project</string>
</property>
<property name="icon">
<iconset resource="../project_manager.qrc">
<normaloff>:/Resources/Add.svg</normaloff>:/Resources/Add.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="openProjectButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Open a Project</string>
</property>
<property name="icon">
<iconset resource="../project_manager.qrc">
<normaloff>:/Resources/Select_Folder.svg</normaloff>:/Resources/Select_Folder.svg</iconset>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources>
<include location="../project_manager.qrc"/>
</resources>
<connections/>
</ui>
@@ -0,0 +1,47 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#include <Qt/GemCatalog.h>
#include <Qt/ui_GemCatalog.h>
namespace O3DE::ProjectManager
{
GemCatalog::GemCatalog(ProjectManagerWindow* window)
: ScreenWidget(window)
, m_ui(new Ui::GemCatalogClass())
{
m_ui->setupUi(this);
ConnectSlotsAndSignals();
}
GemCatalog::~GemCatalog()
{
}
void GemCatalog::ConnectSlotsAndSignals()
{
QObject::connect(m_ui->backButton, &QPushButton::pressed, this, &GemCatalog::HandleBackButton);
QObject::connect(m_ui->confirmButton, &QPushButton::pressed, this, &GemCatalog::HandleConfirmButton);
}
void GemCatalog::HandleBackButton()
{
m_projectManagerWindow->ChangeToScreen(ProjectManagerScreen::NewProjectSettings);
}
void GemCatalog::HandleConfirmButton()
{
m_projectManagerWindow->ChangeToScreen(ProjectManagerScreen::ProjectsHome);
}
} // namespace O3DE::ProjectManager
@@ -0,0 +1,44 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#if !defined(Q_MOC_RUN)
#include <Qt/ScreenWidget.h>
#endif
namespace Ui
{
class GemCatalogClass;
}
namespace O3DE::ProjectManager
{
class GemCatalog
: public ScreenWidget
{
public:
explicit GemCatalog(ProjectManagerWindow* window);
~GemCatalog();
protected:
void ConnectSlotsAndSignals() override;
protected slots:
void HandleBackButton();
void HandleConfirmButton();
private:
QScopedPointer<Ui::GemCatalogClass> m_ui;
};
} // namespace O3DE::ProjectManager
@@ -0,0 +1,231 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>GemCatalogClass</class>
<widget class="QWidget" name="GemCatalogClass">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>806</width>
<height>566</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Gem Catalog</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="toolButton">
<property name="text">
<string>Cart</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="toolButton_2">
<property name="text">
<string>Hamburger Menu</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="label_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton">
<property name="text">
<string>RadioButton</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton_2">
<property name="text">
<string>RadioButton</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton_3">
<property name="text">
<string>RadioButton</string>
</property>
</widget>
</item>
<item>
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox">
<property name="text">
<string>CheckBox</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_2">
<property name="text">
<string>CheckBox</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_3">
<property name="text">
<string>CheckBox</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QListWidget" name="listWidget_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QLabel" name="label_4">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item>
<widget class="QListWidget" name="listWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>Atom</string>
</property>
</item>
<item>
<property name="text">
<string>Audio</string>
</property>
</item>
<item>
<property name="text">
<string>Camera</string>
</property>
</item>
<item>
<property name="text">
<string>PhysX</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="backButton">
<property name="text">
<string>Back</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="confirmButton">
<property name="text">
<string>Create Project</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
@@ -0,0 +1,47 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#include <Qt/NewProjectSettings.h>
#include <Qt/ui_NewProjectSettings.h>
namespace O3DE::ProjectManager
{
NewProjectSettings::NewProjectSettings(ProjectManagerWindow* window)
: ScreenWidget(window)
, m_ui(new Ui::NewProjectSettingsClass())
{
m_ui->setupUi(this);
ConnectSlotsAndSignals();
}
NewProjectSettings::~NewProjectSettings()
{
}
void NewProjectSettings::ConnectSlotsAndSignals()
{
QObject::connect(m_ui->backButton, &QPushButton::pressed, this, &NewProjectSettings::HandleBackButton);
QObject::connect(m_ui->nextButton, &QPushButton::pressed, this, &NewProjectSettings::HandleNextButton);
}
void NewProjectSettings::HandleBackButton()
{
m_projectManagerWindow->ChangeToScreen(ProjectManagerScreen::FirstTimeUse);
}
void NewProjectSettings::HandleNextButton()
{
m_projectManagerWindow->ChangeToScreen(ProjectManagerScreen::GemCatalog);
}
} // namespace O3DE::ProjectManager
@@ -0,0 +1,43 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#if !defined(Q_MOC_RUN)
#include <Qt/ScreenWidget.h>
#endif
namespace Ui
{
class NewProjectSettingsClass;
}
namespace O3DE::ProjectManager
{
class NewProjectSettings
: public ScreenWidget
{
public:
explicit NewProjectSettings(ProjectManagerWindow* window);
~NewProjectSettings();
protected:
void ConnectSlotsAndSignals() override;
protected slots:
void HandleBackButton();
void HandleNextButton();
private:
QScopedPointer<Ui::NewProjectSettingsClass> m_ui;
};
} // namespace O3DE::ProjectManager
@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>NewProjectSettingsClass</class>
<widget class="QWidget" name="NewProjectSettingsClass">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>880</width>
<height>546</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="projectNameLabel">
<property name="text">
<string>Project Name</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="projectNameLineEdit"/>
</item>
<item>
<widget class="QLabel" name="projectPathLabel">
<property name="text">
<string>Project Path</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="projectPathLineEdit"/>
</item>
<item>
<widget class="QLabel" name="projectTemplateLabel">
<property name="text">
<string>Project Template</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QRadioButton" name="projectTemplateStandardRadioButton">
<property name="text">
<string>Standard (Recommened)</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="projectTemplateStandardEmptyButton">
<property name="text">
<string>Empty</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="backButton">
<property name="text">
<string>Back</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="nextButton">
<property name="text">
<string>Next</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
@@ -0,0 +1,106 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#include <Qt/ProjectManagerWindow.h>
#include <ScreenFactory.h>
#include <AzQtComponents/Components/StyleManager.h>
#include <AzCore/IO/Path/Path.h>
#include <QDir>
#include <Qt/ui_ProjectManagerWindow.h>
namespace O3DE::ProjectManager
{
ProjectManagerWindow::ProjectManagerWindow(QWidget* parent, const AZ::IO::PathView& engineRootPath)
: QMainWindow(parent)
, m_ui(new Ui::ProjectManagerWindowClass())
{
m_ui->setupUi(this);
ConnectSlotsAndSignals();
QDir rootDir = QString::fromUtf8(engineRootPath.Native().data(), aznumeric_cast<int>(engineRootPath.Native().size()));
const auto pathOnDisk = rootDir.absoluteFilePath("Code/Tools/ProjectManager/Resources");
const auto qrcPath = QStringLiteral(":/ProjectManagerWindow");
AzQtComponents::StyleManager::addSearchPaths("projectmanagerwindow", pathOnDisk, qrcPath, engineRootPath);
AzQtComponents::StyleManager::setStyleSheet(this, QStringLiteral("projectlauncherwindow:ProjectManagerWindow.qss"));
BuildScreens();
ChangeToScreen(ProjectManagerScreen::FirstTimeUse);
}
ProjectManagerWindow::~ProjectManagerWindow()
{
}
void ProjectManagerWindow::BuildScreens()
{
// Basically just iterate over the ProjectManagerScreen enum creating each screen
// Could add some fancy to do this but there are few screens right now
ResetScreen(ProjectManagerScreen::FirstTimeUse);
ResetScreen(ProjectManagerScreen::NewProjectSettings);
ResetScreen(ProjectManagerScreen::GemCatalog);
ResetScreen(ProjectManagerScreen::ProjectsHome);
ResetScreen(ProjectManagerScreen::ProjectSettings);
ResetScreen(ProjectManagerScreen::EngineSettings);
}
QStackedWidget* ProjectManagerWindow::GetScreenStack()
{
return m_ui->stackedScreens;
}
void ProjectManagerWindow::ChangeToScreen(ProjectManagerScreen screen)
{
int index = aznumeric_cast<int, ProjectManagerScreen>(screen);
m_ui->stackedScreens->setCurrentIndex(index);
}
void ProjectManagerWindow::ResetScreen(ProjectManagerScreen screen)
{
int index = aznumeric_cast<int, ProjectManagerScreen>(screen);
// Fine the old screen if it exists and get rid of it so we can start fresh
QWidget* oldScreen = m_ui->stackedScreens->widget(index);
if (oldScreen)
{
m_ui->stackedScreens->removeWidget(oldScreen);
oldScreen->deleteLater();
}
// Add new screen
QWidget* newScreen = BuildScreen(this, screen);
m_ui->stackedScreens->insertWidget(index, newScreen);
}
void ProjectManagerWindow::ConnectSlotsAndSignals()
{
QObject::connect(m_ui->projectsMenu, &QMenu::aboutToShow, this, &ProjectManagerWindow::HandleProjectsMenu);
QObject::connect(m_ui->engineMenu, &QMenu::aboutToShow, this, &ProjectManagerWindow::HandleEngineMenu);
}
void ProjectManagerWindow::HandleProjectsMenu()
{
ChangeToScreen(ProjectManagerScreen::ProjectsHome);
}
void ProjectManagerWindow::HandleEngineMenu()
{
ChangeToScreen(ProjectManagerScreen::EngineSettings);
}
} // namespace O3DE::ProjectManager
@@ -0,0 +1,57 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#if !defined(Q_MOC_RUN)
#include <ScreenDefs.h>
#include <QMainWindow>
#include <QStackedWidget>
#include <AzCore/IO/Path/Path_fwd.h>
#endif
namespace Ui
{
class ProjectManagerWindowClass;
}
namespace O3DE::ProjectManager
{
class ProjectManagerWindow
: public QMainWindow
{
Q_OBJECT
public:
explicit ProjectManagerWindow(QWidget* parent, const AZ::IO::PathView& engineRootPath);
~ProjectManagerWindow();
void BuildScreens();
QStackedWidget* GetScreenStack();
public slots:
void ChangeToScreen(ProjectManagerScreen screen);
void ResetScreen(ProjectManagerScreen screen);
protected:
void ConnectSlotsAndSignals();
protected slots:
void HandleProjectsMenu();
void HandleEngineMenu();
private:
QScopedPointer<Ui::ProjectManagerWindowClass> m_ui;
};
} // namespace O3DE::ProjectManager
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ProjectManagerWindowClass</class>
<widget class="QMainWindow" name="ProjectManagerWindowClass">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>600</height>
</rect>
</property>
<property name="windowTitle">
<string>O3DE Project Manager</string>
</property>
<widget class="QWidget" name="centralWidget">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QStackedWidget" name="stackedScreens"/>
</item>
</layout>
</widget>
<widget class="QMenuBar" name="menuBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>36</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>16</pointsize>
</font>
</property>
<widget class="QMenu" name="iconMenu">
<property name="title">
<string>Icon</string>
</property>
<property name="icon">
<iconset resource="../project_manager.qrc">
<normaloff>:/Resources/o3de_editor.ico</normaloff>:/Resources/o3de_editor.ico</iconset>
</property>
</widget>
<widget class="QMenu" name="projectsMenu">
<property name="title">
<string>Projects</string>
</property>
</widget>
<widget class="QMenu" name="engineMenu">
<property name="title">
<string>Engine</string>
</property>
</widget>
<addaction name="iconMenu"/>
<addaction name="projectsMenu"/>
<addaction name="engineMenu"/>
</widget>
</widget>
<resources>
<include location="../project_manager.qrc"/>
</resources>
<connections/>
</ui>
@@ -0,0 +1,42 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#include <Qt/ProjectSettings.h>
#include <Qt/ui_ProjectSettings.h>
namespace O3DE::ProjectManager
{
ProjectSettings::ProjectSettings(ProjectManagerWindow* window)
: ScreenWidget(window)
, m_ui(new Ui::ProjectSettingsClass())
{
m_ui->setupUi(this);
ConnectSlotsAndSignals();
}
ProjectSettings::~ProjectSettings()
{
}
void ProjectSettings::ConnectSlotsAndSignals()
{
QObject::connect(m_ui->gemsButton, &QPushButton::pressed, this, &ProjectSettings::HandleGemsButton);
}
void ProjectSettings::HandleGemsButton()
{
m_projectManagerWindow->ChangeToScreen(ProjectManagerScreen::GemCatalog);
}
} // namespace O3DE::ProjectManager
@@ -0,0 +1,42 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#if !defined(Q_MOC_RUN)
#include <Qt/ScreenWidget.h>
#endif
namespace Ui
{
class ProjectSettingsClass;
}
namespace O3DE::ProjectManager
{
class ProjectSettings
: public ScreenWidget
{
public:
explicit ProjectSettings(ProjectManagerWindow* window);
~ProjectSettings();
protected:
void ConnectSlotsAndSignals() override;
protected slots:
void HandleGemsButton();
private:
QScopedPointer<Ui::ProjectSettingsClass> m_ui;
};
} // namespace O3DE::ProjectManager
@@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ProjectSettingsClass</class>
<widget class="QWidget" name="ProjectSettingsClass">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>782</width>
<height>579</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="projectSettingsButton">
<property name="text">
<string>Project Settings</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="gemsButton">
<property name="text">
<string>Gems</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>761</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Project Name</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit"/>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Project Location</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_2"/>
</item>
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>Project Image Location</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_3"/>
</item>
<item>
<widget class="QLabel" name="label_4">
<property name="text">
<string>Project Background Image Location</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_4"/>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
@@ -0,0 +1,52 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#include <Qt/ProjectsHome.h>
#include <Qt/ui_ProjectsHome.h>
namespace O3DE::ProjectManager
{
ProjectsHome::ProjectsHome(ProjectManagerWindow* window)
: ScreenWidget(window)
, m_ui(new Ui::ProjectsHomeClass())
{
m_ui->setupUi(this);
ConnectSlotsAndSignals();
}
ProjectsHome::~ProjectsHome()
{
}
void ProjectsHome::ConnectSlotsAndSignals()
{
QObject::connect(m_ui->newProjectButton, &QPushButton::pressed, this, &ProjectsHome::HandleNewProjectButton);
QObject::connect(m_ui->addProjectButton, &QPushButton::pressed, this, &ProjectsHome::HandleAddProjectButton);
QObject::connect(m_ui->editProjectButton, &QPushButton::pressed, this, &ProjectsHome::HandleEditProjectButton);
}
void ProjectsHome::HandleNewProjectButton()
{
m_projectManagerWindow->ChangeToScreen(ProjectManagerScreen::NewProjectSettings);
}
void ProjectsHome::HandleAddProjectButton()
{
//Do nothing for now
}
void ProjectsHome::HandleEditProjectButton()
{
m_projectManagerWindow->ChangeToScreen(ProjectManagerScreen::ProjectSettings);
}
} // namespace O3DE::ProjectManager
@@ -0,0 +1,45 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#if !defined(Q_MOC_RUN)
#include <Qt/ScreenWidget.h>
#endif
namespace Ui
{
class ProjectsHomeClass;
}
namespace O3DE::ProjectManager
{
class ProjectsHome
: public ScreenWidget
{
public:
explicit ProjectsHome(ProjectManagerWindow* window);
~ProjectsHome();
protected:
void ConnectSlotsAndSignals() override;
protected slots:
void HandleNewProjectButton();
void HandleAddProjectButton();
void HandleEditProjectButton();
private:
QScopedPointer<Ui::ProjectsHomeClass> m_ui;
};
} // namespace O3DE::ProjectManager
@@ -0,0 +1,137 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ProjectsHomeClass</class>
<widget class="QWidget" name="ProjectsHomeClass">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>826</width>
<height>585</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>My Projects</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="currentProjectButton">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="newProjectButton">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../project_manager.qrc">
<normaloff>:/Resources/Add.svg</normaloff>:/Resources/Add.svg</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="addProjectButton">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../project_manager.qrc">
<normaloff>:/Resources/Select_Folder.svg</normaloff>:/Resources/Select_Folder.svg</iconset>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="QToolButton" name="editProjectButton">
<property name="text">
<string>Edit Project</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Open a Project</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources>
<include location="../project_manager.qrc"/>
</resources>
<connections/>
</ui>
@@ -0,0 +1,25 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
namespace O3DE::ProjectManager
{
enum class ProjectManagerScreen
{
FirstTimeUse,
NewProjectSettings,
GemCatalog,
ProjectsHome,
ProjectSettings,
EngineSettings
};
} // namespace O3DE::ProjectManager
@@ -0,0 +1,43 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#include <ScreenFactory.h>
#include <Qt/FirstTimeUse.h>
#include <Qt/NewProjectSettings.h>
#include <Qt/GemCatalog.h>
#include <Qt/ProjectsHome.h>
#include <Qt/ProjectSettings.h>
#include <Qt/EngineSettings.h>
namespace O3DE::ProjectManager
{
QWidget* BuildScreen(ProjectManagerWindow* window, ProjectManagerScreen screen)
{
switch(screen)
{
case (ProjectManagerScreen::FirstTimeUse):
return new FirstTimeUse(window);
case (ProjectManagerScreen::NewProjectSettings):
return new NewProjectSettings(window);
case (ProjectManagerScreen::GemCatalog):
return new GemCatalog(window);
case (ProjectManagerScreen::ProjectsHome):
return new ProjectsHome(window);
case (ProjectManagerScreen::ProjectSettings):
return new ProjectSettings(window);
case (ProjectManagerScreen::EngineSettings):
return new EngineSettings(window);
default:
return new QWidget(window->GetScreenStack());
}
}
} // namespace O3DE::ProjectManager
@@ -0,0 +1,24 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#include <ScreenDefs.h>
#include <Qt/ProjectManagerWindow.h>
#include <QWidget>
namespace O3DE::ProjectManager
{
QWidget* BuildScreen(ProjectManagerWindow* window, ProjectManagerScreen screen);
} // namespace O3DE::ProjectManager
@@ -0,0 +1,38 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#if !defined(Q_MOC_RUN)
#include <Qt/ProjectManagerWindow.h>
#include <QWidget>
#endif
namespace O3DE::ProjectManager
{
class ScreenWidget
: public QWidget
{
public:
explicit ScreenWidget(ProjectManagerWindow* window)
: QWidget(window->GetScreenStack())
, m_projectManagerWindow(window)
{
}
protected:
virtual void ConnectSlotsAndSignals() = 0;
ProjectManagerWindow* m_projectManagerWindow;
};
} // namespace O3DE::ProjectManager
+55
View File
@@ -0,0 +1,55 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#include <AzQtComponents/Utilities/HandleDpiAwareness.h>
#include <AzQtComponents/Components/StyleManager.h>
#include <AzCore/Component/ComponentApplication.h>
#include <AzCore/Settings/SettingsRegistryMergeUtils.h>
#include <AzCore/IO/Path/Path.h>
#include <Qt/ProjectManagerWindow.h>
#include <QApplication>
#include <QCoreApplication>
#include <QGuiApplication>
int main(int argc, char* argv[])
{
QApplication::setOrganizationName("O3DE");
QApplication::setOrganizationDomain("o3de.org");
QCoreApplication::setApplicationName("ProjectManager");
QCoreApplication::setApplicationVersion("1.0");
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
QCoreApplication::setAttribute(Qt::AA_DontCreateNativeWidgetSiblings);
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
AzQtComponents::Utilities::HandleDpiAwareness(AzQtComponents::Utilities::SystemDpiAware);
QApplication app(argc, argv);
// Need to use settings registry to get EngineRootFolder
AZ::IO::FixedMaxPath engineRootPath;
{
AZ::ComponentApplication componentApplication;
auto settingsRegistry = AZ::SettingsRegistry::Get();
settingsRegistry->Get(engineRootPath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder);
}
AzQtComponents::StyleManager styleManager(&app);
styleManager.initialize(&app, engineRootPath);
O3DE::ProjectManager::ProjectManagerWindow window(nullptr, engineRootPath);
window.show();
return app.exec();
}