mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-27 19:45:43 +03:00
112 lines
2.9 KiB
C++
112 lines
2.9 KiB
C++
#ifndef INTERFACEDATABASELMS_H
|
|
#define INTERFACEDATABASELMS_H
|
|
|
|
#include <QObject>
|
|
#include <QWidget>
|
|
#include <QTranslator>
|
|
|
|
#include "DataBaseLMS_global.h"
|
|
#include "databaselms.h"
|
|
|
|
class DATABASELMS_EXPORT InterfaceDataBaseLMS : public QObject, DataBaseLMS
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
InterfaceDataBaseLMS(QWidget *ownerWidget, QObject *parent = nullptr);
|
|
|
|
public Q_SLOTS:
|
|
void slot_LanguageChanged(QString language);
|
|
|
|
public:
|
|
//Соединение
|
|
bool connectionToDB();
|
|
bool disConnectionFromDB();
|
|
bool DBisConnected();
|
|
|
|
|
|
//Инструкторы
|
|
|
|
bool authorizationInstructor(QString login, QString password);
|
|
bool deAuthorizationInstructor(QString login);
|
|
bool deAuthorizationAllInstructors();
|
|
|
|
QString getNameInstructorByLogin(QString login);
|
|
int getIdInstructorByLogin(QString login);
|
|
|
|
QList<Instructor> getListInstructors();
|
|
Instructor getInstructor(int id);
|
|
|
|
int newInstructor();
|
|
int delInstructor(int id);
|
|
int editInstructor(Instructor instructor);
|
|
|
|
bool isAdminInstructor(int id);
|
|
bool isArchivedInstructor(int id);
|
|
bool isLoggedInInstructor(int id);
|
|
|
|
|
|
//Обучаемые
|
|
|
|
bool authorizationTrainee(QString login, QString password, QString classroom_name, QString computer_name);
|
|
bool deAuthorizationTrainee(QString login);
|
|
bool deAuthorizationAllTrainees();
|
|
|
|
//Регистрация тайминга Обучаемого
|
|
int entryTraineeOnSimulator(int id_trainee);
|
|
int exitTraineeFromSimulator(int id_trainee);
|
|
|
|
QString getNameTraineeOnComputer(QString computer_name);
|
|
Trainee getTraineeOnComputer(QString computer_name);
|
|
|
|
QString getNameTraineeByLogin(QString login);
|
|
int getIdTraineeByLogin(QString login);
|
|
|
|
QList<Trainee> getListTraineesInGroup(int id);
|
|
QList<Group> getListGroups();
|
|
QList<Trainee> getListTrainees();
|
|
Trainee getTrainee(int id);
|
|
|
|
int newTrainee(int id_group);
|
|
int delTrainee(int id);
|
|
int editTrainee(Trainee trainee);
|
|
|
|
bool isArchivedTrainee(int id);
|
|
bool isLoggedInTrainee(int id);
|
|
|
|
|
|
//Группы
|
|
|
|
Group getGroup(int group_id);
|
|
int newGroup();
|
|
int delGroup(int id);
|
|
int editGroup(Group group);
|
|
|
|
|
|
//Задачи
|
|
|
|
int newTaskAMM(TaskAmmFim task, int id_trainee);
|
|
int delTaskAMM(int id);
|
|
int editTaskAMM(TaskAmmFim task);
|
|
|
|
QList<TaskAmmFim> getListTasksAMMofTrainee(int id_trainee);
|
|
QList<TaskAmmFim> getListTasksFIMofTrainee(int id_trainee);
|
|
|
|
TaskAmmFim getTaskAMMbyID(int id_task);
|
|
TaskAmmFim getTaskFIMbyID(int id_task);
|
|
|
|
int newTaskFIM(TaskAmmFim task, int id_trainee);
|
|
int delTaskFIM(int id);
|
|
int editTaskFIM(TaskAmmFim task);
|
|
int replaceReportFIM(TaskAmmFim task);
|
|
int changeStatusTaskFIM(int id_task, QString status);
|
|
int changeStatusTaskAMM(int id_task, QString status);
|
|
|
|
private:
|
|
QTranslator qtLanguageTranslator;
|
|
QWidget* ownerWidget;
|
|
//QMutex mtxAccess;
|
|
};
|
|
|
|
#endif // INTERFACEDATABASELMS_H
|