Create the Project Manager project (#320)

* Created the Project Manager project with a barebone styled window and rough sketch of first screen

* Renamed to Project Manager, ect.

* Corrected string name for projectmanager and added comments on getting engine path

* Changed output name for Project Manager to lowercase o3de

* Added header guards
This commit is contained in:
AMZN-nggieber
2021-04-30 17:11:40 -07:00
committed by GitHub
parent dd3f032480
commit 7a2f698bbc
20 changed files with 495 additions and 0 deletions
@@ -0,0 +1,31 @@
/*
* 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 ProjectManager
{
FirstTimeUse::FirstTimeUse(QWidget* parent)
: QWidget(parent)
, m_ui(new Ui::FirstTimeUseClass())
{
m_ui->setupUi(this);
}
FirstTimeUse::~FirstTimeUse()
{
}
//#include <Qt/moc_FirstTimeUse.cpp>
} // namespace ProjectManager
@@ -0,0 +1,36 @@
/*
* 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 <QWidget>
#endif
namespace Ui
{
class FirstTimeUseClass;
}
namespace ProjectManager
{
class FirstTimeUse : public QWidget
{
public:
explicit FirstTimeUse(QWidget* parent);
~FirstTimeUse();
private:
QScopedPointer<Ui::FirstTimeUseClass> m_ui;
};
} // namespace 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,49 @@
/*
* 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 <Qt/FirstTimeUse.h>
#include <AzQtComponents/Components/StyleManager.h>
#include <AzCore/IO/Path/Path.h>
#include <QDir>
#include <Qt/ui_ProjectManagerWindow.h>
namespace ProjectManager
{
ProjectManagerWindow::ProjectManagerWindow(QWidget* parent, const AZ::IO::PathView& engineRootPath)
: QMainWindow(parent)
, m_ui(new Ui::ProjectManagerWindowClass())
{
m_ui->setupUi(this);
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"));
FirstTimeUse* firstTimeUse = new FirstTimeUse(m_ui->centralwidget);
firstTimeUse->show();
}
ProjectManagerWindow::~ProjectManagerWindow()
{
}
//#include <Qt/moc_ProjectManagerWindow.cpp>
} // namespace 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 <QMainWindow>
#include <AzCore/IO/Path/Path_fwd.h>
#endif
namespace Ui
{
class ProjectManagerWindowClass;
}
namespace ProjectManager
{
class ProjectManagerWindow : public QMainWindow
{
public:
explicit ProjectManagerWindow(QWidget* parent, const AZ::IO::PathView& engineRootPath);
~ProjectManagerWindow();
private:
QScopedPointer<Ui::ProjectManagerWindowClass> m_ui;
};
} // namespace ProjectManager
@@ -0,0 +1,61 @@
<?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"/>
</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="menuIcon">
<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="menuProjects">
<property name="title">
<string>Projects</string>
</property>
</widget>
<widget class="QMenu" name="menuSettings">
<property name="title">
<string>Engine</string>
</property>
</widget>
<addaction name="menuIcon"/>
<addaction name="menuProjects"/>
<addaction name="menuSettings"/>
</widget>
</widget>
<resources>
<include location="../project_manager.qrc"/>
</resources>
<connections/>
</ui>