123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- #ifndef GAMERES_H
- #define GAMERES_H
- #include <QObject>
- #include <QThread>
- #include <LotroDat.h>
- using namespace LOTRO_DAT;
- class GameRes : public QObject {
- Q_OBJECT
-
- private:
- GameRes();
- public:
- static GameRes* getInstance() {
- static GameRes instance;
- return &instance;
- }
-
- public slots:
- void openDatFile(int id);
- void closeDatFile(int id);
- void applyPatch(QString name);
- void setGameLocale(QString locale);
- void startGame();
- void installMicroPatch();
- void applyAll();
- bool isBusy() {return false;}
- void checkDatFile();
- QStringList getLotroPath();
- void saveAllDatFiles();
- signals:
-
- void openDatFileFinished(int result);
- void closeDatFileFinished(int result);
- void applyPatchFinished(int result);
- void setGameLocaleFinished(int result);
- void startGameFinished(int result);
- void installMicroPatchFinished(int result);
- void applyAllFinished(int result);
- void checkDatFileFinished(int result);
-
- void startedPatching(QString patchname);
- void updatedPatchPercent(int percent);
- void finishedPatching(QString patchname, QString result);
- private:
- int dateToTimestamp(QString customDateString, QString format);
- void processFile();
- void applyLoadscreens();
- bool isDatReady();
- std::string getDatPath(int id);
- private slots:
- void applyMicroPatch(QString filename);
- private:
- QThread *thread_;
- bool busy_;
- Database db_;
- DatFile datfiles_[5];
- LOCALE locale_;
- };
- #endif
|