Resources.h 934 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // Copyright 2015 Dolphin Emulator Project
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #pragma once
  4. #include <QIcon>
  5. #include <QList>
  6. #include <string_view>
  7. namespace DiscIO
  8. {
  9. enum class Country;
  10. enum class Platform;
  11. } // namespace DiscIO
  12. // Store for various QPixmaps that will be used repeatedly.
  13. class Resources final
  14. {
  15. public:
  16. enum class MiscID
  17. {
  18. BannerMissing,
  19. Logo,
  20. };
  21. static void Init();
  22. static QIcon GetPlatform(DiscIO::Platform platform);
  23. static QIcon GetCountry(DiscIO::Country country);
  24. static QIcon GetMisc(MiscID id);
  25. static QIcon GetResourceIcon(std::string_view name);
  26. static QIcon GetThemeIcon(std::string_view name);
  27. static QIcon GetAppIcon();
  28. private:
  29. Resources() {}
  30. static QIcon LoadNamedIcon(std::string_view name, const QString& dir);
  31. static bool m_svg_supported;
  32. static QList<QIcon> m_platforms;
  33. static QList<QIcon> m_countries;
  34. static QList<QIcon> m_misc;
  35. };