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

Function optionSlugForWidget

app/src/AI/ToolDispatcher.cpp:918–930  ·  view source on GitHub ↗

* @brief Maps a widget slug to the dataset option slug that enables that widget. */

Source from the content-addressed store, hash-verified

916 * @brief Maps a widget slug to the dataset option slug that enables that widget.
917 */
918static QString optionSlugForWidget(const QString& widgetType)
919{
920 static const QHash<QString, QString> kMap = {
921 { QStringLiteral("plot"), QStringLiteral("plot")},
922 { QStringLiteral("fft"), QStringLiteral("fft")},
923 { QStringLiteral("bar"), QStringLiteral("bar")},
924 { QStringLiteral("gauge"), QStringLiteral("gauge")},
925 { QStringLiteral("compass"), QStringLiteral("compass")},
926 { QStringLiteral("led"), QStringLiteral("led")},
927 {QStringLiteral("waterfall"), QStringLiteral("waterfall")},
928 };
929 return kMap.value(widgetType);
930}
931
932/**
933 * @brief Returns a trimmed dataset array carrying only fields the assistant needs.

Callers 1

executeAddTileFunction · 0.85

Calls 1

valueMethod · 0.45

Tested by

no test coverage detected