MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / getStatus

Method getStatus

app/src/API/Handlers/ProjectHandler.cpp:1656–1673  ·  view source on GitHub ↗

* @brief Get project status */

Source from the content-addressed store, hash-verified

1654 * @brief Get project status
1655 */
1656API::CommandResponse API::Handlers::ProjectHandler::getStatus(const QString& id,
1657 const QJsonObject& params)
1658{
1659 Q_UNUSED(params)
1660
1661 auto& project = DataModel::ProjectModel::instance();
1662
1663 QJsonObject result;
1664 result[QStringLiteral("title")] = project.title();
1665 result[QStringLiteral("filePath")] = project.jsonFilePath();
1666 result[QStringLiteral("modified")] = project.modified();
1667 result[QStringLiteral("groupCount")] = project.groupCount();
1668 result[QStringLiteral("datasetCount")] = project.datasetCount();
1669 result[QStringLiteral("actionCount")] = static_cast<int>(project.actions().size());
1670 result[QStringLiteral("containsCommercialFeatures")] = project.containsCommercialFeatures();
1671
1672 return CommandResponse::makeSuccess(id, result);
1673}
1674
1675/**
1676 * @brief Add group

Callers

nothing calls this directly

Calls 7

titleMethod · 0.80
modifiedMethod · 0.80
datasetCountMethod · 0.80
actionsMethod · 0.80
groupCountMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected