Files
RRJServer/DB_IaT/InstructorsAndTrainees/instructorsandtraineeswidget.h
krivoshein 3ed2b5f5d1 styleSheet
2024-12-18 14:53:12 +03:00

88 lines
2.6 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#ifndef INSTRUCTORSANDTRAINEESWIDGET_H
#define INSTRUCTORSANDTRAINEESWIDGET_H
#include <QWidget>
#include <QTranslator>
#include "instructorsAndTrainees_global.h"
#include "viewertrainees.h"
#include "viewerinstructors.h"
#include "messangerwidget.h"
#include "doctaskswidget.h"
#include "connectortoserver.h"
Q_DECLARE_METATYPE(QList<Instructor>)
Q_DECLARE_METATYPE(QList<Trainee>)
Q_DECLARE_METATYPE(QList<Group>)
Q_DECLARE_METATYPE(QList<Computer>)
Q_DECLARE_METATYPE(QList<Classroom>)
Q_DECLARE_METATYPE(QList<Task>)
namespace Ui {
class InstructorsAndTraineesWidget;
}
class INSTRUCTORSANDTRAINEES_EXPORT InstructorsAndTraineesWidget : public QWidget
{
Q_OBJECT
public:
explicit InstructorsAndTraineesWidget(QWidget *parent = nullptr);
~InstructorsAndTraineesWidget();
private:
void changeEvent(QEvent * event) override;
public:
void updateMyStyleSheet();
private:
QString loadStyleSheet();
public Q_SLOTS:
//Слот обработки смены языка
void slot_LanguageChanged(QString language);
//Слот обработки результата авторизации
void checkLoginResult(ServerAuthorization * serverAuth);
//Слот обработки результата деавторизации
void checkDeLoginResult(ServerDeAuthorization * serverDeAuth);
void slot_ConnectedToServer(bool state);
Q_SIGNALS:
//сигнал об изменении языка интерфейса
void signal_LanguageChanged(QString language);
//сигнал о необходимости обновления интерфейса
void signal_NeedUpdateUI(bool treeInstructor, bool treeTrainee);
//сигнал о блокировке авторизации
void signal_BlockAutorization(bool block);
private Q_SLOTS:
void on_btnConnectionToServer_clicked();
void on_btnAuthorizationInstructor_clicked();
void on_btnUpdateStyleSheet_clicked();
private:
//Авторизация инструктора локальная
bool authorizationInstructorDialog(QWidget* parent = nullptr);
bool deAuthorizationInstructor(QString login);
bool authorizationIsCompleted();
void updateLabelLoggedInInstructor(QString login, QString name);
private:
Ui::InstructorsAndTraineesWidget *ui;
ConnectorToServer* connectorToServer;
ViewerTrainees* viewerTrainees;
ViewerInstructors* viewerInstructors;
MessangerWidget* messangerWidget;
DocTasksWidget* docTasksWidget;
bool adminMode;
QString loginInstructorLoggedInLocal;
QString nameInstructorLoggedInLocal;
QTranslator qtLanguageTranslator;
};
#endif // INSTRUCTORSANDTRAINEESWIDGET_H