lotro.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #ifndef LEGACYAPP_H
  2. #define LEGACYAPP_H
  3. #include <QObject>
  4. #include <QSettings>
  5. #include <QApplication>
  6. #include <LotroDat/LotroDat.h>
  7. class Lotro : public QObject
  8. {
  9. Q_OBJECT
  10. public:
  11. explicit Lotro(QSettings& app_settings_, QObject *parent = nullptr);
  12. bool initialised();
  13. int currentLocale();
  14. bool patched();
  15. public slots:
  16. void initialiseDatFile(QString file_name);
  17. void changeLocale();
  18. void getLocaleFileContents(long long file_id, int locale);
  19. void importFilesFromDatabase(QString database_path);
  20. void importFile(long long file_id, QString file_path);
  21. void importTextFragment(long long file_id, long long fragment_id, QString fragment_contents, QString arguments);
  22. void getTextFragment(long long file_id, long long fragment_id);
  23. void createCoreStatusFile(QString output_filename);
  24. void extractSingleFile(QString output_filename, long long file_id);
  25. void extractSingleFileToDatabase(QString database_path, long long file_id);
  26. void extractGrouppedFiles(QString output_foldername, LOTRO_DAT::FILE_TYPE type);
  27. void extractGrouppedFilesToDatabase(QString database_path, LOTRO_DAT::FILE_TYPE type);
  28. void getUnactiveCategories();
  29. void startGame();
  30. void showFileInfo();
  31. private:
  32. bool tryToBlockFile();
  33. signals:
  34. // general signals. First argument is process_name, second - processed values
  35. void processStarted(QString, QVector<QVariant>);
  36. void processFinished(QString, QVector<QVariant>);
  37. void processUpdated(QString, QVector<QVariant>);
  38. void caughtError(QString, QVector<QVariant>);
  39. void textFragmentReceived(QString, QString);
  40. void unactiveCategoriesReceived(QStringList);
  41. void localeFileContentsReceived(int, LOTRO_DAT::SubfileData); // extention, contents
  42. private:
  43. LOTRO_DAT::DatFile file;
  44. bool busy;
  45. QSettings& app_settings;
  46. };
  47. #endif // LEGACYAPP_H