lotrodatmanager.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #ifndef LEGACYAPP_H
  2. #define LEGACYAPP_H
  3. #include <QObject>
  4. #include <QSettings>
  5. #include <QApplication>
  6. #include <LotroDat/LotroDat.h>
  7. class PatchDownloader;
  8. class LotroDatManager : public QObject
  9. {
  10. Q_OBJECT
  11. public:
  12. explicit LotroDatManager(QSettings* settings, PatchDownloader* downloader, QObject *parent = nullptr);
  13. bool Initialised();
  14. bool NotPatched();
  15. bool IsRusificationActive();
  16. public slots:
  17. void InitialiseManager();
  18. void DeinitialiseManager();
  19. void StartGame(LOTRO_DAT::DatLocaleManager::LOCALE locale);
  20. void ChangeTranslationLanguage();
  21. void InstallActivePatches();
  22. void InstallPatches();
  23. void InstallLoadscreens();
  24. void InstallVideos();
  25. void InstallUpdates();
  26. void InstallMicroPatch();
  27. void CreateBackup();
  28. void RestoreFromBackup();
  29. void RemoveBackup();
  30. private:
  31. bool startLotroLauncherWithParameters(LOTRO_DAT::DatLocaleManager::LOCALE locale);
  32. void ApplyTexts();
  33. void ApplyImages();
  34. void ApplySounds();
  35. signals:
  36. void textStatusChanged();
  37. void imagesStatusChanged();
  38. void soundsStatusChanged();
  39. void generalStatusChanged();
  40. // general signals. First argument is process_name, second - processed values
  41. void processStarted();
  42. void processFinished();
  43. void processUpdated(QString, QVector<QVariant>);
  44. void caughtError(QString, QVector<QVariant>);
  45. private:
  46. LOTRO_DAT::DatFile client_local_file;
  47. LOTRO_DAT::DatFile client_general_file;
  48. QSettings* app_settings;
  49. PatchDownloader* patch_downloader;
  50. };
  51. #endif // LEGACYAPP_H