76 lines
1.8 KiB
C
76 lines
1.8 KiB
C
|
#ifndef DEVICEMODEL_H
|
||
|
#define DEVICEMODEL_H
|
||
|
|
||
|
#include <QString>
|
||
|
#include <QList>
|
||
|
#include <QJsonArray>
|
||
|
|
||
|
#include "baseentity.h"
|
||
|
#include "devicestructureelement.h"
|
||
|
|
||
|
class DeviceModel : public BaseEntity
|
||
|
{
|
||
|
public:
|
||
|
DeviceModel();
|
||
|
virtual ~DeviceModel();
|
||
|
|
||
|
QString name() const;
|
||
|
void setName(const QString &newName);
|
||
|
|
||
|
QString description() const;
|
||
|
void setDescription(const QString &newDescription);
|
||
|
|
||
|
int workEfficiency() const;
|
||
|
void setWorkEfficiency(int newWorkEfficiency);
|
||
|
|
||
|
int reliability() const;
|
||
|
void setReliability(int newReliability);
|
||
|
|
||
|
int energyEfficiency() const;
|
||
|
void setEnergyEfficiency(int newEnergyEfficiency);
|
||
|
|
||
|
int userFriendliness() const;
|
||
|
void setUserFriendliness(int newUserFriendliness);
|
||
|
|
||
|
int durability() const;
|
||
|
void setDurability(int newDurability);
|
||
|
|
||
|
int aestheticQualities() const;
|
||
|
void setAestheticQualities(int newAestheticQualities);
|
||
|
|
||
|
int idType() const;
|
||
|
void setIdType(int newIdType);
|
||
|
|
||
|
QString nameType() const;
|
||
|
void setNameType(const QString &newNameType);
|
||
|
|
||
|
int idManuf() const;
|
||
|
void setIdManuf(int newIdManuf);
|
||
|
|
||
|
QString nameManuf() const;
|
||
|
void setNameManuf(const QString &newNameManuf);
|
||
|
|
||
|
QList<DeviceStructureElement> structureElements() const;
|
||
|
void setStructureElements(const QList<DeviceStructureElement> &newStructureElements);
|
||
|
|
||
|
void fromJson(const QJsonObject &json) override;
|
||
|
QJsonObject toJson() const override;
|
||
|
|
||
|
private:
|
||
|
QString _name = "";
|
||
|
QString _description = "";
|
||
|
int _workEfficiency = 0;
|
||
|
int _reliability = 0;
|
||
|
int _energyEfficiency = 0;
|
||
|
int _userFriendliness = 0;
|
||
|
int _durability = 0;
|
||
|
int _aestheticQualities = 0;
|
||
|
int _idType = 0;
|
||
|
QString _nameType = "";
|
||
|
int _idManuf = 0;
|
||
|
QString _nameManuf = "";
|
||
|
QList<DeviceStructureElement> _structureElements;
|
||
|
};
|
||
|
|
||
|
#endif // DEVICEMODEL_H
|