Qt/Resources: Convert int parameters of GetCountry(), GetPlatform() and GetMisc() to enum classes

Makes the parameter strongly-typed and doesn't accept arbitrary int
values.
This commit is contained in:
Lioncash
2018-07-10 15:10:03 -04:00
parent b9960777a7
commit a0642b3b00
4 changed files with 26 additions and 20 deletions

View File

@ -7,23 +7,29 @@
#include <QList>
#include <QPixmap>
namespace DiscIO
{
enum class Country;
enum class Platform;
}
// Store for various QPixmaps that will be used repeatedly.
class Resources final
{
public:
enum class MiscID
{
BannerMissing,
LogoLarge,
LogoSmall
};
static void Init();
static QPixmap GetPlatform(int platform);
static QPixmap GetCountry(int country);
static QPixmap GetPlatform(DiscIO::Platform platform);
static QPixmap GetCountry(DiscIO::Country country);
static QPixmap GetMisc(int id);
enum
{
BANNER_MISSING,
LOGO_LARGE,
LOGO_SMALL
};
static QPixmap GetMisc(MiscID id);
static QIcon GetScaledIcon(const std::string& name);
static QIcon GetScaledThemeIcon(const std::string& name);