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

Method setPlotPoints

app/src/DataModel/Scripting/DashboardApi.cpp:272–280  ·  view source on GitHub ↗

* @brief Implements setPlotPoints(n) for JS scripts. */

Source from the content-addressed store, hash-verified

270 * @brief Implements setPlotPoints(n) for JS scripts.
271 */
272QVariantMap 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.

Callers 2

prelude.jsFile · 0.80
SerialStudio.jsFile · 0.80

Calls 2

makeJsResultFunction · 0.85
coreSetPlotPointsFunction · 0.85

Tested by

no test coverage detected