mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
ref: change initialize logic
*complete without change animation
This commit is contained in:
130
mainwindow.h
130
mainwindow.h
@@ -3,23 +3,13 @@
|
||||
|
||||
#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 <Core/versioncontainer.h>
|
||||
#include <Core/notifycontroller.h>
|
||||
#include <Data/Datas.h>
|
||||
#include <QHBoxLayout>
|
||||
|
||||
#include <Widgets/commonbuttongroupwidget.h>
|
||||
#include <Widgets/entrywidget.h>
|
||||
#include <Widgets/instructorbuttongroupwidget.h>
|
||||
#include <Widgets/updatenotifywidget.h>
|
||||
#include <Widgets/versionselectwidget.h>
|
||||
#include <Widgets/waitanimationwidget.h>
|
||||
#include <Widgets/entrywidget.h>
|
||||
|
||||
#include <Data/Datas.h>
|
||||
#include <UI/resourcemanager.h>
|
||||
#include "mywinheader.h"
|
||||
|
||||
@@ -34,113 +24,67 @@ class MainWindow : public QMainWindow
|
||||
|
||||
public:
|
||||
MainWindow(QWidget *parent = nullptr);
|
||||
void callUpdateList();
|
||||
void checkUpdate();
|
||||
~MainWindow();
|
||||
~MainWindow(){};
|
||||
|
||||
void initialize(ResourceManager *resourceManager);
|
||||
void addWidgetToChangeGroup(CommonButtonGroupWidget *commonWidgetGroup);
|
||||
void addWidgetToInteractiveGroup(EntryWidget *entryWidget);
|
||||
void setLoadSettings(ServerSettings *serverSettings);
|
||||
void setLoginSuccessState();
|
||||
void setLoginFailedState();
|
||||
void setClientVersionName(const QString &versionName);
|
||||
|
||||
void initialize();
|
||||
void bindConnection();
|
||||
void login();
|
||||
void saveServerSettingsWithConnect();
|
||||
void loadToServer();
|
||||
void undoCurrentChanges();
|
||||
void startUnityClient();
|
||||
void setCurrentVersionName(StreamingVersionData *version);
|
||||
void disableUnsaveButton(bool flag);
|
||||
void activateLoadingAnimation(bool flag);
|
||||
void showMainFrame(bool flag);
|
||||
|
||||
void showWarning(QString text);
|
||||
void loadCompleteState();
|
||||
void setInlineDebug(QString value);
|
||||
signals:
|
||||
void sigInitializeClient(RecognizeSystem *recognize,SendSystem *sendSystem);
|
||||
void sigRecognize(UpdateController* updateController,
|
||||
DataParser* dataParser,
|
||||
MainWindow* mainWindow,
|
||||
HashComparer* hashComparer,
|
||||
TCPClient *tcpClient);
|
||||
|
||||
void sigSendCommand(PacketType packetType);
|
||||
void sigSendXMLAnswer(QString answer);
|
||||
void sigSetConnect(ServerSettings* serverSettings,QThread *thread);
|
||||
void sigCalculateHash();
|
||||
void sigSendAutorization();
|
||||
void sigSendCheck();
|
||||
bool sigGetConnected();
|
||||
void sigSendCheckUpdate();
|
||||
|
||||
bool getIsAutoStart();
|
||||
void setNeedUpdateState(const QString ¬ifyText);
|
||||
void setLastVersionState();
|
||||
void showConnectionEmpty();
|
||||
void showOfflineButton(bool flag);
|
||||
void setStartOfflineButton(bool isAvailable);
|
||||
void setStartState();
|
||||
void serverBlocked();
|
||||
|
||||
QHBoxLayout *getDisplayLayout() const;
|
||||
public slots:
|
||||
void showUpdateInfo();
|
||||
void showCompleteDialogBox();
|
||||
void slotShowUpdateInfo();
|
||||
void slotConnectionState(bool flag);
|
||||
void slotServerDisconnect();
|
||||
void updateProgress();
|
||||
void loadComplete();
|
||||
void lostConnection();
|
||||
void serverBlocked();
|
||||
void checkLoginResult(ServerAuthorization * serverAuth);
|
||||
void setNeedUpdate(bool flag,quint64 size,quint64 fileCount,quint64 deleteCount);
|
||||
void showServerListWidget(QList<StreamingVersionData*> *serverData);
|
||||
void slotCommonWidgetState();
|
||||
void setServerVersion(StreamingVersionData *version);
|
||||
|
||||
signals:
|
||||
void sigShowSettings(bool isActive);
|
||||
void sigChangeLanguage(const QString& arg1);
|
||||
void sigShowUpdateInfo();
|
||||
void sigExit();
|
||||
void sigTryLogin();
|
||||
void sigStartOffline();
|
||||
|
||||
private slots:
|
||||
void on_settingsButton_clicked();
|
||||
void on_languageComboBox_activated(const QString &arg1);
|
||||
void slotDisableNotify();
|
||||
void on_exitButton_clicked();
|
||||
void on_offlineStartButton_clicked();
|
||||
void on_unsafeChangingButton_clicked();
|
||||
void slotDisableNotify();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
MyWinHeader *header;
|
||||
UpdateNotifyWidget *updateWidget;
|
||||
CommonButtonGroupWidget *commonButtonGroupWidget;
|
||||
EntryWidget *entryWidget;
|
||||
VersionSelectWidget *versionSelectWidget;
|
||||
WaitAnimationWidget *waitAnimationWidget;
|
||||
InstructorButtonGroupWidget *instructorButtonGroup;
|
||||
|
||||
QTranslator translator;
|
||||
TCPClient *client;
|
||||
DataParser *dataParser;
|
||||
DataParserOutput *dataParserOutput;
|
||||
UpdateController *updateController;
|
||||
RecognizeSystem *recognizeSystem;
|
||||
ScreenChecker *screenChecker;
|
||||
ExternalExecuter *externalExecuter;
|
||||
SendSystem *sendSystem;
|
||||
HashComparer *hashComparer;
|
||||
VersionContainer *versionContainer;
|
||||
ResourceManager *resourceManager;
|
||||
NotifyController *notifyController;
|
||||
PostProcessorSystem *postProcessorSystem;
|
||||
|
||||
QThread *workerThread;
|
||||
QThread *animationThread;
|
||||
QTimer *timer;
|
||||
QList<FileData> *updateList;
|
||||
QPixmap _background;
|
||||
QPixmap background;
|
||||
QRect bottomRightPosition;
|
||||
QRect offlinePosition;
|
||||
|
||||
int fileCountForUpdate;
|
||||
int filesLoaded;
|
||||
bool isRecovery;
|
||||
|
||||
void checkAppAvailable();
|
||||
void checkLanguage(QString language);
|
||||
void autoStart();
|
||||
void loadStaticData();
|
||||
void bindClient();
|
||||
void createObjects();
|
||||
void showConnectionEmpty();
|
||||
void setTitle();
|
||||
void bindConnection();
|
||||
void setUpUi();
|
||||
void commonWidgetState();
|
||||
|
||||
void setServerVersion(StreamingVersionData *version);
|
||||
void paintEvent(QPaintEvent *event);
|
||||
protected:
|
||||
virtual void keyPressEvent(QKeyEvent *event);
|
||||
|
||||
Reference in New Issue
Block a user