mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
109 lines
2.6 KiB
C++
109 lines
2.6 KiB
C++
#ifndef MAINWINDOW_H
|
|
#define MAINWINDOW_H
|
|
|
|
#include <QMainWindow>
|
|
#include <QDebug>
|
|
#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 "Datas.h"
|
|
#include "updatenotifywidget.h"
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
namespace Ui { class MainWindow; }
|
|
QT_END_NAMESPACE
|
|
|
|
class TCPClient;
|
|
class UpdateController;
|
|
class RecognizeSystem;
|
|
class ExternalExecuter;
|
|
class UpdateNotifyWidget;
|
|
class HashComparer;
|
|
|
|
class MainWindow : public QMainWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
MainWindow(QWidget *parent = nullptr);
|
|
void callUpdateList();
|
|
void bindNotifyWidget(UpdateNotifyWidget *widget);
|
|
void checkUpdate();
|
|
~MainWindow();
|
|
|
|
void bindConnection();
|
|
|
|
signals:
|
|
void sigInitializeClient(RecognizeSystem *recognizeSystem,
|
|
ExternalExecuter *externalExecuter,
|
|
SendSystem *sendSystem,
|
|
QThread *thread);
|
|
|
|
void sigSetConnect(ServerSettings* serverSettings,QThread *thread);
|
|
void sigCalculateHash();
|
|
void sigSendCommand(QString message);
|
|
void sigSendAutorization();
|
|
bool sigGetConnected();
|
|
|
|
private slots:
|
|
void on_loginButton_clicked();
|
|
|
|
void on_updateButton_clicked();
|
|
|
|
void on_startButton_clicked();
|
|
|
|
void on_saveServerButton_clicked();
|
|
|
|
void on_settingsButton_clicked();
|
|
|
|
void on_connectButton_clicked();
|
|
|
|
void on_languageComboBox_activated(const QString &arg1);
|
|
|
|
void slotDisableNotify();
|
|
|
|
void slotConnectionState(bool flag);
|
|
|
|
void slotServerDisconnect();
|
|
|
|
private:
|
|
Ui::MainWindow *ui;
|
|
UpdateNotifyWidget *updateWidget;
|
|
QTranslator translator;
|
|
TCPClient *client;
|
|
DataParser *dataParser;
|
|
UpdateController *updateController;
|
|
RecognizeSystem *recognizeSystem;
|
|
ScreenChecker *screenChecker;
|
|
ExternalExecuter *externalExecuter;
|
|
SendSystem *sendSystem;
|
|
HashComparer *hashComparer;
|
|
QThread *connectionThread;
|
|
QTimer *timer;
|
|
|
|
int fileCountForUpdate;
|
|
int filesLoaded;
|
|
|
|
void debugLog(QString message);
|
|
void painting();
|
|
void initialize();
|
|
void updateProgress();
|
|
void loadComplete();
|
|
void setNeedUpdate(bool flag,quint64 size,quint64 fileCount);
|
|
void lostConnection();
|
|
void serverBlocked();
|
|
void checkLoginResult(ServerAuthorization * serverAuth);
|
|
void checkAppAvailable();
|
|
void checkLanguage(QString language);
|
|
void autoStart();
|
|
void loadStaticData();
|
|
void bindClient();
|
|
void createObjects();
|
|
};
|
|
#endif // MAINWINDOW_H
|