mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
92 lines
2.3 KiB
C++
92 lines
2.3 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*/QWidget, DataBaseLMS
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
InterfaceDataBaseLMS(QWidget* 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);
|
|
|
|
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();
|
|
|
|
//void setTasks(QString login, QStringList tasks);
|
|
QList<Task> getTasksTrainee(int id);
|
|
|
|
QString getNameTraineeOnComputer(QString computer_name);
|
|
Trainee getTraineeOnComputer(QString computer_name);
|
|
|
|
QString getNameTraineeByLogin(QString login);
|
|
|
|
QList<Trainee> getListTraineesInGroup(int id);
|
|
QList<Group> getListGroups();
|
|
QList<Trainee> getListTrainees();
|
|
|
|
Trainee getTrainee(int id);
|
|
Group getGroup(int group_id);
|
|
|
|
int newGroup();
|
|
int delGroup(int id);
|
|
int editGroup(Group group);
|
|
|
|
int newTaskAMM(int id_trainee);
|
|
int delTaskAMM(int id);
|
|
int editTaskAMM(TaskAmmFim task);
|
|
|
|
int newTaskFIM(int id_trainee);
|
|
int delTaskFIM(int id);
|
|
int editTaskFIM(TaskAmmFim task);
|
|
|
|
int newTrainee(int id_group);
|
|
int delTrainee(int id);
|
|
int editTrainee(Trainee trainee);
|
|
|
|
bool isArchivedTrainee(int id);
|
|
bool isLoggedInTrainee(int id);
|
|
|
|
private:
|
|
QTranslator qtLanguageTranslator;
|
|
};
|
|
|
|
#endif // INTERFACEDATABASELMS_H
|