mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
112 lines
2.9 KiB
C++
112 lines
2.9 KiB
C++
#ifndef COREMANAGER_H
|
|
#define COREMANAGER_H
|
|
|
|
#include <QObject>
|
|
#include <QTranslator>
|
|
|
|
#include <QThread>
|
|
#include <QTranslator>
|
|
#include <Core/dataparser.h>
|
|
#include <Core/tcpclient.h>
|
|
#include <Core/screenchecker.h>
|
|
#include <Core/UpdateController.h>
|
|
#include <Core/sendsystem.h>
|
|
#include <Core/hashcomparer.h>
|
|
#include <Core/versioncontainer.h>
|
|
#include <widgetmanager.h>
|
|
#include <Data/Client.h>
|
|
|
|
#include <UI/resourcemanager.h>
|
|
|
|
class CoreManager : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit CoreManager(QObject *parent = nullptr);
|
|
~CoreManager(){}
|
|
void initialize(WidgetManager *widgetManager,QThread *workerThread);
|
|
void start();
|
|
void checkUpdateInfo();
|
|
void checkAutoStart();
|
|
void setLanguage(const QString &language);
|
|
|
|
VersionContainer *getVersionContainer() const;
|
|
SendSystem *getSendSystem() const;
|
|
ResourceManager *getResourceManager() const;
|
|
RecognizeSystem *getRecognizeSystem() const;
|
|
|
|
void loadToServer();
|
|
void undoCurrentChanges();
|
|
void startUnityClient();
|
|
void tryLogin();
|
|
void startOffline();
|
|
void sendPacketType(PacketType packetType);
|
|
|
|
void saveServerSettingsWithConnect();
|
|
|
|
|
|
void checkAppAvailable();
|
|
void exit();
|
|
void initializeWidgets();
|
|
|
|
void recalculateState();
|
|
signals:
|
|
void sigInitializeClient(RecognizeSystem *recognize,SendSystem *sendSystem);
|
|
void sigSendPacketType(PacketType packetType);
|
|
void sigSendXMLAnswer(QString answer);
|
|
void sigSetConnect(ServerSettings* serverSettings);
|
|
void sigCalculateHash();
|
|
void sigSendAutorization();
|
|
void sigSendCheckUpdate();
|
|
bool sigGetConnected();
|
|
void sigSendUpdateToServer();
|
|
|
|
|
|
void sigSetLoadSettings(ServerSettings *serverSettings);
|
|
|
|
private:
|
|
QTranslator translator;
|
|
TCPClient *tcpClient;
|
|
DataParser *dataParser;
|
|
DataParserOutput *dataParserOutput;
|
|
UpdateController *updateController;
|
|
RecognizeSystem *recognizeSystem;
|
|
ScreenChecker *screenChecker;
|
|
ExternalExecuter *externalExecuter;
|
|
SendSystem *sendSystem;
|
|
HashComparer *hashComparer;
|
|
VersionContainer *versionContainer;
|
|
ResourceManager *resourceManager;
|
|
PostProcessorSystem *postProcessorSystem;
|
|
Client *client;
|
|
|
|
WidgetManager *widgetManager;
|
|
|
|
QThread *workerThread;
|
|
|
|
quint16 fileCountForUpdate;
|
|
quint16 filesLoaded;
|
|
bool isRecovery;
|
|
bool autostart;
|
|
|
|
|
|
void loadStaticData();
|
|
void binding();
|
|
void initializeSystems();
|
|
void callUpdateList();
|
|
void lostConnection();
|
|
void serverBlocked();
|
|
void checkLoginResult(ServerAuthorization *auth);
|
|
void checkAccessType(const QString &accessType);
|
|
void setServerVersion(StreamingVersionData *version);
|
|
void calcUpdateProgress();
|
|
void loadComplete();
|
|
void setLocalVersion();
|
|
void checkNeedUpdate(bool flag, quint64 size, quint64 fileCount, quint64 deleteCount);
|
|
void checkUpdate();
|
|
|
|
void setInlineDebug(QString text);
|
|
};
|
|
|
|
#endif // COREMANAGER_H
|