mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
refact1
This commit is contained in:
123
LibInstructorsAndTrainees/instructorsandtraineeswidget.h
Normal file
123
LibInstructorsAndTrainees/instructorsandtraineeswidget.h
Normal file
@@ -0,0 +1,123 @@
|
||||
#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"
|
||||
#include "dialogauthorization.h"
|
||||
#include "instructor.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_ErrorAuth(QString error);
|
||||
void slot_SetVersion(StreamingVersionData* serverVersion);
|
||||
|
||||
//Слот обработки результата подключения к серверу
|
||||
void slot_ConnectedToServer(bool state);
|
||||
|
||||
void slot_traineeSelected(int id_trainee);
|
||||
void slot_instructorSelected(int id_instructor);
|
||||
|
||||
void slot_AnswerDocsChanged();
|
||||
|
||||
void slot_TryConnectToServer();
|
||||
|
||||
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(Instructor& instructor);
|
||||
void updateLabelServer();
|
||||
void setLanguageInterfase();
|
||||
|
||||
private:
|
||||
ConnectorToServer* connectorToServer;
|
||||
|
||||
ViewerTrainees* viewerTrainees;
|
||||
ViewerInstructors* viewerInstructors;
|
||||
MessangerWidget* messangerWidget;
|
||||
MessangerController* messangerController;
|
||||
|
||||
DialogTasksCommon* dlgTasksCommon;
|
||||
DialogSettings* dlgSettings;
|
||||
DialogAuthorization* dlgAuthorization;
|
||||
|
||||
WaitAnimationWidget *waitAnimationWidget;
|
||||
|
||||
Instructor instructorLoggedInLocal;
|
||||
|
||||
bool flSettingsServerIsChanged;
|
||||
|
||||
bool flTryConnectToServer;
|
||||
int cntTryConnectToServer;
|
||||
|
||||
bool flTryLogin;
|
||||
|
||||
QTranslator qtLanguageTranslator;
|
||||
QString language;
|
||||
|
||||
Ui::InstructorsAndTraineesWidget *ui;
|
||||
};
|
||||
|
||||
#endif // INSTRUCTORSANDTRAINEESWIDGET_H
|
||||
Reference in New Issue
Block a user