legacyapplication.h 890 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef LEGACYAPPLICATION_H
  2. #define LEGACYAPPLICATION_H
  3. #include <QThread>
  4. #include <QTimer>
  5. #include "utils.h"
  6. class LotroDatManager;
  7. class MainWindow;
  8. class LegacyApplication : public QObject
  9. {
  10. Q_OBJECT
  11. public:
  12. static LegacyApplication& instance() {
  13. static LegacyApplication instance;
  14. return instance;
  15. }
  16. ~LegacyApplication();
  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. MainWindow *gui = nullptr;
  28. QThread* patch_managers_thread_;
  29. QTimer modules_init_timer_;
  30. size_t seconds_after_previous_try_to_init_ = 10; // init value should be equal to try_to_init_timeout_
  31. const size_t try_to_init_timeout_ = 10;
  32. };
  33. #endif // LEGACYAPPLICATION_H