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

Method toVariant

app/src/DataModel/NotificationCenter.cpp:350–359  ·  view source on GitHub ↗

* @brief Serializes an event to a QML-friendly variant map. */

Source from the content-addressed store, hash-verified

348 * @brief Serializes an event to a QML-friendly variant map.
349 */
350QVariantMap DataModel::NotificationCenter::toVariant(const Event& e) const
351{
352 QVariantMap m;
353 m.insert(QStringLiteral("timestamp"), e.timestampMs);
354 m.insert(QStringLiteral("level"), e.level);
355 m.insert(QStringLiteral("channel"), e.channel);
356 m.insert(QStringLiteral("title"), e.title);
357 m.insert(QStringLiteral("subtitle"), e.subtitle);
358 return m;
359}
360
361/**
362 * @brief Lazily creates the tray icon using the platform-agnostic logo.

Callers 14

handleToolsCallMethod · 0.80
setWidgetSettingMethod · 0.80
runOutputWidgetSampleFunction · 0.80
sourceConfigureMethod · 0.80
sourceSetPropertyMethod · 0.80
applyValidatedLicenseMethod · 0.80
jsonObjectToVariantMapFunction · 0.80
runMethod · 0.80
saveWidgetSettingMethod · 0.80

Calls

no outgoing calls

Tested by 1

evaluateMethod · 0.64