@@ -212,6 +212,11 @@ GameListModel::GameListModel(GameListWidget* parent)
212212
213213GameListModel::~GameListModel () = default ;
214214
215+ bool GameListModel::getShowLocalizedTitles () const
216+ {
217+ return m_show_localized_titles;
218+ }
219+
215220void GameListModel::setShowLocalizedTitles (bool enabled)
216221{
217222 m_show_localized_titles = enabled;
@@ -223,25 +228,25 @@ void GameListModel::setShowLocalizedTitles(bool enabled)
223228 refreshCovers ();
224229}
225230
231+ bool GameListModel::getShowCoverTitles () const
232+ {
233+ return m_show_titles_for_covers;
234+ }
235+
226236void GameListModel::setShowCoverTitles (bool enabled)
227237{
228238 m_show_titles_for_covers = enabled;
229239 emit dataChanged (index (0 , Column_Cover), index (rowCount () - 1 , Column_Cover), {Qt::DisplayRole});
230240}
231241
232- void GameListModel::setShowGameIcons ( bool enabled)
242+ int GameListModel::getRowHeight () const
233243{
234- m_show_game_icons = enabled;
235-
236- if (enabled)
237- GameList::ReloadMemcardTimestampCache ();
238- refreshIcons ();
244+ return getIconSizeWithPadding ();
239245}
240246
241- void GameListModel::refreshIcons ()
247+ int GameListModel::getIconSize () const
242248{
243- m_icon_pixmap_cache.Clear ();
244- emit dataChanged (index (0 , Column_Icon), index (rowCount () - 1 , Column_Icon), {Qt::DecorationRole});
249+ return m_icon_size;
245250}
246251
247252int GameListModel::getIconSizeWithPadding () const
@@ -269,6 +274,17 @@ void GameListModel::setIconSize(int size)
269274 refreshIcons ();
270275}
271276
277+ void GameListModel::refreshIcons ()
278+ {
279+ m_icon_pixmap_cache.Clear ();
280+ emit dataChanged (index (0 , Column_Icon), index (rowCount () - 1 , Column_Icon), {Qt::DecorationRole});
281+ }
282+
283+ float GameListModel::getCoverScale () const
284+ {
285+ return m_cover_scale;
286+ }
287+
272288void GameListModel::setCoverScale (float scale)
273289{
274290 if (m_cover_scale == scale)
@@ -353,6 +369,11 @@ void GameListModel::updateCacheSize(int num_rows, int num_columns, QSortFilterPr
353369 m_cover_pixmap_cache.SetMaxCapacity (static_cast <u32 >(cache_size));
354370}
355371
372+ qreal GameListModel::getDevicePixelRatio () const
373+ {
374+ return m_device_pixel_ratio;
375+ }
376+
356377void GameListModel::setDevicePixelRatio (qreal dpr)
357378{
358379 if (m_device_pixel_ratio == dpr)
@@ -565,6 +586,20 @@ const QPixmap& GameListModel::getFlagPixmapForEntry(const GameList::Entry* ge) c
565586 return it->second ;
566587}
567588
589+ bool GameListModel::getShowGameIcons () const
590+ {
591+ return m_show_game_icons;
592+ }
593+
594+ void GameListModel::setShowGameIcons (bool enabled)
595+ {
596+ m_show_game_icons = enabled;
597+
598+ if (enabled)
599+ GameList::ReloadMemcardTimestampCache ();
600+ refreshIcons ();
601+ }
602+
568603QIcon GameListModel::getIconForGame (const QString& path)
569604{
570605 QIcon ret;
@@ -907,6 +942,21 @@ QVariant GameListModel::headerData(int section, Qt::Orientation orientation, int
907942 return ret;
908943}
909944
945+ const QPixmap& GameListModel::getNoAchievementsPixmap () const
946+ {
947+ return m_no_achievements_pixmap;
948+ }
949+
950+ const QPixmap& GameListModel::getHasAchievementsPixmap () const
951+ {
952+ return m_has_achievements_pixmap;
953+ }
954+
955+ const QPixmap& GameListModel::getMasteredAchievementsPixmap () const
956+ {
957+ return m_mastered_achievements_pixmap;
958+ }
959+
910960const GameList::Entry* GameListModel::getTakenGameListEntry (u32 index) const
911961{
912962 return (m_taken_entries.has_value () && index < m_taken_entries->size ()) ? &m_taken_entries.value ()[index] : nullptr ;
0 commit comments