legacyapplication.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef LEGACYAPPLICATION_H
  2. #define LEGACYAPPLICATION_H
  3. #include <QThread>
  4. #include <QTimer>
  5. #include "utils.h"
  6. class LotroDatManager;
  7. class PatchList;
  8. class MainWindow;
  9. class LegacyApplication : public QObject
  10. {
  11. Q_OBJECT
  12. public:
  13. static LegacyApplication& instance() {
  14. static LegacyApplication instance;
  15. return instance;
  16. }
  17. private:
  18. LegacyApplication();
  19. public:
  20. bool init();
  21. signals:
  22. void ErrorStatusChanged(AppErrorStatus status);
  23. void SecondsToNextTryToInitChanged(size_t seconds_elapsed);
  24. private slots:
  25. void InitModules();
  26. private:
  27. // LotroDatManager *lotro_dat_manager = nullptr;
  28. // QThread *lotro_dat_manager_thread = nullptr;
  29. // PatchList *patch_list = nullptr;
  30. MainWindow *gui = nullptr;
  31. QThread* patch_downloader_thread_;
  32. QTimer modules_init_timer_;
  33. size_t seconds_after_previous_try_to_init_ = 10; // init value should be equal to try_to_init_timeout_
  34. const size_t try_to_init_timeout_ = 10;
  35. };
  36. #endif // LEGACYAPPLICATION_H