Open Source Snapmatic picture and Savegame viewer/editor for GTA V https://gta5view.syping.de/

AppEnv.h 2.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*****************************************************************************
  2. * gta5view Grand Theft Auto V Profile Viewer
  3. * Copyright (C) 2016-2018 Syping
  4. *
  5. * This program is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. *****************************************************************************/
  18. #ifndef APPENV_H
  19. #define APPENV_H
  20. #include <QString>
  21. #include <QUrl>
  22. enum class GameVersion : int { NoVersion = 0, SocialClubVersion = 1, SteamVersion = 2, BothVersions = 3 };
  23. enum class GameLanguage : int { Undefined = 0, English = 1, French = 2, Italian = 3, German = 4, Spanish = 5, Mexican = 6, Brasilian = 7, Russian = 8, Polish = 9, Japanese = 10, SChinese = 11, TChinese = 12, Koreana = 13 };
  24. class AppEnv
  25. {
  26. public:
  27. AppEnv();
  28. // Build Stuff
  29. static QString getBuildDateTime();
  30. static QString getBuildCode();
  31. // Folder Stuff
  32. static QString getGameFolder(bool *ok = 0);
  33. static bool setGameFolder(QString gameFolder);
  34. static QString getExLangFolder();
  35. static QString getInLangFolder();
  36. static QString getPluginsFolder();
  37. // Web Stuff
  38. static QByteArray getUserAgent();
  39. static QUrl getCrewFetchingUrl(QString crewID);
  40. static QUrl getPlayerFetchingUrl(QString crewID, QString pageNumber);
  41. static QUrl getPlayerFetchingUrl(QString crewID, int pageNumber);
  42. // Game Stuff
  43. static GameVersion getGameVersion();
  44. static GameLanguage getGameLanguage(GameVersion gameVersion);
  45. static GameLanguage gameLanguageFromString(QString gameLanguage);
  46. static QString gameLanguageToString(GameLanguage gameLanguage);
  47. static bool setGameLanguage(GameVersion gameVersion, GameLanguage gameLanguage);
  48. // Screen Stuff
  49. static qreal screenRatio();
  50. };
  51. #endif // APPENV_H