#include "manufacturer.h" Manufacturer::Manufacturer() {} Manufacturer::~Manufacturer() {} QString Manufacturer::name() const { return _name; } void Manufacturer::setName(const QString &newName) { _name = newName; } void Manufacturer::fromJson(const QJsonObject &json) { setId(json["id"].toInt()); setName(json["name"].toString()); } QJsonObject Manufacturer::toJson() const { QJsonObject obj; obj["id"] = id(); obj["name"] = name(); return obj; }