summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/Resources.h
blob: 20573dfae04656e1fede4f2e57223f05c3a88d16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Copyright 2015 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include <QIcon>
#include <QList>
#include <string_view>

namespace DiscIO
{
enum class Country;
enum class Platform;
}  // namespace DiscIO

// Store for various QPixmaps that will be used repeatedly.
class Resources final
{
public:
  enum class MiscID
  {
    BannerMissing,
    Logo,
  };

  static void Init();

  static QIcon GetPlatform(DiscIO::Platform platform);
  static QIcon GetCountry(DiscIO::Country country);

  static QIcon GetMisc(MiscID id);

  static QIcon GetResourceIcon(std::string_view name);
  static QIcon GetThemeIcon(std::string_view name);
  static QIcon GetAppIcon();

private:
  Resources() {}
  static QIcon LoadNamedIcon(std::string_view name, const QString& dir);

  static bool m_svg_supported;
  static QList<QIcon> m_platforms;
  static QList<QIcon> m_countries;
  static QList<QIcon> m_misc;
};