mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
68 lines
1.7 KiB
C++
68 lines
1.7 KiB
C++
#ifndef CONNECTORTOSERVER_H
|
|
#define CONNECTORTOSERVER_H
|
|
|
|
#include <QObject>
|
|
#include "Core\tcpclient.h"
|
|
#include "Core\dataparser.h"
|
|
#include "Core\sendsystem.h"
|
|
#include "Core\recognizesystem.h"
|
|
#include "instructor.h"
|
|
#include "trainee.h"
|
|
#include "group.h"
|
|
|
|
class ConnectorToServer : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit ConnectorToServer(QObject *parent = nullptr);
|
|
|
|
bool authorizationInstructorLocal(QString login, QString password);
|
|
bool deAuthorizationInstructorLocal(QString login);
|
|
|
|
bool sendQueryToDB(TypeQueryToDB typeQuery);
|
|
|
|
QList<Instructor> getListInstructors();
|
|
QList<Trainee> getListTrainees();
|
|
QList<Group> getListGroups();
|
|
|
|
public slots:
|
|
void slot_AnswerQueryToDB(QList<Instructor>* listInstructors,
|
|
QList<Trainee>* listTrainees,
|
|
QList<Group>* listGroups);
|
|
|
|
signals:
|
|
void sigSetConnect(ServerSettings* serverSettings,QThread *thread);
|
|
void sigInitializeClient(RecognizeSystem *recognizeSystem,
|
|
SendSystem *sendSystem,
|
|
QThread *thread);
|
|
void sigSendAutorization();
|
|
void sigSendDeAutorization();
|
|
|
|
void sigSendQueryToDB();
|
|
|
|
|
|
void sigLoginResult(ServerAuthorization * serverAuth);
|
|
void sigDeLoginResult(ServerDeAuthorization * serverDeAuth);
|
|
|
|
void signal_UpdateDB(bool treeInstructor, bool treeTrainee);
|
|
|
|
|
|
private:
|
|
void initialize();
|
|
void bindConnection();
|
|
void createObjects();
|
|
|
|
private:
|
|
QThread *connectionThread;
|
|
TCPClient *client;
|
|
DataParser *dataParser;
|
|
SendSystem *sendSystem;
|
|
RecognizeSystem *recognizeSystem;
|
|
|
|
QList<Instructor> listInstructors;
|
|
QList<Trainee> listTrainees;
|
|
QList<Group> listGroups;
|
|
};
|
|
|
|
#endif // CONNECTORTOSERVER_H
|