mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
88 lines
2.0 KiB
C++
88 lines
2.0 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 "Datas.h"
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
namespace Ui { class MainWindow; }
|
|
QT_END_NAMESPACE
|
|
|
|
class TCPClient;
|
|
class UpdateController;
|
|
class RecognizeSystem;
|
|
class ExternalExecuter;
|
|
|
|
class MainWindow : public QMainWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
MainWindow(QWidget *parent = nullptr);
|
|
|
|
~MainWindow();
|
|
|
|
signals:
|
|
void onInitializeClient(RecognizeSystem *recognizeSystem,
|
|
ExternalExecuter *externalExecuter);
|
|
|
|
void onSetConnect(ServerSettings* serverSettings);
|
|
void onCalculateHash();
|
|
void SendClientAuthorization();
|
|
void onSendMessage(QString message);
|
|
|
|
private slots:
|
|
void on_loginButton_clicked();
|
|
|
|
void on_updateButton_clicked();
|
|
|
|
void on_startButton_clicked();
|
|
|
|
void on_saveServerButton_clicked();
|
|
|
|
void on_settingsButton_clicked();
|
|
|
|
void disableNotify();
|
|
|
|
void onConnectionState(bool flag);
|
|
|
|
void on_connectButton_clicked();
|
|
|
|
void on_languageComboBox_activated(const QString &arg1);
|
|
|
|
private:
|
|
Ui::MainWindow *ui;
|
|
QTranslator translator;
|
|
TCPClient *client;
|
|
DataParser *dataParser;
|
|
UpdateController *updateController;
|
|
RecognizeSystem *recognizeSystem;
|
|
ScreenChecker *screenChecker;
|
|
ExternalExecuter *externalExecuter;
|
|
QThread *connectionThread;
|
|
QThread *updateControllerThread;
|
|
quint64 maxBytesAvailable;
|
|
QTimer *timer;
|
|
float globalValue;
|
|
|
|
void DebugLog(QString message);
|
|
void Initialize();
|
|
void UpdateProgress(qint64 size,quint64 sended);
|
|
void LoadComplete();
|
|
void SetNeedUpdate(bool flag,quint64 size,quint64 fileCount);
|
|
void LostConnection();
|
|
void CheckLoginResult(ServerAuthorization * serverAuth);
|
|
void CheckAppAvailable();
|
|
void checkLanguage(QString language);
|
|
void autoStart();
|
|
void loadStaticData();
|
|
};
|
|
#endif // MAINWINDOW_H
|