mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
96 lines
2.6 KiB
C++
96 lines
2.6 KiB
C++
#ifndef MAINWINDOW_H
|
|
#define MAINWINDOW_H
|
|
|
|
#include <QMainWindow>
|
|
#include <QDebug>
|
|
#include <QHBoxLayout>
|
|
|
|
#include <Widgets/commonbuttongroupwidget.h>
|
|
#include <Widgets/updatenotifywidget.h>
|
|
#include <Widgets/entrywidget.h>
|
|
|
|
#include <Data/Datas.h>
|
|
#include <UI/resourcemanager.h>
|
|
#include "mywinheader.h"
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
namespace Ui { class MainWindow; }
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
class MainWindow : public QMainWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
MainWindow(QWidget *parent = nullptr);
|
|
~MainWindow(){};
|
|
|
|
void initialize(ResourceManager *resourceManager);
|
|
void addWidgetToChangeGroup(CommonButtonGroupWidget *commonWidgetGroup);
|
|
void addWidgetToInteractiveGroup(EntryWidget *entryWidget);
|
|
void setLoadSettings(Settings *serverSettings);
|
|
void setLoginSuccessState();
|
|
void setClientVersionName(const QString &versionName);
|
|
|
|
void loadToServer();
|
|
void undoCurrentChanges();
|
|
void disableUnsaveButton(bool flag);
|
|
void showMainFrame(bool flag);
|
|
void loadCompleteState();
|
|
void setInlineDebug(QString value);
|
|
bool getIsAutoStart();
|
|
void setNeedUpdateState(const QString ¬ifyText);
|
|
void setLastVersionState();
|
|
void showConnectionEmpty();
|
|
void showOfflineButton(bool flag);
|
|
void setStartOfflineButton(bool isAvailable);
|
|
void setStartState();
|
|
void serverNotifyShow(QString text, int durationMS = 3000);
|
|
void showError(ErrorsEnum errorNum);
|
|
|
|
QHBoxLayout *getDisplayLayout() const;
|
|
void serverBlockedState();
|
|
public slots:
|
|
void slotShowUpdateInfo();
|
|
void slotConnectionState(bool flag);
|
|
void slotServerDisconnect();
|
|
void slotCommonWidgetState();
|
|
void setServerVersion(StreamingVersionData *version);
|
|
|
|
void updateInitInformation(QString fullSize, QString currentSize);
|
|
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 on_exitButton_clicked();
|
|
void on_offlineStartButton_clicked();
|
|
void on_unsafeChangingButton_clicked();
|
|
void slotDisableNotify();
|
|
|
|
private:
|
|
Ui::MainWindow *ui;
|
|
ResourceManager *resourceManager;
|
|
EntryWidget *entryWidget;
|
|
|
|
QTimer *timer;
|
|
QPixmap background;
|
|
QRect bottomRightPosition;
|
|
QRect offlinePosition;
|
|
void bindClient();
|
|
void bindConnection();
|
|
void setUpUi();
|
|
|
|
void paintEvent(QPaintEvent *event);
|
|
protected:
|
|
virtual void keyPressEvent(QKeyEvent *event);
|
|
};
|
|
#endif // MAINWINDOW_H
|