Adds Download status info UI to Gem Catalog (#4602)
* Adds Download status info UI to Gem Catalog Signed-off-by: nggieber <nggieber@amazon.com> * Removed test code Signed-off-by: nggieber <nggieber@amazon.com> * Remove unused variable Signed-off-by: nggieber <nggieber@amazon.com> * Addressed PR feedback Signed-off-by: nggieber <nggieber@amazon.com> * Fixed Open3DEngine spelling Signed-off-by: nggieber <nggieber@amazon.com>
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
|
||||
#include "GemInfo.h"
|
||||
|
||||
#include <QObject>
|
||||
|
||||
namespace O3DE::ProjectManager
|
||||
{
|
||||
GemInfo::GemInfo(const QString& name, const QString& creator, const QString& summary, Platforms platforms, bool isAdded)
|
||||
@@ -29,17 +31,17 @@ namespace O3DE::ProjectManager
|
||||
switch (platform)
|
||||
{
|
||||
case Android:
|
||||
return "Android";
|
||||
return QObject::tr("Android");
|
||||
case iOS:
|
||||
return "iOS";
|
||||
return QObject::tr("iOS");
|
||||
case Linux:
|
||||
return "Linux";
|
||||
return QObject::tr("Linux");
|
||||
case macOS:
|
||||
return "macOS";
|
||||
return QObject::tr("macOS");
|
||||
case Windows:
|
||||
return "Windows";
|
||||
return QObject::tr("Windows");
|
||||
default:
|
||||
return "<Unknown Platform>";
|
||||
return QObject::tr("<Unknown Platform>");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,13 +50,13 @@ namespace O3DE::ProjectManager
|
||||
switch (type)
|
||||
{
|
||||
case Asset:
|
||||
return "Asset";
|
||||
return QObject::tr("Asset");
|
||||
case Code:
|
||||
return "Code";
|
||||
return QObject::tr("Code");
|
||||
case Tool:
|
||||
return "Tool";
|
||||
return QObject::tr("Tool");
|
||||
default:
|
||||
return "<Unknown Type>";
|
||||
return QObject::tr("<Unknown Type>");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,15 +64,33 @@ namespace O3DE::ProjectManager
|
||||
{
|
||||
switch (origin)
|
||||
{
|
||||
case Open3DEEngine:
|
||||
return "Open 3D Engine";
|
||||
case Open3DEngine:
|
||||
return QObject::tr("Open 3D Engine");
|
||||
case Local:
|
||||
return "Local";
|
||||
return QObject::tr("Local");
|
||||
case Remote:
|
||||
return QObject::tr("Remote");
|
||||
default:
|
||||
return "<Unknown Gem Origin>";
|
||||
return QObject::tr("<Unknown Gem Origin>");
|
||||
}
|
||||
}
|
||||
|
||||
QString GemInfo::GetDownloadStatusString(DownloadStatus status)
|
||||
{
|
||||
switch (status)
|
||||
{
|
||||
case NotDownloaded:
|
||||
return QObject::tr("Not Downloaded");
|
||||
case Downloading:
|
||||
return QObject::tr("Downloading");
|
||||
case Downloaded:
|
||||
return QObject::tr("Downloaded");
|
||||
case UnknownDownloadStatus:
|
||||
default:
|
||||
return QObject::tr("<Unknown Download Status>");
|
||||
}
|
||||
};
|
||||
|
||||
bool GemInfo::IsPlatformSupported(Platform platform) const
|
||||
{
|
||||
return (m_platforms & platform);
|
||||
|
||||
Reference in New Issue
Block a user