* @brief Get project status */
| 1654 | * @brief Get project status |
| 1655 | */ |
| 1656 | API::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 |
nothing calls this directly
no test coverage detected