Qt: Add icons for unknown region and PSF files in game list

This commit is contained in:
Connor McLaughlin 2021-01-24 14:24:13 +10:00
parent f61427017d
commit d62e6ffbb3
7 changed files with 12 additions and 0 deletions

View file

@ -225,6 +225,8 @@ QVariant GameListModel::data(const QModelIndex& index, int role) const
return m_type_disc_pixmap;
case GameListEntryType::Playlist:
return m_type_playlist_pixmap;
case GameListEntryType::PSF:
return m_type_psf_pixmap;
case GameListEntryType::PSExe:
default:
return m_type_exe_pixmap;
@ -239,6 +241,8 @@ QVariant GameListModel::data(const QModelIndex& index, int role) const
return m_region_jp_pixmap;
case DiscRegion::NTSC_U:
return m_region_us_pixmap;
case DiscRegion::Other:
return m_region_other_pixmap;
case DiscRegion::PAL:
default:
return m_region_eu_pixmap;
@ -401,9 +405,11 @@ void GameListModel::loadCommonImages()
m_type_disc_pixmap = QIcon(QStringLiteral(":/icons/media-optical-24.png")).pixmap(QSize(24, 24));
m_type_exe_pixmap = QIcon(QStringLiteral(":/icons/applications-system-24.png")).pixmap(QSize(24, 24));
m_type_playlist_pixmap = QIcon(QStringLiteral(":/icons/address-book-new-22.png")).pixmap(QSize(22, 22));
m_type_psf_pixmap = QIcon(QStringLiteral(":/icons/multimedia-player.png")).pixmap(QSize(22, 22));
m_region_eu_pixmap = QIcon(QStringLiteral(":/icons/flag-eu.png")).pixmap(QSize(42, 30));
m_region_jp_pixmap = QIcon(QStringLiteral(":/icons/flag-jp.png")).pixmap(QSize(42, 30));
m_region_us_pixmap = QIcon(QStringLiteral(":/icons/flag-uc.png")).pixmap(QSize(42, 30));
m_region_other_pixmap = QIcon(QStringLiteral(":/icons/flag-other.png")).pixmap(QSize(42, 30));
for (int i = 0; i < static_cast<int>(GameListCompatibilityRating::Count); i++)
m_compatibiliy_pixmaps[i].load(QStringLiteral(":/icons/star-%1.png").arg(i));

View file

@ -69,10 +69,12 @@ private:
QPixmap m_type_disc_pixmap;
QPixmap m_type_exe_pixmap;
QPixmap m_type_playlist_pixmap;
QPixmap m_type_psf_pixmap;
QPixmap m_region_jp_pixmap;
QPixmap m_region_eu_pixmap;
QPixmap m_region_us_pixmap;
QPixmap m_region_other_pixmap;
std::array<QPixmap, static_cast<int>(GameListCompatibilityRating::Count)> m_compatibiliy_pixmaps;
mutable std::unordered_map<std::string, QPixmap> m_cover_pixmap_cache;

Binary file not shown.

After

Width:  |  Height:  |  Size: 682 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 954 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View file

@ -56,6 +56,8 @@
<file>icons/flag-eu@2x.png</file>
<file>icons/flag-jp.png</file>
<file>icons/flag-jp@2x.png</file>
<file>icons/flag-other.png</file>
<file>icons/flag-other@2x.png</file>
<file>icons/flag-uc.png</file>
<file>icons/flag-uc@2x.png</file>
<file>icons/flag-us.png</file>
@ -88,6 +90,8 @@
<file>icons/media-playback-start@2x.png</file>
<file>icons/media-record.png</file>
<file>icons/media-record@2x.png</file>
<file>icons/multimedia-player.png</file>
<file>icons/multimedia-player@2x.png</file>
<file>icons/preferences-desktop-keyboard-shortcuts.png</file>
<file>icons/preferences-desktop-keyboard-shortcuts@2x.png</file>
<file>icons/preferences-system.png</file>