#include "DataRow.h" #include "common.h" DataRow::DataRow() { } DataRow::~DataRow() {} QVariant DataRow::getValue(QString name) { for (int i = 0; i < colnum; i++) { if (colName[i].compare(name) == 0) return value[i]; } return ""; } void DataRow::toJson(json& jsonObj) { jsonObj["id"] = id; for (int i = 0; i < colnum; i++) { jsonObj[colName[i].toStdString()] = CommonHelper::qstringToUtf8(value[i].toString()); } }