* @brief Implements setPlotPoints(n) for JS scripts. */
| 270 | * @brief Implements setPlotPoints(n) for JS scripts. |
| 271 | */ |
| 272 | QVariantMap DataModel::DashboardBridge::setPlotPoints(const QJSValue& pointsVal) |
| 273 | { |
| 274 | if (!pointsVal.isNumber()) |
| 275 | return makeJsResult(false, QStringLiteral("setPlotPoints: points must be a number")); |
| 276 | |
| 277 | QString errorMsg; |
| 278 | const bool ok = coreSetPlotPoints(static_cast<int>(pointsVal.toInt()), errorMsg); |
| 279 | return makeJsResult(ok, errorMsg); |
| 280 | } |
| 281 | |
| 282 | /** |
| 283 | * @brief Shared body for the four JS visibility setters. |
no test coverage detected