Перед внедрением списочной модели БД в GUI

This commit is contained in:
krivoshein
2024-12-10 10:27:00 +03:00
parent e6da40c4e7
commit 4556c07fc9
96 changed files with 1044 additions and 444 deletions

View File

@@ -46,7 +46,7 @@ bool ConnectorToServer::deAuthorizationInstructorLocal(QString login)
return true;
}
bool ConnectorToServer::queryGetListInstructors()
bool ConnectorToServer::sendQueryToDB(TypeQueryToDB typeQuery)
{
if (!client->getIsConnected())
{
@@ -54,10 +54,12 @@ bool ConnectorToServer::queryGetListInstructors()
}
ClientQueryToDB *queryToDB = new ClientQueryToDB;
queryToDB->typeQuery = TypeQueryToDB::TYPE_QUERY_GET_LIST_INSTRUCTORS;
queryToDB->typeQuery = typeQuery;
dataParser->createQueryToDBMessage(queryToDB);
emit sigSendQueryToDB();
return true;
}
QList<Instructor> ConnectorToServer::getListInstructors()
@@ -65,10 +67,24 @@ QList<Instructor> ConnectorToServer::getListInstructors()
return listInstructors;
}
void ConnectorToServer::slot_AnswerQueryToDB(QList<Instructor>* listInstructors)
QList<Trainee> ConnectorToServer::getListTrainees()
{
return listTrainees;
}
QList<Group> ConnectorToServer::getListGroups()
{
return listGroups;
}
void ConnectorToServer::slot_AnswerQueryToDB(QList<Instructor>* listInstructors,
QList<Trainee>* listTrainees,
QList<Group>* listGroups)
{
this->listInstructors = *listInstructors;
emit signal_UpdateDB(true, false);
this->listTrainees = *listTrainees;
this->listGroups = *listGroups;
emit signal_UpdateDB(true, true);
}
void ConnectorToServer::initialize()