mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-08 17:18:53 +00: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:
parent
b9960777a7
commit
a0642b3b00
4 changed files with 26 additions and 20 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue