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

Function widgetIdFor

app/src/API/Handlers/WorkspacesHandler.cpp:64–69  ·  view source on GitHub ↗

* @brief Builds the derived widgetId string for a workspace widget reference. */

Source from the content-addressed store, hash-verified

62 * @brief Builds the derived widgetId string for a workspace widget reference.
63 */
64[[nodiscard]] static QString widgetIdFor(int workspaceId, int widgetType, int groupId, int relIdx)
65{
66 const QString slug = API::EnumLabels::dashboardWidgetSlug(widgetType);
67 return QStringLiteral("ws%1:%2:g%3:%4")
68 .arg(QString::number(workspaceId), slug, QString::number(groupId), QString::number(relIdx));
69}
70
71/**
72 * @brief Outcome of parsing a widgetId string into its component fields.

Callers 5

refsToJsonFunction · 0.85
widgetAddMethod · 0.85
widgetRemoveMethod · 0.85
validateMethod · 0.85
cleanupMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected