Added reporting support- depends on LimeReport.
This commit is contained in:
@@ -48,6 +48,11 @@ QStringList IMetaDataPlugin::dependsOn()
|
||||
return m_dependsOn;
|
||||
}
|
||||
|
||||
ReportList IMetaDataPlugin::reports()
|
||||
{
|
||||
return m_reports;
|
||||
}
|
||||
|
||||
void IMetaDataPlugin::init(const QJsonObject &metaData)
|
||||
{
|
||||
parseMetaData(metaData);
|
||||
@@ -105,6 +110,19 @@ void IMetaDataPlugin::parseMetaData(const QJsonObject &metaData)
|
||||
m_translations[key] = trLocalized.toObject()[key].toString();
|
||||
}
|
||||
}
|
||||
|
||||
QJsonValue repArray = data.toObject()["reports"];
|
||||
foreach (QJsonValue repVal, repArray.toArray()) {
|
||||
QJsonObject repObj = repVal.toObject();
|
||||
|
||||
ReportPtr report = ReportPtr(new Report());
|
||||
report->setName(repObj["name"].toString());
|
||||
report->setDescription(repObj["description"].toString());
|
||||
report->setListReport(repObj["listReport"].toBool());
|
||||
report->setFile(repObj["file"].toString());
|
||||
|
||||
m_reports.append(report);
|
||||
}
|
||||
}
|
||||
|
||||
QString IMetaDataPlugin::parseLocaleText(const QJsonObject &object)
|
||||
|
||||
Reference in New Issue
Block a user