Add Initial Gem Repository Management Screen (#4172)

* Adds the gem repo screen with the UI built but with mocked data and not connected to the o3de scripts

Signed-off-by: nggieber <nggieber@amazon.com>

* Changed name of added to enabled, disabled define, removed unused functions

Signed-off-by: nggieber <nggieber@amazon.com>

* Added eof nl to qss

Signed-off-by: nggieber <nggieber@amazon.com>
This commit is contained in:
AMZN-nggieber
2021-09-20 08:36:29 -07:00
committed by GitHub
parent 59f79ad0de
commit 357e823323
26 changed files with 1054 additions and 21 deletions
@@ -912,4 +912,45 @@ namespace O3DE::ProjectManager
return AZ::Success(AZStd::move(templates));
}
}
GemRepoInfo PythonBindings::GemRepoInfoFromPath(pybind11::handle path, pybind11::handle pyEnginePath)
{
/* Placeholder Logic */
(void)path;
(void)pyEnginePath;
return GemRepoInfo();
}
//#define MOCK_GEM_REPO_INFO true
AZ::Outcome<QVector<GemRepoInfo>, AZStd::string> PythonBindings::GetAllGemRepoInfos()
{
QVector<GemRepoInfo> gemRepos;
#ifndef MOCK_GEM_REPO_INFO
auto result = ExecuteWithLockErrorHandling(
[&]
{
/* Placeholder Logic, o3de scripts need method added
*
for (auto path : m_manifest.attr("get_gem_repos")())
{
gemRepos.push_back(GemRepoInfoFromPath(path, pybind11::none()));
}
*
*/
});
if (!result.IsSuccess())
{
return AZ::Failure<AZStd::string>(result.GetError().c_str());
}
#else
gemRepos.push_back(GemRepoInfo("JohnCreates", "John Smith", "", QDateTime(QDate(2021, 8, 31), QTime(11, 57)), true));
gemRepos.push_back(GemRepoInfo("JanesGems", "Jane Doe", "", QDateTime(QDate(2021, 9, 10), QTime(18, 23)), false));
#endif // MOCK_GEM_REPO_INFO
std::sort(gemRepos.begin(), gemRepos.end());
return AZ::Success(AZStd::move(gemRepos));
}
}