mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-27 19:45:43 +03:00
126 lines
3.4 KiB
C++
126 lines
3.4 KiB
C++
#ifndef INSTRUCTORSANDTRAINEESWIDGET_H
|
||
#define INSTRUCTORSANDTRAINEESWIDGET_H
|
||
|
||
#include <QWidget>
|
||
#include <QTranslator>
|
||
#include "instructorsAndTrainees_global.h"
|
||
#include "viewertrainees.h"
|
||
#include "viewerinstructors.h"
|
||
#include "messangerwidget.h"
|
||
#include "messangercontroller.h"
|
||
#include "connectortoserver.h"
|
||
#include "metatypes.h"
|
||
#include "dialogtaskscommon.h"
|
||
#include "dialogsettings.h"
|
||
|
||
|
||
namespace Ui {
|
||
class InstructorsAndTraineesWidget;
|
||
}
|
||
|
||
class INSTRUCTORSANDTRAINEES_EXPORT InstructorsAndTraineesWidget : public QWidget
|
||
{
|
||
Q_OBJECT
|
||
|
||
public:
|
||
explicit InstructorsAndTraineesWidget(QWidget *parent = nullptr);
|
||
~InstructorsAndTraineesWidget();
|
||
|
||
public:
|
||
static const QString languageENG;
|
||
static const QString languageRUS;
|
||
|
||
public:
|
||
QString getLanguage();
|
||
|
||
private:
|
||
void changeEvent(QEvent * event) override;
|
||
void resizeEvent(QResizeEvent *event) override;
|
||
|
||
private:
|
||
void updateMyStyleSheet();
|
||
QString loadStyleSheet();
|
||
|
||
public Q_SLOTS:
|
||
//Слот обработки смены языка
|
||
void slot_LanguageChanged(QString language);
|
||
//Слот обработки смены стиля
|
||
void slot_UpdateStyleSheet();
|
||
|
||
//Слот обработки результата авторизации
|
||
void slot_checkLoginResult(ServerAuthorization * serverAuth);
|
||
//Слот обработки результата деавторизации
|
||
void slot_checkDeLoginResult(ServerDeAuthorization * serverDeAuth);
|
||
|
||
void slot_ServerBlocked();
|
||
|
||
//Слот обработки результата подключения к серверу
|
||
void slot_ConnectedToServer(bool state);
|
||
|
||
void slot_traineeSelected(int id_trainee);
|
||
void slot_instructorSelected(int id_instructor);
|
||
|
||
void slot_AnswerDocsChanged();
|
||
|
||
void slot_ConnectToServer();
|
||
|
||
Q_SIGNALS:
|
||
//сигнал смены языка
|
||
void signal_LanguageChanged(QString language);
|
||
//сигнал о необходимости обновления интерфейса
|
||
void signal_NeedUpdateUI(bool treeInstructor, bool treeTrainee);
|
||
|
||
private Q_SLOTS:
|
||
void on_btnConnectionToServer_clicked();
|
||
void on_btnAuthorizationInstructor_clicked();
|
||
void on_btnSettings_clicked();
|
||
void on_btnEditorTrainees_clicked();
|
||
void on_btnEditorInstructors_clicked();
|
||
|
||
void on_btnPersonalCard_clicked();
|
||
|
||
void on_btnTasksCommon_clicked();
|
||
|
||
private:
|
||
//Авторизация инструктора локальная (на ГУИ)
|
||
bool authorizationInstructorDialog(QWidget* parent = nullptr);
|
||
bool deAuthorizationInstructor(QString login);
|
||
bool authorizationIsCompleted();
|
||
void updateLabelLoggedInInstructor(QString login, QString name);
|
||
void updateLabelServer();
|
||
|
||
void setLanguageInterfase();
|
||
|
||
private:
|
||
WaitAnimationWidget *waitAnimationWidget;
|
||
|
||
ConnectorToServer* connectorToServer;
|
||
|
||
ViewerTrainees* viewerTrainees;
|
||
ViewerInstructors* viewerInstructors;
|
||
MessangerWidget* messangerWidget;
|
||
MessangerController* messangerController;
|
||
|
||
DialogTasksCommon* dlgTasksCommon;
|
||
DialogSettings* dlgSettings;
|
||
|
||
bool adminMode;
|
||
QString loginInstructorLoggedInLocal;
|
||
QString nameInstructorLoggedInLocal;
|
||
QString idInstructorLoggedInLocal;
|
||
|
||
QTranslator qtLanguageTranslator;
|
||
QString language;
|
||
|
||
bool flSettingsServerIsChanged;
|
||
|
||
bool flTryConnectToServer;
|
||
int cntTryConnectToServer;
|
||
|
||
bool flTryLogin;
|
||
|
||
Ui::InstructorsAndTraineesWidget *ui;
|
||
};
|
||
|
||
#endif // INSTRUCTORSANDTRAINEESWIDGET_H
|