mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
feat: change message and contac list attribute
This commit is contained in:
@@ -27,6 +27,7 @@ add_library(DataBaseLMS SHARED
|
||||
typeQueryToDB.h
|
||||
timingoftrainee.cpp
|
||||
timingoftrainee.h
|
||||
contactModel.h
|
||||
)
|
||||
|
||||
target_link_libraries(DataBaseLMS PRIVATE Qt5::Widgets)
|
||||
|
||||
52
DataBaseLMS/contactModel.h
Normal file
52
DataBaseLMS/contactModel.h
Normal file
@@ -0,0 +1,52 @@
|
||||
#ifndef CONTACTMODEL_H
|
||||
#define CONTACTMODEL_H
|
||||
|
||||
#include "instructor.h"
|
||||
#include "trainee.h"
|
||||
#include "user.h"
|
||||
|
||||
class ContactModel
|
||||
{
|
||||
public:
|
||||
ContactModel(Instructor instructor)
|
||||
{
|
||||
login = instructor.getLogin();
|
||||
name = instructor.getName();
|
||||
type = 0;
|
||||
loggedIn = instructor.getLoggedIn();
|
||||
id = instructor.getID();
|
||||
};
|
||||
|
||||
ContactModel(Trainee trainee)
|
||||
{
|
||||
login = trainee.getLogin();
|
||||
name = trainee.getName();
|
||||
type = 1;
|
||||
loggedIn = trainee.getLoggedIn();
|
||||
id = trainee.getID();
|
||||
}
|
||||
|
||||
void setType(int type){this->type = type;}
|
||||
int getType(){return type;}
|
||||
|
||||
void setName(QString name){this->name = name;}
|
||||
QString getName(){return name;}
|
||||
|
||||
void setLoggedIn(bool loggedIn){this->loggedIn = loggedIn;}
|
||||
bool getLoggedIn(){return loggedIn;}
|
||||
|
||||
void setLogin(QString login){this->login = login;}
|
||||
QString getLogin(){return login;}
|
||||
|
||||
void setID(int id){this->id = id;}
|
||||
int getID(){return id;}
|
||||
|
||||
private:
|
||||
QString login;
|
||||
QString name;
|
||||
bool loggedIn;
|
||||
int type;
|
||||
int id;
|
||||
};
|
||||
|
||||
#endif // CONTACTMODEL_H
|
||||
Reference in New Issue
Block a user