12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- #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();
- GameRes(const GameRes&);
- GameRes& operator=(GameRes&);
- public:
- GameRes* getInstance() {
- static GameRes instance;
- return instance;
- }
-
- public:
- void openDatFile(int id);
- void closeDatFile(int id);
- void applyPatch(QString name);
- void setGameLocale(QString locale);
- void startGame();
- void installMicroPatch();
- void applyAll();
- bool isBusy() {}
- void checkDatFile();
- 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:
- void processFile();
- void prepareMicroPatch();
- void applyMicroPatch();
- void applyLoadscreens();
- void saveLocale(int locale, QPushButton *button);
- bool isDatReady();
- private:
- QThread *thread_;
- bool busy_;
- DatFile datfiles_[5];
- Database db_;
- LOCALE locale_;
- };
- #endif
|