mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
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:
@ -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);
|
||||
|
Reference in New Issue
Block a user